The MediRecords FHIR API supports the following MedicationRequest operations.
GET {API_URL}/v1/MedicationRequest
This API interface enables the client to search MedicationRequest instances from MediRecords repository. This is in compliance with the MediRecords MedicationRequest profile.
Query Parameters | ||
---|---|---|
_count | number | Instruct the server regarding how many resources should be returned in a single page |
authoredon | date | The date the medication request was recorded in the format YYYY-MM-DD. |
code | token | A valid medication code. |
patient | reference | Patient(id) for whom the medication request record is created. |
priority | token | Represents the priority of the prescription. We support only routine and urgent values. |
requester | reference | Practitioner(id) or organization(id) who has ordered for the prescription. |
status | token | Represents the prescription status. We support only draft, active, completed, cancelled, stopped and entered-in-error values. |
The server returns matching MedicationRequest instances in a Bundle that the logged-in user has access to. If no search criteria is provided, then all MedicationRequest instances that the logged-in user has access to will be returned.
Only script records that are not draft or deleted will be provided in the search results.
In an error situation, server SHALL return OperationOutcome detailing the error with the appropriate HTTP Error code as follows.
Status | Text |
---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
GET {API_URL}/v1/MedicationRequest/{id}
This API interface enables the client to read an MedicationRequest resource from MediRecords repository which is compliant with the MediRecords MedicationRequest profile.
Request Parameters | |
---|---|
id | The logical id of the MedicationRequest resource |
In an error situation, server SHALL return OperationOutcome detailing the error with the appropriate HTTP Error code as follows.
Status | Text |
---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
The following table provides the FHIR Webhook event types generated for the MedicationRequest resource.
Hub Event | Application Trigger Event | |
---|---|---|
medication-request.created | Occurs whenever a new prescription record is created | Example |
medication-request.updated | Occurs whenever a prescription record is updated |
Bundle
MedicationRequest (1)
Encounter (0..1)
Patient (1)
PractitionerRole (0..1)
Practitioner (0..3)
Organization (0..2)
medication-request.deleted | Occurs whenever a prescription record is deleted |
Bundle
request (1)
url: DELETE MedicationRequest/{id}