MediRecords FHIR Implementation Guide
1.4.2 - release


MedicationRequest

The MediRecords FHIR API supports the following MedicationRequest profiles:

MRMedicationRequest Core MedicationRequest
MRMedicationRequestAdmission MedicationRequest Admission

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 following MedicationRequest profiles:

MRMedicationRequest Core MedicationRequest
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.

Response

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

Read

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 following profiles:

MRMedicationRequest Core MedicationRequest
MRMedicationRequestAdmission MedicationRequest Admission
Request Parameters  
id The logical id of the MedicationRequest resource

Response

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

Webhook

The following table provides the FHIR Webhook event types generated for the MedicationRequest resource.

Core MedicationRequest Webhooks

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}

MedicationRequest Admission Webhooks

Hub Event Application Trigger Event  
medication-request-admission.created Occurs whenever a new prescription record is created in Admissions Example
medication-request-admission.updated Occurs whenever a prescription record is ceased or updated in Admissions  
Bundle 
  MedicationRequest (1)
  Encounter (1)
  Patient (1)
  PractitionerRole (0..1)
  Practitioner (0..3)
  Organization (0..4)
  Location (0..1)