Inspiration

I'm really interested in AI and healthcare, having completed a few projects on the matter, and this seemed like a great way to explore the fusion of those two subjects once again.

What it does

LifeLens is a Node.js CDS webhook that obtains the patient's information, namely their name, age and gender, conditions, medications, observations, procedures and lifestyle factors, and leverages ChatGPT-4o to predict the patient's life expectancy and also give them a few pointers to life a healthier and longer life.

How I built it

I followed the Youtube CDS webhook demo, since it was difficult to wrap my head around the documentation at first. From that sample demo, I started modifying the code in order to find as much of the patient information as I could, and then format it in a condensed format, since the webhook would time out if I sent too much data over to ChatGPT. I also modified the prompt a few times in order to get a concise response from the LLM.

Challenges I ran into

The documentation is very difficult to understand at first, but after viewing the demo, things started falling into place. The biggest hurdle was the timeout issue, and I was tweaking the prompt and the patient information in order to get a timely response from ChatGPT.

Accomplishments that I'm proud of

Actually creating the webhook! It was very difficult at first to wrap my head around how to not only create it, but also have it be called. I'm also happy with the response time from the AI, which I was able to cut down and keep it all from timing out.

What I learned

This is my first Node.js project, so that was a great thing to be able to work on. I also used ngrok for the first time and will definitely be using it again. I also learned a lot about FHIR, MeldRX and their ecosystem, as well as CDS webhooks.

What's next for LifeLens

A more thorough assessment, which would take into account the patient's complete medical history, would be a wonderful addition. Although this would need to be done via a link from the webhook, since the timeout would definitely be an issue with something like this.

Built With

Share this project:

Updates