Send Pure OpenMRS Lab Order to HIE
POST {{openhim-ssl}}/SHR/lab
Request Body
{"resourceType"=>"Bundle", "type"=>"transaction", "entry"=>[{"resource"=>{"resourceType"=>"Task", "id"=>"{{TASK_UUID}}", "identifier"=>[{"system"=>"http://fhir.openmrs.org/ext/task/identifier", "value"=>"{{TASK_UUID}}"}], "basedOn"=>[{"reference"=>"ServiceRequest/{{SERVICE_REQUEST_UUID}}", "type"=>"ServiceRequest"}], "status"=>"requested", "intent"=>"order", "for"=>{"reference"=>"Patient/{{PATIENT_UUID}}", "type"=>"Patient"}, "encounter"=>{"reference"=>"Encounter/{{ENCOUNTER_UUID}}", "type"=>"Encounter"}, "authoredOn"=>"{{CURRENT_DATE}}", "lastModified"=>"{{CURRENT_DATE}}", "owner"=>{"reference"=>"Practitioner/f9badd80-ab76-11e2-9e96-0800200c9a66", "type"=>"Practitioner"}, "location"=>{"reference"=>"Location/66af1085-6d14-4abc-9c11-1af7cafa2e4e", "type"=>"Location"}}, "request"=>{"method"=>"PUT", "url"=>"Task/{{TASK_UUID}}"}}, {"resource"=>{"resourceType"=>"Encounter", "id"=>"{{ENCOUNTER_UUID}}", "meta"=>{"lastUpdated"=>"2023-01-25T20:59:23.000+03:00", "tag"=>[{"system"=>"http://fhir.openmrs.org/ext/encounter-tag", "code"=>"encounter", "display"=>"Encounter"}]}, "status"=>"unknown", "class"=>{"system"=>"http://terminology.hl7.org/CodeSystem/v3-ActCode", "code"=>"AMB"}, "type"=>[{"coding"=>[{"system"=>"http://fhir.openmrs.org/code-system/encounter-type", "code"=>"1E88B447-7B50-440E-B475-09844AA0E86E", "display"=>"Lab Order"}]}], "subject"=>{"reference"=>"Patient/{{PATIENT_UUID}}", "type"=>"Patient"}, "participant"=>[{"individual"=>{"reference"=>"Practitioner/f9badd80-ab76-11e2-9e96-0800200c9a66", "type"=>"Practitioner", "identifier"=>{"value"=>"UNKNOWN"}}}], "period"=>{"start"=>"2023-01-25T20:59:23+03:00"}, "location"=>[{"location"=>{"reference"=>"Location/66af1085-6d14-4abc-9c11-1af7cafa2e4e", "type"=>"Location", "display"=>"Airstrip Clinic"}}], "partOf"=>{"reference"=>"Encounter/420739ce-a1d9-41ec-9e4d-adc8cae36a7b", "type"=>"Encounter"}}, "request"=>{"method"=>"PUT", "url"=>"Encounter/{{ENCOUNTER_UUID}}"}}, {"resource"=>{"resourceType"=>"Practitioner", "id"=>"f9badd80-ab76-11e2-9e96-0800200c9a66", "meta"=>{"lastUpdated"=>"2018-07-23T02:52:59.000+03:00"}, "identifier"=>[{"system"=>"http://fhir.openmrs.org/ext/provider/identifier", "value"=>"UNKNOWN"}], "active"=>true, "name"=>[{"id"=>"b2350886-820c-45df-80e5-ccd8e05c2672", "family"=>"Admin", "given"=>["Abel", "Mkombozi"]}, {"id"=>"FE5A0AB1-0B74-48DB-B5D2-EBAC7DC201FC", "family"=>"Mkombozi", "given"=>["ABEL"]}], "gender"=>"male"}, "request"=>{"method"=>"PUT", "url"=>"Practitioner/f9badd80-ab76-11e2-9e96-0800200c9a66"}}, {"resource"=>{"resourceType"=>"Patient", "id"=>"{{PATIENT_UUID}}", "meta"=>{"lastUpdated"=>"{{CURRENT_DATE}}"}, "identifier"=>[{"id"=>"{{IDENTIFIER_UUID}}", "use"=>"official", "type"=>{"coding"=>[{"code"=>"9C92F3DF-AE32-462F-8FB2-A78DFAF8BA7C"}], "text"=>"National ID"}, "system"=>"http://moh.bw.org/ext/identifier/omang", "value"=>"{{OMANG_NO}}"}, {"id"=>"19fac3a8-c79c-4fb8-b1c2-b0914d925fa7", "extension"=>[{"url"=>"http://fhir.openmrs.org/ext/patient/identifier#location", "valueReference"=>{"reference"=>"Location/8d6c993e-c2cc-11de-8d13-0010c6dffd0f", "type"=>"Location", "display"=>"Unknown Location"}}], "use"=>"usual", "type"=>{"coding"=>[{"code"=>"05a29f94-c0ed-11e2-94be-8c13b969e334"}], "text"=>"OpenMRS ID"}, "system"=>"http://openelis-global.org/pat_nationalId", "value"=>"{{OPENMRS_ID}}"}], "active"=>true, "name"=>[{"id"=>"{{NAME_UUID}}", "family"=>"{{lastName}}", "given"=>["{{firstName}}"]}], "gender"=>"{{sex}}", "birthDate"=>"{{birthDate}}", "deceasedBoolean"=>false, "address"=>[{"use"=>"home", "line"=>["{{address}}"], "city"=>"{{city}}", "state"=>"B", "postalCode"=>"0101", "country"=>"BWA"}], "telecom"=>[{"id"=>"{{TELECOM_UUID}}", "value"=>"{{phone}}"}]}, "request"=>{"method"=>"PUT", "url"=>"Patient/{{PATIENT_UUID}}"}}, {"resource"=>{"resourceType"=>"ServiceRequest", "id"=>"{{SERVICE_REQUEST_UUID}}", "status"=>"active", "intent"=>"order", "code"=>{"coding"=>[{"code"=>"{{LAB_TEST_CODE}}", "display"=>"{{LAB_TEST_DISPLAY}}"}, {"system"=>"https://openconceptlab.org/orgs/CIEL/sources/CIEL", "code"=>"{{CIEL_CODE}}", "display"=>"{{LAB_TEST_DISPLAY}}"}], "text"=>"{{LAB_TEST_DISPLAY}}"}, "subject"=>{"reference"=>"Patient/{{PATIENT_UUID}}", "type"=>"Patient"}, "encounter"=>{"reference"=>"Encounter/{{ENCOUNTER_UUID}}", "type"=>"Encounter"}, "occurrencePeriod"=>{"start"=>"2023-01-18T21:02:37+03:00"}, "requester"=>{"reference"=>"Practitioner/f9badd80-ab76-11e2-9e96-0800200c9a66", "type"=>"Practitioner", "identifier"=>{"value"=>"UNKNOWN"}}}, "request"=>{"method"=>"PUT", "url"=>"ServiceRequest/{{SERVICE_REQUEST_UUID}}"}}, {"resource"=>{"resourceType"=>"Location", "id"=>"{{LOCATION_UUID}}", "meta"=>{"lastUpdated"=>"2023-02-08T08:07:08.000+02:00", "tag"=>[{"system"=>"http://fhir.openmrs.org/ext/location-tag", "code"=>"Visit Location", "display"=>"Visits are only allowed to happen at locations tagged with this location tag or at locations that descend from a location tagged with this tag."}]}, "status"=>"active", "name"=>"{{OPENMRS_FACILITY_NAME}}", "address"=>{"country"=>"Botswana"}}, "request"=>{"method"=>"PUT", "url"=>"Location/{{LOCATION_UUID}}"}}]}