-
Notifications
You must be signed in to change notification settings - Fork 9
Intervention FHIR Mappings
In HL7 FHIR, the Order resource "describes a request that an action be performed." The specification further clarifies that orders "require real world actions by one or more humans." As such, it is likely the best representation of planned interventions (as opposed to using specific order resources directly). See the specification for more details.
Order resources contain a reference to the more specific order that is being requested. As such, storing an intervention will actually require two resources to be stored: (1) The Order
resource, and (2) the more specific resource described by the order. There are two approaches to doing this:
-
Separate Requests: First store the specific order resource. Next store the
Order
resource with a reference to the returned ID of the specific order resource. -
Bundle: Create a bundle containing both the
Order
resource and the more specific order resource. Submit the bundle to the server as atransaction
.
Option 2 (as a bundle) seems to be the more idiomatic approach, so this is the approach I would suggest. That said, if this presents problems for Ember, the separate requests approach can be used instead.
NOTE: After documenting all of the details, I can see that both approaches are fairly complicated, particularly for the frontend. We may want to consider a simplified API for the frontend, with the full FHIR mapping happening in the backend. Another approach might be not to use FHIR at all for storing planned interventions (as I do have some concerns regarding how that works as well). This is something that should be discussed further.
Rather than repeat the same bundle format over and over for each intervention definition, I will show how it generally works here, and then indicate the specific order resource information for each intervention type.
The bundle should specify the type
as transaction
.
The first entry in the bundle should be the Order
. The Order
resource should supply the following fields:
- text: the text that the user entered for the intervention details (must be xhtml)
- date: the date the intervention was created/planned
- subject: a reference to the patient who should receive the intervention
- source: a reference to the user (a practitioner) who created the intervention
- target: a reference to the user (a practitioner) who is assigned to do the intervention
- detail: a reference to the specific order resource describing the intervention. Since this is a transaction bundle, the reference should be to the urn specified in the second entry.
The second entry in the bundle is the specific order resource. It should have the proper status to indicate it is proposed/planned/etc.
The following is an example of the Schedule Appointment intervention:
{
"resourceType": "Bundle",
"type": "transaction",
"entry": [
{
"fullUrl": "urn:uuid:61ebe359-bfdc-4613-8bf2-c5e300945f0a",
"resource": {
"resourceType": "Order",
"text": {
"status": "additional",
"div": "<div>Schedule an appointment in the next two weeks to come in and receive a physical exam.</div>"
},
"date": "2015-11-16@14:30:00-04:00",
"subject": {
"reference": "Patient/497fd901-bedc-7634-75f3-156a8f74d55e"
},
"source": {
"reference": "Practitioner/685fd42a-fbed-1867-1a87-d89f6e52a175"
},
"target": {
"reference": "Practitioner/186d8fe2-acbd-9658-35f7-123ad8fe698a"
},
"detail": {
"reference": "urn:uuid:88f151c0-a954-468a-88bd-5ae15c08e059"
},
},
"request": {
"method": "POST",
"url": "Order",
}
},
{
"fullUrl": "urn:uuid:88f151c0-a954-468a-88bd-5ae15c08e059",
"resource": {
"resourceType": "Appointment",
"status": "proposed",
"participant": [{
"actor": {
"reference": "Patient/497fd901-bedc-7634-75f3-156a8f74d55e"
},
"required": "required",
"status": "needs-action"
}]
},
"request": {
"method": "POST",
"url": "Appointment"
}
}
]
}
The Schedule Appointment intervention should be an Order
that references an Appointment
. The Appointment
has the following fields:
-
status: set to
proposed
-
participant: at least one participant is required, so we use the patient:
- actor: a reference to the patient
-
required: set to
required
-
status: set to
needs-action
The following is an example of the second bundle entry with the embedded Appointment
resource:
{
"fullUrl": "urn:uuid:88f151c0-a954-468a-88bd-5ae15c08e059",
"resource": {
"resourceType": "Appointment",
"status": "proposed",
"participant": [{
"actor": {
"reference": "Patient/497fd901-bedc-7634-75f3-156a8f74d55e"
},
"required": "required",
"status": "needs-action"
}]
},
"request": {
"method": "POST",
"url": "Appointment"
}
}
The Home Visit intervention is very much like the Schedule Appointment intervention. The only difference is that it contains an additional participant to represent the location (home). This participant has the following values:
- actor: a reference to the location (defined in the 3rd entry of the bundle)
-
required: set to
required
-
status: set to
needs-action
The following is an example of the second bundle entry with the embedded Appointment
resource:
{
"fullUrl": "urn:uuid:88f151c0-a954-468a-88bd-5ae15c08e059",
"resource": {
"resourceType": "Appointment",
"status": "proposed",
"participant": [{
"actor": {
"reference": "Patient/497fd901-bedc-7634-75f3-156a8f74d55e"
},
"required": "required",
"status": "needs-action"
}, {
"actor": {
"reference": "urn:uuid:5d689ae5-24ad-f568-225a-9354ad6ef875"
},
"required": "required",
"status": "needs-action"
}]
},
"request": {
"method": "POST",
"url": "Appointment"
}
}
In addition, the bundle must include a 3rd entry to indicate the location. The location must have the following fields:
-
name: set to
home
-
type: a CodeableConcept with the code
PTRES
-
physicalType: a CodeableConcept with the code
ho
The following is an example of the third bundle entry with the embedded Location
resource:
{
"fullUrl": "urn:uuid:5d689ae5-24ad-f568-225a-9354ad6ef875",
"resource": {
"resourceType": "Location",
"name": "home",
"type": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/RoleCode",
"code": "PTRES",
"display": "Patient's Residence"
}
]
},
"physicalType": {
"coding": [
{
"system": "http://hl7.org/fhir/location-physical-type",
"code": "ho",
"display": "House"
}
]
}
},
"request": {
"method": "POST",
"url": "Location"
}
}
The Phone Call intervention should be an Order
that references a CommunicationRequest
. The CommunicationRequest
has the following fields (some of which are redundant with the Order
):
- sender: a reference to the practitioner assigned the intervention
- recipient: a reference to the patient who is to receive the phone call
-
medium: a CodeableConcept with code
PHONE
-
status: set to
proposed
- requester: a reference to the user who created the planned intervention
- requestedOn: when the intervention was created
- subject: a reference to the patient
The following is an example of the second bundle entry with the embedded CommunicationRequest
resource:
{
"fullUrl": "urn:uuid:88f151c0-a954-468a-88bd-5ae15c08e059",
"resource": {
"resourceType": "CommunicationRequest",
"sender": {
"reference": "Practitioner/186d8fe2-acbd-9658-35f7-123ad8fe698a"
},
"recipient": {
"reference": "Patient/497fd901-bedc-7634-75f3-156a8f74d55e"
},
"medium": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/ParticipationMode",
"code": "PHONE",
"display": "telephone"
}
]
},
"status": "proposed",
"requester": {
"reference": "Practitioner/685fd42a-fbed-1867-1a87-d89f6e52a175"
},
"requestedOn": "2015-11-16@14:30:00-04:00",
"subject": {
"reference": "Patient/497fd901-bedc-7634-75f3-156a8f74d55e"
}
},
"request": {
"method": "POST",
"url": "CommunicationRequest"
}
}
The Medication intervention should be an Order
that references a MedicationOrder
. The MedicationOrder
has the following fields:
-
status: set to
draft
- patient: a reference to the patient who should be prescribed the medication
- prescriber: a reference to the practitioner who should prescribe the medication
-
medication: a CodeableConcept with only the
text
set to the medication details. The medication field is required, which is why we have to put something there.
The following is an example of the second bundle entry with the embedded MedicationOrder
resource:
{
"fullUrl": "urn:uuid:88f151c0-a954-468a-88bd-5ae15c08e059",
"resource": {
"resourceType": "MedicationOrder",
"status": "draft",
"patient": {
"reference": "Patient/497fd901-bedc-7634-75f3-156a8f74d55e"
},
"prescriber": {
"reference": "Practitioner/186d8fe2-acbd-9658-35f7-123ad8fe698a"
},
"medication": {
"text": "Lisinopril 10mg"
}
},
"request": {
"method": "POST",
"url": "MedicationOrder"
}
}
The Diet intervention should be an Order
that references a NutritionOrder
. The NutritionOrder
has the following fields:
- patient: a reference to the patient who should be put on the diet
- orderer: a reference to the practitioner who should order the diet
-
status: set to
proposed
The following is an example of the second bundle entry with the embedded NutritionOrder
resource:
{
"fullUrl": "urn:uuid:88f151c0-a954-468a-88bd-5ae15c08e059",
"resource": {
"resourceType": "NutritionOrder",
"patient": {
"reference": "Patient/497fd901-bedc-7634-75f3-156a8f74d55e"
},
"orderer": {
"reference": "Practitioner/186d8fe2-acbd-9658-35f7-123ad8fe698a"
},
"status": "proposed"
},
"request": {
"method": "POST",
"url": "NutritionOrder"
}
}
The Exercise intervention should be an Order
that references a ProcedureRequest
. The ProcedureRequest
has the following fields:
- subject: a reference to the patient who should be ordered to exercise
-
code: a CodeableConcept containing the SNOMED-CT code
281090004
-
status: set to
proposed
- orderer: a reference to the practitioner who should order the exercise
The following is an example of the second bundle entry with the embedded ProcedureRequest
resource:
{
"fullUrl": "urn:uuid:88f151c0-a954-468a-88bd-5ae15c08e059",
"resource": {
"resourceType": "ProcedureRequest",
"subject": {
"reference": "Patient/497fd901-bedc-7634-75f3-156a8f74d55e"
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "281090004",
"display": "Recommendation to exercise"
}
]
},
"status": "proposed",
"orderer": {
"reference": "Practitioner/186d8fe2-acbd-9658-35f7-123ad8fe698a"
},
},
"request": {
"method": "POST",
"url": "ProcedureRequest"
}
}