Closed robeastwood-agency closed 4 years ago
Work is underway to fix this invariant bug, essentially by rewriting it to be combined with another invariant (via #61).
This has been implemented via https://github.com/AuDigitalHealth/ci-fhir-stu3/commit/8fa64c59e0002fe6af45a11cb617eaef4f94740e
Specifically, the faulty invariant has been removed from the element Composition.extension:compositionAuthorRole
and combined into the root Composition element invariant; details are:
key: inv-dh-cmp-02: Description: The author 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 FHIRPath:
extension('http://hl7.org.au/fhir/StructureDefinition/composition-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/composition-author-role').valueReference.identifier.where(system.count() + value.count() >1).exists()
Prerequisites
The bug
The Event Summary composition (composition-es-1), the invariant on the mandatory extension Composition.extension:compositionAuthorRole 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 inv-dh-cmp-02: "A practitioner role shall conform to PractitionerRole with Practitioner with Mandatory Identifier" with the FHIRPath expression of
The following 6 existing examples in the ES FHIR IG are affected by this FHRPath:
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