Africans on Rails
challenges ruby on rails software videoHere are some videos of Baobabers explaining how they feel about developing software in Ruby on Rails.
Add comment September 27th, 2007
Here are some videos of Baobabers explaining how they feel about developing software in Ruby on Rails.
Add comment September 27th, 2007
In a recent migration we needed to calculate the age of the patient at the time of their ARV initiation. Their WHO stage changes based on whether or not the patient is younger than 14. Turns out there is no fancy Ruby function to calculate age. Originally we used the following code based on a suggestion:
age = ((d2.to_time - d1.to_time) / 1.years).to_i
Unfortunately this doesn’t always work because of floating point arithmetic. Consider
d1 = Date.parse("2001-01-01")
d2 = Date.parse("2002-01-01")
age = ((d2.to_time - d1.to_time) / 1.years).to_i
p age
Here the age is 0. Clearly not what we want. But we do need to account for leap years and ignore remainders. So the trick is to treat the days logically:
d1 = Date.parse("2001-01-01")
d2 = Date.parse("2002-01-01")
age = (d2.year - d1.year) + ((d2.month - d1.month) + ((d2.day - d1.day) < 0 ? -1 : 0) < 0 ? -1 : 0)
p age
This accounts for day left overs and month left overs (so that the year is not artificially incremented. As an added bonus, this is the same thing in MySQL:
SET @age = (YEAR(@date_now) - YEAR(@patient_birthdate)) + IF(((MONTH(@date_now) - MONTH(@patient_birthdate)) + IF((DAY(@date_now) - DAY(@patient_birthdate)) < 0, -1, 0)) < 0, -1, 0);
4 comments December 9th, 2006
We are proud to announce that we have recently deployed our new CD4 instrument interface at Kamuzu Central Hospital. Here is a picture of the deployed system (click for a larger version):
One of the critical tests required to effectively treat HIV patients is the CD4 count. As the number of patients being treated in Malawi increases, so will the number of CD4 counts that need to be taken. A recent study showed that a typical CD4 result gets manually transcribed 7 times before reaching the decision maker. Obviously this is an error prone process. An error in the patient’s CD4 count not only wastes precious resources (the hospital is currently very low on expensive reagent) but it can also lead to the wrong decision being made for a patient.
Our solution was to develop a system that eliminated transcription of any kind throughout the entire process. The steps are as follows:
The system has just been launched, but already the lab technicians are happy because they no longer have to read the result from a screen, write it down, then type it into an excel document. We are hoping to see a dramatic improvement in data accuracy and usefulness as well.
Of course, the FACScount is one of many lab machines used in hospital throughout Malawi. We are hoping to generalize the approaches and learnings from this exercise and also work with other health care providers to create free and open source hardware and software solutions for lab equipment throughout the world. Contact us if you want to get involved.
Add comment September 1st, 2006
Traditionally, a VCT Center in Malawi uses a paper-based system for collecting data during a counseling session. Essentially, a counselor writes down answers to specific questions on a multi-page form during the session. These forms are then manually re-keyed into a personal-computer based system by a separate data-entry clerk; this system is then used to generate monthly, quarterly and annual reports. The paper-based entry is filed for future reference.
This approach has significant drawbacks:
In 2004, Baobab introduced a radically different methodology for using information technology (IT) within the VCT environment. Baobab’s eVCT system essentially eliminates the paper-based entry method with a computer-based model that is more accurate and flexible than the paper-based model. Most importantly, the solution is locally relevant, designed and implemented from the ground up in Malawi with local staff to meet the constraints and challenges of a developing world hospital. For example, Baobab places a strong emphasis on keeping costs low by using locally bought parts, open-source software and a number of internally developed innovations.
At a high level, an eVCT implementation provides a counselor with a touch-screen based appliance which they use for real-time data entry. The graphical user interface is intuitive for a novice user; we have quickly seen new Baobab appliance users enter data at virtually “touch-type� speed with a little practice. The appliance guides a counselor through a counseling session sequentially; this approach ensure data completeness, as well as internally logical responses (e.g., a male can’t be entered as pregnant). Every counselor’s appliance is connected to a battery back-up system which can power the system for over 10 hours without grid power; the back-up battery system is also capable of powering the central server which captures the data.
Each component of eVCT was designed with a keen eye towards local applicability, low cost and either redundancy or ability for “plug & play� replacement. Specific examples include:
Most importantly, Baobab technology has been deployed and proven in a number of applications, including Pediatrics, Registration, Pharmaceutical Management, and HIV/AIDS treatment, among others. Baobab is continually refining its technology and implementation model based on feedback from users, innovations and incubation projects from its staff, and input from partners. Finally, the overall cost of a complete eVCT system is cost-competitive with a paper-based system (which requires investment in a personal computer and associated software and technology).
The eVCT system is currently being used at the following locations:
During the pilot implementation of eVCT at the MACRO location, a study was conducted to assess the impact of the system implementation on a paper-based site. The study concluded the following:
- All 12 respondents reported they preferred to use the touchscreen system versus paper forms.
- All 12 respondents reported the touchscreen was faster to complete than paper
- Of the 12 respondents, 11 reported having occasional technical problems, primarily related to prolonged power outages. Based on this feedback, the UPS-based back-up system was replaced with the deep-cycle battery technology innovation
- Responses indicated that the introduction of the touchscreen computer into the counseling session had no negative impact on the counseling process.
- Twenty-three clients (38%) reported not noticing use of the touchscreen computer during the VCT session
- Negative feedback received through open-ended questions focused on issues unrelated to the use of the touchscreen during VCT, such as long wait times at the VCT center.
For the complete documentation on Baobab’s HIV eVCT System, see the following document: Deploying Baobab Health Partners HIV eVCT System
Add comment August 30th, 2006
Stories of failed computer implementations are widespread, and not limited to developing countries. Failed implementations can result from many factors. In Western settings the most common reason for a failed implementation is lack of user adoption frequently resulting from a mismatch between the user needs and system capabilities. The root cause of this mismatch is a lack of understanding of user needs by systems developers.
Developing countries are faced with many additional challenges to successful implementations including:
Baobab has developed a number of innovative technologies on-site in Malawi to address these problems. They will be described in subsequent posts.
Add comment August 29th, 2006