Closed robeastwood-agency closed 4 years ago
Work is in progress to fix this invariant FHIRPath expression. The existing invariant will be merged with an invariant to add missing constraints on the type of Reference and placed on the root DocumentReference level.
Existing invariant description and the FHIRPath expression have been updated to include constraint on the type of Reference, and moved to the DocumentReference root level: inv-dh-docref-05: If present, an authoring role shall at least have a reference that conforms to PractitionerRole with Practitioner with Mandatory Identifier or an identifier with at least a system and a value (: extension('http://hl7.org.au/fhir/StructureDefinition/author-role').exists() implies extension('http://hl7.org.au/fhir/StructureDefinition/author-role').valueReference.reference.resolve().conformsTo('http://ns.electronichealth.net.au/ci/fhir/3.0/StructureDefinition/practitionerrole-withpractitionerident-1') or extension('http://hl7.org.au/fhir/StructureDefinition/author-role').valueReference.identifier.where(system.count() + value.count() >1).exists())
Prerequisites
The bug
In the Advance Care Planning Document Reference profile (documentreference-acp-1), the invariant on the optional extension DocumentReference.extension:AuthorRole has a faulty FHIRPath expression. The consequence of which is that acceptable content for this element always fails to be valid against these invariants.
The invariant is iinv-dh-docref-03: "A practitioner role shall conform to PractitionerRole with Practitioner with Mandatory Identifier" with the FHIRPath expression of
What I expected to happen
Acceptable content for this element shall be valid against these invariants. Unacceptable content for this element shall not be valid against these invariants.
The fix
The correct (and simplified) FHIRPath is:
Screenshots
N/A
Workarounds
N/A
QA.html excerpt
N/A
Desktop (please complete the following information):
N/A
Additional context
N/A