12. clearwind consulting
health care workers
for community health
care workers in the field
large number of children
to look after
in village (not in clinics)
14. clearwind consulting
identify and help
sometimes not easy to spot malnurished kids
maybe no records
let other people know the kid needs help
parents sometimes have enough trouble feeding rest
of the family
15. clearwind consulting
disclaimer
I am not a health care
worked or related to
development
i know the techy bits
can't speak about
efficiency of the program
16. clearwind consulting
Robbed of vital nutrients as
children, they grow up stunted and
sickly, weaklings in a land that still
runs on manual labor.
http://www.nytimes.com/2006/12/28/world/africa/
28malnutrition.html
25. clearwind consulting
serial
pygsm
http
since then spomskyd has
been replaced by pygsm django route
pygsm do a lot of work
sorting out all those sms
quirks
35. clearwind consulting
7654321 > mrdt +34 y n f
malaria rapid
diagnosis
child 34
y has malari
n has no bednet
f has a fever
36. clearwind consulting
7654321 > mrdt +34 y n f
7654321 < MRDT> Child +34, MADISON, Molly,
F/12m has MALARIA. Child is less than 3. Please provide
1 tab of Coartem (ACT) twice a day for 3 days
44. clearwind consulting
# Register a new patient
@keyword(r'new (S+) (S+) ([MF]) ([d-]+)
( D+)?( d+)?( zd+)?')
@authenticated
def new_case (self, message,...[snip]):
# Do something with the new patient
46. clearwind consulting
1. see what's going where
2. route to different
its a django standard,
more friendly for other
users
easier to change sms
without having to
change the code
47. clearwind consulting
urlpatterns = patterns('',
(r'^new (.*)',
"apps.mctc.views.joining.new_case"),
)
despite the name, url
patterns can be used for
more than just urls
52. clearwind consulting
# NEW 70 1201 M 19102008 123124124
class NewForm(Form):
child = StringField(valid="(d+)")
gmc = StringField(valid="(d+)")
sex = GenderField()
dob = DateField(format="%m%d%Y")
contact = StringField(valid="(d+)",
required=False)
53. clearwind consulting
class based views
http://www.slideshare.net/simon/
classbased-views-with-django
54. clearwind consulting
class based view that does repetitive
work
→ validate form
→ process form
→ what to do if it goes wrong
subclassed for different country (eg.
Malawi)
55. clearwind consulting
class MalawiNew(New):
@authenticated
def post_init(self):
self.form = NewForm
def pre_process(self):
# malawi specific request
years, months = years_months(self.form.clean.dob.data.strftime.data)
if years > 5:
raise FormFailed, "You have attempted to register child #%s. However, "
"the date of birth entered is %s. The age of this "
"child is above 5 years. Please resend SMS with corrected "
"age." % (self.form.clean.child.data, self.form.clean.dob.data.strftime("%m.
%d.%Y"))
def post_process(self):
if self.form.clean.contact.data:
self.data.case.mobile = self.form.clean.contact
def error_already_exists(self):
# malawi specific code
return "You have attempted to register child #%s in %s GMC. However, this child
already exists. If this is an error, please resend SMS with correct information. If this
patient is new or a replacement, please use the EXIT command first, then re-register." %
(self.form.clean.child.data, self.data.provider.clinic.name)
64. clearwind consulting
another framework?
designed for a non-technical audience
as a techy that can be annoying, eg settings.py
if you just want to speak to SMS and nothing else, maybe better way to go
67. clearwind consulting
We have over 5000 kids in the
system now and counting. It's
been used to catch over 100 kids
with malnutrition and about 400
with malaria.
Matt Berg