Inspiration

Patient safety, the wellbeing of a patient during a visit, is frequently harmed due to medication, medical complication, surgical, infections, and diagnostic errors. While some of these problems can be pinpointed to specific causes, most arise due to system-wide inefficiencies and errors that compound on one another. A major cause is the siloing of patient data across different healthcare providers, leading to incomplete information and inefficient care coordination. Current solutions are ineffective, dated, or lacking an incentive for hospitals to get involved.

What it does

Unify is an all-in-one, fully anonymized medical database analysis tool, patient search engine, doctor communications platform, and case study generator. The application serves as a central database where medical personnel can upload new patient data or search through existing treatment cases. If a doctor has questions regarding how a specific patient was treated, they can anonymously chat with the original healthcare provider for advice. On the home dashboard, important hospital statistics are shown to allow staff to keep track of improvement in patient safety.

How we built it

In our project, we utilized OpenAI embeddings to represent patient data, which allowed us to calculate similarity scores between different cases. These embeddings transformed the patient information into high-dimensional vectors that encapsulated key features such as medical history, treatments, and diagnoses. By comparing these vectors, we could determine how closely related two patient cases were, which helped in identifying similar conditions or recommending treatments.

On the frontend, we used Next.js to design the user interface, with React for building dynamic and interactive components, and TypeScript to ensure robust typing and styling across the application.

For the backend, MongoDB was used to store patient cases, and FastAPI acted as the bridge between the database, machine learning model, and frontend. FastAPI enabled seamless interaction between the various components. When users searched for similar patient cases, the system leveraged OpenAI's embeddings to compute similarity scores, allowing the frontend to display relevant and related patient information quickly. This approach facilitated a more personalized and informed recommendation process in the medical chat application.

Challenges we ran in

To make the case study matching system, we knew we couldn’t rely on direct matching as that would mean similar cases wouldn’t be matched simply because they were typed in differently. We settled on extracting the transformer embeddings of concatenated strings of patient data. These embedding vectors could then be compared to an input embedding vector to quantify how semantically close the two strings are. This resulted in a robust system capable of finding interesting and relevant cases despite data entry differences.

Accomplishments that we're proud of

We’re very proud of our similarity based patient search function which relies on the cosine similarity of transformer-based embeddings. This allows doctors to freely enter their data without having to strictly adhere to cumbersome formatting/documentation rules. For example, a doctor listing a patient’s language as “ENGL” will score very similarly to “English”. This reduces the burden placed on medical staff and will lay the foundation for connecting Unify with hospitals across the globe and the different data conventions they use.

What we learned

We learned a lot about using OpenAI’s API in ways other than making a chat bot. We also learned a lot about the medical industry and the role that data plays in it. Along the way, we improved our skills in the tech stack we used, including Next.js, TailwindCSS, and FastAPI.

What's next for Unify

We would like to make Unify HIPAA compliant by updating its database to follow the Safe Harbor Method, which deidentifies protected health information (PHI). The 18 PHI identifiers would be omitted from patient case entries. To facilitate easier deployment into hospitals, it would also be nice if Unify was backwards compatible with current EHR systems. Lastly, we would want to broaden the scope of Unify to international countries by making it support different medical protocols (e.g: CPT and ICD-10)

Built With

Share this project:

Updates