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

Patient.name invariant seems incorrect

    XMLWordPrintableJSON

Details

    • Icon: Technical Correction Technical Correction
    • Resolution: Persuasive
    • Icon: Medium Medium

    Description

      The invariant for Patient name in US Core seems to have a mismatch between `expression` and `xpath`

      The `xpath` is correct (expects a DAR extension on the name element if family and given are not present), but the `expression` seems to be looking for an extension on the root Patient resource, not the name element. I've verified this using a validator that sending JSON Patient containing a name without given or family throws an error unless the extension is at the root Patient; putting an extension on the name element does not work.

      Moreover, the error does not seem to throw on multiple names. Perhaps this is by design? If at least one name has a given or family, are the requirements met? Or is this invariant designed to apply to every name array entry?

                {
                  "key" : "us-core-6",
                  "severity" : "error",
                  "human" : "Either Patient.name.given and/or Patient.name.family SHALL be present or a Data Absent Reason Extension SHALL be present.",
                  "expression" : "(name.family.exists() or name.given.exists()) xor extension.where(url='http://hl7.org/fhir/StructureDefinition/data-absent-reason').exists()",
                  "xpath" : "(/f:name/f:extension/@url='http://hl7.org/fhir/StructureDefinition/data-absent-reason' and not(/f:name/f:family or /f:name/f:given)) or (not(/f:name/f:extension/@url='http://hl7.org/fhir/StructureDefinition/data-absent-reason') and (/f:name/f:family or /f:name/f:given))"
                } 

      Attachments

        Activity

          People

            Unassigned Unassigned
            benjamin Benjamin Flessner
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: