Category Archives: Ponderings

Solomon Star News Report on use of Smap

The Solomon Star News had an article (21st April 2014) on the use of technology to assist in the response to the recent floods.   The technology is, of course, Smap which is being used by World Vision who are also making it available to Save the Children and SWIM (Short Workshops in Mission).

Morning Start Article

Technology Assists World Vision to reach flood affected families faster

Exporting Surveys to Openstreetmap

I have added a new option to the Smap Server that will export a survey in OSM format. The following video shows this being used to add house numbers to Openstreetmap.

The survey from that video is defined in an XLSForm template reproduced below:
osmsurvey

This survey will collect the street name, odd or even, country, city, postcode in the top level form. It then collects the house numbers and their locations in a repeating group.  Some of the top level fields are copied into each house record using the “calculate” type.

I have adopted a couple of naming conventions for surveys that are destined to be exported to osm.

  1. Any question name that starts with an underscore, such as _country, is not exported.
  2. If the question name starts with “addr_”, then that is changed to “addr:”. The reason for this is that XLSForm did not seem to support the use of colons inside names but they are used in OSM key values.

I completed the survey twice to get the house numbers for a street called Jewell Crescent. When the results are exported the OSM file looks like this:

[code language=”xml”]

























































[/code]

After loading into Openstreetmap it looks like this.

This new functionality is in the source code now. It will be included in the next production release of Smap on Sunday 28th of July, after which the server can be downloaded from here.
Other Thoughts

  1. Currently option names map to OSM values.  This is quite restrictive as ODK does not allow these names to have spaces.  I will probably add an option to the export function that, if set, will use the option label to set the OSM value.
  2. You can export any survey to Openstreetmap.  Most of the time these won’t have been designed to be loaded directly as the demo was.  However it can still be useful to get the data into JOSM and then manually copy information into new OSM nodes.  For example if you have a survey with information on health clinics.

Connected Arabic fonts in Android 2.3

I’m working with a customer that is conducting a survey in Iraq using Samsung Galaxy Y Duos (android 2.3) and fieldTask. Later model phones (android 3+) worked well with Arabic but not these earlier versions. Even after rooting the phones and installing new fonts it still didn’t connect the characters.  See below a screen shot using Dr Ben Ox Arabic fonts which seemed to give the best results.
arabic2 (1)

Fortunately there is an Arabic reshaping library available from https://github.com/agawish/Better-Arabic-Reshaper/ which can be used with these old phones. I added ArabicReshaper.java and ArabicUtilities.java from this library to the odkCollect library that performs survey completion in fieldTask. I then modified the “QuestionWidget.java”, “SelectOneWidget.java” and “SelectMultipleWidget.java” files in odkCollect to call the “reshape” function when setting the text. See line 12 below.

[code language=”java” highlight=”11,12″]
protected void addQuestionText(FormEntryPrompt p) {
String imageURI = p.getImageText();
String audioURI = p.getAudioText();
String videoURI = p.getSpecialFormQuestionText(“video”);

// shown when image is clicked
String bigImageURI = p.getSpecialFormQuestionText(“big-image”);

// Add the text view. Textview always exists, regardless of whether there’s text.
mQuestionText = new TextView(getContext());
// mQuestionText.setText(p.getLongText()); smap
mQuestionText.setText(ArabicUtilities.reshape(p.getLongText())); // smap
mQuestionText.setTextSize(TypedValue.COMPLEX_UNIT_DIP, mQuestionFontsize);
mQuestionText.setTypeface(null, Typeface.BOLD);
mQuestionText.setPadding(0, 0, 0, 7);
mQuestionText.setId(QuestionWidget.newUniqueId()); // assign random id

// Wrap to the size of the parent view
mQuestionText.setHorizontallyScrolling(false);

if (p.getLongText() == null) {
mQuestionText.setVisibility(GONE);
}

// Create the layout for audio, image, text
mediaLayout = new MediaLayout(getContext());
mediaLayout.setAVT(p.getIndex(), “”, mQuestionText, audioURI, imageURI, videoURI, bigImageURI);

addView(mediaLayout, mLayout);
}
[/code]

This improved the display significantly:
SC20130708-172712

This Arabic version of fieldTask is available for download from http://dev/smap.com.au. There are other widgets that could have this functionality added and presumably the arabic text typed by an enumerator in a text field should also be reshaped. These additional changes will be made on an as needs basis. The preferred option is to get a phone that supports Arabic fonts natively which would be a better option than having to root the phones to install new fonts.

If you want to go fast go alone, if you want to go far go together

An old african proverb.  It is also written large on the walls of Johannesburg airport.  I think its a great proverb.  

A few of our “team work” obsessed corporations could learn from this.  True you need team work and an organisation to make far reaching changes but if you don’t want to get bogged down then sometimes you need to hand the work over to one person, or maybe a few people, to make some rapid progress and deliver an updated draft for the team to work on.

Real Time Assessments

Stuart Thomson has put up a great site Desire Lines for Change showing how the  Smap software can be used to contribute to community discussions and decision making.  This fits well with one of the principles on which the software has been developed.

The idea came from when I worked at Rolls Royce aero engines R&D labs back in the early 80’s. Royces had this concept of assessing in real time whether or not an engine test was successful,  real time was defined as 20 minutes.  Within this time it had to be possible to decide if the test was successful and whether or not we could move on to the next test.  The totality of the data from the test, which could be very large,  would however be analysed over weeks, months and even years in order to contribute to engine design decisions.  If this data was going to be useful then we had to know if we had done enough cycles and the engine was run within the required parameters.  The diagram below shows the principle.

real time

The Smap mobile phones software is intended to contribute to this sort of real time assessment shown as the green 20 minute cycle in the picture above.  The data is collected and can then be analysed in the dashboard which may result in requests for more data.  Once the data is assessed as sound it can then be exported and analysed in a statistical analysis package or a GIS system over much longer periods of time.

Similarly as described in Desire Lines for Change, an initial assessment with the mobile phones can be made.  The data can be analysed and checked using the dashboard.  It can then be posted into a community forum to prompt an ongoing discussion, the results of which can be used in subsequent design decisions.

A report released today stated that 43% of Australians received sub-standard (below best practice) care at each visit to a general practitioner.  http://www.abc.net.au/news/2012-07-16/healthcare-system-failing-australians/4132056. Apparently this is largely due to GPs not being up to date with the latest treatments and practices.  Smart phones were suggested as a way to improve the situation.

I recently spent a couple of weeks in Africa looking at ways to increase the effectiveness and reach of mHealth initiatives.  Its customary to emphasise the importance of low cost devices in developing countries.  Applications that only require SMS or voice can be used by the widest number of people on the lowest cost phones with the longest battery life. Which is absolutely true if you are creating an application to be used by the general population or community health workers then this is almost certainly the sort of phone technology that should be your first preference.  To some extent this is also still true in developed countries.  If SMS works for your app then you should probably use it.

However I think you can make a strong case that doctors in developing countries can benefit just as much from smart phones as GPs in developed countries, if not more so.  Just as mobile phones leap frogged land lines, supplying a developing country doctor with a smart phone or tablet connected to a cloud based server can be much simpler than equipping the clinic with PCs and associated medical software.  It is also cost effective if that phone becomes an integral part of treating scores of patients per day and reporting health informatics.

The following diagram attempts to illustrates this.

Phone cost versus ease of use, flexibility and capability

No future for j2me phones?  There does not seem to be much development happening on these phones in developed countries nowadays.  I don’t think that it should be so different in developing countries.  So maybe applications should either be aimed at low cost devices over SMS / Voice, or smart phones, or both.