MedAI Platform โ 7 integrated microservices, 8 trained ML models, 260M+ clinical records. From OPD to Emergency to ICU to Discharge โ one unified AI system built by Lattice Consulting for MSR Ramaiah Group.
A full walk-through of the MedAI decision support system, the 7-microservice LLM architecture, and the clinical insights dashboard tailored for India's hospital workflows.
Operating a full-scale hospital โ from OPD to emergency to surgery to ICU to discharge โ generates millions of data points daily. Yet critical decisions are still made on intuition, not intelligence.
Average wait time 42 minutes. ESI mis-triage rate ~18% nationally. Every misclassification risks lives โ or wastes critical resources on non-urgent cases.
6-hour delay in detection โ 7.6% increase in mortality per hour. The difference between life and death is measured in hours, not days.
15โ25% of hospital beds occupied by patients in wrong acuity level. Resources wasted while critical patients wait.
26% 30-day readmission rate in oncology โ entirely preventable with AI-powered risk stratification. Each readmission costs the hospital โน2โ5 lakhs and the patient immeasurable suffering.
A monorepo architecture with seven specialized AI services, a real-time simulation engine, and a unified React dashboard โ powered by 260M+ clinical records from MIMIC-IV.
5-class ESI prediction from 59 features. XGBoost + Neural Network dual-model.
Continuous sepsis monitoring with Bi-LSTM temporal attention. 6-hour sliding windows.
Multi-Agent RL (MADDPG) for staffing optimization. 8 departments as autonomous agents.
TabTransformer + XGBoost for readmission/mortality prediction. Treatment pathway engine for 8 cancer types.
Unified clinical timeline explorer. Vitals, labs, meds, transfers โ cohort comparison across 5 patients.
Local LLM via Ollama. Natural language clinical queries with smart routing to ED/Oncology/Journey APIs.
Real-time replay of MIMIC patient journeys. WebSocket event streaming. ~30 patients/sim-day.
Every model trained on real de-identified clinical data from MIMIC-IV (260M+ documents). Not synthetic benchmarks โ real patient journeys.
ED Triage ยท 5-Class Classification ยท 300 Estimators
59-feature vector with missingness flags. GPU-accelerated training on RTX 4060. Stratified 70/15/15 split across 299K ED admissions.
ICU Sepsis ยท Binary Classification ยท 1000 Estimators
114 features from 6-hour sliding windows. 19 vitals ร 6 statistical aggregations. Cost-sensitive learning for class imbalance.
ICU Sepsis ยท Bidirectional LSTM + Temporal Attention
Input shape: (batch, 6 timesteps, 19 features). Temporal attention identifies which hours are most predictive. Clinically interpretable.
Oncology ยท Multi-Task Binary ยท 16 Features
Dual XGBoost models for 30-day readmission and in-hospital mortality. 67K admissions, 29K unique patients, 30+ cancer categories.
TabTransformer ยท d_model=64 ยท 4 Attention Heads
Treats tabular features as a sequence with positional encoding. Learns feature interactions without manual feature crosses.
Hospital Ops ยท Multi-Agent RL ยท Continuous Control
Curriculum learning: Stage 1 (ED only) โ Stage 2 (ED+ICU+Medicine) โ Stage 3 (all 8 departments). Ornstein-Uhlenbeck exploration.
One fully integrated web stack application delivering cutting-edge AI at every clinical touchpoint. No gaps, no blind spots, no manual workarounds.
Patient arrives. ABHA ID linked. Demographics captured. History retrieved from MongoDB.
AI predicts ESI level in <2 seconds. 94% confidence. Auto-disposition recommendation.
Continuous sepsis surveillance. SOFA scoring. 4-6 hour early warning before clinical deterioration.
Oncology pathway generation. Risk stratification. NCCN-aligned treatment protocols for 8 cancer types.
AI-optimized staffing via MADDPG. Readmission risk assessed. Follow-up automatically scheduled.
Measured improvements over traditional hospital systems โ backed by MIMIC-IV validation data.
| Metric | Traditional System | MedAI Platform | Improvement |
|---|---|---|---|
| Sepsis Detection Lead Time | At clinical recognition | 4-6 hours BEFORE recognition | AUROC 0.994 |
| ED Triage Consistency | Inter-rater ฮบ = 0.62 | F1 = 0.653 (eliminates variability) | Zero human bias |
| Oncology Risk Assessment | Manual chart review (30 min) | Instant prediction (<5ms) | 360ร faster |
| Staffing Optimization | Manual scheduling | MARL-optimized | 15% wait โ |
| Patient Data Exploration | Separate EHR screens | Unified timeline + cohort | Single interface |
From concept to 7-microservice production system โ a rigorous journey of research, development, and validation by Lattice Consulting Worldwide.
Deep research into hospital operations challenges. MIMIC-IV data acquisition and MongoDB ingestion pipeline. 260M+ documents across 30+ collections.
ED Triage XGBoost + Neural Network training (299K admissions). Sepsis LSTM with temporal attention. GPU-accelerated training on RTX 4060.
Oncology TabTransformer + Risk XGB. MADDPG multi-agent RL for hospital ops. HospitalEventEngine for real-time simulation.
React 19 dashboard unification. 7 FastAPI services. Clinical Chat with local Ollama LLM. WebSocket real-time streaming.
Performance benchmarking. AUROC 0.994 sepsis detection. Clinical validation protocol design for MS Ramaiah. CDSCO SaMD documentation.
Clinical pilot at M.S. Ramaiah ED (500+ patients). ABDM Health ID integration. Production Docker deployment. Pan-India & global expansion planning.
After clinical trial approval at MSR Ramaiah, MedAI becomes the benchmark application for the hospital industry โ first across India, then ASEAN, Middle East & Africa.

