AuDigitalHealth / ci-fhir-stu3

Working drafts of HL7™ FHIR® Release 3 (STU) artefacts authored and maintained by the Clinical Informatics team at the Australian Digital Health Agency.
Other
11 stars 0 forks source link

SHS Composition profile has bug in invariant for AuthorRole extension #54

Closed robeastwood-agency closed 4 years ago

robeastwood-agency commented 4 years ago

Prerequisites

The bug

In the Shared health Summary composition profile (composition-shs-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-09: "A practitioner role shall conform to PractitionerRole with Practitioner with Mandatory Identifier" with the FHIRPath expression of

Composition.extension('http://hl7.org.au/fhir/StructureDefinition/composition-author-role').resolve().conformsTo('http://ns.electronichealth.net.au/ci/fhir/3.0/StructureDefinition/practitionerrole-withpractitionerident-1')

The following 7 existing examples in the SHS 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:

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()

Screenshots

N/A

Workarounds

N/A

QA.html excerpt

N/A

Desktop (please complete the following information):

N/A

Additional context

N/A

dbojicic-agency commented 4 years ago

Work is underway to fix this invariant bug.

dbojicic-agency commented 4 years ago

Invariant inv-dh-cmp-09 has been moved from Composition.extension:compositionAuthorRole to the root Composition level and updated to include rules on Reference data type (related to Shared Health Summary composition profile - missing constraints on elements with a Reference #62).

The updated invariant details are:

key: inv-dh-cmp-09: 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 expression: 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()