Inspiration

Medication errors are a common problem in both general practice and hospitals, and it's tough to completely eliminate them as the sources are spread throughout the medical process, ranging from prescription faults, typing errors/poor handwriting or allergies that the doctor might not have taken into consideration. Pharmacopia hopes to solve some of these problems by giving complete control to you, the patient.

What it does

All you need to do is upload your prescription through the application. Drugs, tests and other medical details are automatically extracted from the uploaded image and displayed to you in a visually pleasing way. The application also lets you know any contradictions between the drugs and uses the Rearc API to provide tons of information about the drugs, so you can understand what medications you're consuming.

How we built it

The application architecture is displayed below: pharmacopia architecture

  • We used AWS Amplify and Vue for building the frontend, and AWS Cognito for authentication. The uploaded image is sent into a S3 bucket which is used to trigger a lambda function that extracts text from the image using AWS Textract and key medical data using AWS Medical Comprehend. Finally we have the Rearc AWS Data Exchange API which provides the user with loads of information on each drug.

  • We process the information obtained and use Spacy's robust Medical NER (Named Entity Recognition) model to recognise medical entities, summarise it and find existing contradictions between drugs by comparing its chemical interaction information with active components of other drugs to see if there could be a potentially adverse reaction when taken together. Additionally we also provide alternative drug suggestions and its core ingredient composition.

Challenges we ran into

  • We had a tough time setting up the application in AWS Amplify. This was our first time using most of the AWS services, and it was a really good learning experience.
  • We found certain inconsistency in the API data so it was hard to process information for every drug.

Accomplishments that we're proud of

  • Our approach to process medical text to find contradictions which is a novel concept and doesn't have any solid literature to support.
  • Our extensive utilisation of Rearc API information.

What's next for Pharmacopia

  • Developing a chatbot that the user can interact with instead of going through the information we provide. We could use AWS Lex for the same, and this would significantly improve user experience.
  • Improving the UI to provide drug details in a more visually pleasing way so users can get the information they want quickly.
  • Make the application comprehensive for both a clinical practitioner and a patient/drug consumer by better information processing and machine learning.
Share this project:

Updates