Rethinking our approach to Electronic Health Records
A computer scientist's view on the problem
Our Electronic Health Records are a mess.
A caveat
I don’t work in EHR. I’m a computer scientist who runs a workforce optimisation consultancy in the NHS. But I live next door to the EHR people and as a concerned neighbour I poke my head over the fence and say “what the hell is going on over there?”
The current state of things…
All our health data sits in heterogenous databases in healthcare provider organisations. They will have an application with a database that sits behind it. And the idea is that “they all talk to each other”.
Where can a patient view their complete set of medical notes? The answer is nowhere. Each provider holds one piece of the data jigsaw. And good luck negotiating access to each jigsaw piece.
So our first attempt is to force each provider to create an API - typically this is a thing called FHIR (Fast Healthcare Interoperability Resources). Because in an ideal world, the data behind each application is a perfect synchronised record of the data in the other systems. If this worked, when you went to a hospital, your home address would be the same in every location. Spoiler: it’s not.
There’s a lot of contractual negotiation that needs to go on for just one single direction FHIR interface between two care providers.
It’s complex, there’s lots of them and it gets worse…
Jill’s constellation of care..
For any one care pathway, there’s a constellation of care surrounding that patient. Take the example of Jill - an elderly stroke patient.
Paramedic is dispatched
Emergency department
Acute recovery ward
Radiologist
Hospital pharmacy
Specialist stroke consultant doctor
Bed management team
Ambulatory care to rehabilitation centre
Stroke rehabilitation centre
rehabilitation centre pharmacy
Patient’s primary care doctor
Concerned relative and carer
Ambulatory care to nursing home
Patient’s nursing home
District nursing team
Occupational therapy team
Physiotherapist
…
That’s 17 off the top of my head for ONE care pathway. What if Jill is also undergoing cancer treatment? Maybe their oncologist needs to know?
And it gets even worse… because even in Miracle World where you have FHIR contracts between each care provider, are they the same provider for each patient? Jill’s nursing home isn’t the same as Marion’s? Are you going to connect them ALL up?
What if they have the stroke in another part of the country? or a different country?
What we’re trying to connect up is EVERY care provider in the country; and possibly the world. And “care provider” can mean a lot of things from a specialist hospital to a son or daughter. This is A LOT of people.
Let’s see how this scales when you’re trying to negotiate a data exchange contract between all the care providers.
The first box is one care provider. No need to interface. The second is 2 providers - one line. 3 is 3 interfaces, 4 is 6 interfaces etc until 12 providers would be 66 interfaces.
This is becoming a catchphrase… but it gets worse. Because those interfaces need to be bidirectional. So, double it. 132 interfaces for 12 carers.
The formula for this is N^2 - N. For our 17 provider example, that’s 17^2 - 17 = 272 interfaces! Is it any wonder we can’t get Jill’s 17 piece jigsaw puzzle together!?
Oh btw. since Jill’s stroke, she’s moved in to her daughter’s house to recuperate. Who are you going to tell? So, you tell your primary care doctor and 16 messages need to successfully go out to the other 16 carers. 14 complete, 2 fail and have the old address. But now we’ve got a jigsaw puzzle that doesn’t fit together. Who has the authoritative record? The primary care clinician? Ok, great. But Jill’s daughter mentioned the move when she was in the nursing home. The nursing home isn’t the authoritative record.
But hey, it gets worse! Because that’s just Jill’s one care pathway. She has multiple with even more carers. And Jill is not your only patient. You’ve got 2’000’000 patients in your county, with multiple care pathways and different associated care constellations.
OMG.
Maybe we could just link them all up? How many connections for every care provider in a country.
Here’s ChatGPT’s conservative estimate for the UK.
~19,000 social‑care + 900+ hospitals + 13,400 pharmacies + 9,200 GPs + ~450 community hospitals
→ ≈ 42,000–43,000 care provider organisations or sites in the UK
Personally, I think it’s way more + people who are sick often have friends, neighbours and relatives coordinating their care. But let’s go with 42’000…
42’000 carers = 1.76 billion interfaces.
… for one country.
What to do?
One big Single Patient Record (aka NPfIT )
Well, bugger this. Let’s just have one massive national single patient record. Because that’ll work.
“You’re gonna need a bigger app”
OK. Cool. We’ve got a lot less connections. Maybe just 45’000 interfaces if we just include care provider organisations. At this point, let me just point out the awesome complexity in The Mega App and Mega Database sat behind it. Health data is complex. The maternity EHR system - BadgerNet - is well respected. It does one thing really well - maternity records. That’s a specialism of dilations, growth charts, mother AND baby records. There’s going to be a lot of feature and complexity in the data structures within it. OK. So that times a few hundred different specialties, demographic data, patient administration, appointments, ambulatory care…
This thing is going to be awesome!!!
And so Tony Blair tried this in the UK in 2002. Handing over £12.7 billion to Fujitsu, British Telecom, Accenture, CSC, McKinsey et al. And when have giant major government IT projects ever failed? Right?
Fast forward to 2011…
Annnnnd it’s gone. £12.7 billion.
Quick anecdote: my friend Professor Joe McDonald was involved in NPfIT at a senior level and took a trip out to India to visit the engineers…
«Prof goes into lift and sees the lift attendant and another guy»
Prof: “Who’s this other guy?”
Lift attendant: “Oh, he’s my assistant”He told me that if he ever writes the book on this saga it will be called “The Lift Attendant’s Assistant”. Available in all good book shops for anybody looking how to waste £12.7 billion.
Meh. OK. That wont work.
How about summary care records?
So, our clinical informaticians decide that this is impossible and we create summary care records. Grab together a bunch of nodes in the region and we can aggregate it into a bigger regional node. This works to some extent. My friend Professor Joe McDonald co-created The Great North Care Record. It’s awesome. Links up health records across the North East of England. If you get into an ambulance in Newcastle, they’ll probably have a summary of your hospital record. Similar SCRs have sprung up across the country in Yorkshire and London.
But they are summary care records. They’re not the full puzzle. And people don’t stay in region. And the constellation of care is much bigger than just a few hospitals. And you have to co-ordinate the providers. And then who is the authoritative record keeper of something as simple as an address?
OK. Give up?
No.
The thing my friend Dr Marcus Baw said that kept me up all night…
My friend Marcus describes himself as a “clinician who codes” but he could be equally described as a “coder who clinicians”
Marcus understand the EHR problem but he also uses the software versioning system Git. In simple terms, git allows a group of software engineers to co-author. That’s it. Git is distributed authoring. That’s what we need in EHR! And Marcus has gone on that journey.
Call me sad but I was literally awake in bed that night thinking about this paradigm shift. Just pass the record around like you would an MP3 file and stash it somewhere on the internet where the providers can get to it! No gatekeepers except the patient and whoever they delegate access to.
A chance encounter on a plane…
Three years ago, I was flying back from a nerd conference in Krakow to London, I happened to sit next to a brilliant CTO and described this epiphany.
“Hmmm… interesting. Although I think I’d use Hypercore”
Two hours later we’d sketched out a basic architectural diagram of what a modern EHR system could look like.
Introducing pEHR - distributed P2P health records…
What if it looked more like this…
W’oh! Where’s mega app and mega database gone?
Don’t need it.
Honestly, I know it’s mind-bending but you don’t need it.
The technology is very similar to Bit Torrent - more commonly used for video piracy. Arrghhh!! To be shaw.
The beauty of a distributed ledger (data in the middle) is that nobody owns it but individuals have control over their part of it. Part of the data in the middle is the routing information about who is connected to who, and whether they have access to certain parts of the information.
Here’s a few of the awesome things about pEHR:
The patient can see their entire health record
They can delegate access to peers.
The peers can transmit huge files like MRI scans.
You can have a peer to peer video consulation
Bolt on whatever app you like. Want ChatGPT to act as a patient advocate for you?
YOU (or your delegates) can control access to it.
You can be anywhere on the planet.
You can even pop up a FHIR interface so your hospital can consume the data.
The possibilities are endless.
So why doesn’t this exist? Honestly - there’s very little money in making a protocol to improve and save billions of lives.
But let’s build it anyway.
How can I get involved?
Myself and a bunch of P2P enthusiasts are on a platform called Keet. It’s similar to WhatsApp. If you download Keet you can then paste in the following link and it will take you to our pEHR project room. The link only lasts two weeks so give me a nudge if it runs out.
pear://keet/yfou3am7ahz93pt9bbo45oageqriyrtisjndn6du1h11k7cbfq4nnkyc3k7m73abkmz8z8hjjiasbbecncwgdyu9is5bcmbx3mcgud7ntsjsax6csce6ji4foenx9rxmc36cks6nok4bchrp7o7aor64sdydkye
Why doesn’t that look like a normal web address? ☝️
This will blow your mind! There is no website. The application code is itself in the data on the network. Room information? in the data. Messages you send each other? in the data. User administration? in the data.
Not only can you store the health data on the network, you can distribute the EHR applications in the p2p data too. Amazing!
Brilliant. We need this now. In Australia we want to build a pEHR starting now. Vern Hughes
+61 425 722890
vern.hughes@bigpond.com
www.innovation200.org
Great post! And a great potential solution. Definitely one worthy of being investigated further.