Appearance
4.2 Context/Metadata Requirements
In order for the Recipient System to know that the inbound Direct Secure Message is an Unsolicited Notification and be able to accurately and efficiently route and process the message to the appropriate care team, department, and provider or automate a unique workflow, Sending HISPs SHALL provide the appropriate metadata to determine the purpose of the message and to help Recipient Systems identify to whom it may be of interest.
The Initiating System SHALL produce and include required context data elements either in the MIME part or in the XD Metadata packaged in XDM format by the Initiating System or the HISP.
The two different tables represent the two XDR Metadata levels:
Submission Set Metadata – describes the entire contents of the XDM package and applies to all attachments
Document Entry Metadata – describes each of the attachments within an XDM package.
For this IG, XDM packages SHALL contain information on one patient and for one event so only one HL7 V2 message will be included.
Direct IG for Context Requirements
A sending system SHALL indicate its conformance to this guide by including the following header with the RFC 822 headers of the Health Content Container (as defined by The Direct Standard®)
X-Direct-Context: <cid-identifier>
The presence of the X-Direct-Context parameter indicates this IG is conformant to the Context IG.
The MIME body of the conforming Health Content Container SHALL be a MIME multipart container. The cid-identifier in the X-Direct-Context header SHALL correspond to the value of a Content-ID header of the MIME part that contains the Metadata attachment (see Section 2.0 of this document), as per RFC 2045. The MIME part referenced by the Content-ID header SHALL NOT be nested within another MIME multipart container. Only a single context is permitted per message. When multiple attachments are included by a sender, the same context SHALL apply to all attachments.
Below is a table showing the required Context Metadata for inclusion in messages that do not include an XDM payload. Metadata elements that are an extension of the Context IG are defined below and listed in green.
Context MIME part Requirements
| Data Element Number | Context Element | Value | Value Set | Context/Metadata Requirement |
|---|---|---|---|---|
| (1) | X-Direct-Context | Message Header | R | |
| (2) | Content-Type | The mimeType SHALL be text/plain. You may include character type encoding. This is specified in section 2 of the Context IG. Any standard coding is supported. | Fixed Value | R |
| (3) | Content-Transfer-Encoding | This is an optional field and the possible values are specified in section 6.1 of RFC2045. | O | |
| (4) | Content-ID | This needs to be a GUID or other type of unique identifier. It must match the Content-ID used in the X-Direct-Context field in the message header. | R | |
| (5) | Content-Disposition | attachment; filename=metadata.txt Defined in section 2 of the Context IG. | Fixed Value | R |
Context Element Requirements
| Data Element Number | Context Element | Value | Value Set | Context/Metadata Requirement | Mapping Guidance from XD to Context IG |
|---|---|---|---|---|---|
| (6) | Version | 1.2 | Fixed Value | R | N/A |
| (7) | Id | <transaction id: A unique and persistent identifier assigned by the originating party to uniquely identify a sequence of related transactions. This id-element also correlates any error reporting or required acknowledgments when this is not already encapsulated in the message content.> This is a persistent value to enable tracking ADT messages of an encounter. SHALL be populated with the Visit Number found in PV1.19 and IHE type identifier urn:ihe:iti:xds:2015:encounterId Example: 12345: urn:ihe:iti:xds:2015:encounterId | R | SHALL populate Direct Context id element with corresponding IHE encounerId from the XD SubmissionSet.referenceIdList. | |
| (8) | Patient-id | <the patient's id>This is a two-part field with a unique assigning authority oid “:” the patient id assigned by that authority. Defined in section 3.3 of the Context IG. | R | DocumentEntry.sourcePatientID | |
| (9) | Type | General/notification | Fixed Value | R | |
| (10) | Purpose | Treatment (Preferred) | Values from the purpose-value value set established in the Context IG | R | |
| (11-11m) | Patient | <populate the defined sub-elements} “givenName” / “surname” / “middleName” / “dateOfBirth” / “gender” / “socialSecurityNumber” / “telephoneNumber” / “streetAddress” / “localityName” / “stateOrProvinceName” / “postalCode” / “country” / “directAddress” R: givenName, surname, dateOfBirth, gender The rest are RE. Note: gender is codified using value set A. | R | DocumentEntry.sourcePatientInfo Patient Demographics are represented as individual PID elements adhering to the HL7v2 constraints. See section 4.3.2.3 for guidance on formatting. | |
| (12) | Creation-time | <a field containing the date and time the ADT Mesagewas generated> | R | DocumentEntry.creationTime of the v2 attachment | |
| (13) | Profile | urn:dt-org:dsm:adt-en:SMTP+CIG+V2:<version> | Fixed Value | R | Populated with the DocumentEntry.formatCode associated with the v2 attachment |
| (14) | Type-code | 2.16.840.1.113883.6.1:86530-3 | Fixed Value | R | |
| (15) | Activity-code | 2.16.840.1.113883.6.1:<a concept from the value set> | D | R | Populate the Context activity-code with the SubmissionSet.contentTypeCode |
Implementer guidance for populating the patient element comes directly from the Context IG. The information is repeated below for convenience, but the source of these requirements remains in the Context IG.
Constraints included from the Context IG Both the patient-parameter-name and patient-parameter-value are case insensitive. The patient-parameter-value format is defined based on the patient-parameter-name and MUST NOT contain the “;”, CR, or LF characters. Contiguous whitespace MUST be treated as a single space. Leading and trailing whitespace MUST be ignored. A patient-parameter-name MUST NOT appear more than once in the patient-data-element. When a parameter is included, the following additional requirements apply:
The telephone and directAddress parameters MAY be multivalued. Multiple values SHALL be expressed as a comma-separated list of valid patient-parameter-values. |
|---|
Context Element Definitions (Defined in this IG)
The fields below extend the metadata content define in the Context IG.
| Data Element Number | Context Element | Element Definition |
| (12) | creation-time | <a field containing the date and time the attachment was generated> |
| (13) | profile | profile= “profile:” profile-identifier profile-identifier = <URI defining message requirements> This constraint extends the Context IG. urn:dt-org:dsm:adt-en:SMTP+CIG+V2:<version> urn:dt-org:dsm:adt-en:SMTP+XDM:<version> Example: urn:dt-org:dsm:adt-en:SMTP+CIG+V2:1.1 urn:dt-org:dsm:adt-en:SMTP+XDM:1.1 |
| (14) | type-code | type-code = “type-code:” type-code-identifier type-code-identifier = content-type-system “:” content-type-code content-type-system = <assigning authority domain id> content-type-code = <printable ascii characters other than whitespace and “;”> |
| (15) | activity-code | activity-code = “activity-code:” activity-code -identifier activity-code -identifier = content-type-system “:” content-type-code content-type-system = <assigning authority domain id> content-type-code = <printable ascii characters other than whitespace and “;”> |
XD Metadata Requirements
This chapter describes requirements for the MIME part that contains the XDM package when the Notification message is formatted.
Metadata Element Requirements
The following list identifies the XD metadata requirements. Mapping Guidance provided only for XD metadata requirements from the Context IG. See XDR and XDM for Direct Secure Messaging Specification for all other conversion requirements.
Submission Set
| Data Element Number | Metadata Element | Value | Value Set | Metadata Requirement | Mapping Guidance |
|---|---|---|---|---|---|
| (16) | Author | This would be the Treating Facility | R | Populate authorInstitution from PV2.23.1 from the V2 attachment | |
| (17) | contentTypeCode | D | R | Context IG > XD populate the activity-code | |
| (18) | entryUUID | R | |||
| (19) | intendedRecipient | This is one or more determined recipients. | R | ||
| (20) | PatientId | RE | Shall be populated with Context IG patient-id as XD patientId as know by the receiver. | ||
| (21) | sourceId | R | |||
| (22) | submissionTime | This is the time of the Event | R | ||
| (23) | title | O | |||
| (24) | uniqueId | R | Populate with the id of the V2 message in MSH Segment using MSH-10 Message Control ID plus the assigning authority to create an external identifier as defined in IHE ITI TF vol.3 ch. 4.2.3.1.3. | ||
| (25) | referenceIdList | This is a persistent value to enable tracking ADT messages of an encounter. It SHALL populated with the Visit Number found in PV1.19 and IHE type identifier urn:ihe:iti:xds:2015:encounterId. Example: 12345: urn:ihe:iti:xds:2015:encounterId | R | SubmissionSet.referenceIdList SHALL be mapped from the Context IG id |
Document entry
| Data Element Number | Metadata Element | Value | Value Set | Context/Metadata Requirement | Mapping Guidance |
|---|---|---|---|---|---|
| (25) | Author | This would be the Treating Facility | RE | Populate authorInstitution PV2.23.1 from the V2 attachment | |
| (26) | classCode | For Document Entry associated with the V2 message: 2.16.840.1.113883.6.1:86530-3 For Document Entry associated with the human readable, classCode may vary to support existing implementations between HISPs and edge systems to define the body message. The preferred value established by this IG is 56444-3 (LOINC), but other guidance may prevail. | R | ||
| (27) | confidentialityCode | RE | |||
| (28) | creationTime | Time when the message was created | R | ||
| (29) | entryUUID | R | |||
| (30) | formatCode | This format code was established specifically for the DirectTrust Event Notifications via the Direct Standard specification. urn:dt-org:dsm:adt-en:SMTP+CIG+V2:<version> urn:dt-org:dsm:adt-en:SMTP+XDM:<version> Example: urn:dt-org:dsm:adt-en:SMTP+CIG+V2:1.1 urn:dt-org:dsm:adt-en:SMTP+XDM:1.1 | Fixed Value | R | |
| (31) | healthcareFacilityTypeCode | E | RE | ||
| (32) | languageCode | F | RE | ||
| (33) | mimeType | For hl7v2 message, application/hl7v2+er7 For human readable free text attachment, required text/plain (if using multipart/alternative, text/plain should appear first) | Expected type | R | |
| (34) | patientId | RE | Shall not be populated with Context IG patient-id as XD patientId as know by the receiver. | ||
| (35) | practiceSettingCode | G | RE | ||
| (36) | sourcePatientId | RE | Populate with the Context IG patient-id. | ||
| (37) | sourcePatientInfo | R | |||
| (38) | typeCode | 2.16.840.1.113883.6.1:<a concept from the value set> | D | R | |
| (39) | uniqueId | R |
