A modern, AI-powered web application that allows users to upload lab reports (PDF or images) and instantly see their health parameters extracted into a clean, interactive table with insights and trends.
✅ File Upload: Smooth drag-and-drop interface for PDF and image files ✅ OCR Processing: Uses Tesseract.js for text extraction from images and PDFs ✅ Data Extraction: Automatically extracts health parameters, values, units, and ranges ✅ Interactive Display: Clean, responsive table showing extracted health data ✅ Health Trends: Simulated historical data with interactive charts ✅ AI Insights: Flags abnormal values and provides actionable recommendations ✅ Modern UI: Beautiful dark theme with Tailwind CSS ✅ Responsive Design: Works perfectly on desktop and mobile devices
- Frontend: Next.js 15 with React 19
- Styling: Tailwind CSS 4
- OCR: Tesseract.js for text extraction
- Charts: Recharts for data visualization
- Icons: Lucide React
- Language: TypeScript
- Node.js 18+
- npm or yarn
- Clone the repository:
git clone <repository-url>
cd korai_health- Install dependencies:
npm install- Run the development server:
npm run dev- Open http://localhost:3000 in your browser.
-
Upload a Lab Report:
- Drag and drop a PDF or image file onto the upload area
- Or click to browse and select a file
- Supported formats: JPEG, PNG, PDF
-
Processing:
- The app will automatically extract text using OCR
- Health parameters will be identified and analyzed
- Processing typically takes 10-30 seconds depending on file size
-
View Results:
- Health Parameters Table: Shows extracted values with status indicators
- Health Trends: Interactive chart showing historical data
- AI Insights: Recommendations for abnormal values
For testing purposes, you can use the sample lab report text file located at public/sample-lab-report.txt. This file contains common health parameters that the app can recognize and analyze.
The application currently recognizes and analyzes these health parameters:
- Glucose (mg/dl)
- Cholesterol (mg/dl)
- Hemoglobin (g/dl)
- Creatinine (mg/dl)
- Sodium (mmol/l)
- Potassium (mmol/l)
- Calcium (mg/dl)
- Vitamin D (mcg/dl)
- 🟢 Normal: Values within healthy range
- 🟡 High/Low: Values outside normal range (attention needed)
- 🔴 Critical: Values significantly outside normal range (immediate attention)
korai_health/
├── app/
│ ├── layout.tsx # Root layout with metadata
│ ├── page.tsx # Main application component
│ └── globals.css # Global styles
├── public/
│ └── sample-lab-report.txt # Sample data for testing
├── package.json
└── README.md
- File Upload: Drag-and-drop interface with file validation
- OCR Processing: Tesseract.js integration for text extraction
- Data Parser: Extracts health parameters from OCR text
- Results Display: Interactive table and charts
- AI Insights: Status analysis and recommendations
To add support for new health parameters:
- Add the parameter name to the
healthKeywordsarray inextractHealthData() - Define normal ranges and status logic in the parsing function
- Update the historical data structure if needed
- Client-side processing (no data sent to external servers)
- File type validation
- Secure file handling
- No sensitive data storage
- User authentication and report history
- More sophisticated NLP for better parameter extraction
- Integration with health APIs
- Export functionality (PDF, CSV)
- Mobile app version
- Real-time health monitoring
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.
For questions or support, please open an issue in the repository.