Uploaded image for project: 'FHIR Specification Feedback'
  1. FHIR Specification Feedback
  2. FHIR-21606

calendar values are different from UCUM values - FHIRPath #65

    XMLWordPrintableJSON

Details

    • Icon: Change Request Change Request
    • Resolution: Persuasive with Modification
    • Icon: Medium Medium
    • FHIRPath (FHIR)
    • STU3
    • Implementable Technology Specifications
    • fluentpath
    • 6.7
    • Hide

      Agree that definite quantity time durations should not be used for calendar calculations.

      Agree that `1 year` should not be equal to `1 'a'`, and so on for all definite quantity time durations above seconds.

      Propose that the literal time durations be called "calendar durations" and represented as UCUM units using annotations:

      `1 year` is represented with the UCUM `1 '

      {year}

      '`

      `1 month` is represented with the UCUM `1 '

      {month}

      '`

      `1 day` is represented with the UCUM `1 '

      {day}

      `

      `1 hour` is represented with the UCUM `1 '

      {hour}

      '`

      `1 minute` is represented with the UCUM `1 '

      {minute}

      '`

      `1 second` is represented with the UCUM `1 '

      {second}

      '`

      Only the "second" is equal to the UCUM time unit 's'

      Equivalent returns true, i.e. `1 year ~ 1 'a'` is true

      Date/time arithmetic is an error for the UCUM time units above second, only supported for the annotated calendar durations above second. on the grounds that it's too easy to mistakenly use UCUM time units and think they are calendar durations.

      Still note that calendar duration date/time arithmetic above seconds truncates (ignores decimals)

      Date/time arithmetic with seconds includes decimals, so users that really want `+ 1 'a'` to mean + 365.25 days, can convert the days to seconds and perform the operation that way.

      dateTime + 1 'h' // error

      dateTime + (1 'h').toQuantity('s')

      Show
      Agree that definite quantity time durations should not be used for calendar calculations. Agree that `1 year` should not be equal to `1 'a'`, and so on for all definite quantity time durations above seconds. Propose that the literal time durations be called "calendar durations" and represented as UCUM units using annotations: `1 year` is represented with the UCUM `1 ' {year} '` `1 month` is represented with the UCUM `1 ' {month} '` `1 day` is represented with the UCUM `1 ' {day} ` `1 hour` is represented with the UCUM `1 ' {hour} '` `1 minute` is represented with the UCUM `1 ' {minute} '` `1 second` is represented with the UCUM `1 ' {second} '` Only the "second" is equal to the UCUM time unit 's' Equivalent returns true, i.e. `1 year ~ 1 'a'` is true Date/time arithmetic is an error for the UCUM time units above second, only supported for the annotated calendar durations above second. on the grounds that it's too easy to mistakenly use UCUM time units and think they are calendar durations. Still note that calendar duration date/time arithmetic above seconds truncates (ignores decimals) Date/time arithmetic with seconds includes decimals, so users that really want `+ 1 'a'` to mean + 365.25 days, can convert the days to seconds and perform the operation that way. dateTime + 1 'h' // error dateTime + (1 'h').toQuantity('s')
    • Bas van den Heuvel/Bryn Rhodes: 9-0-0
    • Correction
    • Non-substantive

    Description

      Comment:

      The list in the introduction seems to suggest that a year is simular to an 'a', and month and 'mo' . This is not the case.

      Summary:

      calendar values are different from UCUM values

      Attachments

        Activity

          People

            Unassigned Unassigned
            bvdh Bas van den Heuvel
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: