6. Create a completed MedicationAdministration and update the MedicationRequest within a transaction.

POST https://api-{{tenant-id}}.developer.commure.com/api/v1/r4/

When we receive a message that the order has been picked up, the MedicationDispense status will be changed to completed and we will create a MedicationAdministration resource to track the last part of the workflow.

Immediately prior to administering the medication, the nurse may confirm that the medication is being given to the intended patient. This may involve entering or scanning the patient identifier along with entering details of the administration event. The client application should be able to use the artifacts of the workflow up to this point to validate that the medication is going to the intended patient and to surface any additional notes or issues with the request.

Assuming the verification is handled by the client application, the client will send the MedicationAdministration resource with an updated status at the end of this process. Once again, this will be handled as an event that may trigger additional steps or communication to fulfill the original request. For example, we may need to create a follow-up dispense and administration to be fulfilled at a later time. The status updates on MedicationAdministration and MedicationRequest are analogous to the request in step 4b. In our example, the completed MedicationAdministration completes the MedicationRequest.

Request Body

{"resourceType"=>"Bundle", "id"=>"bundle-transaction", "type"=>"transaction", "entry"=>[{"resource"=>{"resourceType"=>"MedicationAdministration", "status"=>"completed", "category"=>{"coding"=>[{"system"=>"http://terminology.hl7.org/CodeSystem/medication-admin-category", "code"=>"inpatient", "display"=>"Inpatient", "userSelected"=>true}]}, "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/{{patient-id}}"}, "effectiveDateTime"=>"{{$isoTimestamp}}", "request"=>{"reference"=>"MedicationRequest/{{medication-request-id}}"}}, "request"=>{"method"=>"POST", "url"=>"MedicationAdministration"}}, {"resource"=>{"resourceType"=>"MedicationRequest", "id"=>"{{medication-request-id}}", "identifier"=>[{"system"=>"https://commure.com/fhir/example-system", "value"=>"medication-request-id"}], "status"=>"completed", "intent"=>"order", "priority"=>"stat", "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/{{patient-id}}"}, "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}}]}]}, "request"=>{"method"=>"PUT", "url"=>"MedicationRequest/{{medication-request-id}}"}}]}

RESPONSES

status: OK

{"resourceType":"Bundle","type":"transaction-response","entry":[{"resource":{"resourceType":"MedicationAdministration","id":"f850ea5d-e4e0-4606-a315-7844b609f390","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":"664a7d24-2867-4492-b562-c66e985c715e","lastUpdated":"2020-10-23T21:42:34.451245+00:00"},"extension":[{"url":"http://hl7.org/fhir/3.0/StructureDefinition/extension-MedicationAdministration.status","valueCode":"completed"}],"status":"completed","category":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/medication-admin-category","code":"inpatient","display":"Inpatient","userSelected":true}]},"medicationCodeableConcept":{"coding":[{"system":"http://snomed.info/sct","code":"50580-506-02","display":"Tylenol PM"}]},"subject":{"reference":"Patient/8823e92f-4081-4e66-aec5-75500b18c483"},"effectiveDateTime":"2019-07-28T22:08:00-07:00","request":{"reference":"MedicationRequest/medical-request-id"}},"response":{"status":"201","location":"https://api-53914125.developer.commure.com/api/v1/r4/MedicationAdministration/f850ea5d-e4e0-4606-a315-7844b609f390/_history/664a7d24-2867-4492-b562-c66e985c715e","etag":"W/\"664a7d24-2867-4492-b562-c66e985c715e\"","lastModified":"2020-10-23T21:42:34+00:00"}}]}