Skip to content

Commit

Permalink
Identify mhr patient emergency contacts by an extension on contact ra…
Browse files Browse the repository at this point in the history
…ther than an extension on contact.relationship
  • Loading branch information
RichardTON committed Jan 22, 2024
1 parent 6322594 commit c3bf53e
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 114 deletions.
12 changes: 6 additions & 6 deletions input/examples/patient-carer-mary-brown.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
<gender value="male"/>
<birthDate value="1939-08-25"/>
<contact>
<extension url="http://ns.electronichealth.net.au/fhir/StructureDefinition/dh-mhr-special-processing-1">
<valueCoding>
<system value="http://ns.electronichealth.net.au/fhir/CodeSystem/dh-mhr-special-processing-1"/>
<code value="emergency-contact"/>
</valueCoding>
</extension>
<relationship>
<extension url="http://ns.electronichealth.net.au/fhir/StructureDefinition/dh-mhr-special-processing-1">
<valueCoding>
<system value="http://ns.electronichealth.net.au/fhir/CodeSystem/dh-mhr-special-processing-1"/>
<code value="emergency-contact"/>
</valueCoding>
</extension>
<coding>
<system value="http://snomed.info/sct"/>
<code value="133932002"/>
Expand Down
3 changes: 3 additions & 0 deletions input/examples/patient-contact-jo-mee.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
<Patient xmlns="http://hl7.org/fhir">
<id value="contact-jo-mee"/>
<!-- Emergency contact type with relationship text, full name, phone number, no email -->
<meta>
<profile value="http://ns.electronichealth.net.au/fhir/StructureDefinition/dh-patient-emergency-contact-1"/>
</meta>
<identifier>
<type>
<coding>
Expand Down
18 changes: 6 additions & 12 deletions input/examples/patient-emergency-contact-john-smith.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,20 @@
<gender value="male"/>
<birthDate value="1939-08-25"/>
<contact>
<extension url="http://ns.electronichealth.net.au/fhir/StructureDefinition/dh-mhr-special-processing-1">
<valueCoding>
<system value="http://ns.electronichealth.net.au/fhir/CodeSystem/dh-mhr-special-processing-1"/>
<code value="emergency-contact"/>
</valueCoding>
</extension>
<relationship>
<extension url="http://ns.electronichealth.net.au/fhir/StructureDefinition/dh-mhr-special-processing-1">
<valueCoding>
<system value="http://ns.electronichealth.net.au/fhir/CodeSystem/dh-mhr-special-processing-1"/>
<code value="emergency-contact"/>
</valueCoding>
</extension>
<coding>
<system value="http://terminology.hl7.org/CodeSystem/v2-0131"/>
<code value="C"/>
<display value="Emergency Contact"/>
</coding>
</relationship>
<relationship>
<extension url="http://ns.electronichealth.net.au/fhir/StructureDefinition/dh-mhr-special-processing-1">
<valueCoding>
<system value="http://ns.electronichealth.net.au/fhir/CodeSystem/dh-mhr-special-processing-1"/>
<code value="emergency-contact"/>
</valueCoding>
</extension>
<text value="brother"/>
</relationship>
<name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,20 @@
<gender value="male"/>
<birthDate value="1939-08-25"/>
<contact>
<extension url="http://ns.electronichealth.net.au/fhir/StructureDefinition/dh-mhr-special-processing-1">
<valueCoding>
<system value="http://ns.electronichealth.net.au/fhir/CodeSystem/dh-mhr-special-processing-1"/>
<code value="emergency-contact"/>
</valueCoding>
</extension>
<relationship>
<extension url="http://ns.electronichealth.net.au/fhir/StructureDefinition/dh-mhr-special-processing-1">
<valueCoding>
<system value="http://ns.electronichealth.net.au/fhir/CodeSystem/dh-mhr-special-processing-1"/>
<code value="emergency-contact"/>
</valueCoding>
</extension>
<coding>
<system value="http://terminology.hl7.org/CodeSystem/v2-0131"/>
<code value="N"/>
<display value="Next-of-Kin"/>
</coding>
</relationship>
<relationship>
<extension url="http://ns.electronichealth.net.au/fhir/StructureDefinition/dh-mhr-special-processing-1">
<valueCoding>
<system value="http://ns.electronichealth.net.au/fhir/CodeSystem/dh-mhr-special-processing-1"/>
<code value="emergency-contact"/>
</valueCoding>
</extension>
<text value="cousin"/>
</relationship>
<name>
Expand All @@ -61,26 +55,20 @@
</period>
</contact>
<contact>
<extension url="http://ns.electronichealth.net.au/fhir/StructureDefinition/dh-mhr-special-processing-1">
<valueCoding>
<system value="http://ns.electronichealth.net.au/fhir/CodeSystem/dh-mhr-special-processing-1"/>
<code value="emergency-contact"/>
</valueCoding>
</extension>
<relationship>
<extension url="http://ns.electronichealth.net.au/fhir/StructureDefinition/dh-mhr-special-processing-1">
<valueCoding>
<system value="http://ns.electronichealth.net.au/fhir/CodeSystem/dh-mhr-special-processing-1"/>
<code value="emergency-contact"/>
</valueCoding>
</extension>
<coding>
<system value="http://terminology.hl7.org/CodeSystem/v2-0131"/>
<code value="C"/>
<display value="Emergency Contact"/>
</coding>
</relationship>
<relationship>
<extension url="http://ns.electronichealth.net.au/fhir/StructureDefinition/dh-mhr-special-processing-1">
<valueCoding>
<system value="http://ns.electronichealth.net.au/fhir/CodeSystem/dh-mhr-special-processing-1"/>
<code value="emergency-contact"/>
</valueCoding>
</extension>
<text value="brother"/>
</relationship>
<name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ This profile derives from AU Core and is designed to My Health App requirements
* Record or update a patient's emergency contact(s)

### Profile specific guidance
- A contact is processed as an emergency contact through the presence of the [dh-mhr-special-processing-1](StructureDefinition-dh-mhr-special-processing-1.html) extension on `Patient.contact.relationship`, with a fixed value of 'emergency-contact'.
- `Patient.contact.relationship.coding` is constrained to three types, 'Emergency Contact', 'Next of Kin' and 'Carer'.
- `Patient.contact.relationship.text` contains additional information about the relationship between the emergency contact and the patient. If the emergency contact type is 'Emergency Contact' or 'Next of Kin', then there shall be an additional description, as shown in the [Emergency Contact](Patient-emergency-contact-john-smith.html) and [Next of Kin](Patient-next-of-kin-jo-lee.html) examples. If the type is 'Carer', there will be no additional description, as shown in the [Carer](Patient-carer-mary-brown.html) example.
- Two occurrences of `Patient.contact.relationship` are permitted. If an occurrence contains `coding` then it shall not contain `text`. The reverse also applies, i.e. if an occurrence contains `text` then it shall not contain `coding`.
- A contact is identified as a My Health Record emergency contact through the presence of the [dh-mhr-special-processing-1](StructureDefinition-dh-mhr-special-processing-1.html) extension on `Patient.contact`, with a value of 'emergency-contact'.
- For My Health Record emergency contacts:
- `Patient.contact.relationship.coding` is constrained to three types, 'Emergency Contact', 'Next of Kin' and 'Carer'.
- `Patient.contact.relationship.text` contains additional information about the relationship between the emergency contact and the patient. If the emergency contact type is 'Emergency Contact' or 'Next of Kin', then there shall be an additional description, as shown in the [Emergency Contact](Patient-emergency-contact-john-smith.html) and [Next of Kin](Patient-next-of-kin-jo-lee.html) examples. If the type is 'Carer', there will be no additional description, as shown in the [Carer](Patient-carer-mary-brown.html) example.
- Two occurrences of `Patient.contact.relationship` are permitted. If an occurrence contains `coding` then it shall not contain `text`. The reverse also applies, i.e. if an occurrence contains `text` then it shall not contain `coding`.
- There are no new constraints on other contacts.

This profile may be referred to by APIs, which will be listed here when available.
114 changes: 46 additions & 68 deletions input/resources/Profile/dh-patient-emergency-contact-1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<title value="ADHA Patient Emergency Contact"/>
<status value="draft"/>
<experimental value="false"/>
<date value="2024-01-16"/>
<date value="2024-01-22"/>
<publisher value="Australian Digital Health Agency"/>
<contact>
<name value="Australian Digital Health Agency"/>
Expand All @@ -25,20 +25,27 @@
<baseDefinition value="http://hl7.org.au/fhir/core/StructureDefinition/au-core-patient"/>
<derivation value="constraint"/>
<differential>
<element id="Patient">
<path value="Patient"/>
</element>
<element id="Patient.contact">
<element id="Patient">
<path value="Patient"/>
</element>
<!-- Setting up the slicing on contact, based on the existence of the extension on relationship -->
<element id="Patient.contact">
<path value="Patient.contact"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="relationship.extension('http://ns.electronichealth.net.au/fhir/StructureDefinition/dh-mhr-special-processing-1').url"/>
<path value="extension('http://ns.electronichealth.net.au/fhir/StructureDefinition/dh-mhr-special-processing-1').value.system"/>
</discriminator>
<discriminator>
<type value="value"/>
<path value="extension('http://ns.electronichealth.net.au/fhir/StructureDefinition/dh-mhr-special-processing-1').value.code"/>
</discriminator>
<rules value="open"/>
</slicing>
<mustSupport value="true"/>
</element>

<!-- Contact slice -->
<element id="Patient.contact:mhr-ec">
<path value="Patient.contact"/>
<sliceName value="mhr-ec"/>
Expand All @@ -65,6 +72,37 @@
<mustSupport value="true"/>
</element>

<element id="Patient.contact:mhr-ec.extension">
<path value="Patient.contact.extension" />
<min value="1"/>
</element>

<element id="Patient.contact:mhr-ec.extension:special-processing">
<path value="Patient.contact.extension" />
<sliceName value="special-processing" />
<min value="1"/>
<type>
<code value="Extension" />
<profile value="http://ns.electronichealth.net.au/fhir/StructureDefinition/dh-mhr-special-processing-1" />
</type>
<mustSupport value="true"/>
</element>
<element id="Patient.contact:mhr-ec.extension:special-processing.valueCoding">
<path value="Patient.contact.extension.valueCoding"/>
<mustSupport value="true"/>
</element>

<element id="Patient.contact:mhr-ec.extension:special-processing.valueCoding.system">
<path value="Patient.contact.extension.valueCoding.system"/>
<min value="1"/>
<fixedUri value="http://ns.electronichealth.net.au/fhir/CodeSystem/dh-mhr-special-processing-1"/>
</element>
<element id="Patient.contact:mhr-ec.extension:special-processing.valueCoding.code">
<path value="Patient.contact.extension.valueCoding.code"/>
<min value="1"/>
<fixedCode value="emergency-contact"/>
</element>

<!-- Setting up the slicing on relationship, based on the existence of the coding -->
<element id="Patient.contact:mhr-ec.relationship">
<path value="Patient.contact.relationship"/>
Expand Down Expand Up @@ -98,36 +136,6 @@
value="http://ns.electronichealth.net.au/fhir/ValueSet/emergency-contact-type-1"/>
</binding>
</element>
<element id="Patient.contact:mhr-ec.relationship:ec-type.extension">
<path value="Patient.contact.relationship.extension" />
<slicing>
<discriminator>
<type value="value" />
<path value="url" />
</discriminator>
<rules value="open" />
</slicing>
<min value="1"/>
<mustSupport value="true"/>
</element>
<element id="Patient.contact:mhr-ec.relationship:ec-type.extension:special-processing">
<path value="Patient.contact.relationship.extension" />
<sliceName value="special-processing" />
<short value="Emergency contact relationship" />
<min value="1"/>
<type>
<code value="Extension" />
<profile value="http://ns.electronichealth.net.au/fhir/StructureDefinition/dh-mhr-special-processing-1" />
</type>
<mustSupport value="true"/>
</element>
<element id="Patient.contact:mhr-ec.relationship:ec-type.extension:special-processing.valueCoding">
<path value="Patient.contact.relationship.extension.valueCoding"/>
<patternCoding>
<system value="http://ns.electronichealth.net.au/fhir/CodeSystem/dh-mhr-special-processing-1"/>
<code value="emergency-contact"/>
</patternCoding>
</element>
<element id="Patient.contact:mhr-ec.relationship:ec-type.coding">
<path value="Patient.contact.relationship.coding"/>
<min value="1"/>
Expand All @@ -150,38 +158,7 @@
<code value="CodeableConcept"/>
</type>
<mustSupport value="true"/>
</element>
<element id="Patient.contact:mhr-ec.relationship:ec-description.extension">
<path value="Patient.contact.relationship.extension" />
<slicing>
<discriminator>
<type value="value" />
<path value="url" />
</discriminator>
<rules value="open" />
</slicing>
<min value="1"/>
<mustSupport value="true"/>
</element>
<element id="Patient.contact:mhr-ec.relationship:ec-description.extension:special-processing">
<path value="Patient.contact.relationship.extension" />
<sliceName value="special-processing" />
<short value="Emergency contact relationship" />
<min value="1"/>
<type>
<code value="Extension" />
<profile value="http://ns.electronichealth.net.au/fhir/StructureDefinition/dh-mhr-special-processing-1" />
</type>
<mustSupport value="true"/>
</element>
<element id="Patient.contact:mhr-ec.relationship:ec-description.extension:special-processing.valueCoding">
<path value="Patient.contact.relationship.extension.valueCoding"/>
<patternCoding>
<system value="http://ns.electronichealth.net.au/fhir/CodeSystem/dh-mhr-special-processing-1"/>
<code value="emergency-contact"/>
</patternCoding>
</element>

<element id="Patient.contact:mhr-ec.relationship:ec-description.coding">
<path value="Patient.contact.relationship.coding"/>
<max value="0"/>
Expand All @@ -194,7 +171,8 @@
<mustSupport value="true"/>
</element>

<element id="Patient.contact:mhr-ec.name">
<!-- Mandatory name but haven't specified if it should be text or family+given -->
<element id ="Patient.contact:mhr-ec.name">
<path value="Patient.contact.name"/>
<min value="1"/>
<mustSupport value="true"/>
Expand Down

0 comments on commit c3bf53e

Please sign in to comment.