Skip to content

Commit 93d010b

Browse files
author
Adrian Clay
authored
Improve the mapping docs for MessageHeader (#273)
* Reformat MessageHeader documentation table * Improve the mapping docs for MessageHeader Split out complex fields into more lines, and a separate section for the event field. Giving each field more room should make reading easier. Remove the completely empty "FHIR Objects 3.0.2" column as it was just taking up screen space. Provide an example MessageHeader JSON object inline with the docs, to hopefully provide more useful contextual understanding.
1 parent e114176 commit 93d010b

File tree

1 file changed

+73
-8
lines changed

1 file changed

+73
-8
lines changed

doc/ITK_FHIR_mapping.md

Lines changed: 73 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -733,11 +733,76 @@ Mapped from `<healthCareFacility><location>`
733733

734734
## MessageHeader
735735

736-
| ITK Mapping Element | FHIR Objects 3.0.2 | FHIR Mapping Elements 3.0.2 |
737-
| --- | --- | --- |
738-
| `<itk:header><itk:addresslist><itk:address uri="ODS_CODE" />`<br />`<itk:header><itk:addresslist><itk:address type="2.16.840.1.113883.2.1.3.2.4.18.44" uri="DOS_ID" />` | | destination.ednpoint (two values concatenated ODS_CODE:DOSServiceID:DOS_ID) |
739-
| `<itk:header><a:MessageID>` | | id |
740-
| `<itk:header><itk:handlingSpecification><itk:spec value>` | | Event |
741-
| Code: `<itk:header><itk:handlingSpecification><itk:spec value>`<br />System: `<itk:header><itk:handlingSpecification><itk:spec key>` | | Reason |
742-
| `<itk:header><itk:handlingSpecification><itk:senderAddress>` | | Destination |
743-
| `<ClinicalDocument><effectiveTime>` | | timestamp |
736+
The MessageHeader element is mapped primarily from the `itk:header` XML element, which is located at `soap:Body \ itk:DistributionEnvelope \ itk:header`.
737+
738+
| ITK Mapping Element | FHIR Mapping Elements 3.0.2 |
739+
|--------------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
740+
| `soap:Header / addressing:MessageID` | id |
741+
| CodeableConcept mapped from `itk:header / itk:handlingSpecification / itk:spec[0][@value]`. See below for details. | event |
742+
| ODS sender address concatenated with ":DOSServiceId:" concatenated with the DosServiceId `itk:header / itk:addressList / itk:header` | destination[0].endpoint |
743+
| `ClinicalDocument / effectiveTime[@value]` | timestamp |
744+
| Constant: `"NHS 111 Adaptor"` | source.name |
745+
| Taken from the environment variable `PEM111_SOAP_SEND_TO` | source.endpoint |
746+
| `itk:header / itk:handlingSpecification / itk:spec[0][@key]` | reason.coding[0].system |
747+
| `itk:header / itk:handlingSpecification / itk:spec[0][@value]` | reason.coding[0].code |
748+
749+
### MessageHeader.event
750+
751+
This field can be used by the consumer to identify if an event is for action, or for information.
752+
753+
Any spec value beginning with `"urn:nhs-itk:interaction:primary..."`, for example `"urn:nhs-itk:interaction:primaryEmergencyDepartmentRecipientNHS111CDADocument-v2-0"` is mapped to an EventType of Referral.
754+
755+
```json
756+
{
757+
"system": "https://fhir.nhs.uk/STU3/CodeSystem/EventType-1",
758+
"code": "referral-1",
759+
"display": "Referral"
760+
}
761+
```
762+
763+
Any spec value beginning with `"urn:nhs-itk:interaction:copy..."`, for example `"urn:nhs-itk:interaction:copyRecipientNHS111CDADocument-v2-0"` is mapped to an EventType of DischargeDetails.
764+
765+
```json
766+
{
767+
"system": "https://fhir.nhs.uk/STU3/CodeSystem/EventType-1",
768+
"code": "discharge-details-1",
769+
"display": "Discharge Details"
770+
}
771+
```
772+
773+
<details>
774+
<summary>Example MessageHeader</summary>
775+
776+
```json
777+
{
778+
"fullUrl": "urn:uuid:7AEFFED7-78AF-4940-9EE2-5FAA3920ECFE",
779+
"resource": {
780+
"resourceType": "MessageHeader",
781+
"id": "7AEFFED7-78AF-4940-9EE2-5FAA3920ECFE",
782+
"event": {
783+
"system": "https://fhir.nhs.uk/STU3/CodeSystem/EventType-1",
784+
"code": "referral-1",
785+
"display": "Referral"
786+
},
787+
"destination": [
788+
{
789+
"endpoint": "urn:nhs-uk:addressing:ods:RSHSO14A:DOSServiceID:2000006423"
790+
}
791+
],
792+
"timestamp": "2021-04-06T11:33:35.000+00:00",
793+
"source": {
794+
"name": "NHS 111 Adaptor",
795+
"endpoint": "http://localhost:8080/report"
796+
},
797+
"reason": {
798+
"coding": [
799+
{
800+
"system": "urn:nhs-itk:ns:201005:interaction",
801+
"code": "urn:nhs-itk:interaction:primaryEmergencyDepartmentRecipientNHS111CDADocument-v2-0"
802+
}
803+
]
804+
}
805+
}
806+
}
807+
```
808+
</details>

0 commit comments

Comments
 (0)