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.
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_1AI analyzes prescriptions for:
- Medicine validation
- Unsafe combinations
- Missing dosage information
- Duplicate medicines
- Prescription inconsistencies
- Safety alerts
Extracts text from uploaded prescription images using OCR.
Supports:
- Handwritten prescriptions
- Printed prescriptions
- Image enhancement
- Real-time scanning
Users can manually hide sensitive information directly on uploaded images.
Features:
- Brush masking
- Real-time editing
- Secure preprocessing
- Canvas-based redaction
Capture prescriptions directly from the browser using the device camera.
Generate structured reports containing:
- Patient details
- Medicine list
- AI analysis
- Safety alerts
- OCR extracted text
- Responsive design
- Smooth animations
- Glassmorphism effects
- Clean medical dashboard UI
| Technology | Usage |
|---|---|
| React 19 | Frontend |
| TypeScript | Type Safety |
| Tailwind CSS | Styling |
| Framer Motion | Animations |
| Gemini AI | AI Analysis |
| jsPDF | PDF Export |
| Vite | Build Tool |
npm installCreate .env
VITE_GEMINI_API_KEY=your_api_keyGet your API key from: https://aistudio.google.com/app/apikey
npm run devnpm run buildsrc/
├── components/
├── services/
├── utils/
├── App.tsx
├── main.tsx
└── index.cssUser Upload
↓
OCR Extraction
↓
Privacy Masking
↓
Gemini AI Analysis
↓
Safe Response- Sensitive data masked before AI processing
- No raw patient data shared
- Browser-based secure workflow
- Reports stored locally on the device
✅ Image Upload ✅ Camera Capture ✅ Manual Text Input ✅ OCR Scanning ✅ Manual Redaction
Built with React, Tailwind CSS, Framer Motion, jsPDF, and Gemini AI.