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

Improve implicit conversions to quantity values

    XMLWordPrintableJSON

Details

    • Icon: Change Request Change Request
    • Resolution: Not Persuasive with Modification
    • Icon: Medium Medium
    • Clinical Quality Language (FHIR)
    • 1.5 [deprecated]
    • Clinical Decision Support
    • Developers Guide
    • Hide

      Because it is not always the case that units can be correctly inferred from context (i.e. the user may have intended to have different units in the first argument), this should not be done.

      Note that because the example will result in a run-time, rather than compile-time error, add discussion about this case and that implementation environments should make use of unit conversion validation to help warn users at compile-time when this situation occurs.

      The minimum viable would be to simply provide warnings whenever the implicit conversion from integer/decimal to quantity results in a quantity with a default unit.

      Show
      Because it is not always the case that units can be correctly inferred from context (i.e. the user may have intended to have different units in the first argument), this should not be done. Note that because the example will result in a run-time, rather than compile-time error, add discussion about this case and that implementation environments should make use of unit conversion validation to help warn users at compile-time when this situation occurs. The minimum viable would be to simply provide warnings whenever the implicit conversion from integer/decimal to quantity results in a quantity with a default unit.
    • Chris Moesel/Rob McClure: 12-0-0
    • Clarification
    • Non-substantive

    Description

      Consider enhancing implicit conversion to quantity values to include units that may be inferrable from context. For example:

      ```
      MedicationRequest.expectedSupplyDuration between 30 and 60 days
      ```

      The natural language interpretation of this implies the lower boundary of the between is 30 days as well, but the translator does not include unit inference in quantity-valued implicit conversions.

      Attachments

        Activity

          People

            Unassigned Unassigned
            bryn.rhodes Bryn Rhodes
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: