ICT4H-Save Registration Encounter

Save Registration Encounter

A maternal registration encounter will be captured using a CDA (Clinical Document Architecture) document. In addition, the ITI-65 transaction from the IHE MHD (Mobile Access to Health Documents) profile will be used as a transport mechanism for the CDA documents. This transport will be used by the mobile application servers for sending clinical encounters to the health information exchange infrastructure for capturing the pregnancy in the National Pregnancy Registry.

The purpose of the CDA document is to capture clinical data about a patient. This can include observations, allergy information and other fields such as estimated delivery date or information about a mother's baby such as delivery date. For purposes of the registration encounter, the CDA will capture patient details and a delivery date narrative.

 

CDA Template

The following template specifies the CDA document structure that should be used for capturing the registration encounter. The relevant fields that need to be captured are identified with parameters (e.g. ${createdTime} needs to be replaced with a value such as 20140217121212).

Person Note CDA Template
<?xml version="1.0"?>
<ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:cda="urn:hl7-org:v3" xmlns:voc="urn:hl7-org:v3/voc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pcc="urn:ihe:pcc:hl7v3" xmlns:lab="urn:oid:1.3.6.1.4.1.19376.1.3.2" xmlns:sdtc="urn:hl7-org:sdtc" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040"/>
<templateId root="2.16.840.1.113883.10" extension="IMPL_CDAR2_LEVEL1"/>
<id root="${uniqueId}"/>
<code code="51855-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<title>SA National Pregnancy Register - Patient Note</title>
<!-- Creation time of document, e.g. 20140217121212 -->
<effectiveTime value="${createdTime}"/>
<confidentialityCode code="N" displayName="Normal" codeSystem="2.16.840.1.113883.5.25" codeSystemName="Confidentiality"/>
<languageCode code="en-UK"/>
<!-- Client details -->
<recordTarget>
  <patientRole>
	<!-- Patient Identifier -->
	<!-- The value for extension must be specified in HL7 CX format: -->
	<!-- id^^^assigningAuthority^typeCode -->
	<!-- The typeCode specified the type of identifier, e.g. NI for National Identifier or PPN for Passport Number -->
	<!-- The assigningAuthority specifies the issuer of the id, e.g. ZAF for South Africa -->
	<!-- An example for a South African National ID is: -->
	<!-- <id extension="7612241234567^^^ZAF^NI" root="526ef9c3-6f18-420a-bc53-9b733920bc67" /> -->
	<id extension="${pidCX}" root="526ef9c3-6f18-420a-bc53-9b733920bc67"/>
	<!-- Telephone number in RFC3966 format, e.g. tel:+27731234567 -->
	<telecom value="tel:${cellNumber}"/>
	<patient>
	  <name>
		<given>${givenName}</given>
		<family>${familyName}</family>
	  </name>
	  <administrativeGenderCode code="F" codeSystem="2.16.840.1.113883.5.1"/>
	  <!-- If available, else set nullFlavor -->
	  <!-- Format yyyy[MM[dd]] e.g. 19700123 or 197001 for an estimated date -->
	  <birthTime value="${birthDate}"/>
	  <languageCommunication>
		<languageCode code="${languageCode}"/>
		<preferenceInd value="true"/>
	  </languageCommunication>
	</patient>
  </patientRole>
</recordTarget>
<!-- HCW Details -->
<author>
  <time value="${time}"/>
  <assignedAuthor>
	<id extension="${hcwCode}" root="833f2856-b9e1-4f54-8694-c74c4283755f" assigningAuthorityName="HCW Code"/>
	<telecom value="tel:${cellNumber}"/>
	<assignedPerson>
	  <name>
		<given>${hcwGivenName}</given>
		<family>${hcwFamilyName}</family>
	  </name>
	</assignedPerson>
	<!-- if facility code available, else leave out representedOrganization -->
	<representedOrganization>
	  <id extension="${facilityCode}" root="9a560d61-85f1-4d7b-8ee2-090d2900f836"/>
	</representedOrganization>
  </assignedAuthor>
</author>
<author>
  <time value="${time}"/>
  <assignedAuthor>
	<id root="9a560d61-85f1-4d7b-8ee2-090d2900f836"/>
	<assignedAuthoringDevice>
	  <code code="${mobileHealthApplicationCode}" codeSystem="56877fb7-e3a9-4ad5-bfb5-64d48a045e83"/>
	  <softwareName>${softwareName}</softwareName>
	</assignedAuthoringDevice>
  </assignedAuthor>
</author>
<custodian>
  <assignedCustodian>
	<representedCustodianOrganization>
	  <id root="a5881e6c-b42e-4559-a1fd-d1dc52379658"/>
	  <name>SA National Department of Health</name>
	</representedCustodianOrganization>
  </assignedCustodian>
</custodian>
<documentationOf>
  <serviceEvent classCode="PCPR">
	<effectiveTime value="${encounterDateTime}"/>
  </serviceEvent>
</documentationOf>
<component>
  <structuredBody>
	<component>
	  <section>
		<code code="57060-6" displayName="Estimated date of delivery Narrative" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
		<text>
		  <table>
			<thead>
			  <tr>
				<td>Pregnancy status</td>
				<td>Note Date</td>
				<td>Delivery Date (Estimated)</td>
			  </tr>
			</thead>
			<tbody>
			  <!-- e.g. -->
			  <tr>
				<td>Pregnancy confirmed</td>
				<td>2014-02-17</td>
				<td>2014-10-17</td>
			  </tr>
			</tbody>
		  </table>
		</text>
		<entry>
		  <!-- Pregnancy Status -->
		  <observation classCode="OBS" moodCode="EVN">
			<code code="11449-6" displayName="Pregnancy status" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
			<text/>
			<statusCode code="completed"/>
			<!-- e.g. 20140217 -->
			<effectiveTime value="${effectiveTime}"/>
			<!-- one of 'value' -->
			<value xsi:type="CE" code="77386006" displayName="Pregnancy confirmed" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT"/>
			<!--<value xsi:type="CE" code="102874004" displayName="Unconfirmed pregnancy" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT"/>-->
			<!--<value xsi:type="CE" code="60001007" displayName="Not pregnant" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT"/>-->
			<!--<value xsi:type="CE" code="289256000" displayName="Mother delivered" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT"/>-->
			<!-- Remove entryRelationship if 'Not pregnant' -->
			<entryRelationship typeCode="SPRT" inversionInd="true">
			  <!-- Delivery Date -->
			  <observation classCode="OBS" moodCode="EVN">
				<!-- one of 'code' -->
				<code code="11778-8" displayName="Delivery date Estimated" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
				<!-- <code code="8665-2" displayName="Last menstrual period start date" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/> -->
				<!-- Delivery Date (if 'Mother Delivered') -->
				<!-- <code code="397836004" displayName="Time of delivery" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT"/> -->
				<text/>
				<statusCode code="completed"/>
				<!-- e.g. 20141017 -->
				<!-- use yyyyMM if only estimated up to month level -->
				<value xsi:type="TS" value="${date}"/>
			  </observation>
			</entryRelationship>
		  </observation>
		</entry>
	  </section>
	</component>
  </structuredBody>
</component>
</ClinicalDocument>

CDA Header

The CDA header describes the type of document and captures the mother's demographic details, as well as that of the health worker.

Document Type and Creation Time

CDA Template - Document Type
<typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040"/>
<templateId root="2.16.840.1.113883.10" extension="IMPL_CDAR2_LEVEL1"/>
<id root="${uniqueId}"/>
<code code="51855-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<title>SA National Pregnancy Register - Patient Note</title>
<!-- Creation time of document, e.g. 20140217121212 -->
<effectiveTime value="${createdTime}"/>
<confidentialityCode code="N" displayName="Normal" codeSystem="2.16.840.1.113883.5.25" codeSystemName="Confidentiality"/>
<languageCode code="en-UK"/>

The various identifiers, templates and codes in the header identifies the document type and confidentiality. A document must be uniquely identified by a uniqueId. This id must be generated by the sender and take the form of an OID. See Appendix B in http://www.ihe.net/uploadedFiles/Documents/ITI/IHE_ITI_TF_Vol2x.pdf for details.

A UUID can be represented as an OID by using the prefix 2.25. and appending a UUID in decimal format. This must be the direct decimal for the UUID as a single integer without being split into different parts. As an example, the UUID d1329e63-0408-4f45-b5ba-35f9afa72a94 can expressed as the OID 2.25.278071478427527610493133229150878247572.

The creation time of the document is captured by the effectiveTime element and should be in ISO8601 format (yyyyMMddHHmm[ss][+|-ZZzz]). Note that this element captures the date and time that the actual CDA was created, not the encounter date and time (which is captured elsewhere in the header).

Patient Details

CDA Template - Patient Details
<!-- Client details -->
<recordTarget>
  <patientRole>
	<!-- Patient Identifier -->
	<!-- The value for extension must be specified in HL7 CX format: -->
	<!-- id^^^assigningAuthority^typeCode -->
	<!-- The typeCode specified the type of identifier, e.g. NI for National Identifier or PPN for Passport Number -->
	<!-- The assigningAuthority specifies the issuer of the id, e.g. ZAF for South Africa -->
	<!-- An example for a South African National ID is: -->
	<!-- <id extension="7612241234567^^^ZAF^NI" root="526ef9c3-6f18-420a-bc53-9b733920bc67" /> -->
	<id extension="${pidCX}" root="526ef9c3-6f18-420a-bc53-9b733920bc67"/>
	<!-- Telephone number in RFC3966 format, e.g. tel:+27731234567 -->
	<telecom value="tel:${cellNumber}"/>
	<patient>
	  <name>
		<given>${givenName}</given>
		<family>${familyName}</family>
	  </name>
	  <administrativeGenderCode code="F" codeSystem="2.16.840.1.113883.5.1"/>
	  <!-- If available, else set nullFlavor -->
	  <!-- Format yyyy[MM[dd]] e.g. 19700123 or 197001 for an estimated date -->
	  <birthTime value="${birthDate}"/>
	  <languageCommunication>
		<languageCode code="${languageCode}"/>
		<preferenceInd value="true"/>
	  </languageCommunication>
	</patient>
  </patientRole>
</recordTarget>

The recordTarget element identifies the subject of care for the document, in this case the mother. The following fields need to be captured:

  • Patient identifier. See section below.
  • The mother's cellphone number in RFC3966 format.
  • The mother's given and family names.
  • Gender.
  • The mother's birthdate in ISO8601 format (yyyyMMdd). If only the mother's age is known or the date of birth is estimated, then the value should be truncated to a year or year/month value (yyyy[MM]).
  • Primary language preference. Should be specified as a 2-letter ISO 639 language code. Note that there is no 2-letter code for Sepedi, so the 3-letter ISO 639-2 code nso may be used instead.
Patient Identifiers

 

Patient identifiers are specified using the id element and the value for the identifier is specified in extension. For the maternal encounter described here, the value in the extension must be specified in HL7 CX format. The UUID 526ef9c3-6f18-420a-bc53-9b733920bc67 can be used in root to indicate to the exchange that this format is being used.

The identifier value must consist of (at least) three segments: an id number, an assigning authority and an id type code. The id type code defines the type of identifier, for example national id or passport. The following table lists the HL7 Identifier Type Codes recommended for South Africa:

 

Type CodeNameDescription
NINational IDIn the case of a South African National ID number the assigning authority will be ZAF as defined by the ISO 3166-1-alpha3 country code table
PPNPassport NumberIn this case the assigning authority is the County ISO 3166-1-alpha3 code, for example ZAF (South Africa), ZWE (Zimbabwe), Mozambique (MOZ)
RRIRegional IDIn this case the assigning authority is the last 2 characters of the provincial ISO 3166-2-alpha code. e.g WC for Western Cape.
FIFacility IDTO BE DEFINED
PNPerson NumberThis could be used for Refugee id, in which case the assigning authority will be XXB as defined in ISO 3166-1-alpha3
BCTBirth CertificateIn this case the assigning authority is the County ISO 3166-1-alpha3 code

The identifier can be specified in CX format as follows: ${idValue}^^^${assigningAuthority}^${typeCode}. An example for a South African ID number is as follows:

<id extension="7612241234567^^^ZAF^NI" root="526ef9c3-6f18-420a-bc53-9b733920bc67"/>

Healthcare Worker Details

CDA Template - HCW Details
<!-- HCW Details -->
<author>
  <time value="${time}"/>
  <assignedAuthor>
	<id extension="${hcwCode}" root="833f2856-b9e1-4f54-8694-c74c4283755f" assigningAuthorityName="HCW Code"/>
	<telecom value="tel:${cellNumber}"/>
	<assignedPerson>
	  <name>
		<given>${hcwGivenName}</given>
		<family>${hcwFamilyName}</family>
	  </name>
	</assignedPerson>
	<!-- if facility code available, else leave out representedOrganization -->
	<representedOrganization>
	  <id extension="${facilityCode}" root="9a560d61-85f1-4d7b-8ee2-090d2900f836"/>
	</representedOrganization>
  </assignedAuthor>
</author>

The healthcare worker's details are captured similarly to the mother's details. In addition, the following fields need to be captured:

  • The time the document was authored by the provider (time). This will likely be the same value as encounterDateTime described in the next section. The field is however available should this not be the case.
  • Facility id.

Mobile Health Application Provider

CDA Template - Mobile Health Application Provider
<author>
  <time value="${time}"/>
  <assignedAuthor>
	<id root="9a560d61-85f1-4d7b-8ee2-090d2900f836"/>
	<assignedAuthoringDevice>
	  <code code="${mobileHealthApplicationCode}" codeSystem="56877fb7-e3a9-4ad5-bfb5-64d48a045e83"/>
	  <softwareName>${softwareName}</softwareName>
	</assignedAuthoringDevice>
  </assignedAuthor>
</author>

The mobileHealthApplicationCode and softwareName fields can be used to identify the mobile provider and software stack used to capture the encounter.

Encounter Date

CDA Template - Custodian and Encounter Date
<custodian>
  <assignedCustodian>
	<representedCustodianOrganization>
	  <id root="a5881e6c-b42e-4559-a1fd-d1dc52379658"/>
	  <name>SA National Department of Health</name>
	</representedCustodianOrganization>
  </assignedCustodian>
</custodian>
<documentationOf>
  <serviceEvent classCode="PCPR">
	<effectiveTime value="${encounterDateTime}"/>
  </serviceEvent>
</documentationOf>

The last few elements in the header simply identify the custodian of the document and capture the date and time of the encounter.

CDA Body

The document body captures clinical observations for the mother.

Estimated Date of Delivery Narrative

The delivery date narrative section describes the mother's delivery date as it relates to her pregnancy status. The narrative consists of a text section as well as a coded entry section.

Text

CDA Template - EDD Text
		<text>
		  <table>
			<thead>
			  <tr>
				<td>Pregnancy status</td>
				<td>Note Date</td>
				<td>Delivery Date (Estimated)</td>
			  </tr>
			</thead>
			<tbody>
			  <!-- e.g. -->
			  <tr>
				<td>Pregnancy confirmed</td>
				<td>2014-02-17</td>
				<td>2014-10-17</td>
			  </tr>
			</tbody>
		  </table>
		</text>

Any content in this section is treated as "free" text and is designed to be rendered to a human user. This is in contrast to the coded contents in the entry section which is designed to be machine processable. The content listed in the template is only an example and any content appropriate to the delivery narrative may be entered (including nothing). This section will not be processed by the HIM or any other infrastructure components in the health information exchange.

Coded Entry

CDA Template - EDD Entry
		<entry>
		  <!-- Pregnancy Status -->
		  <observation classCode="OBS" moodCode="EVN">
			<code code="11449-6" displayName="Pregnancy status" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
			<text/>
			<statusCode code="completed"/>
			<!-- e.g. 20140217 -->
			<effectiveTime value="${effectiveTime}"/>
			<!-- one of 'value' -->
			<value xsi:type="CE" code="77386006" displayName="Pregnancy confirmed" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT"/>
			<!--<value xsi:type="CE" code="102874004" displayName="Unconfirmed pregnancy" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT"/>-->
			<!--<value xsi:type="CE" code="60001007" displayName="Not pregnant" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT"/>-->
			<!--<value xsi:type="CE" code="289256000" displayName="Mother delivered" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT"/>-->
			<!-- Remove entryRelationship if 'Not pregnant' -->
			<entryRelationship typeCode="SPRT" inversionInd="true">
			  <!-- Delivery Date -->
			  <observation classCode="OBS" moodCode="EVN">
				<!-- one of 'code' -->
				<code code="11778-8" displayName="Delivery date Estimated" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
				<!-- <code code="8665-2" displayName="Last menstrual period start date" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/> -->
				<!-- Delivery Date (if 'Mother Delivered') -->
				<!-- <code code="21112-8" displayName="Birth date" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/> -->
				<text/>
				<statusCode code="completed"/>
				<!-- e.g. 20141017 -->
				<!-- use yyyyMM if only estimated up to month level -->
				<value xsi:type="TS" value="${date}"/>
			  </observation>
			</entryRelationship>
		  </observation>
		</entry>

The delivery narrative is captured as a set of coded observations and needs to describe the mother's delivery date. Since there are multiple ways to describe this date (estimated, already delivered, etc.), a pregnancy status observation is captured as well. The above template describes a delivery narrative using such a status observation along with the date observation. The entryRelationship element inversely relates these two observations together, i.e. the template reads as: the "delivery date" is supported by the "status" observation.

As an example, the following snippet captures an estimated delivery date of 17 Oct. 2014 that was calculated on 17 Feb. 2014 for a unconfirmed pregnancy:

