hl7au/au-fhir-base

AU Base Patient - genderIdentity binding

Closed this issue · 1 comments

There is a technical problem with the way the binding is done, it should be on the extension, not the extension value.

Originally reported by @grahamegrieve in AU Base Patient - genderIdentity binding.

This issue was fixed via PR #812.

The issue and technical correction were assessed by @brettesler-ext and @dbojicic.

As externally defined extensions cannot have terminology applied directly to the extension by the IG referencing the extension, alternative solutions and considerations around each are listed below:

  1. adding an invariant on Patient resource to control genderIdentity extension terminology, triggering the same behaviour as the extensible binding
    • assessed as a suitable technical correction for the issue
    • aligns with the FHIRWG recommendation to use genderIdentity extension and local terminology
    • is as technical implementation of this recommendation using a different method in place of the original issue
  2. defining a local extension in AU Base IG and enforcing use of the local genderIdentity extension
    • assessed as not suitable as using a local extension would change the original intent as agreed by FHIRWG
    • would be considered as an option to be taken for FHIRWG discussion and agreement in case no other solution is identified
  3. defining a local extension in AU Base IG and enforcing genderIdentity extension to conform to the local one
    • assessed as not feasible technically

The correction was made implementing solution 1.
Changes made in AU Base Patient resource:

  • Remove Patient.genderIdentity extension value slice (with the binding)
<element id="Patient.extension:genderIdentity.valueCodeableConcept">
      <path value="Patient.extension.valueCodeableConcept" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <binding>
        <strength value="extensible" />
        <valueSet value="https://healthterminologies.gov.au/fhir/ValueSet/gender-identity-response-1" />
      </binding>
</element>
  • Add invariant to the Patient root element to require that genderIdentity value shall be a member of the Gender Identity Response value set if any of the codes within that value set can apply, making it effectively an extensible binding
<constraint>
  <key value="inv-pat-1" />
  <severity value="warning" />
  <human value="Gender identity shall be a member of the Gender Identity Response value set if any of the codes within that value set can apply" />
  <expression value="extension('http://hl7.org/fhir/StructureDefinition/patient-genderIdentity').empty() or extension('http://hl7.org/fhir/StructureDefinition/patient-genderIdentity').valueCodeableConcept.memberOf('https://healthterminologies.gov.au/fhir/ValueSet/gender-identity-response-1')"/>
  <source value="http://hl7.org.au/fhir/StructureDefinition/au-patient" />
</constraint> 

Minor related notes: