5. Find the MedicationDispense for a known MedicationRequest identifier Request URL
As the pharmacist enters status updates into their system, Commure will update the MedicationDispense
to reflect those updates. For example, these status updates will ensure that FHIR clients of our main FHIR server will be able to display the updated status so that it may show, for example, that the prescription is ready to be picked up.
The MedicationRequest
order that is being fulfilled is referred to in the field authorizingPrescription
of the MedicationDispense
. The relationship between these resources in the context of a FHIR workflow is that of an event
resource and the request
that this event is basedOn
.
Clients that are interested in the status of MedicationDispense
resources can either poll the history of all MedicationDispense
resources (described in the previous step), or by searching for MedicationDispense
resources that reference a specific MedicationRequest
as its authorizingPrescription
. By checking the list of search parameters that are defined for MedicationDispense we find that the corresponding parameter name is prescription
.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
prescription | string |
RESPONSES
status: OK
{"resourceType":"Bundle","type":"searchset","link":[{"relation":"self","url":"MedicationDispense?prescription=30d709a4-d497-4480-bbb3-fcea2abcc5f0\u0026_count=50"}],"entry":[{"fullUrl":"https://api-53914125.developer.commure.com/api/v1/r4/MedicationDispense/a7a1f2a3-58bc-4c15-8023-392d56725714","resource":{"resourceType":"MedicationDispense","id":"a7a1f2a3-58bc-4c15-8023-392d56725714","meta":{"extension":[{"extension":[{"url":"clientname","valueString":"data_uploader"},{"url":"person","valueReference":{"reference":"Person/bea178a0-6ea4-4b47-99af-e4021bba8f99"}}],"url":"https://commure.com/fhir/provenance/StructureDefinition/creator-structure-map"}],"versionId":"32e593ac-8276-47d1-b1ad-fe1403f70c72","lastUpdated":"2020-10-23T21:40:53.250970+00:00"},"status":"unknown","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"665078","display":"Loratadine 5 MG Chewable Tablet"}],"text":"Loratadine 5 MG Chewable Tablet"},"subject":{"reference":"patient"},"authorizingPrescription":[{"reference":"MedicationRequest/30d709a4-d497-4480-bbb3-fcea2abcc5f0"}],"whenPrepared":"2019-06-01","dosageInstruction":[{"sequence":1,"text":"Twice Daily.","asNeededBoolean":true}]},"search":{"mode":"match"}}]}