3a. Get snapshot of all active MedicationRequest resources
GET https://api-{{tenant-id}}.developer.commure.com/api/v1/r4/MedicationRequest
We need the MedicationRequest
to be visible to the nurse that will be administering the medication and communicating with the pharmacist. Communicating the MedicationRequest
with the pharmacy’s non-FHIR system is typically handled by Commure as part of our integration with the hospital’s existing systems.
FHIR client applications, like the one being used by the nurse, may want to retrieve and display changes in real time. To do so a broad search query serves as a starting point for retrieving a snapshot of resources that are relevant to the application. Subsequently, the client will simply observe changes to the resource or resource types that are of interest rather than running the full search again. Note that when there are many results, the application will need to retrieve them by following the provided link to the next page of results.
Request Body
{"resourceType"=>"MedicationRequest", "identifier"=>[{"system"=>"wtv", "value"=>"medication-request-id"}], "status"=>"active", "intent"=>"order", "medicationCodeableConcept"=>{"coding"=>[{"system"=>"http://www.nlm.nih.gov/research/umls/rxnorm", "code"=>"861467", "display"=>"Loratadine 5 MG Chewable Tablet"}], "text"=>"Loratadine 5 MG Chewable Tablet"}, "subject"=>{"identifier"=>{"system"=>"example-identifier-system", "value"=>"medication-scenario-patient"}}, "authoredOn"=>"2015-04-08T02:11:28-04:00", "dosageInstruction"=>[{"sequence"=>1, "timing"=>{"repeat"=>{"frequency"=>1, "period"=>4, "periodUnit"=>"h"}}, "asNeededBoolean"=>false, "doseAndRate"=>[{"type"=>{"coding"=>[{"system"=>"http://terminology.hl7.org/CodeSystem/dose-rate-type", "code"=>"ordered", "display"=>"Ordered"}]}, "doseQuantity"=>{"value"=>1}}]}]}
RESPONSES
status: OK
{"resourceType":"Bundle","type":"transaction-response","entry":[{"resource":{"resourceType":"MedicationRequest","id":"30d709a4-d497-4480-bbb3-fcea2abcc5f0","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":"c3d87032-4af3-4aba-b062-708aa0e30cc4","lastUpdated":"2020-10-23T21:40:53.169642+00:00"},"identifier":[{"system":"wtv","value":"medication-request-id"}],"status":"on-hold","intent":"order","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"861467","display":"Loratadine 5 MG Chewable Tablet"}],"text":"Loratadine 5 MG Chewable Tablet"},"subject":{"reference":"patient"},"authoredOn":"2015-04-08T02:11:28-04:00","dosageInstruction":[{"sequence":1,"timing":{"repeat":{"frequency":1,"period":4,"periodUnit":"h"}},"asNeededBoolean":false,"doseAndRate":[{"type":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/dose-rate-type","code":"ordered","display":"Ordered"}]},"doseQuantity":{"value":1}}]}]},"response":{"status":"201","location":"https://api-53914125.developer.commure.com/api/v1/r4/MedicationRequest/30d709a4-d497-4480-bbb3-fcea2abcc5f0/_history/c3d87032-4af3-4aba-b062-708aa0e30cc4","etag":"W/\"c3d87032-4af3-4aba-b062-708aa0e30cc4\"","lastModified":"2020-10-23T21:40:53+00:00"}},{"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}]},"response":{"status":"201","location":"https://api-53914125.developer.commure.com/api/v1/r4/MedicationDispense/a7a1f2a3-58bc-4c15-8023-392d56725714/_history/32e593ac-8276-47d1-b1ad-fe1403f70c72","etag":"W/\"32e593ac-8276-47d1-b1ad-fe1403f70c72\"","lastModified":"2020-10-23T21:40:53+00:00"}}]}