So I wrote an electronic health record, running live since 2009, and while it’s still not perfect, it’s had a lot of use and I’ve made a lot of changes.

I wrote it in my spare time.

Here are the statistics as of 24th June 2020:

There are 34,587 registered patients from across Wales, with 36% living Cardiff and Vale University Health Board, 15.9% Aneurin Bevan University Health Board, 11.3% Swansea Bay Health Board, 7.5% Cwm Taf University Health Board and the remaining distributed across Hywel Dda, Betsi Cadwaladr, Powys University Health Boards and NHS England sites.

There are 111 defined patient cohorts, with 78 NHS cohorts and 32 research cohorts and 577 health professionals registered to use the system including 81 specialist nurses, 78 administrators, 75 consultants, 63 physiotherapists, 52 doctors-in-training, 34 speech and language therapists, 30 occupational therapists, 25 dieticians and 10 psychologists, with the remaining comprising research associates, administrators and students.

There have been 436,145 clinical encounters recorded using the software with usage increasing during the COVID-19 crisis to record patient clinical and research contacts. Of these, there have been 175,144 telephone calls, 116,977 outpatient clinic assessments, 91,854 virtual encounters, 17,504 home visits, 11,234 inpatient encounters, 7639 multi-disciplinary team assessments and 5891 therapy group encounters. There are 4843 electronic consent forms recorded.

It integrates with the NHS Wales enterprise master patient index, the NHS Wales Care Record Service, the Cardiff and Vale document repository, the staff directory, multiple patient administrative systems and uses NHS systems for staff authentication.

It is founded on structured meaningful data. All patients have a list of addresses and each address is mapped to health organisation and LSOA and so from there, indices of deprivation. Each patient has a list of diagnoses and problems and treatments. Each patient is linked to multiple health boards but users don’t think in terms of organisations, only services, which can span multiple health and care organisations. At any time, we can view disease progression, by whatever outcome measure, against a cohort of patients with the same disease or defined by other shared characteristics such as age, gender, age at onset etc. It was easy to identify all of our patients with, for example, motor neurone disease, who might need to ‘shield’ from COVID-19; a three-click operation.

Over 6000 clinical or research encounters are recorded each month.

Now I’m re-building it, there’s a lot I’m doing differently but the fundamentals stay the same.

The important things?

  • Data data data
  • Declarative programming with rule-engine
  • Clean architecture
  • Separation of concerns
  • Decoupling