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

The Shared Medicines List Composition and List reject author role with only an identifier #60

Closed RichardTON closed 4 years ago

RichardTON commented 4 years ago

Prerequisites

The bug

inv-dh-cmp-06 is currently failing instances of Shared Medicines List Authored by Practitioner that have an author role with only an identifier. This is too strict. We want to allow for logical identifiers only to pass.

inv-dh-lst-05 in List of Medicine Items with Change Information Authored by Practitioner has the same problem.

What I expected to happen

Instances of a Composition with an author role with only an identifier (with a system and a value) will not raise an error in the QA report. For example

        <extension
                   url="http://hl7.org.au/fhir/StructureDefinition/composition-author-role">
          <valueReference>
          <!--  logical reference to PractitionerRole  -->
            <identifier>
              <type>
                <coding>
                  <system value="http://hl7.org/fhir/v2/0203"/>
                  <code value="NPI"/>
                  <display value="National provider identifier"/>
                </coding>
                <text value="HPI-I"/>
              </type>
              <system value="http://ns.electronichealth.net.au/id/hi/hpii/1.0"/>
              <value value="8003619900041630"/>
            </identifier>
          </valueReference>
        </extension>

QA.html excerpt

Bundle/b50acc1e-3f4e-41d3-9c21-dda924adb210: Bundle.entry[0].resource.extension[0] error inv-dh-cmp-06: A practitioner role shall conform to PractitionerRole with Practitioner with Mandatory Identifier [valueReference.reference.resolve().conformsTo('http://ns.electronichealth.net.au/ci/fhir/3.0/StructureDefinition/practitionerrole-withpractitionerident-1')]

Desktop (please complete the following information):

RichardTON commented 4 years ago

In progress via https://jira.digitalhealth.gov.au/browse/CIFMM-3262. We intentionally want to allow for logical identifiers only to pass. This story will merge the functionality into inv-dh-cmp-01 / inv-dh-lst-03 so that this invariant enforces either a conforming reference or a conforming identifier. If we can't work out the FHIRPAth in time then retain the improved text but revert to original FHIRPath that only enforces a reference or a conforming identifier and raise a known issue.

RichardTON commented 4 years ago

Fixed in https://github.com/AuDigitalHealth/ci-fhir-stu3/commit/8135142d3a9b02705f0ec1c1f27e1e8d92c07a78#diff-80794f69a631479ea6c1e39e079c51ee