CouchDB takes Medic Mobile to the front lines of healthcare work

We were very excited for the chance to talk with Stefan du Fresne at Medic Mobile about how they have been employing CouchDB in applications.

Medic Mobile is a nonprofit technology company that was founded in 2010 to improve health in hard to reach communities. They serve their mission by designing, building, delivering, and supporting world-class software that helps community health workers, managers, and clinical teams work together to provide equitable care.

Their offices in Nairobi, Kathmandu, and San Francisco (and 75 staff) support more than 18,000 health workers in 23 countries, improving how health systems work for more than 11 million people.

Stefan was kind enough to share some specifics of their work with CouchDB.

How did you hear about CouchDB, and why did you choose to use it?

Many years ago CouchDB was picked for its master to master replication abilities, and resilience. We wanted to allow for multiple field deployments that worked well separately, and would push data upstream to an aggregator when network connectivity allowed.

Over time as our tools have evolved our use of CouchDB has grown. While many of our CHWs still send in data via SMS, CouchDB (with PouchDB) has allowed us to build a fully offline webapp that a growing number of our CHWs use.

More detail can be found in this blog post.

Did you have a specific problem that CouchDB solved?

We needed to be able to provide our application to our users in a consistent way, regardless of whether they have network connectivity. Seamless replication meant we didn’t need to worry about getting all data into one place and then relying on that place for functionality.

For the folks who are unsure of how they could use CouchDB–because there are a lot of databases out there—could you explain the use case?

Specifically for us, CouchDB (with PouchDB) allows us to have a fully functional offline first progressive web app that flawlessly synchronizes between a master datastore and any number of other datastores with almost no infrastructural effort. It is literally half a dozen lines of code to set up continuous replication.

More generally, CouchDB lets you push arbitrary JSON to a datastore that seamlessly replicates to other datastores whenever it is convenient to you. You can also combine it with PouchDB in the front-end as we have done, and you have a really low effort base for an offline-first web app.

What would you say is the top benefit of using CouchDB?

  • Simplicity. CouchDB can be accessed completely over REST. Being able to curl your way to database glory is really appealing. It makes it really easy to get started with a fresh DB, inspect an existing database, or quickly build up scripts/tooling around your data
  • Replication. This is a really hard problem, and CouchDB gives it you for free. It’s hard to understate how cool this is.
  • JSON. Because the database doesn’t enforce a schema, you can be very flexible in how you store and manage your data.

What tools are you using in addition for your infrastructure? Have you discovered anything that pairs well with CouchDB?

PouchDB is definitely a big one for us.

In general though, since CouchDB is exposed in a RESTian way whatever your favourite web service tool is (curl, httpie, insomnia, postman…) it will work great with CouchDB. And since the responses are all JSON, you can get surprisingly far debugging and mucking about with your databases with curl and jq (or even sed if you’re feeling adventurous).

We’ve been using Kanso, Gardener, Dashboard and Garden Market for deploying new versions of our software. These tools were great, but they have a lot going on within them, and a lot of their potential has not been realised over time. We’re currently building our cheekily named replacement Horticulturalist, which should reduce the amount of code we need to get deployments out the door, and generally give us more flexibility and stability in how we deploy our software.

We are also using couch2pg, a small utility to replicate data from a couchdb instance into PostgreSQL. This lets us build more complicated SQL based analytics where required.

What are your future plans with your project? Any cool plans or developments you want to promote?

We’re in a scaling phase, and expect to be supporting 200,000 health workers providing care for 100 million people by 2021. We believe community health workers have an important role to play in healthcare systems that reach everyone.

As we scale up the number of health workers using the software, we’ll also be adding to the support we provide to each health worker and family. Today, health workers use the app to diagnose and treat sick children, register and screen pregnancies and newborns, deliver modern contraceptives to advance family planning, help keep track of immunization visits, screen for malnutrition, and monitor for infectious disease outbreaks. In the near future, we’ll help address the burdens of HIV/AIDS, Tuberculosis, and non-communicable diseases.

We’re getting the offline-first app into the hands of more people on the community health team, including nurses and frontline managers. We’re also exploring ways for household caregivers to interact with and use the app as they provide care for their families, extending the health system even further.

Health systems and health workers want the newly-accessible data to guide their work – so, we’re planning to build risk profiles and targeting algorithms to answer questions like, “Which child is most likely to be sick?” Our goal is to improve coverage and equity, and we’ll release our code, processes, and learnings. Finally, the app will serve as an integration point for technologies that will help health workers deliver great care, including biometrics and low-cost diagnostics.

 

Use cases are a great avenue for sharing useful technical information. Please consider joining the fun! Additionally, if there’s something you’d like to see covered on the CouchDB blog, we would love to accommodate. Email us!

For more about CouchDB visit couchdb.org or follow us on Twitter at @couchdb

CouchDB Weekly News, September 14, 2017

Releases in the CouchDB Universe

  • icouch 0.3.7 (Erlang) – A CouchDB client for Elixir using ibrowse for HTTP transfer

Opinions and other News in the CouchDB Universe

… and in the PouchDB Universe

CouchDB Use Cases, Questions and Answers

Stack Overflow:

no public answer yet:

PouchDB Use Cases, Questions and Answers

Stack Overflow:

no public answer yet:

For more new questions and answers about CouchDB, see these search results and about PouchDB, see these.

Get involved!

If you want to get into working on CouchDB:

  • We have an infinite number of open contributor positions on CouchDB. Submit a pull request and join the project!
  • Do you want to help us with the work on the new CouchDB website? Get in touch on our new website mailing list and join the website team! – www@couchdb.apache.org
  • The CouchDB advocate marketing programme is just getting started. Join us in CouchDB’s Advocate Hub!
  • CouchDB has a new wiki. Help us move content from the old to the new one!
  • Can you help with Web Design, Development or UX for our Admin Console? No Erlang skills required! – Get in touch with us.
  • Do you want to help moving the CouchDB docs translation forward? We’d love to have you in our L10n team! See our current status and languages we’d like to provide CouchDB docs in on this page. If you’d like to help, don’t hesitate to contact the L10n mailing list on l10n@couchdb.apache.org or ping Andy Wenk (awenkhh on IRC).

We’d be happy to welcome you on board!

Events

Job opportunities for people with CouchDB skills

Also in the news

Submit news to the CouchDB Weekly

Reach out to us with your news suggestions by sending us an email or by contacting us on Twitter @CouchDB.