Inspiration
Prior to this hackathon, I have never built a healthcare app, nor was even aware of all the concepts, such as CDS Hooks, FHIR, etc. This was the perfect opportunity to dive straight into this industry and have a bunch of take aways from technical concepts within healthcare and hopefully maybe this app can help someone in the future. I know how stressful the healthcare industry can be and I wanted to make an app that can really help medical professionals get quicker insights into patient history to help in the decision making process. It is by no means a replacement to a medical degree, but instead a tool that can be leveraged to help.
What it does
The app is connected with MeldRx within the EHR system and when within the backend view of the medical application, the app will provide an option to view more insight on the user. When that button is clicked, it will go through a secure authentication process to ensure that the user consents to providing the data to the application.
Once the user is within the application, the system will automatically analyze the patient's data, consisting of the condition and observation data. It will then provide a risk score, stating the risk that the patient is at, based on their historical medical information with a transparent explanation for the risk score. Additionally, the app will provide recommended actions and preventive measures, based on the patient's data. A super quick summary will be provided as well.
The model also outputs the accuracy of the response as well, with an option to download the model's analysis as a PDF document for safe keeping.
The app also displays a high level overview of the data in order to visualize it, such as resolved and active conditions and the patient's most common conditions.
How we built it
I built this application with Next.js, utilizing a combination of javascript and typescript and following the standards for CDS hooks and FHIR to retrieve the patient's data. React redux was used for state managing, such as keeping track of the user's authentication, as well as the patient's data. I used the library recharts to visualize the data into graphs, as well as in combination with tailwind and daisyUI to stylize the frontend of the application.
Where the application all comes together is utilizing Gemini's flash model to analyze the data in a quick enough manner to keep up with the fast pace of the healthcare industry. An accuracy is indicated of the output as well to be transparent with the healthcare profession on how confident the AI model is with it's output. An explanation for the accuracy is provided too.
Challenges we ran into
Challenges I ran into is that it took a lot of trial an error to prompt engineer the data with the AI model to get the output just right and as accurate as possible with the provided data. It was also my first time developing a healthcare app, so prior to this hackathon I was not familiar with CDS Hooks or FHIR.
It's not often, but it has happened through testing where the AI model can not generate the output in the required JSON format. In order to mitigate this, I added automatic re-try logic, where if it does fail, it will wait 500 milliseconds to avoid spamming the AI model, while still being as quick as possible and then try again up to 10 times. To this date, I have seen the model being able to generate the output quickly with 100% success rate and have not see a single failure since.
Accomplishments that we're proud of
I am really proud that I was able to create a predictive healthcare app and submit on time of the hackathon deadline, as well as how far I have come development wise. I felt I was able to pick up medical development concepts very quickly, which I have the hackathon demo videos to thank as well for that as it really helped me get started in the right direction and were very clear and concise.
What we learned
I learned a lot about healthcare standards and app development, such as CDS Hooks and FHIR, as well as different API endpoints from MeldRx and it's platform. I have never even heard of MeldRx prior to this hackathon and now I am confident in building medical applications with the platform and will definitely build another app this way again, as I really enjoyed working on it.
What's next for Predictive AI Healthcare Assister
I want to improve the accuracy of the AI model output. The highest I have seen is 85% accuracy. Possibly, by extracting more relevant data from the patient and further prompt engineering the input for the AI model can help with this.
I would love to turn this into a sort of queuing system, as a way to prioritize patients. As often times, the wait times are super long in hospitals and that could help in getting patients to a doctor faster, as the AI model can output a priority based on their risk score and send it back to the EHR MeldRx card view. Perhaps integrating text notifications as well to patients on the progress of their appointment.
Lastly, this application uses Gemini for AI-driven predictions, but a future improvement is to adapt it to work with Small Language Models (SLMs) or fine-tuned models. This enhancement would provide greater control over data security, ensuring patient information remains protected within secure and compliant environments.
These are initial steps for future improvements of the application, but I can see the potential of scaling this app to work with several different use cases within the healthcare industry.
Built With
- axios
- cds-hooks
- daisyui
- express.js
- fhir
- gemini
- javascript
- meldrx
- nextjs
- react-redux
- react/pdf/renderer
- recharts
- tailwind
- typescript
- vercel

Log in or sign up for Devpost to join the conversation.