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

Warn about locale inconsistencies with case-insensitive code comparisons

    XMLWordPrintableJSON

Details

    • Icon: Change Request Change Request
    • Resolution: Persuasive
    • Icon: Medium Medium
    • FHIR Core (FHIR)
    • R5
    • Terminology Infrastructure
    • CodeSystem
    • 4.8.19
    • Hide

      Resolution to be applied here:  http://build.fhir.org/codesystem-definitions.html#CodeSystem.caseSensitive 

      Change the comment text in the definition of CodeSystem.caseInsensitive from this:

      If this value is missing, then it is not specified whether a code system is case sensitive or not. When the rule is not known, Postel's law should be followed: produce codes with the correct case, and accept codes in any case. This element is primarily provided to support validation software.

      to this (adding the text in red font):

      If this value is missing, then it is not specified whether a code system is case sensitive or not. When the rule is not known, Postel's law should be followed: produce codes with the correct case, and accept codes in any case. This element is primarily provided to support validation software. Case-insensitive comparisons do not take locale into account, and will result in unsatisfactory results for certain locales. Character case definitions and conversions are out of scope for the FHIR standard, and the results of such operations are implementation dependent.

      Show
      Resolution to be applied here:   http://build.fhir.org/codesystem-definitions.html#CodeSystem.caseSensitive   Change the comment text in the definition of CodeSystem.caseInsensitive from this: If this value is missing, then it is not specified whether a code system is case sensitive or not. When the rule is not known, Postel's law should be followed: produce codes with the correct case, and accept codes in any case. This element is primarily provided to support validation software. to this (adding the text in red font): If this value is missing, then it is not specified whether a code system is case sensitive or not. When the rule is not known, Postel's law should be followed: produce codes with the correct case, and accept codes in any case. This element is primarily provided to support validation software. Case-insensitive comparisons do not take locale into account, and will result in unsatisfactory results for certain locales. Character case definitions and conversions are out of scope for the FHIR standard, and the results of such operations are implementation dependent.
    • Reuben Daniels/Marc Duteau: 4-0-0
    • Clarification
    • Non-substantive

    Description

      I think we should explicitly state in the Comments that character case definitions and conversions are out of scope for the FHIR standard, and thus the results of doing a case-insensitive code comparison are implementation dependent. This isn't an issue in the US realm with the ASCII character set, but character case handling varies widely in other locales. If the client and server have different locales configured, or the concept codes are in a different language, then results of case-insensitive code comparisons might not be what the user expects.
      In practice many FHIR servers are implemented using Java. The String.equalsIgnoreCase documentation explicitly warns about this issue.

      Attachments

        Activity

          People

            Unassigned Unassigned
            nradov Nick Radov
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: