Skip to content

The Prescription Analysis Web App compares medications from two prescription PDFs, checking names, strengths, and dosage forms against a dataset. Users can sign up, log in, and track their analyses. Built with Flask and Pandas, it helps monitor prescription changes easily.

Notifications You must be signed in to change notification settings

sagnik-create/Wellnest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prescription Analysis Web App

This Flask-based web application allows users to upload previous and latest prescriptions in PDF format to compare medications, their strengths, and dosage forms. The app also features user authentication with signup and login functionality.

Features

  • User Authentication: Users can sign up and sign in to access their personalized dashboard.
  • PDF Prescription Analysis: The application extracts text from prescription PDFs and compares the medications, checking their strengths against a dataset of medicines.
  • Comparison with Dataset: The app checks medication strength and form (tablet, syrup, etc.) from a provided dataset of medicines.

Prerequisites

Before running the application, make sure you have the following installed:

  • Python 3.7+
  • Flask
  • Pandas
  • PyPDF2

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/medbud-app.git
    cd medbud-app
  2. Create a virtual environment and activate it:

    python3 -m venv venv
    source venv/bin/activate  # On Windows use: venv\Scripts\activate
  3. Install the required packages:

    pip install Flask pandas PyPDF2
  4. Place your medicine_dataset.csv file in the /mnt/data/ directory.

  5. Make sure the directory structure for user pages is in place:

    mkdir users

Running the Application

  1. Run the Flask application:

    python app.py
  2. Open your browser and navigate to:

    http://127.0.0.1:5000/
    

Usage

Sign Up

  1. Navigate to the sign-up page.
  2. Enter your username, email, and password to create an account.

Log In

  1. Enter your username and password on the login page to access your personalized dashboard.

Analyze Prescription

  1. Upload both the previous and latest prescription PDFs.
  2. The app will extract text from both prescriptions, compare the medications, and present the differences (e.g., increased dosage).
  3. The analysis results will be compared to the medicine_dataset.csv file to check for standard strengths and dosage forms.

File Structure

├── app.py
├── templates
│   ├── first.html
│   ├── index.html
│   ├── signin.html
│   ├── signup.html
│   ├── user.html
│   └── prescription_analysis.html
├── users
│   └── (auto-generated HTML files for users)
├── mnt
│   └── data
│       └── medicine_dataset.csv
└── README.md

Dataset

The app uses a dataset (medicine_dataset.csv) that contains medicine information such as:

  • Name: The name of the medicine.
  • Strength: The strength (e.g., 500 mg).
  • Dosage Form: The form in which the medicine is administered (e.g., tablet, syrup).

Contributing

Feel free to fork this repository and submit pull requests for any improvements.

About

The Prescription Analysis Web App compares medications from two prescription PDFs, checking names, strengths, and dosage forms against a dataset. Users can sign up, log in, and track their analyses. Built with Flask and Pandas, it helps monitor prescription changes easily.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published