View my profile

2014-08-18

A common tool for infinite variability

A colleague sent me an email asking for input to be used for an essay she was writing. It involves the development of content for community health workers in low-income countries.

First, some context. Community health workers (CHWs) are usually volunteers or very-low paid people--often women--who work in the health field. They are not clinicians and often have very little training. But they can be effective in working rural areas and villages in many places around the world. In India they are sometimes called ASHAs--Accredited Social Health Activists. In that setting they work for the state ministries of health and register women in the healthcare system who are pregnant. The idea is to help the expectant mother to maintain her health during her pregnancy and afterwards by also helping her new baby stay healthy. ASHAs can provide information the progress of the pregnancy, on nutrition, and the like. They can even call in a clinical referral if the mother seems to be having a health issue. They can also show the mother and her family information to help them understand and support her during the pregnancy. So, you can see where there is a chronic and serious shortage of doctors and nurses, a community health worker may help the work of those clinicians be more efficient by working with the population being served.

My colleague works in this context and tries to develop programs to support CHWs in a variety of countries. She posed the question of how we might best develop training content for these workers. It's expensive to develop, so if we can do it once and disseminate it in many places, that is an efficient approach. The problem is that there are important differences between many of these places. Differences exist in language, culture, literacy levels, availability of communications technology, transportation systems, healthcare services, and on and on. The best solution is to develop these materials locally. But that can be very expensive because every one of them is unique.

I once worked on a series of projects to address this type of issue--creating a common platform for a variable purpose. It was a long time ago with what we would consider much more modest technology, but the issues are the same. How can we provide individual information that is relevant to that person at scale. By scale, we wanted hundreds, even thousands, of variations on the messages to be delivered. They might range from smoking cessation to healthy diet to exercise tips. The messenger could be a physician, a nurse, or even a member of the clergy. The messages could come as a calendar, a newsletter, a greeting card, or even a letter from a pastor. We were trying to find out what approaches worked, but to do that we needed to have some sort of engine to generate all these documents (by type, by topic) that were addressing the issues every individual had. Those issues included literacy level, gender, education attained, health status, etc. At one point, we calculated that with the variety of messages we could develop plus all the above factors that we could have 1.4 million variations. How could we code that?

The previous approaches involved standard branching logic. It would look something like this:

  • If the person is female, then
    • If she is under 19 years of age, then
      • If she is a smoker, then
        • If she smokes every day, then
          • If she has thought of quitting, then
            • Present her with a message to identify a quit date

You can see that for every set of variables, these types of nested branches could be very long and complicated. I was amazed that the previous team had made that work at all. They had tens of thousands of such lines of code. The challenge facing me was that I had three new projects that required that type of logical branching across several topic areas and on a variety of media (the aforementioned calendars and so forth).

How could I approach the task? Well, skipping to the solution and bypassing lots of effort, I realized that if I created a container that was a simple table, I could address all the variations involved. So, I defined each object in a document (a place for a picture or a sentence) as a row in the table. In each row I created up to 10 columns for the characteristics of the person that related to that object. For example, a pregnant woman who was a smoker and wanted to quit, but had not set a day to quit might get a message about doing just that. Or perhaps a picture of a calendar with a date circled in red to indicate a quit date. The idea was to match her profile to the row containing characteristics she possessed and choose the object (in an extra column) that contained the relevant text or picture.

While it took a lot of effort to develop all the messages and pictures needed, the process of choosing them and constructing an appropriate document was much easier than embedding the logic in the code. I just wrote routines that would look at each area of a document and the relevant types of data to choose what to put in it. That was a search string that looked for the appropriate match in another table, the one I described above. A hit would allow the code to select that object and put it in the document. (Okay, it took months to work all the above out, but it did work.)

My point is that we can now take such approaches to address the issues of context and uniqueness from where I began this essay. While language and cultural expectations may vary from place to place, if we are considering issues such as a human pregnancy, there is a biological norm that we can use as a reference. That offers us a way to build a table with potential issues involved in a woman's pregnancy with material relevant to those issues. We can add versions to address linguistic variability, cultural norms, health system personnel and practices, and so forth. We could construct a matrix that allows us to store standard messages and materials that can be selected for local use by setting some parameters. It would involve lots of thinking in advance, but the system could be made able to evolve as more people participated in it and more topics were addressed.

In a way, it's the shape of the container (the rows) and its characteristics (the columns) that might help us address the issues of variability in a common way. It might be the way to create a common container that holds all the needed variations in a format we can search.

No comments:

Post a Comment