Skip to content

Medication Request

angshuman sarkar edited this page Aug 1, 2020 · 13 revisions

⚠️ This page is for individual medication requests, and not for medications in a prescription

Medication Request is described as FHIR MedicationRequest resource. Lets say you would like to describe a doctor's prescription for Paracetamol.



{
  "resourceType": "MedicationRequest",
  "id": "4257e47a-a0dc-4607-a205-d478f55dd600",
  "status": "active",
  "intent": "order",
  "priority": "stat",
  "subject": {
    "display": "Hina Patel",
    "reference": "Patient/NCP10008"
  },
  "medicationReference": {
    "display": "Calpol 500mg",
    "reference": "Medication/c2b8f3fd-6da0-44ed-bc91-8bb05ff614d2"
  },
  "encounter": {
    "reference": "Encounter/E001",
    "display": "out patient encounter which lead to this prescription"
  },
  "requester": {
    "reference": "Practitioner/P007",
    "display": "Dr Manju Sengar"
  },
  "authoredOn": "2020-02-15",
  "dosageInstruction": [
    {
      "sequence": 1,
      "text": "15 days, starting 22/01/2020 to 07/02/2020",
      "patientInstruction": "Don't discontinue",
      "timing": {
        "code": {
          "text": "15 days"
        }
      }
    }
  ],
  "note": [
    {
      "text": "Check if the fever returns tomorrow"
    },
    {
      "text": "Patient told to take with food"
    }
  ],
  "insurance": [
     {
       "reference": "PMJAY/112312313",
       "display": "PMJAY ID 112312313"
     }
  ]
}


  • priority is optional - but if its "stat" you should mention so.
  • subject - at the minimum, you must provide a display name just to satisfy the FHIR schema validation. If you are describing the patient resource, ensure that the reference is resolvable within another entry in the bundle.
  • medicationReference - is reference to a MedicationResource to be found in the same bundle
  • encounter - is a reference to the encounter with practitioner which led to this prescription. Optional but may be mandated to send over.
  • requester - is reference to the practitioner/doctor who created the prescription. Option but check country specific mandate.
  • dosageInstruction - how the medication is to be used. For details please refer to the FHIR documentation on Dosage. If you are providing dosageInstruction then ensure that you use "dosage.text" to provide textual representation of the dosage instruction. There are other relevant attributes like "route", "take as needed" that are defined part of dosage, including instruction for patients. The doctor's interface (HIU-UI) of the reference stack tries best to interpret the "dosage.timing" but there are too many variations of timing.
  • insurance - is reference to the coverage. This is optional but maybe mandated, in case the medication should be covered insurance policy. Reference stack does not render the coverage, so at the minimum ensure you have a display text for the reference.
  • notes - any textual note regarding the medication, maybe from the practitioner herself. Optional.
  • Keep in mind all the referenced resources must appear as entries in the bundle

Now lets introduce some of the referenced resource as explained above, starting with Medication followed by Encounter and Practitioner. Similarly you may describe other referenced resources.

Medication


{
  "resourceType": "Medication",
  "id": "c2b8f3fd-6da0-44ed-bc91-8bb05ff614d2",
  "code": {
    "text": "Calpol 500mg",
    "coding": [
      {
        "system": "https://www.whocc.no/",
        "code": "N02BE01",
        "display": "Paracetamol Analgesic"
      }
    ]
  },
  "form": {
    "coding": [
      {
        "system": "http://snomed.info/sct",
        "code": "385055001",
        "display": "Tablet"
      }
    ]
  }
}
  • id notice the resource id is same as the one referenced by medication request
  • code - a CodeableConcept - while coding is desired, textual description either through "code.text" or "coding.display" is mandatory. Refer to country specific coding system for coding guidelines.
  • form - the form of the medication - in this case, tablet. Again refer to country specific guidelines.

Encounter


{
  "resourceType": "Encounter",
  "id": "E001",
  "status": "finished",
  "class": {
    "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
    "code": "AMB",
    "display": "Outpatient visit"
  },
  "period": {
    "start": "2015-01-17T16:00:00+10:00",
    "end": "2015-01-17T16:30:00+10:00"
  }
}
  • id - notice the id is same as specified in the MedicationRequest "Encounter/E001
  • class - you must provide the "display" text. It is advised that you provide the code if possible. IMB - inpatient, AMB - outpatient/ambulatory, EMER - emergency, FLD - field, VR - virtual, HH - Health at home
  • period - optional. If associated with MedicationRequest, the "authoredOn" attribute is sufficient in OPD or Virtual or Field encounters. However in inpatient (IMB) context, "period" can be used to describe the hospitalization period

Practitioner


{
  "resourceType": "Practitioner",
  "id": "P007",
  "identifier": [
     {
       "system": "http://mciindia.org/",
       "value": "2318"
     }
  ],
  "name": [
    {
      "text": "Manju Sengar",
      "family": "Sengar",
      "given": [
        "Manju"
      ],
      "prefix": [
        "Dr"
      ],
      "suffix": [
        "MD"
      ]
    }
  ]
}
  • id - notice the id is the same that is referenced from Medication request.
  • identifier - optional. You may use it to describe the identifiers like Medical Council of India registration number or similar.
  • name - its a FHIR HumanName type. At the bare minimum, please provide "text" for a name.

 

Now we have all the individual resources explained, lets try to put them together in the PHR envelope/bundle.

{
  "resourceType": "Bundle",
  "id": "89fb2983-9cef-4f67-baa2-4304f37c8ec8",
  "type": "collection",
  "entry": [
    {
      "fullUrl": "urn:uuid:4257e47a-a0dc-4607-a205-d478f55dd600",
      "resource": {
        "resourceType": "MedicationRequest",
        "id": "4257e47a-a0dc-4607-a205-d478f55dd600",
        "status": "active",
        "intent": "order",
        "priority": "stat",
        "subject": {
          "display": "Hina Patel",
          "reference": "Patient/NCP10008"
        },
        "medicationReference": {
          "display": "Calpol 500mg",
          "reference": "Medication/c2b8f3fd-6da0-44ed-bc91-8bb05ff614d2"
        },
        "encounter": {
          "reference": "Encounter/E001",
          "display": "out patient encounter which lead to this prescription"
        },
        "requester": {
          "reference": "Practitioner/P007",
          "display": "Dr Manju Sengar"
        },
        "authoredOn": "2020-02-15",
        "dosageInstruction": [
          {
            "sequence": 1,
            "text": "15 days, starting 22/01/2020 to 07/02/2020",
            "patientInstruction": "Don't discontinue",
            "timing": {
              "code": {
                "text": "15 days"
              }
            }
          }
        ],
        "note": [
          {
            "text": "Check if the fever returns tomorrow"
          },
          {
            "text": "Patient told to take with food"
          }
        ],
        "insurance": [
          {
            "reference": "PMJAY/112312313",
            "display": "PMJAY ID 112312313"
          }
        ]
      }
    },
    {
      "fullUrl": "urn:uuid:c2b8f3fd-6da0-44ed-bc91-8bb05ff614d2",
      "resource": {
        "resourceType": "Medication",
        "id": "c2b8f3fd-6da0-44ed-bc91-8bb05ff614d2",
        "code": {
          "text": "Calpol 500mg",
          "coding": [
            {
              "system": "https://www.whocc.no/",
              "code": "N02BE01",
              "display": "Paracetamol Analgesic"
            }
          ]
        },
        "form": {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "385055001",
              "display": "Tablet"
            }
          ]
        }
      }
    },
    {
      "fullUrl": "urn:uuid:E001",
      "resource": {
        "resourceType": "Encounter",
        "id": "E001",
        "status": "finished",
        "class": {
          "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
          "code": "AMB",
          "display": "Outpatient visit"
        },
        "period": {
          "start": "2015-01-17T16:00:00+10:00",
          "end": "2015-01-17T16:30:00+10:00"
        }
      }
    },
    {
      "fullUrl": "urn:uuid:P007",
      "resource": {
        "resourceType": "Practitioner",
        "id": "P007",
        "identifier": [
          {
            "system": "http://mciindia.org/",
            "value": "23"
          }
        ],
        "name": [
          {
            "text": "Manju Sengar",
            "family": "Sengar",
            "given": [
              "Manju"
            ],
            "prefix": [
              "Dr"
            ],
            "suffix": [
              "MD"
            ]
          }
        ]
      }
    }
  ]
}
  1. Notice how each of the individual resource is an entry in the bundle, the first resource MedicationRequest establishes the references to other resources which all find places in the same bundle. If you put any of the resources in a different bundle, then the envelope is broken.
  • Also notice that each entry has a "fullUrl" following the pattern "urn:uuid:<uuid>". The "uuid" is same as the "id" of the resource. The same id is referenced from the parent resource, in this case the MedicationRequest.
  1. You can put X number of root resources and X number of references in the same bundle. Just don't make the bundle too big!
  2. Usually better if you group the all the medications requested by the doctor, during the same encounter in the same bundle. That way you can reuse the references to the encounter, practitioner resources as all the individual MedicationRequest refer to the same resources of Encounter and Practitioner. Optimise.

TIPS

  • many of the attributes of medication request are optional in FHIR. You should make sure you refer to India or country specific guidelines of whats mandated to be sent over.