CDA Template - EDD Example
		  <observation classCode="OBS" moodCode="EVN">
			<code code="11449-6" displayName="Pregnancy status" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
			<text/>
			<statusCode code="completed"/>
			<effectiveTime value="20140217"/>
			<value xsi:type="CE" code="102874004" displayName="Unconfirmed pregnancy" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT"/>
			<entryRelationship typeCode="SPRT" inversionInd="true">
			  <observation classCode="OBS" moodCode="EVN">
				<code code="11778-8" displayName="Delivery date Estimated" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
				<text/>
				<statusCode code="completed"/>
				<value xsi:type="TS" value="20141017"/>
			  </observation>
			</entryRelationship>
		  </observation>

MHD

The IHE Mobile access to Health Documents profile (http://wiki.ihe.net/index.php?title=Mobile_access_to_Health_Documents_(MHD)) defines interfaces for sending and retrieving documents. See http://www.ihe.net/uploadedFiles/Documents/ITI/IHE_ITI_Suppl_MHD.pdf for full details around this.

The ITI-65 Put Document Dossier transaction will be used to send CDA documents to the health information exchange. The transaction takes the form of a MIME multipart message (multipart/form-data) sent as a POST transaction to the endpoint https://{him-server}/ws/rest/v1/registration/net.ihe/DocumentDossier/?PatientID=${pid}. The message consists of two mime parts:

  1. a JSON entry describing the document metadata, and
  2. the document contents (the CDA).

Patient identifiers for are expressed in MHD metadata entries in the same HL7 CX format as defined above in Patient Identifiers. Note that url encoding will be necessary for expressing the patient id in a url string.

Document Metadata

The document metadata is expressed as JSON in the first MIME part of the message transaction. The MIME type for this is entry should be set to application/json and the Content-Disposition should be form-data with the name ihe-mhd-metadata.

A metadata entry should consist of a single documentEntry section. For the purpose of registering the maternal pregnancy encounter, only a small set of fields are required to be specified within the documentEntry. Since the content is known, the HIM is capable of inferring most of the MHD metadata required from the profile from the CDA document. The following table lists the fields that are required. Note however that for future use-cases this relaxation of the profile may not apply and therefore is currently only appropriate to submissions with the exact classCode, typeCode, formatCode and mimeType specified here.

FieldDescription
patientIdThe patient identifier
uniqueIdAn unique identifier OID for the document. This should be generated by the sender.
entryUUIDA UUID to uniquely identify the entry. This should be generated by the sender and expressed as an urn (with a prefix urn:uuid:).
classCodeClassifies the submitted document. This should be:

{ "code": "51855-5", "codingScheme": "2.16.840.1.113883.6.1", "codeName": "Patient Note" }

typeCode

Classifies the submitted document. This should be:

{ "code": "51855-5", "codingScheme": "2.16.840.1.113883.6.1", "codeName": "Patient Note" }

formatCode

Classifies the submitted document. This should be:

{ "code": "npr-pn-cda", "codingScheme": "4308822c-d4de-49db-9bb8-275394ee971d", "codeName": "NPR Patient Note CDA" }

mimeTypeThe document MIME type. This should be text/xml.
hashSHA1 hash of the CDA document
sizeSize of the CDA document in bytes

Document Contents

The second MIME part in the message transaction will contain the CDA document itself. The MIME type should be text/xml and the Content-Disposition should be set to form-data with the name content.

Example Transaction

An example transaction for the above CDA would be a POST request to the HIM server on the url https://{him-server}/ws/rest/v1/registration/net.ihe/DocumentDossier/?PatientID=7612241234567%5e%5e%5eZAF%5eNI. The transaction would be a MIME multipart message (multipart/form-data) with mime parts: 1) document metadata and 2) the document itself.

The metadata entry could be as follows:

Example MHD POST
{
  "documentEntry": {
    "patientId": "7612241234567^^^ZAF^NI",
    "uniqueId": "2.15.278071478427527610493133229150878247572",
    "entryUUID": "urn:uuid:d1329e63-0408-4f45-b5ba-35f9afa72a94",
    "classCode": { "code": "51855-5", "codingScheme": "2.16.840.1.113883.6.1", "codeName": "Patient Note" },
    "typeCode": { "code": "51855-5", "codingScheme": "2.16.840.1.113883.6.1", "codeName": "Patient Note" },
    "formatCode": { "code": "npr-pn-cda", "codingScheme": "4308822c-d4de-49db-9bb8-275394ee971d", "codeName": "NPR Patient Note CDA" },
    "mimeType": "text/xml",
    "hash": "587e159120b29eeb6c542131aabc7b49325a26a0",
    "size": "5222"
  }
}