Context: The general flow we were discussing was here:
https://wiki.ohie.org/display/documents/Send+alert+workflow
I’ll speak from the perspective of a team who has fulfilled the role filled by the concrete ‘rapidsms’ example in the workflow in a zillion contexts
Here are my recommendations:
- Most importantly, change “send enriched alert message” to “send message parameters” (or message arguments, to be precise)
Transforming those into a message to a user is a POS / user interface responsibility / concern:
The POS system does things like
- deciding whether a SMS, voice call is appropriate depending on context, disease, etc
- looking up phone numbers / validating that it is sent to the right SIM card in some cases where CHWs have 2;
- getting the right message to generate in the right language/dialect,
- adding some metadata about the referral so the CHW can say something like 'to take a new test for TB' or 'to make sure your baby is healthy' and answer questions like will I get blood drawn, remind the patient to take insurance/vouched/id cards and so on.
- schedule it within the right schedule (eg not at 3am)
- Let’s sure that call is the cleanest http post URL we can; as long as it is adequately authenticated and secured, something simple like
[http://URL of POS system]/[endpoint]?param1=arg1¶m2=arg2 etc. This will allow the maximum amount of apps to play; these patterns we have gravitated to over time look something like the following:
**http://www.somemhealthapp.org/whatever/rwandaMhealthstuff/MissedReferral? PatientID= 12345 & ReferralReason= TB_Diagnosis & CHW_ID= 98765 ****& **NotAfter= 20140622
- Finally, a suggestion to have REST-style event feeds (Distributed Observer Pattern)which puts the responsibilities of the POS system in its box instead of making the HIM complicated with idiosyncratic & ad-hoc downtime/unable to reach/error condition loops. It is also widely implemented in a lot of mobile messaging apps; and is the pattern that allowed “frantic interoperability” between 5 parties in the wake of the Haiti disaster where getting and sending SMS to the population for health stuff was key
The alternate flow would look more or less like this (source pasted at bottom of emails, i need to get better at the syntax)
’
Original:
title Send missed referral alert
participant CHW
participant RapidSMS
participant OpenHIM
participant CR
participant PR
participant FR
participant TS
participant SHR
SHR->SHR: [1] Missed referral noticed
SHR->+OpenHIM: [2] Send alert details
OpenHIM->+PR: [3] Resolve provider identifier
PR->-OpenHIM: [4] Return provider NID
OpenHIM->+CR: [5] Resolve patient indentifier
CR->-OpenHIM: [6] Return patient NID
RapidSMS->+OpenHIM: [7.1] Query for enriched alert parameters
OpenHIM–>-RapidSMS: [7.2]Return enriched alert parameters
RapidSMS–>-CHW: [8] Send missed referral SMS to CHW