appliance baobab linux blogging care CD4 Instrument Interface challenges database developing countries email eVCT documention hardware hct history hiv irc linux open source openmrs opera power presentation projects ruby on rails server software touchscreen touchscreen toolkit vct vct openmrs migration vct videos video video malawi volunteer

Africans on Rails

challenges ruby on rails software video

Here are some videos of Baobabers explaining how they feel about developing software in Ruby on Rails.

Add comment September 27th, 2007

Calculating ages in Ruby and Rails

challenges open source vct openmrs migration

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

CD4 Instrument Interface

CD4 Instrument Interface challenges hardware hiv projects software

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):
FACScount.jpg

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:

  1. Barcode scan the patients health passport and take take the blood sample
  2. Label the sample with an automatically printed accession number and send it to the lab
  3. At the lab the FACScount machine prompts the technician for an accession number, which they scan from the test tube with a bar code scanner .
  4. After the test has completed a file is transferred over the serial port via the Kermit protocol to a touchscreen clinical workstation which is mounted just above the FACScount.
  5. The workstation verifies that the accession number is valid, displays the results for the clinician on the screen and asks them to verify the results by pressing the save button, which copies the results directly into the patient’s electronic record in the mysql database.
  6. The next time the patient is seen by a clinician the “CD4 trail” is displayed on the touchscreen clinical workstation.

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

Traditional VCT Approaches and Baobab’s eVCT Implementation

appliance challenges developing countries eVCT documention hardware hiv power server software touchscreen vct

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:

  • Data completeness: During the VCT session, the counselor may leave blank entries in a form, either intentionally or unintentionally. This would most likely not be caught until the data re-entry phase, at which point it is significantly harder to get the information (e.g., the patient may have left, the counselor may confuse sessions when trying to recall the answer, etc.)
  • Data validation: During the VCT session, there is no validation that the answers being entered are correct. For example, a patient could be listed as “maleâ€? and “pregnantâ€?. If this discrepancy is caught during data re-entry, it is likely much harder to resolve the discrepancy, assuming that a) the data entry clerk catches the error and b) is motivated to resolve the discrepancy instead of simply entering bad or false data (e.g., assuming that the patient was male and therefore not pregnant instead of female and pregnant).
  • · Data Re-entry: Re-entering data from a form to a computer increases the risk that data is being captured inaccurately and there are limited ways of validating that it was entered correctly.
  • Multiple data sources: Once data is entered and a form is filed, there is a high likelihood that there are discrepancies between the paper form and the computer system. More importantly, when attempting to do analysis or reporting, it is difficult to determine which system has the most accurate information.
  • Limited re-use of data: Traditional VCT systems are not designed to connect to additional IT systems (e.g., ART programs). In addition, given the dual-entry required, it is more complicated to change this system than if it was entirely computer based.

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:

  • Appliance instead of a personal computer: Baobab has developed a low-cost and application-specific appliance for data entry with touch-screen functionality. This appliance is used at the reception for registering a patient, testing lab and clinic for entering information, and in each of the counseling rooms. In addition to costing less than 15% of a personal computer, this appliance has additional benefits, including a) low power consumption enabling future integration with renewable energy sources such as solar power, b) is powered through its Ethernet connection, greatly simplifying deployment by not requiring an outlet, and c) has no useful utility other than VCT, thereby reducing the risk of theft.

  • Redundancy through low-cost computers for server: Baobab is leveraging a low-cost implementation of RAIC (“redundant array of inexpensive computersâ€?) for its central database server which stores and manages data. Baobab’s current incubation has a small footprint to reduce shipping costs and storage space, uses 5% of the power of a traditional server-class computer, can easily run from battery backup or multiple power sources, is widely available and inexpensive, and matches the IT needs of the eVCT application.
  • Deep-cycle batteries instead of universal power supplies at every point of failure: Baobab has developed and deployed a deep-cycle battery system to provide continuous back-up for extended power outages – up to 10 hours or more from one charge. Baobab’s battery backup system is designed on locally sourced and maintained batteries which are also significantly less expensive than traditional UPS backup systems (which typically have a 15 minute or so power backup ability).

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:

  • MACRO (Malawi AIDS Counseling & Resource Organization): Deployed in 2004; currently spans 3 counseling centers, has 25 workstation appliances and counsel approximately 50-75 clients per day.
  • The Lighthouse (Kamuzu Central Hospital): Deployed in 2005; currently has 7 workstation appliances and also counsels approximately 50-75 clients per day.

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:

    • Using an anonymous questionnaire, the VCT providers (receptionist, counselors and lab technicians) were surveyed after the system had been in place for five months. The response rate was 12/14 users. Results were:

    - 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

    • In addition, exit interviews were conducted with 60 clients.

    - 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

    Deploying IT for health care in developing countries

    challenges developing countries

    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:

    • Absence of unique patient identifiers
    • HIV/AIDS pandemic
    • Low levels of computer literacy among health workers
    • Under-trained and inexperienced clinicians
    • Limited healthcare budget
    • Low staffing levels
    • High turnover among staff
    • Inadequate security / high risk of theft
    • Inadequate infrastructure for equipment maintenance

    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


    Paypal a donation

    Why donate?