XMLWordPrintableJSON

    • Type: Change Request
    • Resolution: Persuasive
    • Priority: Medium
    • Shorthand (FHIR)
    • 0.12.0 [deprecated]
    • FHIR Infrastructure
    • Language Reference
    • Hide

      An explanation of the error checking enabled by using $ in alias names is in the Defining Aliases section:

       
      In contrast with other names in FSH (for profiles, extensions, etc.), alias names can optionally begin with a dollar sign ($). If you define an alias with a leading $, you are protected against misspellings. For example, if you choose the alias name `$RaceAndEthnicityCDC` and accidentally type `$RaceEthnicityCDC`, implementations can easily detect there is no alias by that name. However, if the alias is `RaceAndEthnicityCDC` and the misspelling is `RaceEthnicityCDC`, implementations do not know an alias is intended, and will look through FHIR Core and all dependent implementation guides for anything with that name or id, or in some contexts, assume it is a new item, with unpredictable results.

      Show
      An explanation of the error checking enabled by using $ in alias names is in the Defining Aliases section:   In contrast with other names in FSH (for profiles, extensions, etc.), alias names can optionally begin with a dollar sign ($). If you define an alias with a leading $, you are protected against misspellings. For example, if you choose the alias name `$RaceAndEthnicityCDC` and accidentally type `$RaceEthnicityCDC`, implementations can easily detect there is no alias by that name. However, if the alias is `RaceAndEthnicityCDC` and the misspelling is `RaceEthnicityCDC`, implementations do not know an alias is intended, and will look through FHIR Core and all dependent implementation guides for anything with that name or id, or in some contexts, assume it is a new item, with unpredictable results.
    • Moesel/Rhodes 11-0-1
    • Clarification
    • Non-substantive

      The specification indicates in this section (3.1.5) that "Choosing alias names beginning with $ allows for additional error checking." Searching through the spec for other references to this leads to the Defining Aliases topic, but it's not clear from that discussion what additional error-checking is enabled, or why it should/should not be used? The discussion implies it's a best-practice, but it's not clear why. Consider providing a specific example that makes clear why authors should use dollar-sign syntax when defining alias names.

      Existing Wording:

      Dollar-sign syntax with aliases

            Assignee:
            Unassigned
            Reporter:
            Bryn Rhodes
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: