HealthVault Pro is a comprehensive, privacy-conscious Electronic Health Record (EHR) system and AI-driven medical report intelligence platform. Powered by Google Gemini AI (Gemini 2.5 Flash), HealthVault Pro enables patients and healthcare providers to seamlessly upload, parse, analyze, compare, and track medical history, lab reports, and prescriptions over time.
- Overview
- Key Features
- System Architecture
- Technology Stack
- Prerequisites
- Installation & Setup
- Environment Configuration
- Running the Application
- API Reference
- Data Storage & Maintenance
- Security & Privacy
- License
Managing medical history across multiple clinics, doctors, and lab reports is often fragmented and complex. HealthVault Pro solves this by acting as a centralized, intelligent health repository. Beyond standard record storage, it uses Google Gemini AI multimodal vision and language models to interpret medical diagnostic reports (CBC, Liver Function, Lipid Panels, Radiology), parse handwritten or digital prescriptions, evaluate drug-drug interactions, analyze longitudinal treatment trends across multi-doctor visits, and provide structured dietary and doctor consultation guidance.
- Multimodal PDF and image parsing for lab test reports (e.g., Blood Work, Lipid Panels, Metabolic Tests).
- Automatic extraction of metrics, patient values, normal reference ranges, and clinical status (Low, Normal, High, Critical).
- Generates plain-language health summaries, urgent risk warnings, specialist doctor consultation recommendations, and personalized dietary/food advice.
- Disease-centric health node organization that links medical visits, diagnoses, prescribed medications, and lab reports under specific condition timelines.
- Visual breakdown of condition progression across multiple doctor visits.
- Cross-evaluates chronological medical visits and lab tests to determine whether treatment strategies are effective.
- Evaluates treatment evolution across different attending physicians to highlight optimal therapeutic outcomes.
- Analyzes co-prescribed medications for pharmacological drug-drug interactions.
- Categorizes risk severity (Mild, Moderate, Severe, Contraindicated) and provides safety recommendations.
- Extracts medicine names, dosages, durations, timings (Morning, Afternoon, Evening, Night), and special administration instructions directly from prescription images or PDFs.
- Patient-submitted rating and review registry for doctors, specialties, and hospitals.
- Primary lightweight JSON document store (
store.json) for seamless portability. - Secondary Microsoft Access database integration (
patients_registry.accdb) with graceful fallback to JSON-only mode if driver is unavailable.
+-----------------------------------+
| React + Vite Frontend Client |
| (Landing, Portal, Mind-Map, AI) |
+-----------------+-----------------+
| REST API (HTTP)
v
+-----------------+-----------------+
| Express.js Backend Server |
| (Port 5000) |
+--------+----------------+---------+
| |
+------------------+ +------------------+
| |
v v
+----------+----------+ +----------+----------+
| Google Gemini AI SDK| | Local Storage Engine|
| (Gemini 2.5 Flash) | | - store.json |
+---------------------+ | - MS Access DB |
| - Uploaded PDFs |
+---------------------+
- Frontend: React 18, Vite, React Router DOM, Lucide Icons, Vanilla CSS Design Tokens
- Backend: Node.js, Express.js, Multer (File Upload Handling), CORS, dotenv
- Artificial Intelligence:
@google/genai(Google Gemini 2.5 Flash Multimodal API) - Database Engine: Custom JSON Document Store, optional
node-adodb(Microsoft Access Database Engine integration)
- Node.js: v18.0.0 or higher
- npm: v9.0.0 or higher
- Google Gemini API Key: Required for AI report analysis, prescription vision OCR, and interaction checks. Obtain one from Google AI Studio.
-
Clone the Repository:
git clone https://github.com/ahmadkhanalm/HealthVault-Pro.git cd HealthVault-Pro -
Install Backend Dependencies:
cd backend npm install cd ..
-
Install Frontend Dependencies:
cd frontend npm install cd ..
Create a .env file inside the backend folder based on the provided .env.example:
# Copy template to backend/.env
cp backend/.env.example backend/.envEdit backend/.env and add your Google Gemini API Key:
GEMINI_API_KEY=AIzaSyYourActualApiKeyHereDouble-click start_v2.bat in the root directory, or run it via terminal:
start_v2.batThis launches both the Express backend server (on http://localhost:5000) and Vite frontend development server (on http://localhost:5173) in separate command windows.
Terminal 1 (Backend Server):
cd backend
npm startTerminal 2 (Frontend Client):
cd frontend
npm run devOpen your browser and navigate to http://localhost:5173.
POST /api/signup- Register new patient profile.POST /api/login- Authenticate patient/doctor credentials.
GET /api/patients/:cnic- Fetch full patient health record and history.POST /api/patients/:cnic/reports- Upload lab test report (PDF/Image).DELETE /api/patients/:cnic/reports/:reportId- Remove test report.POST /api/patients/:cnic/history- Synchronize clinical visit narrative and prescription.DELETE /api/patients/:cnic/history/:historyId- Delete clinical record.
POST /api/patients/:cnic/analyze-report- Perform comprehensive AI analysis on lab report.POST /api/patients/:cnic/compare-reports- Compare two lab test reports over time.POST /api/patients/:cnic/compare-visits- Cross-analyze multiple doctor visits and treatments.POST /api/patients/:cnic/health-summary- Generate overall patient health trajectory brief.POST /api/patients/:cnic/check-interactions- Check prescribed medicines for drug interactions.POST /api/patients/:cnic/diagnosis-suggestion- AI diagnostic suggestion from lab report values.POST /api/patients/:cnic/treatment-trend- Track therapeutic trend for a specific disease node.POST /api/patients/:cnic/parse-prescription- Vision OCR parsing of handwritten or digital prescription images.
POST /api/reviews- Submit doctor rating and feedback.GET /api/reviews- Fetch list of all public doctor reviews.
To reset all local test data, user accounts, and uploaded PDFs back to a clean initial state, execute the included reset script:
reset_v2.batThis clears backend/data/store.json, wipes files in backend/uploads/, and resets the Access database registry if present.
- All sensitive environment configurations (
.env), private patient databases (store.json), and physical uploaded medical files (uploads/) are excluded from repository version control via.gitignore. - Password fields are sanitized before sending user objects to the client.
This project is open-source software licensed under the MIT License.