Details
-
Technical Correction
-
Resolution: Persuasive
-
Medium
-
US Core (FHIR)
-
current
-
US Core Patient Profile
-
FHIR-37704 us-core-6 invariant
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
Issue Links
- duplicates
-
FHIR-37704 us-core-6 invariant
- Published
- relates to
-
FHIR-25249 Data Absent Reason on Patient.name conflicts with Invariant us-core-8
- Published