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

nsd-3 is always evaluated to "false" because of a string literal 'true'

    XMLWordPrintableJSON

Details

    • Icon: Change Request Change Request
    • Resolution: Retracted
    • Icon: Medium Medium
    • FHIR Core (FHIR)
    • R5
    • NamingSystem
    • Hide

      Retracted by submitter

      Show
      Retracted by submitter

    Description

      nsd-3 constraint in https://hl7.org/fhir/R5/namingsystem.html#invs starts with {{}}

      uniqueId.where(authoritative = 'true')

      {}'true' is a string literal and NamingSystem.uniqueId. authoritative property is boolean. Thus the comparison

       authoritative = 'true'

      }} is always evaluated to {{false as a boolean can't be implicitly converted to a string and vice versa(see https://hl7.org/fhirpath/N1/#conversion boolean <-> string requires an explicit conversion).

      To fix the nsd-3 expression 'true' needs to be replaced with true (without single quotes). So the final expression will look like

      uniqueId.where(authoritative = true).select(type.toString() & period.start.toString() & period.end.toString()).isDistinct()

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            bholyshevskyi@masslight.com BohdanHolyshevskyi
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: