Lessons learnt from 8 years of FOSS (Bahmni) development

gsluthra 145 views 34 slides Jul 28, 2024
Slide 1
Slide 1 of 34
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34

About This Presentation

In this talk, at the Thoughtworks xConf 2021 - Angshuman & Gurpreet share the lessons learnt while building & deploying Bahmni, an open source hospital management system across resource constrained environments. They cover key lessons on sustainability, software entropy, designing tech4good ...


Slide Content

© 2021 Thoughtworks | Confidential
8 years of Open
Source Product
Development:
Lessons Learnt

© 2021 Thoughtworks | Confidential
About Us
2
Members of the Bahmni Product Development Team (and TW Global Health team)
Angshuman Sarkar
●Technical Principal
●20 Years in Software
& Global Health
●Architect (Bahmni,
ProjectEKA
●NDHM Contributor,
Digital/Public Health
Policy habitue
●Open Source Evangelist
●Technical Principal
●20 Years in Software
Development
●Product Manager &
Community Manager
for Bahmni
●Passionate about
Tech4Good
●Open Source Evangelist
Gurpreet Luthra

© 2021 Thoughtworks | Confidential 3

●One of the most popular FOSS
EMR/EHR/HIMS
●50 countries, over 500
implementations. 600 downloads a
month
●Open Source, Open System, Open
Community
●Preferred EHR/HIMS solution in many
countries in Asia and Africa
●Strategic asset for Large Humanitarian
Organizations
●Recognized as a Digital Public Good by
DPGA & UNICEF in 2021

https://bahmni.org

4
https://www.bahmni.org/feature-list

5
BAHMNI - THE OUTREACH AND IMPACT
Jan Swasthya
Sahyog (JSS)
Bilaspur, India
MOH
LESOTHO
Population Served: 2 Mn+

Users Supported: 2000+

Patients Served: 500K+

Transactions: 1 Mn+




Population Served: 1 Mn+

Users Supported: 200+

Patients Served: 250K+

Transactions: 350K+




Population Served: 2Mn+

Users Supported: 500+

Patients Served: 10K+

Transactions: 400K+




Population Served: 2 Mn+

Users Supported: 2000+

Patients Served: 500K+

Transactions: 1 Mn+




50+ Countries implementation
Preferred EMR Solution - Asia, Africa


Supporting 2Mn+ Patient Records
Impacting 15Mn+ Population



500+ Sites Diverse implementations
Highly Customised for Local flavour


20+ Accolades across Govt & NGOs
MOH Bangladesh, Calcutta Kids,
Partners in Health, JSS, Possible




Sustainable Ecosystem
BAHMNI Coalition
Scaling Nationally across continents


Featured in JIMR Study of EMR
Featured in Digital Square Global
Goods Product list





Used as Clinical Research tool
worldwide in TB, HIV etc.



International
Humanitarian
Medical NGO

Bahmni Implementations Across the World
6

7
EHR for low
resource
settings

Jan Swasthya Sahyog (JSS)
Bilaspur, Chhattisgarh
8

© 2021 Thoughtworks | Confidential
People in small places
do not have small
problems
9
2012  The first meeting of TW with JSS, Bilaspur

10

Gudalur Adivasi
Hospital, Tamil Nadu

‣50 bed Hospital
‣Infant mortality rate reduced to
300/thousand to 20/thousand.
‣Self reliant - Community collective,
75% of the tribal have dedicated to
improvement of health


11

Run by the tribals for
the tribals
12
https://ashwini.org/

© 2021 Thoughtworks | Confidential
endTB: Using Bahmni for Clinical Data Capture

‣A Partnership among 3 organisations - MSF,
Partners in Health (PIH & Interactive Research &
Development (IRD funded by UNITAID

‣Operational over 25 countries

●http://endtb.org
●Dr. Cathy Hewison on Design, development,
and deployment of the endTB electronic
medical record
●Fighting Tuberculosis with Open-Source Tech


OBJECTIVE

●To find shorter, less toxic and more
effective treatments for
‘multidrug-resistant TB’ or MDRTB with
two new drugs - Bedaquiline and
Delamanid
●Aims to share findings with WHO and
Governments for a much wider impact


13

© 2021 Thoughtworks | Confidential
1.Country wide deployments - Bangladesh,
Lesotho, Nepal (preferred EMR.
2.Bahmni is under evaluation in Bihar.
3.Used in:
a.Hospitals NGOs, Private, Govt, etc.
b.Clinical Research
c.Primary and Tertiary care - e.g.
re-countructive Surgery
d.Programs  HIV, TB, Burns ANC /
Mother-Child Care, etc.
e.Oncology (in-roadmap)
f.Integration with NDHM (going live-soon)
Now Bahmni has been used in...
14

© 2021 Thoughtworks | Confidential
Architecture for Low Resource Environments?
1.Poor Electricity & Internet connectivity.
2.Outdated hardware, routers, network, etc.
3.Extreme climatic conditions.
4.More patients. Less users/doctors.
Overloaded system.
5.Less-Technical capability or exposure.
6.Inability to pay.
7.Lots of Data. No security. No backups. No
privacy.
8.Cheap Android phones. Or Feature
phones.
9.Malware, Viruses, Lack of Security
Consciousness.
10.In-premise / Laptop deployments.
15
The Lake Clinic,
Cambodia

© 2021 Thoughtworks | Confidential 16

© 2021 Thoughtworks | Confidential
Deployment Options
•Laptop
•Desktop Computer
•In-premise Servers
•Private Data center
•Cloud Providers
17
•Direct Installation
Ansible)
•Vagrant
•Docker Containers
•AMI Images

© 2021 Thoughtworks | Confidential
Large Footprint. Software Entropy.
1.Bahmni has over 1M LoC with 160K AngularJS.
2.Development started in 2013 8 years).
○Puppet → Ansible.
○Vagrant → Docker.
○Mingle → JIRA.
○AngularJS -> React.
○CentOS -> Rocky Linux?  Docker?
○OpenMRS  2016 version. Odoo v10.
etc.
3.Plan for upgrading / retiring.
4.Abstractions & Loose Coupling.
Choices that continue to bug us:
1.Frontend codebase in Single repo -
compromised modularity and SoC.
2.Over reliance on framework (didn’t leverage
POJO enough).
3.Modular dynamic loaded components were
de-emphasized - with single SPA; struggle to
allow customization or pluggability.
4.Created our own design system; turned out to
be costly and assimilation of contribution inline
with overall product design.

© 2021 Thoughtworks | Confidential
Security. Privacy. Patient Data.
Challenges

1.Less Technical Know-how on the ground.
2.Unpatched Networks / Routers / Systems.
3.Malware Attacks.
4.No Trust Boundaries. Shared Wifi.
5.Patient Discrimination (HIV, Albino,
Homophobia, Ethinic, Sexual Violence,
etc).
6.Shared Passwords
7.Vulnerable Libraries in the wild.
8.Default Usernames/passwords.
9.No appreciation or understanding of
Privacy rights.
10.Digital Data - easy to lose, steal,
replicate!
11.Very few orgs have awareness of
Operationalising Digital Security / Safety
protocols.
1.SMS based OTP
2.Fine-Grained Authorisation
Model
3.Audit Log - Even for VIEW of
records
4.Installer sets up firewall and
other security features.
5.Documentation & scripts on
Server Security / Hardening.
6.LetsEncrypt based
certificates.
7.Threat Modelling & Trust
Boundaries
8.…. A lot more to be done!

© 2021 Thoughtworks | Confidential
Product over Project Thinking
20
1.Easy to fund Projects, than a
Product Team.
2.Large Surface Area makes for
Local Optimisation of Decisions
over Global Optimisations
Tactical > Strategic)
3.Fragmented Features - work for
only specific use-cases.
4.No holistic vision / strategy.
5.Large Tech Debt, re-inventing
the wheel.
6.Products: More sustainable for
OSS / Tech4good situations.
7.Core Product - as a platform.
Plugin architecture for custom
extensions by community.

© 2021 Thoughtworks | Confidential
Early Years: Partnered with Grassroots Org
21

© 2021 Thoughtworks | Confidential 22
Team: Iterate, Discuss, Modify and Deploy on
Ground

© 2021 Thoughtworks | Confidential
Understand
Local Context
23

© 2021 Thoughtworks | Confidential 24
Long-term Sponsorship… from a caring &
competent organization

© 2021 Thoughtworks | Confidential
Experience in Global Health Informatics
25

© 2021 Thoughtworks | Confidential
Open Source
Technologies in Global
Health
26
Thoughtworks has been
instrumental in most of the
key products listed here.

© 2021 Thoughtworks | Confidential
Configurability
without coding
•Given the context of our target
segment, programmers are
impossible to find.
•Different hospitals and regions
have different UI needs.
•Cookie-cutter solutions won’t
work
27

© 2021 Thoughtworks | Confidential
1.Country Wide Implementations
a.Country specific
distribution/packaging (NepalEHR,
eHospital Kenya, etc).
b.Local/Regional implementers.
c.Interop: FHIR standard Adopt early)
2.Sustainable Business Model for
Implementor Ecosystem
a.Support / Upgrades
b.Training
c.Implementations
d.Starter Kits / Add-ons
3.Core Product also needs a
sustainable funding strategy
a.Collaboration
b.Partnerships
Lessons in
Sustainability
28

NDHM
Ecosystem Integration - Federated Architecture
- NDHM

© 2021 Thoughtworks | Confidential
Open Source
software isn’t successful
because of “software” --
it’s because of the
“ecosystem
encompassing the
software”.
30

© 2021 Thoughtworks | Confidential 31

© 2021 Thoughtworks | Confidential
1.Product thinking over Project
thinking.
2.Plan & Design for Software
Entropy over time.
3.Low Resource Environments
can be more challenging than
“Enterprise scale”.
4.Security & Privacy - competes
with Good UX.
5.Choose aligned Customers at
the start. Build collaboratively.
6.Tech4Good cannot sustain
without Local Partners &
ecosystem development.
7.Successful Open source needs
a funding model & community.
Lessons!
32

© 2021 Thoughtworks | Confidential
Innovation?
33
“There are many criticisms of technology,
indicating that it can take away the human
element of health care. Bahmni has shown
us how technology can help, and still
remain very human”  Dr. Yogesh Jain

“Successful projects are 99% perspiration,
and 1% innovation”  Linus Torvalds, Exec
Director, Linux Foundation

“And Inspiration”  Gurpreet & Angshu,
Thoughtworkers

© 2021 Thoughtworks | Confidential
Contribute to
Bahmni!

Google: “how to contribute to
Bahmni”
34