Clinical validation pilot at M.S. Ramaiah hospitals. 500+ patient study. CDSCO SaMD Class B submission. ABDM integration.
Multi-hospital deployment via federated learning. FHIR R4 EHR interoperability. Edge deployment on NVIDIA Jetson for rural clinics. ISO 13485 + 27001 certification.
Full Make in India (80-85% local content). CE recertification for export markets. Expansion to ASEAN, Middle East & Africa โ addressing the $2.7B global telehealth kiosk market. PLI scheme incentives (5% on incremental sales).
Four validated clinical scenarios demonstrating measurable impact at every stage of the hospital journey.
55-year-old male, ambulance arrival, diaphoresis
Impact: Consistent triage in <30 seconds vs. 3-5 minutes manually. Eliminates inter-rater variability.
68-year-old, post-cholecystectomy, SICU Day 2
Impact: 4-6 hour early detection. Each hour of early treatment reduces mortality by ~7.6%.
62-year-old, Stage III NSCLC, Charlson 4
Impact: Instant risk stratification + complete treatment pathway vs. 30-minute manual chart review.
7-day simulation, 8 departments, MIMIC arrival patterns
Impact: 42 shift cells ร 8 departments automatically optimized. No manual scheduling needed.
Positioned as a CDSS (Clinical Decision Support System) โ not autonomous diagnosis. Designed for CDSCO SaMD Class B/C compliance.
Class B (medium risk). Non-autonomous โ clinician makes final decision. All outputs include: "AI-assisted assessment โ final clinical decision rests with the treating physician."
Prospective observational study at MS Ramaiah ED. 500+ patients. AI accuracy vs. nurse accuracy (attending as gold standard). IRB approved.
ABHA Health Account linkage. Consent-based data sharing via Health Information Exchange. FHIR R4 DiagnosticReport resources.

Every byte of patient data stays within the hospital network. The LLM runs locally via Ollama โ no API calls to external providers. Ever.
Clinical Chat runs entirely on hospital hardware via Ollama. Supports Llama 3.1 (128K context) and Mistral (32K). No patient data ever leaves the network perimeter.
All training data is pre-de-identified by PhysioNet. Dates shifted, PHI removed. No re-identification possible.
5-tier RBAC: Admin, Physician, Nurse, Resident, IT Support. Each role sees only what they need.
Every API request, prediction, and simulation event is logged with timestamp, endpoint, user_id, request hash, and response status. TLS 1.3 encryption in transit. MongoDB WiredTiger encryption at rest.
| Feature | MedAI | Epic Sepsis | Google Health AI | Viz.ai |
|---|---|---|---|---|
| Multi-Domain Coverage | โ 7 modules | Sepsis only | Imaging focused | Stroke only |
| Local LLM | โ Ollama | โ | Cloud-dependent | โ |
| Simulation Engine | โ Real-time | โ | โ | โ |
| India CDSCO/ABDM | โ Ready | US only | Limited | US only |
| Cost Model | โ Infra only | License fee | Per-API | Per-case |
Partner with M.S. Ramaiah Group & Lattice Consulting to bring MedAI's 7-microservice AI platform to your healthcare institution.