Skip to content

KhushalKarim/hackathon-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

hackathon-app

Second Opnion App for Patients

Overview The App is designed to help patients verify and understand the medications prescribed to them. The app enables users to upload prescription files in image or PDF format, from which it extracts text. Using transformers, the app then suggests important questions that patients should ask their doctors before taking the prescribed medicines. The questions focus on key factors like side effects, dosage, drug interactions, and precautions.

Key Features Prescription Text Extraction:

Upload a prescription image (JPG, PNG, JPEG) or a PDF file.

Extracts the prescription text using OCR (Optical Character Recognition) for images and native text extraction for PDFs.

Questions Generation:

Based on the prescription text and optional manual medicine input, the app generates a set of important questions patients should ask their doctors before taking the medicines.

Medicines Input:

You can manually input the names of the medicines to enhance the question generation for more accurate and relevant inquiries.

How it Works Upload Prescription:

You can upload your prescription either as an image or a PDF.

For images, the app uses Tesseract OCR to extract text.

For PDFs, it uses PyMuPDF to extract text, and if the PDF contains images with text, it uses OCR to detect the text.

Text Extraction:

Once the file is uploaded, the app extracts the text from it and displays it on the screen for review.

Question Generation:

After extracting the prescription text, the app generates a set of questions to ask the doctor.

The questions are generated using an NLP model from Hugging Face's transformers library, tailored to the text from the prescription and any additional medicines you enter.

Display Results:

The app shows the extracted prescription text, the entered medicines, and the questions to ask the doctor on the same page.

Technologies Used Streamlit: Used for creating the web-based user interface where users can upload prescriptions and see results.

Pytesseract: Used for text extraction from images (OCR).

PyMuPDF (fitz): Used for extracting text from PDF files.

Transformers (Hugging Face): Used for NLP-based text analysis and question generation.

PIL (Python Imaging Library): Used for handling and processing image files.

User Instructions Upload your prescription:

You can upload a prescription in the form of an image (JPG, PNG, JPEG) or a PDF file.

After uploading, the app will automatically extract the text from the prescription.

Enter medicine names (optional):

You can enter the names of the medicines prescribed to you (comma-separated). This helps to provide more tailored and relevant questions.

Suggested Questions:

After extracting the prescription text and optional medicines input, the app will generate a list of important questions to ask your doctor, such as:

"What are the possible side effects of these medicines?"

"Are there any drug interactions I should be aware of?"

"What should I do if I miss a dose of my medication?"

"Is this medicine safe to take with my current health conditions?"

Check Prescription:

If you are satisfied with the information, you can click the "Check Prescription" button to finalize the process.

Future Improvements Side Effects and Dosage Checking: Adding functionality to check for potential side effects and verify dosage instructions based on the prescription text.

Drug Interaction Database: Integrating a database to check for interactions between prescribed medicines.

Multi-language Support: Extending support for multiple languages to make the app accessible to a wider audience.

Prescription Validation: Adding a feature to validate if the prescription follows common medical guidelines.

Conclusion This app serves as an easy-to-use tool to help patients gain clarity about their prescriptions. It empowers users by providing a way to ask informed questions, ensuring they take the correct actions before starting any medication.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages