- HealthLens
HealthLens is an AI-powered medical report analysis platform for healthcare professionals and patients. It enables instant upload, analysis, and summarization of medical reports and images using advanced AI models.
- Upload and analyze PDF medical reports and images (PNG, JPG, JPEG)
- AI-powered doctor-level and patient-level summaries
- OCR for medical images
- RESTful API for integration
- User authentication (TODO: expand details)
- Patient management dashboard (TODO: expand details)
- Secure file storage
- Scalable backend with PostgreSQL
- Modern React frontend with shadcn-ui and Tailwind CSS
- Frontend: Vite, React, TypeScript, shadcn-ui, Tailwind CSS
- Backend: Node.js, Express, Sequelize, Multer, PostgreSQL
- AI Service: Python (FastAPI, pdfplumber, Pillow, pytesseract, google-generativeai)
- AI Service: Python (FastAPI, pdfplumber, Pillow, pytesseract, Genkit)
- Other: Docker (TODO: confirm usage), GitHub Actions (TODO: confirm usage)
Genkit is a flexible framework for integrating Large Language Models (LLMs) into your Python applications. You can use Genkit to connect to various LLM providers and switch between them easily.
pip install genkitfrom genkit import LLM
# Initialize an LLM (example: OpenAI)
llm = LLM(provider="openai", api_key="YOUR_OPENAI_API_KEY")
# Generate a response
response = llm.generate("Summarize this medical report:", input_text)
print(response)- Add your LLM provider API keys and settings to
python/.env(e.g.,OPENAI_API_KEY,ANTHROPIC_API_KEY, etc.) - Update your Python service to use Genkit for all LLM tasks.
For more details, see the Genkit documentation.
- Node.js & npm
- Python 3.10+
- PostgreSQL
cd frontend
npm install
npm run devcd backend
npm install
npm startcd python
pip install -r requirements.txt
python server.py- Ensure PostgreSQL is running and credentials are set in
.envfiles (see Configuration).
import requests
files = {'file': open('lab.pdf', 'rb')}
response = requests.post('http://localhost:8000/analyze-report', files=files)
print(response.json())- Visit
http://localhost:8080and use the dashboard to upload and analyze reports.
- Backend: Set environment variables in
backend/.env(DB, DB_USER, DB_PASSWORD, HOST, etc.) - Python: Set
OPENAI_API_KEYinpython/.env - Python: Configure Genkit in
python/.envfor LLM usage - Frontend: Edit config files as needed (see
vite.config.ts,tailwind.config.ts) - TODO: Document all config options and secrets
HealthLens/
├── backend/ # Node.js API, uploads, database
├── frontend/ # React app, UI components
├── python/ # FastAPI AI service, report analysis
├── LICENSE # MIT License
- backend/: Express server, file uploads, database models
- frontend/: Vite+React app, shadcn-ui, Tailwind CSS
- python/: FastAPI service, AI pipeline, OCR, PDF/image processing
POST /analyze-report: Upload and analyze medical report/imageGET /health: Health checkPOST /process: Process message from frontendGET /hello: Test endpoint- TODO: Document Node.js backend endpoints
- Request:
multipart/form-datawith file - Response: JSON with
doctor_summary,patient_summary,metadata
- Frontend:
npm run lint(ESLint)- Manual UI testing (TODO: add automated tests)
- Backend:
npm test(placeholder)- Manual API testing (TODO: add automated tests)
- Python:
- Run
test_api.shfor API tests - Run
test_pdf.py,test_images.pyfor unit tests
- Run
- Frontend: Deploy via Lovable or Vercel (TODO: add steps)
- Backend: Deploy Node.js server (TODO: add steps)
- Python: Deploy FastAPI service (TODO: add steps)
- Database: Provision PostgreSQL (TODO: add steps)
- TODO: Add Docker/CI/CD instructions if available
- Fork the repo, create feature branches, follow commit conventions, submit PRs.
- MIT License
.envfiles are gitignored- Uses bcrypt for password hashing
- TODO: Add more security details and practices
- FastAPI and Express are optimized for high throughput
- Uses async processing for uploads and AI analysis
- TODO: Add benchmarks and performance metrics
-
Modular architecture: separate frontend, backend, AI service
-
PostgreSQL for scalable data storage
-
Multer for efficient file uploads
-
TODO: Add horizontal scaling, cloud deployment notes
Created by abhishekmallav, Prathmesh9523, Yashwant1566
This project is licensed under the MIT License.