Skip to content

Repository files navigation

🩺 MedScript AI — AI Prescription Validator

MedScript AI is a modern AI-powered prescription validation system built using React, TypeScript, Gemini AI, OCR, and privacy-focused masking.

The application helps users securely scan, analyze, validate, and manage medical prescriptions while protecting sensitive patient information before sending data to AI services.


✨ Features

🔒 Privacy Protection Layer

Sensitive information is automatically masked before AI processing.

Protected data includes:

  • Patient names
  • Phone numbers
  • Registration IDs
  • Personal details

Example:

Patient: Rahul Sharma
↓
Patient: PATIENT_1

🤖 Gemini AI Validation

AI analyzes prescriptions for:

  • Medicine validation
  • Unsafe combinations
  • Missing dosage information
  • Duplicate medicines
  • Prescription inconsistencies
  • Safety alerts

📸 OCR Prescription Scanning

Extracts text from uploaded prescription images using OCR.

Supports:

  • Handwritten prescriptions
  • Printed prescriptions
  • Image enhancement
  • Real-time scanning

✍️ Manual Redaction Tool

Users can manually hide sensitive information directly on uploaded images.

Features:

  • Brush masking
  • Real-time editing
  • Secure preprocessing
  • Canvas-based redaction

📷 Camera Support

Capture prescriptions directly from the browser using the device camera.


📄 PDF Report Export

Generate structured reports containing:

  • Patient details
  • Medicine list
  • AI analysis
  • Safety alerts
  • OCR extracted text

🎨 Modern UI

  • Responsive design
  • Smooth animations
  • Glassmorphism effects
  • Clean medical dashboard UI

🛠️ Tech Stack

Technology Usage
React 19 Frontend
TypeScript Type Safety
Tailwind CSS Styling
Framer Motion Animations
Gemini AI AI Analysis
jsPDF PDF Export
Vite Build Tool

🚀 Getting Started

Install Dependencies

npm install

Setup Environment Variables

Create .env

VITE_GEMINI_API_KEY=your_api_key

Get your API key from: https://aistudio.google.com/app/apikey


Run Development Server

npm run dev

Build Project

npm run build

📁 Project Structure

src/
├── components/
├── services/
├── utils/
├── App.tsx
├── main.tsx
└── index.css

🔐 Privacy Workflow

User Upload
    ↓
OCR Extraction
    ↓
Privacy Masking
    ↓
Gemini AI Analysis
    ↓
Safe Response

🛡️ Security

  • Sensitive data masked before AI processing
  • No raw patient data shared
  • Browser-based secure workflow
  • Reports stored locally on the device

📌 Supported Inputs

✅ Image Upload ✅ Camera Capture ✅ Manual Text Input ✅ OCR Scanning ✅ Manual Redaction


Built with React, Tailwind CSS, Framer Motion, jsPDF, and Gemini AI.

About

AI-powered prescription validation system using Gemini AI, OCR, and privacy-focused masking to securely scan, analyze, and validate medical prescriptions with PDF export and modern UI.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages