Post Alert
Post an alert to RapidSMS to SMS to CHW’s.
Transaction Specification
URL: POST /ws/rest/v1/alerts
Description: Receives an alert message and relays it to the appropriate CHW. This transaction allows RapidSMS to receive an alert message and deal with it appropriately. An acknowledgment is returned if the transaction was a success, otherwise an error is returned.
Request
HTTP request body will contain the HL7 v2.5 message defined below.
Data
See Requirements for RapidSMS_SHR Integration FINAL.docx (R#4, R#8, R#12)
Messaging Specification
This will be a HL7 v2.5 ORU_R01 message. For details of the specs see the Alerts tab of the following document:
See RapidSMSMessaging Specs
Response
HTTP 201 - Created - If the encounter was saved.
Error
HTTP 500 - Server Error - If the server encountered an error.
HTTP 400 - Bad Request - If the HL7 v2.5 message is malformed.
Orchestration
This section describes how this transaction is orchestrated through the HIM (interoperability layer) in order to complete this transaction.
- Fetch Provider NID from the PR using their EPID and enrich the message
- Fetch Client NID from the CR using their ECID and enrich the message
- Call Post alerts
Sample Messaging Implementation
Scenario 1
Post an alert to RapidSMS to SMS to CHW’s
User Interface
TODO
Sample Request Message
POST https://hie.jembi.org:5000/ws/rest/v1/alerts HTTP/1.1
<?xml version="1.0"?> <ORU_R01 xmlns="urn:hl7-org:v2xml"> <MSH> <MSH.1>|</MSH.1> <MSH.2>^~\&</MSH.2> <MSH.4> <HD.1>RwandaMOH</HD.1> </MSH.4> <MSH.6> <HD.1>316</HD.1> </MSH.6> <MSH.7> <TS.1>20120829133156</TS.1> </MSH.7> <MSH.9> <MSG.1>ORU</MSG.1> <MSG.2>R01</MSG.2> <MSG.3>ORU_R01</MSG.3> </MSH.9> <MSH.10>26e7ff09-ad7c-4538-862d-395431046450</MSH.10> <MSH.11> <PT.1>D</PT.1> <PT.2>C</PT.2> </MSH.11> <MSH.12> <VID.1>2.5</VID.1> <VID.2> <CE.1>RWA</CE.1> </VID.2> </MSH.12> <MSH.21> <EI.1>ALERT</EI.1> </MSH.21> </MSH> <ORU_R01.PATIENT_RESULT> <ORU_R01.PATIENT> <PID> <PID.3> <CX.1>dc8d2234-7fce-4869-945e-97c8b7d97332</CX.1> <CX.5>ECID</CX.5> </PID.3> <PID.5> <XPN.1> <FN.1>Patient</FN.1> </XPN.1> <XPN.2>Mosa</XPN.2> </PID.5> <PID.7> <TS.1>19910405</TS.1> </PID.7> </PID> <ORU_R01.VISIT> <PV1> <PV1.2>0</PV1.2> <PV1.3> <PL.1>364</PL.1> <PL.4> <HD.1>OMRS-Rwamagana</HD.1> </PL.4> </PV1.3> <PV1.4>ALERT</PV1.4> <PV1.7> <XCN.1>3525410</XCN.1> <XCN.2> <FN.1>Doctor</FN.1> </XCN.2> <XCN.3>John</XCN.3> <XCN.13>NID</XCN.13> </PV1.7> <PV1.44> <TS.1>201208230223</TS.1> </PV1.44> </PV1> </ORU_R01.VISIT> </ORU_R01.PATIENT> <ORU_R01.ORDER_OBSERVATION> <OBR> <OBR.1>0</OBR.1> <OBR.4> <CE.2>ALERT</CE.2> </OBR.4> </OBR> <ORU_R01.OBSERVATION> <OBX> <OBX.1>0</OBX.1> <OBX.2>CE</OBX.2> <OBX.3> <CE.1>rsms_rm</CE.1> <CE.2>rsms_rm REMINDER</CE.2> <CE.3>RSMS</CE.3> </OBX.3> <OBX.5> <CE.1>rsms_pmr</CE.1> <CE.2>rsms_pmr PATIENT MISSED REFERRAL</CE.2> <CE.3>RSMS</CE.3> </OBX.5> </OBX> </ORU_R01.OBSERVATION> </ORU_R01.ORDER_OBSERVATION> </ORU_R01.PATIENT_RESULT> </ORU_R01>
Sample Response Message
HTTP/1.1 201 Created