650 likes | 751 Views
Open Data Kit and Other Technologies Use of Java in the Third World. Steven M. Lewis PhD smlewis@lordjoe.com. Computation and the Third World. Information technology has changed our lives That technology has not penetrated the third world to the extent that if penetrates out lives
E N D
Open Data Kit and Other Technologies Use of Java in the Third World Steven M. Lewis PhD smlewis@lordjoe.com
Computation and the Third World • Information technology has changed our lives • That technology has not penetrated the third world to the extent that if penetrates out lives • The constraints of developing for the third world are different
Challenges for the Third World • Connectivity cannot be assumed. • Power cannot be assumed • Services cannot be assumed • Money is a huge issue • Literacy cannot be assumed
Connectivity cannot be assumed • Many Villages are not wired • Wireless may be the only communications • Even this may be unreliable
Power cannot be assumed • Power may not be available • Even when available it may not be reliable
Services Cannot Be Assumed • Systems placed in villages will not be maintained • Parts will not be available • The knowledge to repair any issues cannot be assumed
Money is a huge issue • The cost of a laptop is more than the average yearly income in many countries • In India a cell phone can be bought for $12 • A village might have a single cell phone
Cell Phone Advantages • Very Portable • Cheap and getting cheaper • Solves problems with intermittent and rarely available power • Automatically solve the problem of connectivity • Is sealed, self contained, rugged and very reliable
Moral - • Today we talk about mobile devices as the wave of the future. • In the third world they are the only widely available computing platform • Effective solutions todayneed to consider the cell phone as the primary platform.
Problem – Matching Fish to Markets on the India Coast • Problem – Fishermen in India can deliver their fish to one of several markets • If a market has more fisherman than buyers, the price for fish will be very low • If there are few fisherman and many then the price will be high
Must bring health care to people First line of defense Routine, regular home visits Know their community Eyes and ears for local health Provide education for best practices Community Health Workers
Little, if any, supervision Paper-based forms – ad hoc design Long time-lag to usable data No historical data Current methods
Standardization of data Rapid data aggregation and analysis Supervision of CHWs Connection to health records (OpenMRS) CHW + phone => Flexible, efficient platform for: Better home care (checklists, protocols, etc) New outreach programs Outbreak detection Improved disease surveillance Our Goals
Open-source data collection tool kit Collaboration between Google & UWashington Forms + GPS + Picture + Barcode + Audio + Video … Initially targeted at public health applications Current deployments in Uganda and Kenya http://code.google.com/p/open-data-kit Open Data Kit
Collect – Android client for data entry Aggregate – App Engine server for data collection Submit – multi-transport layer async data transfer Manage – remote management tools for config Tasks – assignment of tasks to specific workers DB – connect forms to existing DBs for browse/update Viz – visualization of data on graphs/maps Super – supervisory dashboard for mobile supervisors Planner – day planning tools for workers SMS – communication/notification with community Open Data Kit Toolset
Xforms – W3C Same data collection forms can run on any platform Standard HTTP client/server APIs Allows for different server implementations Android Open source platform with multiple implementations by different vendors (HTC, Samsung, …) Example: DataDyne/Episurveyor & Open Data Kit Same forms (but different capabilities) Data can be submitted to either server Allows deployments to use mix of platforms Open Standards –in Java
ODK Collect • A tool build on top of XForms • Using JavaRosa (XForms for Mobile Devices) for data collection and submission on the Android
What is XForms • XForms is an XML standard developed by W3C for specifying Forms in XML • Example • Oberon forms
JavaRosa: XForms on Mobile Devices • JavaRosa • Supports a supports a subset of the xform standard • Questions are asked one per screen • Supports many phones • Written in Java ME
Open Data Kit- ODK Collect • Android library written to support JavaRosa Forms. • Supports Standard Types – text, number date, select, multiselect • Supports Bar Code, Picture, GPS inputs • Supports upload to a server running ODK Aggregate
Android should be on Java Developer's Radar • Its native language is Java • It supports full JDK 1.6 • The platform is open source • Well known tools such as Eclipse and IntelliJ have Android plug-ins • Application distribution is much less controlled Build it and they will come!
Form Elements • Language Section • Define Keys for all Supported Languages • Instance Section • Define Structure of the data • Binding Section • Annotate requirements • Define Conditions • Input Section • Define Controls
Language Section <itext> <translation lang="english" > <text id="Male" ><value>Male</value></text> <text id="Female" ><value>Female</value></text> <text id="Sex" ><value>Sex</value></text> </translation> <translation lang="german" > <text id="Male" ><value>M�nnlich</value></text> <text id="Female" ><value>Weiblich</value></text> <text id="Sex" ><value>Sex</value></text> </translation> </itext>
An Aside on Translation • Google has a very nice API for translation • Machine translation is good for a first cut • Is also good for field use where a translation is needed and not translator is available • Automatic tools to add needed entries to multiple language bundles are easy and worthwhile. • My tools build the language section from language bundles
Translate Code import com.google.api.translate.Translate; import com.google.api.translate.Language; public static final String WEB_SITE = "http://code.google.com/p/i18n-translator/"; public String[] translate(String[] input, Language from, Language to) throws Exception { Translate.setHttpReferrer(WEB_SITE ); System.setProperty("http.proxyHost", "proxy"); System.setProperty("http.proxyPort", "8080"); return Translate.execute(input, from, to); }
Instance Section <instance> <Student2_Registration> <Name/> <Sex/> <FemaleQuestions> <StartedMenstruating/> <Pregnant/> <StartMensesAge/> <Child jr:template=""> <Name/> <Sex/> <Age/> </Child> </FemaleQuestions> <MaleQuestions> <Circumcised/> <MasterbationRate/> </MaleQuestions> ...
Binding Section <bind nodeset="/Student2_Registration/Name" type="string" required="true()" /> <bind nodeset="/Student2_Registration/Sex" type="select1" required="true()" /> <bind nodeset="/Student2_Registration/FemaleQuestions" relevant="selected(/Student2_Registration/Sex, 'Female')" /> <bind nodeset="/Student2_Registration/MaleQuestions" relevant="selected(/Student2_Registration/Sex, 'Male')" /> <bind nodeset="/Student2_Registration/Birthday" type="date" required="true()" />
Input Section <input ref="/Student2_Registration/Name" > <label ref="jr:itext('What_isYourName')" /> </input> <select1 ref="/Student2_Registration/Sex" > <label ref="jr:itext('What_isYourSex')" /> <item> <value>Male</value> <label ref="jr:itext('Male')" /> </item> <item> <value>Female</value> <label ref="jr:itext('Female')" /> </item> </select1> ...
Tools • PurcForms a GWT based tool for editing XForms • ODK Forms Designer a GWT tool specifically targetted to ODK • Annotation Based Generator
ODK Aggregate • Infrastructure for Storing results • Build on top of Google App Engine • Demo http://lordjoedev.appspot.com/
Deployments Kenya HIV, 300 CHWs Tanzania e-IMCI, 5 clinicians