Version 1.0 Pivot Access Ltd RAPIDSMS-RHEA Integration Technical Design Document Pivot Access Ltd RAPIDSMS-RHEA Integration Technical Design Document Table of Contents 1.1 Revision History...............................................................................................................4 1.2 Contributors/Reviewers....................................................................................................4 2.1 Scope of this document....................................................................................................5 2.2 Requirements for this document.......................................................................................5 3.4 echnic!" Structure...........................................................................................................# 4.1 Comp"i!nce with RH$% tr!ns!ction specific!tions.........................................................& 4.2 Supported resources..........................................................................................................& 4.3 'erform!nce......................................................................................................................( 4.4 Security.............................................................................................................................( 4.5 )ess!*e +efinitions.........................................................................................................( 4.# Se*ment +efinitions.........................................................................................................( 4.& St!nd!rd Code Sets.........................................................................................................12 4.( )ess!*e $,!mp"es.........................................................................................................14 5.1 %'- desi*n !nd deve"opment..........................................................................................25 5.2 %'- oper!tions................................................................................................................2# Pivot Access Ltd RAPIDSMS-RHEA Integration Technical Design Document 1 Document Control 1.1 Revision History Date Author Version Change Summar !"-10-!011 #$A%T$A&I 'I(AMA Di)ier 0.1 *irst +ersion !"-11-!011 Pi+ot an) RHEA Team 0.! H&, message )e-initions 1.2 Contributors/Reviewers Contri.utor/Re+ie0er Comments M#TESA Christian %'E1IMA%A Antoine 2A(AME Maurice Pivot Access Ltd RAPIDSMS-RHEA Integration Technical Design Document 2 Introduction 2.1 Scope of this document This )ocument )escri.es ho0 the RAPIDSMS sstem is )esigne). It )escri.es the structure o- RAPIDSMS an) ho0 it integrates 0ith the RHEA. A-ter rea)ing the )ocument the rea)er shoul) .e a.le to un)erstan) the sstem an) can maintain or ma3e changes an) -i4 .ugs. 2.2 Requirements for this document This is a technical )ocument that )escri.es the )esign o- the Ra5i)SMS - R$A%DA Sstem6 an) its integration to RHEA. The )ocument re-ers to +arious technologies. Rea)ers shoul) .e a0are o- these technologies an) terminologies. Pthon D7ango Ra5i)sms $e. Ser+ices H&, 2.3 Audience This )ocument is targete) -or )e+elo5ers an) technical rea)ers that 0ill integrate Ra5i)SMS - R$A%DA 0ith RHEA as 0ell as )e+elo5ing -urther com5onents an) maintaining Ra5i)SMS - R$A%DA. It is e45ecte) that the rea)er has some technical .ac3groun) relate) to the technologies mentione) in the re8uirements o- this )ocument. 2.4 ocument References Re- 9. Document %ame #R& 1 Pthon htt5://5thon.org/ ! D7ango htt5s://000.)7ango5ro7ect.com/ ; Ra5i)sms htt5://000.ra5i)sms.org htt5://)ocs.ra5i)sms.org htt5://en.0i3i.oo3s.org/0i3i/Ra5i)SMS<De+elo5ers<(ui)e = $e. Ser+ices htt5://000.0;schools.com/0e.ser+ices/ > H&, htt5://000.hl,.com/ ? Ra5i)SMS - R$A%DA htt5://000.ra5i)sms.moh.go+.r0 Pivot Access Ltd RAPIDSMS-RHEA Integration Technical Design Document 3 Design Overview 3.1 !urpose This )ocument has the 5ur5ose to 5ro+i)e a technical )esign o- Ra5i)SMS inter-aces 0ith RHEA@s Intero5era.ilit &aer AHIEB. This )ocument s5eci-ies the current Ra5i)SMS C R$A%DA )esign an) 5ro+i)es a -ull e45lanation o- the s5eci-ications e45ecte) in RHEA transactions6 Phase 16 gui)e -or im5lementation )ecisions o- Ra5i)SMS-SHR integration. 3.2 R"pidS#S $verview Ra5i)SMS Aan SMS .ase) sstem to 5ro+i)e a real time communit .ase) sur+eillance an) alert sstem -or maternal an) chil) health in R$A%DAB 0as .uilt on Ra5i)SMS6 a -ree an) o5en-source -rame0or3 -or )namic )ata collection6 logistics coor)ination an) communication6 le+eraging .asic short message ser+ice ASMSB mo.ile 5hone technolog. It 0as customiDe) s5eci-icall to su55ort maternal6 neonatal an) earl chil) health at the communit le+el . intro)ucing tools to hel5 CH$s trac3 5regnant 0omen un)er their care6 monitor antenatal care6 i)enti- an) re-er 0omen at ris36 an) im5ro+e communication 0ith health -acilit an) )istrict le+el -acilities in the case o- emergencies. 3.3 %echno&o'y The Ra5i)SMS - R$A%DA 0as )esigne) an) im5lemente) using the -ollo0ing technologies: ES : (%#/&I%#F 5lat-orm A#.untuB Pthon an) Re8uire) Pac3ages D7ango $e. *rame0or3 Ra5i)sms Core &i.rar 2annel SMS (ate0a MSG& Data.ase Management Sstem Chero3ee $e. Se+er 3.4 %echnic"& Structure Ra5i)SMS consists o- three main com5onents: A55lications: 5er-orms one or more o- the -ollo0ing -unctionsH message 5rocessing -rom the Router6 Data-mo)el e4tension6 $e.#I ... Aeg: CH$ RegistrationH Iirth re5ort6 etc..B Iac3en)s: recei+e messages -rom e4ternal sources6 an) )eli+er messages -rom A55lications to e4ternal sourcesA(SM Han)set or Mo)em: +ia the 5(SM .ac3en)6 SMSC : +ia 2annel SMS gate0a6 HTTP clients : +ia HTTP .ac3en)B Router: routes messages .et0een Iac3en)s an) A55lications. Pivot Access Ltd RAPIDSMS-RHEA Integration Technical Design Document 4 RapidSS ! R"#$D# and R%&# Integration This 5aragra5h 5ro+i)es an integration )esign that contains stan)ar)s an) measures that the sstem must satis- in or)er to com5l 0ith the RHEA Pro7ect. It 0ill .e use) to +ali)ate the )esign an) ensure that it is aligne) 0ith RHEAJs o+erall Architecture6 Design Princi5les an) Stan)ar)s. 4.1 Comp&i"nce with RH(A tr"ns"ction specific"tions To inter-o5erate6 Ra5i)SMS nee)s to : Consume ser+ices e45ose) . RHEA : Ra5i)SMS shoul) su55ort RHEA Transaction messages as )e-ine) in the RHEA transactions s5eci-ications )ocument. E45ose a REST*ul API that 0ill a+ail some o- its -unctionalities to RHEA. Ra5i)SMS has a nee) to setu5 an) a))ress the connecti+it6 a))ressing6 securit an) relia.le messaging schema that 0ill allo0 the communication an) the e4change o- )ata 0ith RHEA. 4.2 Supported resources to consume ARa5i)SMS to RHEAB : Sa+e Patient Encounter : This transaction )eals 0ith sa+ing a 5atients encounter in their me)ical recor) to e45ose ARHEA to Ra5i)SMSB : Post alerts : Recei+es an alert message an) relas it to the a55ro5riate CH$ +ia SMS Pivot Access Ltd RAPIDSMS-RHEA Integration Technical Design Document 4.3 !erform"nce TODO 4.4 Security In or)er to com5l 0ith RHEA securit regulations6 accesses to the 5atientsJ health recor)s are 5ro+i)e) a-ter authentication. As a result6 the RAPIDSMS API 0ill 5ro+i)e authoriDation -unction. 4.) #ess"'e efinitions Ra5i)SMS API 0ill su55ort the Health &e+el , AH&,B Version !.> #nsolicite) Result Message AER#KR01B. The -ollo0ing are ER# message segments that 0ill .e 5rocesse)6 i- 5resent: MSH Message Hea)er Segment Pro+i)es transactional in-ormation -or the message. PID Patient I)enti-ication Segment inclu)es 5atient in-ormation.PV1 Patient Visit Segment. #se) to i)enti-6 an) 5ro+i)e encounter in-ormation. EIR - E.ser+ation Re8uest segment ser+es as a section hea)er -or the EIF segments that )irectl -ollo0. EIF -The E.ser+ation Result Segment AEIFB is use) to con+e o.ser+ation results as Lname/+alue 5airsM that in)icates o.ser+ations. The EV% segment ca5tures .asic e+ent in-ormation. The ST* segment ca5tures rele+ant in-ormation -or the health 5ro-essional. The ER( segment ca5tures organiDational a--iliation in-ormation -or the health 5ro-essional. The &A% segment ca5tures language in-ormation *or each o- the segments that are 5rocesse)6 5lease re-er to the Segment De-initions section o- this )ocument -or more )etails. 4.* Se'ment efinitions The -ollo0ing ta.le sho0s an) )escri.es the segments o- the H&, messages that are sent to SHR or recei+e) -rom SHR . Ra5i)SMS. Man o- the segments are either re8uire) or o5tional com5onents o- t0o or more o- the messages -or 5atient encounters6 or alerts that the Ra5i)SMS API can sen) or recei+e. Each segment )e-inition in the ta.le contains se+eral ro0s an) columns o- )ata to )e-ine the rele+ant segment. SE(ME%T SE(ME%T %AME *IE&D RE*ERE%CE *IE&D %AME Descri5tion note MSH MESSA(E HEADER SE(ME%T This segment is re8uire) in e+er transactional message6 an) it 5ro+i)es all in-ormation re8uire) to 5rocess the Message/transaction Pivot Access Ltd RAPIDSMS-RHEA Integration Technical Design Document MSH-1 *iel) Se5arator It is re8uire) to utiliDe the LNM -iel) se5arator in all messages to .e sent. MSH-! Enco)ing Characters It is strongl recommen)e) to utiliDe the enco)ing characters liste) in S5ecial Characters an) Enco)ing section. &iteral +alue: OKPQR9J MSH-; Sen)ing A55licatio n *or each message6 the H&, )ata e4change 5artner shoul) +alue MSH-;.1 0ith the name o- the sen)ing a55lication. e.g: LRa5i)SMSM MSH-= Sen)ing *acilit *or each message6 the H&, )ata e4change 5artner shoul) +alue MSH-=.1 0ith the *acilit Co)e that 0as assigne) . the Minstr o- Health. e.g: *ESA CEDE In Ra5i)SMS MSH-> Recei+ing A55licatio n *or each message6 the target sstem 0ill .e 5ro+i)e). E.g : LSHRM -or Ra5i)SMS MSH-? Recei+ing *acilit *or each message6 the target health -acilit 0ill .e 5ro+i)e). E.g : LR0an)a MEHM -or Ra5i)SMS MSH-, Date/Time o- Message Date/time the sen)ing sstem create) the message. The e45ecte) -ormat is 1111MMDDHHMMSSH -or e4am5le6 L!0110=!010>!;=M re5resents A5ril !06 !011 at 10:>! AM an) ;= secon)sB. MSH-S Message T5e *or each message6 MSH-S.1 must .e +alue) 0ith message t5e LER#M6 MSH- S.! +alue) 0ith LR01M an) MSH-S.; +alue) 0ith LER#KR01KER#<R01M. MSH-10 Message Control ID The sen)er must +alue this -iel) 0ith a uni8ue i)enti-ier. Ra5i)SMS 0ill 5ro+i)e the Re5ort re-erence num.er in this -iel). MSH-11 Processing ID #se TDT no0 -or De.ugging6 Pro)uction6 Training -or MSH-11.16 an) use LCM -or MSH-11.! the 5rocessing mo)e. MSH-1! Version ID #se TV!.>M -or MSH-1!.16 an) use LR$AM -or MSH-11.! the internationaliDation co)e. Pivot Access Ltd RAPIDSMS-RHEA Integration Technical Design Document MSH-!1 Message Pro-ile I)enti-ier De-ines the 3in) o- -unctional )ata carrie) 0ithin this message. Value +alues: TPRET6 TRIS2T6 TIIRT6 TMATT6 an) LA&ERTM. PID PATIE%T IDE%TI*ICATIE % SE(ME%T This segment is re8uire) an) is use) -or i)enti-ing the 5atient an) communicating the 5atientJs in-ormation PID-; Patient I)enti-ier &ist Patient i)enti-ier is inclu)e) APID-;.1B an) the i)enti-ier t5e +alue APID-;.> 6 use L%IDM -rom Ra5i)SMSB PID-> Patient %ame The Patient &ast/*amil %ame APID- >.1.1B an) Patient *irst/(i+en %ames APID->.!B are re8uire). The Patient Mi))le %ame APID->.;B shoul) .e inclu)e)6 i- a+aila.le. Ra5i)SMS )oesn@t ha+e names -or 5atient. PID-!S Death Date an) Time The )ate an) time the 5atient 0as )ea). PV1 PATIE%T VISIT SE(ME%T #se) to i)enti-6 an) 5ro+i)e encounter in-ormation. PV1-1 Set ID #se L1M PV1-! Patient Class #se LCommunit HealthM PV1-; Assigne) Patient &ocation The location 0here the 5atient is locate). Ra5i)SMS assumes the 5atient is in the same location as the The communit Health $or3er ACH$B. PV1-, Atten)e) Doctor The assigne) 5ractitioner ID A-rom the Pro+i)er RegistrB. Ra5i)SMS use the %ID o- a CH$. PV1-== A)mit Date/Time The )ate an) time. Ra5i)SMS use )ate an) time in the collecte) re5ort . a CH$ EIR EISERVATIE% REG#EST SE(ME%T The E.ser+ation Result Segment AEIFB is use) to con+e o.ser+ation results as Lname/+alue 5airsM EIR-1 Set ID Se8uence num.er o- one o- multi5le EIRs that ma .e in a message. use L1M -or -irst or)er6 L!M -or secon) or)er 6 etc. EIR-= #ni+ersal Co)e that in)icates the t5e o- )ata Pivot Access Ltd RAPIDSMS-RHEA Integration Technical Design Document Ser+ice I)enti-ier carrie) in this %oti-ication segment. use LMaternal Health Re5ortingM -or EIR-=.! EIF EISERVATIE% RES#&T SE(ME%T The E.ser+ation Result Segment AEIFB is use) to con+e o.ser+ation results as Lname/+alue 5airs.M EIF-1 Set ID Se8uence num.er o- the EIF6 0hich increments u5 . one -or each o.ser+ation segment in the grou5. EIF-! Value T5e In)icates the t5e -or the o.ser+ation +alue. EIF-; E.ser+atio n I)enti-ier #ni8ue i)enti-ier o- the s5eci-ic o.ser+ation .eing 5asse) in this segment. EIF-;.1 -or ID6 EIF-;.! -or )escri5tion6 an) EIF-;.; -or the co)ing sstem. EIF-> E.ser+atio n Value Actual result +alue or o.ser+ation. The o.ser+ation +alue 0ill al0as .e one o- these +alues: Date o- &ast Menstrual Perio) Mother@s $eight Estimate) Date o- Deli+er Chil) %um.er Ia. 0eight Ris3 Co)e Maternal Co)e Trigger %ame EV% EVE%T SE(ME%T The EV% segment ca5tures .asic e+ent in-ormation. EV%-! Recor)e) Date/Time EV%-!.1 -or Date an) Time the in-ormation has .een recor)e). ST* STA** IDE%TI*ICATIE % SE(ME%T The ST* segment ca5tures rele+ant in-ormation -or the health 5ro-essional. ST*-! Sta-- I)enti-ier &ist %ID ST*-= Sta-- T5e CH$6 S#P ST*-" De5artmen t The +illage the CH Pivot Access Ltd RAPIDSMS-RHEA Integration Technical Design Document ER( PRACTITIE%ER ER(A%I'ATIE% #%IT SE(ME%T The ER( segment ca5tures organiDational a--iliation in-ormation -or the health 5ro-essional. ER(-1 Set ID #se L1M ER(-> Practitioner ErganiDatio n #nit I)enti-ier Ra5i)SMS uses *ESA CEDE o- the health -acilit -or ER(->.?.1 &A% &A%(#A(E SE(ME%T The &A% segment ca5tures language in-ormation &A%-1 Set ID #se L1M &A%-! &anguage Co)e &A%-!.1 -or &anguage co)e6 Ra5i)SMS uses LR$M6ME%M6an) L*RM 4.+ St"nd"rd Code Sets The -ollo0ing ta.le illustrates the co)e sets6 some are ta3en -rom Ra5i)SMS6 the RHEA transaction s5eci-ications )ocument6 the SHR<Ra5i)SMS<H&, ma55ing )ocument6 an) others 0ill .e a))e) -rom RHEA DATA CEDEIEE26 i- an. This means that this ta.le can .e mo)i-ie) in an +ersion o- this )ocument6 0here some co)e sets coul) .e a))e)6 remo+e) or mo)i-ie). Source Categor' Code Description RapidSS (accination V1 IC(6 PE V! P16 Penta16 PCV1 V; P!6 Penta!6 PCV! V= P;6 Penta;6 PCV; V> Measles RapidSS )irt* %A %e+er recei+e) antenatal care Pivot Access Ltd RAPIDSMS-RHEA Integration Technical Design Document Ris+ T$ T0ins TR Tri5let IE Male Chil) (I *emale Chil) TE Mother at term &A Mother in la.or RapidSS %P %o 5ro.lem SC Serious con)ition6 .ut un3no0n CI Cor) in-ection DI Diarrhea MA Malaria *E *e+er H1 H5othermia RI Ra5i) .reathing P% Pneumonia HE Hemorrhaging/ .lee)ing VE Vomiting CE Con+ulsion SA Se+ere anemia SI CH Coughing #% #nconscious EE Ee)ema *P *lacci) 5aralsis %S %ec3 sti--ness CM Congenital mal-ormation UA Uaun)ice A* A.normal -ontanel Pivot Access Ltd RAPIDSMS-RHEA Integration Technical Design Document PC Premature contraction S& Stoc3 la.or DS Chronic )isease PS &a.or on 5re+ious cesarean section DP De5arture R* Re-usal 4., #ess"'e (-"mp&es The -ollo0ing e4am5les illustrate the H&, messages that are sent to SHR or recei+e) -rom SHR . Ra5i)SMS. $e ha+e -i+e )i--erent e4am5les o- messages accor)ing to these -i+e )i--erent message 5ro-ile i)enti-iersH PRE6 RIS26 IIR6 MAT an) A&ERT. Each e4am5le 5ro+i)es the -ollo0ing: Sam5le Message: 5ro+i)es the entire message string Message %arrati+e: tells the stor o- the message. Segment Details: lists each message segment6 such as the Message Hea)er AMSHB segment6 containe) in the sam5le message6 the -iel)s containe) in that segment an) the )ata A-rom the sam5le messageB 5ro+i)e) in each -iel). &,ample 1- .R& message This message sho0s the )etaile) sam5le H&, message that is sent to SHR -or a ne0 encounter noti-ing a ne0 5regnanc registration -rom Ra5i)SMS. Sample essage S%NKPQR9NRa5i)SMSN*;1?NSHRNR0an)aMEHN!011110S0?>,1"NNER#KR01KER#<R01N?"0?0NDKCN V!.>KR$ANNNNNNNNNPR .IDNNN11S"!,01!0;=;0=0KKKK%IDNN .(1N1NCommunit HealthN;1?NNNN11S,;,00>?!;;0";NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN!011110S0?>,1" O)RN1NNNKMaternal Health Re5orting O)/N1NTSNKDate o- &ast Menstrual Perio)KNN!0110,0=NNNNNN* O)/N!N%MNKMother@s $eightKNN>,N3NNNNN O)/N;NTSNKEstimate) Date o- Deli+erKNN!01!0=0?NNNNNN* Pivot Access Ltd RAPIDSMS-RHEA Integration Technical Design Document essage $arrative In this e4am5le6 a.o+e6 the Message Hea)er AMSHB segment6 i)enti-ies the message as .eing sent to SHR6 R0an)a MEH -acilit6 -rom Ra5i)SMS6 -rom the -acilit registere) 0ith co)e L*;1?M6 0hich is the -acilit co)e associate) 0ith M#HE'A Health Centre in Ra5i)SMS. The MSH segment also lets 3no0 that the message 0ill contain the stan)ar) se5arator o- LNM an) enco)ing characters o- LKPQ R9M. This message 0as create) on 0S/10/!011 at a55ro4imatel ?:>, AM A0?:>,:1" to .e e4actB6 an) is an ER# R01 Ai.e.6 unsolicite) resultB message. Ra5i)SMS has assigne) the uni8ue message ID o- L?"0?0M to this ER# messageH the SHR 0ill 5erha5s echo this uni8ue ID .ac3 in the res5onse message. The LDM that -ollo0s the uni8ue message ID in)icates that this ma .e a 5ro)uction6 training or a )e.ugging message an) the LCM the 5rocessing mo)e. The Version -iel)6 the ne4t to last -iel) in this segment6 i)enti-ies that Ra5i)SMS is using H&, +ersion !.>. This is a +ersion o- H&, that the Ra5i)SMS API an) SHR o--iciall su55ort an) the internationaliDation co)e is R$A -rom ISE ;1??. In the message 5ro-ile ID -iel)6 the last -iel) sho0n in this segment6 Ra5i)SMS has sent a LPREM meaning that is a 5regnanc noti-ication message.
The ne4t segment o- the message is the Patient I)enti-ication APIDB segment. This ER# message is -or a 5atient registere) in Ra5i)SMS 0ith a national i)entit num.er 11S"!,01!0;=;0=0. The Patient Visit APV1B segment sho0s that the +isit is a Communit Health .ase) 5rogram. The set ID is 1 an) the 5atient is locate) at a location i)enti-ie) . ;1?6 MuhoDa health centreH the 5atient met a CH$ 0ith national ID 11S,;,00>?!;;0"; on S th %o+em.er !011.
The ne4t segments6 the o.ser+ations AEIR an) EIFB6 contains o.ser+ation )ata -or Maternal Health Re5orting. The )ate o- last menstrual 5erio)6 -or the i)enti-ie) 5atient6 is 0=/0,/!0116 her 0eight is >,3g6 an) sheJs e45ecte) to )eli+er on ? th A5ril. Segment Details MSH: MSH-1 *iel) Se5arator: N MSH-! Enco)ing Characters: KPQR9 MSH-;.1 Sen)ing A55lication C %ames5ace ID: Ra5i)SMS MSH-=.1 Sen)ing *acilit C %ames5ace ID: *;1? MSH-;.1 Recei+ing A55lication C %ames5ace ID: SHR MSH-=.1 Recei+ing *acilit C %ames5ace ID: R0an)a MEH MSH-,.1 Date Time o- Message: !011110S0?>,1" A11/0S/!011 at 0?:>,:1"B MSH-S Message T5e MSH-S.1 Message T5e: ER# MSH-S.! Trigger E+ent: R01 MSH-S.; Message structure: ER#KR01KER#<R01 MSH-10 Message Control ID: ?"0?0 MSH-11.1 Processing ID: D Pivot Access Ltd RAPIDSMS-RHEA Integration Technical Design Document MSH-11.! Processing Mo)e: C MSH-1!.1 Version ID: V!.> MSH-1!.! InternationaliDation Co)e: R$A MSH-!1.1 Message Pro-ile: PRE PID: PID-;.1 Patient I)enti-ier ID: 11S"!,01!0;=;0=0 PID-;.> Patient I)enti-ier T5e Co)e: %ID PV1: PV1-1 Set ID: 1 PV1-! Patient Class: Communit Health PV1-; Assigne) Patient &ocation: ;1? PV1-, Atten)ing Doctor: 11S,;,00>?!;;0"; PV1-== A)mit Date/Time: !011110S0?>,1" A11/0S/!011 at 0?:>,:1"B EIR: EIR-1 Set ID: 1 EIR-= #ni+ersal Ser+ice I)enti-ier EIR-=.! Te4t: Maternal Health Re5orting EIF: EIF-1 Set ID: V16 !6 ;W EIF-! Value T5e: VTS6 %M6 TSW EIF-; E.ser+ation I)enti-ier EIF-;.! Te4t :V Date o- &ast Menstrual Perio)6 MotherJs $eight6 Estimate) Date o- Deli+erW EIF-> E.ser+ation Value :V 0,/0=/!0116 >,6 0=/0?/!01!W EIF-?.1 #nit I)enti-ier: V6 36W EIF-11 E.ser+ation Result Status: V*6 *6 *W &,ample 2- RIS0 message This message sho0s the )etaile) sam5le H&, message that is sent to SHR -or a ne0 encounter noti-ing a ne0 ris3 re5ort -rom Ra5i)SMS. Sample essage S%NKPQR9NRa5i)SMSN*;1?NSHRNR0an)aMEHN!011110S0,>,;"NNER#KR01KER#<R01N?"0?1NDKCN V!.>KR$ANNNNNNNNNRIS2 .IDNNN11S"!,01!0;=;0=0KKKK%IDNN .(1N1NCommunit HealthN;1?NNNN11S,;,00>?!;;0";NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN!011110S0,>,;" O)RN1NNNKMaternal Health Re5orting O)/N1N%MNKMother@s $eightKNN>,N3NNNNN* O)/N!NCENKRis3 Co)eKNNHENNNNNN* Pivot Access Ltd RAPIDSMS-RHEA Integration Technical Design Document essage $arrative In this e4am5le6 a.o+e6 the Message Hea)er AMSHB segment6 i)enti-ies the message as .eing sent to SHR6 R0an)a MEH -acilit6 -rom Ra5i)SMS6 -rom the -acilit registere) 0ith co)e L*;1?M6 0hich is the -acilit co)e associate) 0ith M#HE'A Health Centre in Ra5i)SMS. The MSH segment also lets 3no0 that the message 0ill contain the stan)ar) se5arator o- LNM an) enco)ing characters o- LKPQ R9M. This message 0as create) on 0S/10/!011 at a55ro4imatel ?:>, AM A0,:>,:;" to .e e4actB6 an) is an ER# R01 Ai.e.6 unsolicite) resultB message. Ra5i)SMS has assigne) the uni8ue message ID o- L?"0?1M to this ER# messageH the SHR 0ill 5erha5s echo this uni8ue ID .ac3 in the res5onse message. The LDM that -ollo0s the uni8ue message ID in)icates that this ma .e a 5ro)uction6 training or a )e.ugging message an) the LCM the 5rocessing mo)e. The Version -iel)6 the ne4t to last -iel) in this segment6 i)enti-ies that Ra5i)SMS is using H&, +ersion !.>. This is a +ersion o- H&, that the Ra5i)SMS API an) SHR o--iciall su55ort an) the internationaliDation co)e is R$A -rom ISE ;1??. In the message 5ro-ile ID -iel)6 the last -iel) sho0n in this segment6 Ra5i)SMS has sent a LRIS2M meaning that is a ris3 noti-ication message.
The ne4t segment o- the message is the Patient I)enti-ication APIDB segment. This ER# message is -or a 5atient registere) in Ra5i)SMS 0ith a national i)entit num.er 11S"!,01!0;=;0=0. The Patient Visit APV1B segment sho0s that the +isit is a Communit Health .ase) 5rogram. The set ID is 1 an) the 5atient is locate) at a location i)enti-ie) . ;1?6 MuhoDa health centreH the 5atient met a CH$ 0ith national ID 11S,;,00>?!;;0"; on S th %o+em.er !011.
The ne4t segments6 the o.ser+ations AEIR an) EIFB6 contains o.ser+ation )ata -or Maternal Health Re5orting. The 0eight6 -or the i)enti-ie) 5atient6 is >,3g6 an) sheJs ris3 .lee)ing. Segment Details MSH: MSH-1 *iel) Se5arator: N MSH-! Enco)ing Characters: KPQR9 MSH-;.1 Sen)ing A55lication C %ames5ace ID: Ra5i)SMS MSH-=.1 Sen)ing *acilit C %ames5ace ID: *;1? MSH-;.1 Recei+ing A55lication C %ames5ace ID: SHR MSH-=.1 Recei+ing *acilit C %ames5ace ID: R0an)a MEH MSH-,.1 Date Time o- Message: !011110S0?>,;" A11/0S/!011 at 0,:>,:;"B MSH-S Message T5e MSH-S.1 Message T5e: ER# MSH-S.! Trigger E+ent: R01 MSH-S.; Message structure: ER#KR01KER#<R01 MSH-10 Message Control ID: ?"0?0 MSH-11.1 Processing ID: D MSH-11.! Processing Mo)e: C MSH-1!.1 Version ID: V!.> MSH-1!.! InternationaliDation Co)e: R$A MSH-!1.1 Message Pro-ile: PRE PID: PID-;.1 Patient I)enti-ier ID: 11S"!,01!0;=;0=0 PID-;.> Patient I)enti-ier T5e Co)e: %ID Pivot Access Ltd RAPIDSMS-RHEA Integration Technical Design Document PV1: PV1-1 Set ID: 1 PV1-! Patient Class: Communit Health PV1-; Assigne) Patient &ocation: ;1? PV1-, Atten)ing Doctor: 11S,;,00>?!;;0"; PV1-== A)mit Date/Time: !011110S0?>,1" A11/0S/!011 at 0,:>,:;"B EIR: EIR-1 Set ID: 1 EIR-= #ni+ersal Ser+ice I)enti-ier EIR-=.! Te4t: Maternal Health Re5orting EIF: EIF-1 Set ID: V16 !W EIF-! Value T5e: V%M6 CEW EIF-; E.ser+ation I)enti-ier EIF-;.! Te4t :V MotherJs $eight6 Ris3 Co)eW EIF-> E.ser+ation Value :V >,6 HEW EIF-?.1 #nit I)enti-ier: V36W EIF-11 E.ser+ation Result Status: V*6 *W &,ample 3- )IR message This message sho0s the )etaile) sam5le H&, message that is sent to SHR -or a ne0 encounter noti-ing a ne0 .irth registration -rom Ra5i)SMS. Sample essage S%NKPQR9NRa5i)SMSN*;1?NSHRNR0an)aMEHN!011110"0?>,1"NNER#KR01KER#<R01N?"0"0NDKCN V!.>KR$ANNNNNNNNNIIR .IDNNN11S"!,01!0;=;0=1KKKK%IDNN .(1N1NCommunit HealthN;1?NNNN11S,;,00>?!;;0";NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN!011110"0?>,1" O)RN1NNNKMaternal Health Re5orting O)/N1NCENKRis3 Co)eKNN%PNNNNNN* Pivot Access Ltd RAPIDSMS-RHEA Integration Technical Design Document O)/N!NTSNKIirth DateKNN!011110"NNNNNN* O)/N;N%MNKIa. $eightKNN;.;N3NNNNN* O)/N=NCENKIirth Co)eKNN(INNNNNN* O)/N>N%MNKChil) %um.erKNN01NNNNNN* essage $arrative In this e4am5le6 a.o+e6 the Message Hea)er AMSHB segment6 i)enti-ies the message as .eing sent to SHR6 R0an)a MEH -acilit6 -rom Ra5i)SMS6 -rom the -acilit registere) 0ith co)e L*;1?M6 0hich is the -acilit co)e associate) 0ith M#HE'A Health Centre in Ra5i)SMS. The MSH segment also lets 3no0 that the message 0ill contain the stan)ar) se5arator o- LNM an) enco)ing characters o- LKPQ R9M. This message 0as create) on 0"/11/!011 at a55ro4imatel ?:>, AM A0?:>,:1" to .e e4actB6 an) is an ER# R01 Ai.e.6 unsolicite) resultB message. Ra5i)SMS has assigne) the uni8ue message ID o- L?"0"0M to this ER# messageH the SHR 0ill 5erha5s echo this uni8ue ID .ac3 in the res5onse message. The LDM that -ollo0s the uni8ue message ID in)icates that this ma .e a 5ro)uction6 training or a )e.ugging message an) the LCM the 5rocessing mo)e. The Version -iel)6 the ne4t to last -iel) in this segment6 i)enti-ies that Ra5i)SMS is using H&, +ersion !.>. This is a +ersion o- H&, that the Ra5i)SMS API an) SHR o--iciall su55ort an) the internationaliDation co)e is R$A -rom ISE ;1??. In the message 5ro-ile ID -iel)6 the last -iel) sho0n in this segment6 Ra5i)SMS has sent a LIIRM meaning that is a .irth noti-ication message.
The ne4t segment o- the message is the Patient I)enti-ication APIDB segment. This ER# message is -or a 5atient registere) in Ra5i)SMS 0ith a national i)entit num.er 11S"!,01!0;=;0=1. The Patient Visit APV1B segment sho0s that the +isit is a Communit Health .ase) 5rogram. The set ID is 1 an) the 5atient is locate) at a location i)enti-ie) . ;1?6 MuhoDa health centreH the 5atient met a CH$ 0ith national ID 11S,;,00>?!;;0"; on " th %o+em.er !011.
The ne4t segments6 the o.ser+ations AEIR an) EIFB6 contains o.ser+ation )ata -or Maternal Health Re5orting. The i)enti-ie) 5atient has no 5ro.lem6 she comes to )eli+er on " th %o+em.er !0116 the .a.Js 0eight is ;.;3g6 the .a. is a girl6 an) sheJs the -irst .orn. Segment Details MSH: MSH-1 *iel) Se5arator: N MSH-! Enco)ing Characters: KPQR9 MSH-;.1 Sen)ing A55lication C %ames5ace ID: Ra5i)SMS MSH-=.1 Sen)ing *acilit C %ames5ace ID: *;1? MSH-;.1 Recei+ing A55lication C %ames5ace ID: SHR MSH-=.1 Recei+ing *acilit C %ames5ace ID: R0an)a MEH MSH-,.1 Date Time o- Message: !011110"0?>,1" A11/0"/!011 at 0?:>,:1"B MSH-S Message T5e MSH-S.1 Message T5e: ER# MSH-S.! Trigger E+ent: R01 MSH-S.; Message structure: ER#KR01KER#<R01 MSH-10 Message Control ID: ?"0"0 MSH-11.1 Processing ID: D MSH-11.! Processing Mo)e: C MSH-1!.1 Version ID: V!.> Pivot Access Ltd RAPIDSMS-RHEA Integration Technical Design Document MSH-1!.! InternationaliDation Co)e: R$A MSH-!1.1 Message Pro-ile: IIR PID: PID-;.1 Patient I)enti-ier ID: 11S"!,01!0;=;0=1 PID-;.> Patient I)enti-ier T5e Co)e: %ID PV1: PV1-1 Set ID: 1 PV1-! Patient Class: Communit Health PV1-; Assigne) Patient &ocation: ;1? PV1-, Atten)ing Doctor: 11S,;,00>?!;;0"; PV1-== A)mit Date/Time: !011110"0?>,1" A11/0"/!011 at 0?:>,:1"B EIR: EIR-1 Set ID: 1 EIR-= #ni+ersal Ser+ice I)enti-ier EIR-=.! Te4t: Maternal Health Re5orting EIF: EIF-1 Set ID: V16 !6 ;6 =6 >W EIF-! Value T5e: VCE6 TS6 %M6 CE6 %MW EIF-; E.ser+ation I)enti-ier EIF-;.! Te4t :V Ris3 Co)e6 Iirth Date6 Ia. $eight6 Iirth Co)e6 Chil) %um.erW EIF-> E.ser+ation Value :V %P6 11/0"/!0116 ;.;6 (I6 01W EIF-?.1 #nit I)enti-ier: V3W EIF-11 E.ser+ation Result Status: * &,ample 3- #T message This message sho0s the )etaile) sam5le H&, message that is sent to SHR -or a ne0 encounter noti-ing a )eath re5ort -rom Ra5i)SMS. Sample essage S%NKPQR9NRa5i)SMSN*;1?NSHRNR0an)aMEHN!011110"0,>,1"NNER#KR01KER#<R01N?"0"1NDKCN V!.>KR$ANNNNNNNNNMAT .IDNNN11S"!,01!0;=;0=1KKKK%IDNNNNNNNNNNNNNNNNNNNNNNNNNN!011110" .(1N1NCommunit HealthN;1?NNNN11S,;,00>?!;;0";NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN!011110" O)RN1NNNKMaternal Health Re5orting Pivot Access Ltd RAPIDSMS-RHEA Integration Technical Design Document O)/N1NCENKMaternal Death Co)eKNN%DNNNNNN* essage $arrative In this e4am5le6 a.o+e6 the Message Hea)er AMSHB segment6 i)enti-ies the message as .eing sent to SHR6 R0an)a MEH -acilit6 -rom Ra5i)SMS6 -rom the -acilit registere) 0ith co)e L*;1?M6 0hich is the -acilit co)e associate) 0ith M#HE'A Health Centre in Ra5i)SMS. The MSH segment also lets 3no0 that the message 0ill contain the stan)ar) se5arator o- LNM an) enco)ing characters o- LKPQ R9M. This message 0as create) on 0"/11/!011 at a55ro4imatel ?:>, AM A0,:>,:1" to .e e4actB6 an) is an ER# R01 Ai.e.6 unsolicite) resultB message. Ra5i)SMS has assigne) the uni8ue message ID o- L?"0"1M to this ER# messageH the SHR 0ill 5erha5s echo this uni8ue ID .ac3 in the res5onse message. The LDM that -ollo0s the uni8ue message ID in)icates that this ma .e a 5ro)uction6 training or a )e.ugging message an) the LCM the 5rocessing mo)e. The Version -iel)6 the ne4t to last -iel) in this segment6 i)enti-ies that Ra5i)SMS is using H&, +ersion !.>. This is a +ersion o- H&, that the Ra5i)SMS API an) SHR o--iciall su55ort an) the internationaliDation co)e is R$A -rom ISE ;1??. In the message 5ro-ile ID -iel)6 the last -iel) sho0n in this segment6 Ra5i)SMS has sent a LMATM meaning that is a )eath noti-ication message.
The ne4t segment o- the message is the Patient I)enti-ication APIDB segment. This ER# message is -or a 5atient registere) in Ra5i)SMS 0ith a national i)entit num.er 11S"!,01!0;=;0=16 an) the Death Date is 11/0"/!011. The Patient Visit APV1B segment sho0s that the +isit is a Communit Health .ase) 5rogram. The set ID is 1 an) the 5atient is locate) at a location i)enti-ie) . ;1?6 MuhoDa health centreH the 5atient met a CH$ 0ith national ID 11S,;,00>?!;;0"; on " th %o+em.er !011.
The ne4t segments6 the o.ser+ations AEIR an) EIFB6 contains o.ser+ation )ata -or Maternal Health Re5orting. The ne0 .orn comes to )ie. Segment Details MSH: MSH-1 *iel) Se5arator: N MSH-! Enco)ing Characters: KPQR9 MSH-;.1 Sen)ing A55lication C %ames5ace ID: Ra5i)SMS MSH-=.1 Sen)ing *acilit C %ames5ace ID: *;1? MSH-;.1 Recei+ing A55lication C %ames5ace ID: SHR MSH-=.1 Recei+ing *acilit C %ames5ace ID: R0an)a MEH MSH-,.1 Date Time o- Message: !011110"0,>,1" A11/0"/!011 at 0,:>,:1"B MSH-S Message T5e MSH-S.1 Message T5e: ER# MSH-S.! Trigger E+ent: R01 MSH-S.; Message structure: ER#KR01KER#<R01 MSH-10 Message Control ID: ?"0"0 MSH-11.1 Processing ID: D MSH-11.! Processing Mo)e: C MSH-1!.1 Version ID: V!.> MSH-1!.! InternationaliDation Co)e: R$A MSH-!1.1 Message Pro-ile: MAT Pivot Access Ltd RAPIDSMS-RHEA Integration Technical Design Document PID: PID-;.1 Patient I)enti-ier ID: 11S"!,01!0;=;0=1 PID-;.> Patient I)enti-ier T5e Co)e: %ID PID-!S.1 Death Date: !011110" PV1: PV1-1 Set ID: 1 PV1-! Patient Class: Communit Health PV1-; Assigne) Patient &ocation: ;1? PV1-, Atten)ing Doctor: 11S,;,00>?!;;0"; PV1-== A)mit Date/Time: !011110"0?>,1" A11/0"/!011 at 0?:>,:1"B EIR: EIR-1 Set ID: 1 EIR-= #ni+ersal Ser+ice I)enti-ier EIR-=.! Te4t: Maternal Health Re5orting EIF: EIF-1 Set ID: 1 EIF-! Value T5e: CE EIF-; E.ser+ation I)enti-ier EIF-;.! Te4t: Maternal Death Co)e EIF-> E.ser+ation Value %D EIF-11 E.ser+ation Result Status: * &,ample 1- R&1 message This message sho0s the )etaile) sam5le H&, message that is sent to SHR noti-ing a ne0 CH$ registration -rom Ra5i)SMS. Sample essage S%NKPQR9NRa5i)SMSN*;1?NSHRNR0an)aMEHN!011110S0>>,1"NNER#KR01KER#<R01N?"0>0NDKCN V!.>KR$ANNNNNNNNNRE( ST2NN11S,;,00>?!;;0";NNCommunit Health $or3erNNNNKISA%(A%E OR1N1NNNNKKKKK;1? 3#$N1NR$ essage $arrative In this e4am5le6 a.o+e6 the Message Hea)er AMSHB segment6 i)enti-ies the message as .eing sent to SHR6 R0an)a MEH -acilit6 -rom Ra5i)SMS6 -rom the -acilit registere) 0ith co)e L*;1?M6 0hich is the -acilit co)e associate) 0ith M#HE'A Health Centre in Ra5i)SMS. The MSH segment also lets 3no0 that the message 0ill contain the stan)ar) se5arator o- LNM an) enco)ing characters o- LKPQ R9M. This message 0as create) on 0S/10/!011 at a55ro4imatel ?:>, AM A0>:>,:1" to .e e4actB6 an) is an ER# R01 Ai.e.6 unsolicite) resultB message. Ra5i)SMS has assigne) the uni8ue message ID o- L?"0>0M to this ER# messageH the SHR 0ill 5erha5s echo this uni8ue ID .ac3 in the res5onse message. The LDM that -ollo0s the uni8ue message ID in)icates that this ma .e a 5ro)uction6 training or a )e.ugging message an) the LCM the 5rocessing mo)e. The Version -iel)6 the ne4t to last -iel) in this segment6 i)enti-ies that Ra5i)SMS is using H&, +ersion !.>. This is a +ersion o- H&, that the Ra5i)SMS API an) SHR o--iciall Pivot Access Ltd RAPIDSMS-RHEA Integration Technical Design Document su55ort an) the internationaliDation co)e is R$A -rom ISE ;1??. In the message 5ro-ile ID -iel)6 the last -iel) sho0n in this segment6 Ra5i)SMS has sent a LPREM meaning that is a CH$ registration noti-ication message.
The ne4t segment o- the message is the Sta-- I)enti-ication AST*B segment. This ER# message is a registration o- a ne0 CH$ in Ra5i)SMS 0ith a national i)entit num.er 11S,;,00>?!;;0";6 -rom ISA%(A%E +illage. The ErganiDation AER(B segment sho0s that the CH$ is registere) at a -acilit 0ith ;1? Co)e6 0hich is MuhoDa Health Centre. The ne4t segment6 the &anguage A&A%B6 contains language s5o3en . the CH$6 0hich is 2inar0an)a AR$B.
Segment Details MSH: MSH-1 *iel) Se5arator: N MSH-! Enco)ing Characters: KPQR9 MSH-;.1 Sen)ing A55lication C %ames5ace ID: Ra5i)SMS MSH-=.1 Sen)ing *acilit C %ames5ace ID: *;1? MSH-;.1 Recei+ing A55lication C %ames5ace ID: SHR MSH-=.1 Recei+ing *acilit C %ames5ace ID: R0an)a MEH MSH-,.1 Date Time o- Message: !011110S0>>,1" A11/0S/!011 at 0>:>,:1"B MSH-S Message T5e MSH-S.1 Message T5e: ER# MSH-S.! Trigger E+ent: R01 MSH-S.; Message structure: ER#KR01KER#<R01 MSH-10 Message Control ID: ?"0>0 MSH-11.1 Processing ID: D MSH-11.! Processing Mo)e: C MSH-1!.1 Version ID: V!.> MSH-1!.! InternationaliDation Co)e: R$A MSH-!1.1 Message Pro-ile: RE( ST*: ST*-! Sta-- I)enti-ier: 11S,;,00>?!;;0"; ST*-= Sta-- T5e: Communit Health $or3er ST*-".! Sta-- De5artment: ISA%(A%E ER(: ER(-1 Set ID: 1 ER(- Practitioner ErganiDation #nit I)enti-ier EIR->.? Assigning *acilit: ;1? &A%: &A%-1 Set ID: 1 &A%-!.1 &anguage Co)e - I)enti-ier: R$ &,ample 2- #3&RT message This message sho0s the )etaile) sam5le H&, message that is sent to Ra5i)SMS )escri.ing a ne0 alert -rom SHR. Pivot Access Ltd RAPIDSMS-RHEA Integration Technical Design Document Sample essage S%NKPQR9NSHRNR0an)aMEHNRa5i)SMSN;1?N!011110S0,>,;"NNER#KR01KER#<R01NNDKCN V!.>KR$ANNNNNNNNNA&ER .IDNNN11S"!,01!0;=;0=0KKKK%IDNN O)RN1NNNKMaternal Health AlertNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCH$ O)/N1NCENKAlertKNNHENNNNNN* essage $arrative In this e4am5le6 a.o+e6 the Message Hea)er AMSHB segment6 i)enti-ies the message as .eing sent to Ra5i)SMS6 ;1?-MuhoDa Health Centre6 -rom SHR6 -rom R0an)a MEH -acilit. The MSH segment also lets 3no0 that the message 0ill contain the stan)ar) se5arator o- LNM an) enco)ing characters o- LKPQ R9M. This message 0as create) on 0S/10/!011 at a55ro4imatel ?:>, AM A0,:>,:;" to .e e4actB6 an) is an ER# R01 Ai.e.6 unsolicite) resultB message. Ra5i)SMS has assigne) the uni8ue message ID o- L?"0?1M to this ER# messageH the SHR 0ill 5erha5s echo this uni8ue ID .ac3 in the res5onse message. The LDM that -ollo0s the uni8ue message ID in)icates that this ma .e a 5ro)uction6 training or a )e.ugging message an) the LCM the 5rocessing mo)e. The Version -iel)6 the ne4t to last -iel) in this segment6 i)enti-ies that Ra5i)SMS is using H&, +ersion !.>. This is a +ersion o- H&, that the Ra5i)SMS API an) SHR o--iciall su55ort an) the internationaliDation co)e is R$A -rom ISE ;1??. In the message 5ro-ile ID -iel)6 the last -iel) sho0n in this segment6 SHR has sent an LA&ERTM meaning that is a alert message.
The ne4t segment o- the message is the Patient I)enti-ication APIDB segment. This ER# message is -or a 5atient registere) in Ra5i)SMS 0ith a national i)entit num.er 11S"!,01!0;=;0=0. The ne4t segments6 the o.ser+ations AEIR an) EIFB6 contains o.ser+ation )ata -or Maternal Health Alert to .e sent to the CH$ . Ra5i)SMS. The 5atient is .lee)ing. Segment Details MSH: MSH-1 *iel) Se5arator: N MSH-! Enco)ing Characters: KPQR9 MSH-;.1 Sen)ing A55lication C %ames5ace ID: SHR MSH-=.1 Sen)ing *acilit C %ames5ace ID: R0an)a MEH MSH-;.1 Recei+ing A55lication C %ames5ace ID: Ra5i)SMS MSH-=.1 Recei+ing *acilit C %ames5ace ID: ;1? MSH-,.1 Date Time o- Message: !011110S0?>,;" A11/0S/!011 at 0,:>,:;"B MSH-S Message T5e MSH-S.1 Message T5e: ER# MSH-S.! Trigger E+ent: R01 MSH-S.; Message structure: ER#KR01KER#<R01 MSH-11.1 Processing ID: D MSH-11.! Processing Mo)e: C MSH-1!.1 Version ID: V!.> MSH-1!.! InternationaliDation Co)e: R$A MSH-!1.1 Message Pro-ile: Alert PID: PID-;.1 Patient I)enti-ier ID: 11S"!,01!0;=;0=0 Pivot Access Ltd RAPIDSMS-RHEA Integration Technical Design Document PID-;.> Patient I)enti-ier T5e Co)e: %ID EIR: EIR-1 Set ID: 1 EIR-= #ni+ersal Ser+ice I)enti-ier EIR-=.! Te4t: Maternal Health Alert EIR-=,.1 *iller Su55lemental Ser+ice In-ormation: CH$ EIF: EIF-1 Set ID: 1 EIF-! Value T5e: CE EIF-; E.ser+ation I)enti-ier EIF-;.! Te4t: Alert EIF-> E.ser+ation Value: HE EIF-11 E.ser+ation Result Status: * 4 RapidSS!R"#$D# R&ST2ul #.I Ra5i)SMS-R$A%DA has also chosen the REST architecture -or its API6 .ecause the se5aration o- concern is clear an) all resources are accessi.le using the same 5rotocol AHTTPB. ).1 A!. desi'n "nd deve&opment $ith REST 0e 0ill )namicall .uil) uni8ue #R&s to re5resent enriche) RAPIDSMS resources as nee)e) using the -ollo0ing stan)ar) message -ormats: H&, +!.>6 USE% or FM&. The H&, messages .ac3 an) -orth6 in the .o) o- re8uests are 5arse)6 integrate) an) 5resente) in the correct -ormat that can .e un)erstoo) . the reci5ient. Ra5i)SMS uses Pthon-H&, 5arser to )eal 0ill these messages. The API 0ill .e .uilt using DUA%(E-PISTE%6 a REST li.rar ma3ing the )e-inition o- the resource ma55ing eas to )o in a +er )eclarati+e manner. The integration o- the API laer 0ith the .ac3en) )ata source6 as 0ell as other ser+ices such as con-iguration6 0ill .e )one using the Pthon/D7ango -rame0or3. Pivot Access Ltd RAPIDSMS-RHEA Integration Technical Design Document Throughout the )e+elo5ment ccle6 0e 5lan to use a continuous integration 5rocess 0ith unit tests. The 5lan to manage the 5ro7ect on RAPIDSMS si)e is through an agile/SCR#M 5rocess6 0ith iterati+e6 incremental )e+elo5ment s5rints6 5re-era.l e+er t0o-to--our 0ee3s. ).2 A!. oper"tions The i)enti-ication o- the resources A5atient6 encounters an)/or alerts...B 0ill .e .ac3 an) -orth ARHEA to Ra5i)SMS an) Ra5i)SMS to RHEAB. The initial -eature o- Ra5i)SMS-R$A%DA REST*ul API is to e45ose one o- its -unctionalities to the RHEA sstem. Restrictions -or certain o5erations coul) .e re8uire) -or sensiti+e in-ormation .eing e4change) . .oth the sstem. Pivot Access Ltd RAPIDSMS-RHEA Integration Technical Design Document Ra5i)SMS-R$A%DA 0ill consume : Resource- .atient&ncounters Save .atient &ncounter /R0- PEST /0s/rest/+1/5atient/XV5at-IDW/encounters escription1 This transaction )eals 0ith sa+ing a 5atients encounter in their me)ical recor). Request1 HTTP re8uest .o) 0ill contain the H&, +!.> message )e-ine) .elo0 0ith a single 5atient i)enti-ication 5arameter in the #R& !"r"meters1 XV5at-IDW : re5resents the 5atient ID H0+ #ess"'e "t" (&ements1 *rom Maternal )ata ma55ing.4ls an) Re8uirements -or Ra5i)SMS<SHR Integration *I%A&.)oc4 APRE6 RIS2 an) IIR messagesB H0+v2 mess"'e specific"tion "nd m"ppin'1 TODO Response1 HTTP !01 - Create) - I- the encounter 0as sa+e). (rrors1 HTTP >00 - Ser+er Error - I- the ser+er encountere) an error. HTTP =00 - Ia) Re8uest - I- the H&, +!.> message is mal-orme). an) e45ose : Resource- #lerts .ost alerts /R01 PEST /a5i/5atients/V5atient-i)W/alerts escription1 Recei+es an alert message an) relas it to the a55ro5riate CH$. Request1 HTTP re8uest .o) 0ill contain the H&, +!.> message )e-ine) .elo0. H0+ #ess"'e "t" (&ements1 See Re8uirements -or Ra5i)SMS<SHR Integration *I%A&.)oc4 AR9=6 R9"6 R91!B H0+v2 mess"'e specific"tion "nd m"ppin'1 TODO Response1 HTTP !01 - Create) - I- the encounter 0as sa+e). (rrors1 HTTP >00 - Ser+er Error - I- the ser+er encountere) an error. HTTP =00 - Ia) Re8uest - I- the H&, +!.> message is mal-orme). Pivot Access Ltd RAPIDSMS-RHEA Integration Technical Design Document 5 Integration and T&STS REST-ul APIs are +er eas to test using HTTP re8uests -rom sim5le comman) line tools such as c#R& or -rom a 0e. .ro0ser. $e can create an) )e5lo6 in a -e0 )as6 a -ull 0or3ing 5rotot5e o- the API an) 5ro)uce moc3-u5 resources an) interacting a55lication o- the API can retrie+e sam5le )ata in the same 0a as the -inal API 5ro)uction +ersion. Pivot Access Ltd RAPIDSMS-RHEA Integration Technical Design Document