Clinical Workflow

GET Get medication requests

GET /MedicationRequest

Retrieves a set of resources by using filters.

Parameters

  • patient (query, string) Returns prescriptions for a specific patient
  • X-CORRELATION-ID (header, string)
  • Accept (header, string)
    Allowed values: application/fhir+json.

Responses

  • 200

    Media type: application/fhir+json. Schema: MedicationRequestBundle (extended).

    Includes all fields of MedicationRequestBundle.

    • entry (array of any)

      Entry in the bundle must have a resource or information.

      • Rule: must be a resource unless there's a request or response.
      • Rule: fullUrl property can't be a version-specific reference. For bundles of 'document' and 'message' type, the first resource is special and must be Composition or MessageHeader properties respectively. For all bundles, the meaning of the order of entries depends on the bundle type.

      Each item:

      Entry in the bundle must have a resource or information.

      • Rule: must be a resource unless there's a request or response.
      • Rule: fullUrl property can't be a version specific reference. For bundles of 'document' and 'message' type, the first resource is special and must be the Composition or MessageHeader properties respectively. For all bundles, the meaning of the order of entries depends on the bundle type.

    Example

    {
        "resourceType": "Bundle",
        "id": "05b25304-30cc-4200-883e-7bdb83b5c71f",
        "meta": {
            "lastUpdated": "2023-03-13T10:15:18.511487+05:30"
        },
        "type": "searchset",
        "total": 1,
        "link": [
            {
                "relation": "self",
                "url": "https://localhost:8092/clinical-workflow/fhir-r4/v1/MedicationRequest?patient=001B000001Pjme5IAB"
            }
        ],
        "entry": [
            {
                "fullUrl": "https://localhost:8092/clinical-workflow/fhir-r4/v1/MedicationRequest/0kmB000000007YbIAI",
                "search": {
                    "mode": "match"
                },
                "resource": {
                    "resourceType": "MedicationRequest",
                    "id": "0kmB000000007YbIAI",
                    "status": "active",
                    "intent": "proposal",
                    "category": [
                        {
                            "coding": [
                                {
                                    "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category",
                                    "code": "inpatient",
                                    "display": "Inpatient"
                                }
                            ],
                            "text": "MedicationRequest category Bundle"
                        }
                    ],
                    "priority": "routine",
                    "doNotPerform": true,
                    "reportedBoolean": true,
                    "medicationReference": {
                        "reference": "Medication/0itB00000004RQFIA2",
                        "type": "Medication"
                    },
                    "subject": {
                        "reference": "Patient/001B000001Pjme5IAB",
                        "type": "Patient"
                    },
                    "encounter": {
                        "reference": "Encounter/0kGB0000000CgPBMA0",
                        "type": "Encounter"
                    },
                    "authoredOn": "2015-01-15T00:00:00.000Z",
                    "requester": {
                        "reference": "Practitioner/0cmB0000000H5s3IAC",
                        "type": "Practitioner"
                    },
                    "performer": {
                        "reference": "Practitioner/0cmB0000000H5s3IAC",
                        "type": "Practitioner"
                    },
                    "performerType": {
                        "coding": [
                            {
                                "system": "http://snomed.info/sct",
                                "code": "26369006",
                                "display": "Public Health Nurse"
                            }
                        ],
                        "text": "MedicationRequest performerType Bundle"
                    },
                    "reasonCode": [
                        {
                            "coding": [
                                {
                                    "system": "http://snomed.info/sct",
                                    "code": "297217002",
                                    "display": "Rib Pain (finding)"
                                }
                            ],
                            "text": "MedicationRequest Reason Code Bundle"
                        }
                    ],
                    "reasonReference": [
                        {
                            "reference": "Observation/0hIB0000000CqJNMA0",
                            "type": "Observation"
                        }
                    ],
                    "basedOn": [
                        {
                            "reference": "MedicationRequest/0kmB000000007VXIAY",
                            "type": "MedicationRequest"
                        },
                        {
                            "reference": "ServiceRequest/0jyB0000000CaRCIA0",
                            "type": "ServiceRequest"
                        }
                    ],
                    "groupIdentifier": {
                        "use": "usual",
                        "value": "20000105719990",
                        "system": "urn:oid:1.2.36.146.595.217.0.1"
                    },
                    "courseOfTherapyType": {
                        "coding": [
                            {
                                "code": "acute"
                            }
                        ]
                    },
                    "dosageInstruction": [
                        {
                            "sequence": 1,
                            "text": "one to two tablets every 4-6 hours as needed for rib pain",
                            "additionalInstruction": [
                                {
                                    "text": "test text"
                                }
                            ],
                            "patientInstruction": "Take one to two tablets every four to six hours as needed for rib pain",
                            "timing": {
                                "event": [
                                    "2023-01-01T00:00:00.000Z",
                                    "2023-01-03T00:00:00.000Z",
                                    "2023-01-03T00:00:00.000Z"
                                ],
                                "repeat": {
                                    "boundsRange": {
                                        "low": {
                                            "value": 1.0,
                                            "unit": "minutes",
                                            "code": "minutes"
                                        },
                                        "high": {
                                            "value": 4.0,
                                            "unit": "minutes",
                                            "code": "minutes"
                                        }
                                    },
                                    "count": 2,
                                    "countMax": 4,
                                    "duration": 5.0,
                                    "durationMax": 10.0,
                                    "durationUnit": "d",
                                    "frequency": 1.0,
                                    "frequencyMax": 2,
                                    "period": 2.0,
                                    "periodMax": 4.0,
                                    "periodUnit": "h",
                                    "when": [
                                        "C"
                                    ],
                                    "offset": 10
                                }
                            },
                            "asNeededBoolean": true,
                            "site": {
                                "coding": [
                                    {
                                        "system": "http://snomed.info/sct",
                                        "code": "26643007",
                                        "display": "Oral Route"
                                    }
                                ],
                                "text": "PatientMedication​Dosage​ site Bundle"
                            },
                            "route": {
                                "coding": [
                                    {
                                        "system": "http://snomed.info/sct",
                                        "code": "26643006",
                                        "display": "Oral Route"
                                    }
                                ],
                                "text": "PatientMedication​Dosage​ route Bundle"
                            },
                            "method": {
                                "coding": [
                                    {
                                        "system": "http://snomed.info/sct",
                                        "code": "421521009",
                                        "display": "Swallow - dosing instruction imperative (qualifier value)"
                                    }
                                ],
                                "text": "PatientMedication​Dosage​ method Bundle"
                            },
                            "doseAndRate": [
                                {
                                    "type": {
                                        "coding": [
                                            {
                                                "code": "ordered"
                                            }
                                        ]
                                    },
                                    "doseRange": {
                                        "low": {
                                            "value": 1.0,
                                            "unit": "TAB",
                                            "code": "TAB"
                                        },
                                        "high": {
                                            "value": 2.0,
                                            "unit": "TAB",
                                            "code": "TAB"
                                        }
                                    },
                                    "rateRange": {
                                        "low": {
                                            "value": 1.0,
                                            "unit": "TAB",
                                            "code": "TAB"
                                        },
                                        "high": {
                                            "value": 2.0,
                                            "unit": "TAB",
                                            "code": "TAB"
                                        }
                                    }
                                }
                            ]
                        }
                    ],
                    "dispenseRequest": {
                        "initialFill": {
                            "quantity": {
                                "value": 30.0,
                                "unit": "TAB",
                                "code": "TAB"
                            },
                            "duration": {
                                "value": 10.0,
                                "unit": "days",
                                "code": "d"
                            }
                        },
                        "dispenseInterval": {
                            "value": 10.0,
                            "unit": "days",
                            "code": "d"
                        },
                        "validityPeriod": {
                            "start": "2020-01-15T00:00:00.000Z",
                            "end": "2025-01-15T00:00:00.000Z"
                        },
                        "numberOfRepeatsAllowed": 0,
                        "quantity": {
                            "value": 30.0,
                            "unit": "TAB",
                            "code": "TAB"
                        },
                        "expectedSupplyDuration": {
                            "value": 10.0,
                            "unit": "days",
                            "code": "d"
                        },
                        "performer": {
                            "reference": "Organization/001B000001Pjme5IAB",
                            "type": "Organization"
                        }
                    },
                    "substitution": {
                        "allowedBoolean": true,
                        "reason": {
                            "coding": [
                                {
                                    "system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
                                    "code": "KP",
                                    "display": "formulary policy"
                                }
                            ],
                            "text": "MedicationRequest reason Bundle"
                        }
                    },
                    "priorPrescription": {
                        "reference": "MedicationRequest/0kmB000000007VXIAY",
                        "type": "MedicationRequest"
                    }
                }
            }
            
        ]
    }
  • 500 Something went wrong.

    Media type: application/fhir+json. Schema: OperationOutcome.

    Example

    {
        "resourceType": "OperationOutcome",
        "issue": [
            {
                "severity": "error",
                "code": "code-invalid",
                "details": {
                    "text": " Details not found."
                }
            }
        ]
    }
  • 503 Error connecting Salesforce.

    Media type: application/fhir+json. Schema: OperationOutcome.

    Example: same as GET /MedicationRequest 500 response.