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

Using optional keywords and non-uniform syntax

    XMLWordPrintableJSON

Details

    • Icon: Change Request Change Request
    • Resolution: Not Persuasive with Modification
    • Icon: High High
    • Shorthand (FHIR)
    • 0.12.0 [deprecated]
    • FHIR Infrastructure
    • Language Reference
    • 3.1.10.4
    • Hide

      The voter's suggestion was to create a fictional "units" element on Quantities.

      * myQuantity.units = UCUM#mm "millimeters" 

      instead of the current syntactic sugar for setting the units of Quantities:

      * myQuantity units = UCUM#mm "millimeters" 

      We believe this would be confusing, especially because valueQuantity.unit is a valid path.

      FSH users were polled on our 6/11/2020 call, and the consensus was to not offer any special syntax intended to "paper over" the way FHIR defines Quantity. Therefore, the proposed resolution is to remove the following "special" syntax from the FSH language:

      * myQuantity units = UCUM#mm "millimeters"

      What remains would be:

      * myQuantity from UnitsOfMeasureVS

      * myQuantity =  UCUM#mm "millimeters"

      * myQuantity = 22.0 'mm'

       

      Show
      The voter's suggestion was to create a fictional "units" element on Quantities. * myQuantity.units = UCUM#mm "millimeters"  instead of the current syntactic sugar for setting the units of Quantities: * myQuantity units = UCUM#mm "millimeters"  We believe this would be confusing, especially because valueQuantity.unit is a valid path. FSH users were polled on our 6/11/2020 call, and the consensus was to not offer any special syntax intended to "paper over" the way FHIR defines Quantity. Therefore, the proposed resolution is to remove the following "special" syntax from the FSH language: * myQuantity units = UCUM#mm "millimeters" What remains would be: * myQuantity from UnitsOfMeasureVS * myQuantity =  UCUM#mm "millimeters" * myQuantity = 22.0 'mm'  
    • Kramer/Rhodes: 14-0-0
    • Correction
    • Non-compatible

    Description

      Although to some it may appear as a nice simplification, I shall strongly discorage using optional keywords that do not add to the semantical meaning of the expression.

      For a language it is important to be clearly understandable and easily learnable, and readable. Therefore, I would strongly suggest either making the keyword "units" non-optional but explicit or alternatively not using it at all. Please do not artificially increase the language complexity.

      Moreover, as it is now, the syntax does not seem to be uniform any more. E.g. compare the two rules:
      * valueQuantity\.value = 55\.0
      and
      * valueQuantity units = UCUM#mm "millimeters"
      I would much rather like having
      * valueQuantity\.units = UCUM#mm "millimeters"
      instead, as for me units can be seen as an attribute\. On that note, the binding to externally defined units:
      _* valueQuantity units from http://hl7\.org/fhir/ValueSet/distance-units_
      would be better uniformly re-written as
      _* valueQuantity\.units = http://hl7\.org/fhir/ValueSet/distance-units_

      Existing Wording:

      Note: Use of the word units is suggested for clarity, but is optional.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ivan_zapreev Ivan Zapreev (Inactive)
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: