On the sunniest Saturday in London this year (so far), the Turn A Blind AI (TaBA) team of six amazing ducks came to the Quack Hack 2019 to hack and rock the healthcare industry. We wanted to create a new, smart approach to GP appointment scheduling using Artificial Intelligence (AI).

This system for GPs could take advantage of machine learning/AI to identify patients who are at risk due to their age, length of time since the last check up or family history. This new health management app could improve the quality of the NHS by notifying high risk patients to get a medical appointments and health checks on time.

 For those who do not know, the Quack Hack is an internal Cyber-Duck event where team members with different skillsets get to build new innovative projects. My team included Tod (UX Designer) and Nacho, Tiago, Mauricio and Elaine (development).

TABA Team

My team - Tod, Elaine, Tiago, Elena, Mauricio and Nacho from left to right.

Why is the project important?

In the UK, GPs do more than 370 million consultations annually – 60 million more than five years ago. Face-to-face consultations have risen 13 per cent, and telephone contacts by 63 per cent. That’s a lot of weight on GPs.

More than a quarter of the UK population have long-term conditions. Initially, we wanted to create a data base with all possible diseases using the data of existing patients over the weekend. Why not?

But… two days are not enough and access to medical data is limited. So, TaBA decided to just cover one disease modal – stroke. There are more than 100,000 strokes in the UK each year. That is around one stroke every five minutes. The cost of stroke to society is around £26 billion a year. This focus meant we could achieve much more with our hack. The only one requirement for the machine learning solution was that data and records have to be digital.TABA Stroke

The data that encouraged us to choose to investigate strokes.

The process  

We started with a brainstorming and whiteboard session to bring all the ideas into one place, agree on technologies and the next steps. 

The first and the most important question was – what problem is TaBA going to solve? The ducks didn’t need to look far. We easily came to the conclusion that a health management app could have a great value for both sides: GP/NHS and patients. But how?

TABA Whiteboard

The results of our whiteboard session. 

The patient could:

  • Receive better healthcare
  • Find it easier to make appointments
  • Increase their confidence in the NHS
  • Build a better relationship with the NHS

The GP / NHS could:

  • Reduce admin tasks and appointments
  • Reduce unnecessary appointments
  • Ensure patients visit for a specific reason

Overall, GPs could focus on more quality appointments. This app could put control back in the hands of the GP, leading to patient illness prevention and proactivity.

Technologies 

To create a new digital assistant for GPs, the ducks agreed to use powerful technologies such as:

  • Laravel – our favourite platform for backend development
  • PipeDream Laravel - a dev package to create Laravel application schemas rapidly
  • Bulma – a modern CSS framework based on Flexbox
  • VueJS - a progressive JavaScript framework on frontend
  • Docker - a platform to develop, deploy, and run applications inside containers
  • AWS - Amazon Web Services (AWS) - Cloud Computing Services
  • Buddy - The DevOps automation platform
  • PHP ML - Machine Learning

TABA Tech

The technologies we used for TaBA. 

Machine learning

Finding the right way to integrate AI into the TaBA system was the most challenging aspect of this project. We decided to apply machine learning through the way doctors could give a risk indication of individual patients. We would define the urgency of a patient’s next appointment (High Risk, Check-Up, Alert) based on the health records they have. 

TABA Regression

An example of linear regression from an informative Medium article about machine learning.

None of the TaBA team members had experience in working with AI projects before. We learned as we developed! Initially, we went for an AI fully managed service workflow provided by Amazon, SageMake. But this was an overkill approach since this is more used for vector learning e.g. teaching machines to identify a cat with different cat pictures.

Next, we decided to use Google Tensorflow. Again, we hit a wall. The main purpose of this service is to compete with SageMaker, so we ended up in the same situation. 

Finally, we decided to use simple linear regression as a modelling approach to feed the system using PHP ML library. We reviewed a sample of 100,000 records and used 10% for training sample and 90% for testing the data. The goal was to predict real valued output, in this case the stroke risk.

TABA Training the AI

How we trained our AI.

We used the following arbitrary ranges to evaluate the probability for high risk, alert, check up:

Age: 20- 29 -> 0.05, 30 – 39 -> 0.1,  40 – 49 -> 0.15,  50 – 59 -> 0.2.5,  60 – 69 -> 0.5,  70 – 79 -> 0.7, 

Smoking: 0.25 if smoker: 0.05 if not smoker

Gender: male: 0.08. female 0.05

 TABA Front End

A screenshot of the admin panel for GPs to manage their patients.

Summary

Overall, integrating this smart TaBA solution into the existing health care system could improve NHS administration processes. But most importantly, it could alert patients with increased medical risks to visit their GP before they develop a critical health condition. Due to limited time, the demo TaBA model covers only one disease, but the same model could be used and applied to all existing diseases when symptoms are identified.   

I really enjoyed my first hackathon weekend at Cyber-Duck. My team came together to brainstorm and create a really useful potential proof of concept for the NHS. Sound interesting? Cyber-Duck could run an intensive Hackathon session with your staff too. If you want to find out more give us a shout.

Check out the other projects from this year’s Quack Hack: