CareCompileMediFlow v5
v5.0 — AI-Native Clinical Simulation

MediFlow v5

Synthetic patients. Real HL7. Three fine-tuned AI models delivering clinical notes, lab interpretations, and pathology reports — across four live target systems. Zero real PHI. Full clinical fidelity.

13,311
Simulation Runs
359,409
HL7 Messages Sent
1,838
Synthetic Patients
55,677
AI Analyses Run
0
Real PHI Used
886 Training Examples
44 Note & Lab Types
27 HL7 Messages / Run
<30s Per Simulation
How It Works

From synthetic patient to four live systems

Every simulation run follows the same path — patient generation, AI content, HL7 assembly, and simultaneous 4-system delivery. 27 messages. Every time.

01
Patient Generation
Demographics, ICD-10 diagnosis, acuity, vitals, and 15 lab panels generated from realistic clinical distributions — age-appropriate, condition-coherent, statistically plausible. Every patient is unique. None are real.
ICD-10 LOINC Acuity Engine 30+ Scenarios
02
AI Content
Three locally-running fine-tuned 8B models engage in sequence: mediflow-llama authors the clinical note, mediflow-lab writes the lab interpretation narrative, mediflow-pathology generates pathology reports when indicated. Template fallback ensures uninterrupted simulation.
mediflow-llama mediflow-lab mediflow-pathology Llama 3.1 8B
03
HL7 Assembly
27 messages constructed with production-grade segment structure: ADT^A01 admission with full PID/PV1/DG1 segments, 15 ORU^R01 lab panels with LOINC-coded OBX, 11 MDM^T02 clinical reports with AI-authored content, and DFT^P03 billing charges.
ADT^A01 ORU^R01 ×15 MDM^T02 ×11 DFT^P03
04
4-System Delivery
All 27 messages delivered simultaneously to CareCompile via HTTP bridge, VistA FHIR via R4 REST, WorldVistA Docker over direct HL7 TCP, and OpenEMR via Viewer API. ACK status tracked per message per target. Failed messages queued for retry.
CareCompile ACK=AA FHIR R4 HL7 TCP OpenEMR API
Fine-Tuned AI Models

Three domain-specific models. All running locally.

Purpose-built for hospital workflows. Trained on real clinical patterns. Running locally — no cloud dependency, no latency, no PHI exposure.

Clinical Documentation
Clinical Notes
Authors clinical notes for 24 documentation types — selecting the right format automatically based on acuity and encounter type. ED Note for emergencies. Critical Care for ICU. H&P for inpatient. SBAR for handoffs. The format is never wrong.
H&P ED Note Critical Care Discharge Summary Operative Report Rapid Response Code Blue SBAR Handoff + 16 more
Base ModelLlama 3.1 8B
Fine-TuningLoRA r=16
Training293 cases
Note Types24
InferenceLocal · no cloud
FallbackTemplate-based
Laboratory Intelligence
Lab Interpretation
Interprets raw lab values into clinician-style narrative summaries — not just flagged numbers. “Troponin I critically elevated at 4.2 ng/mL, consistent with acute MI in the context of chest pain and ST changes.” Covers 11 panel types including microbiology, hematology, and antimicrobial stewardship.
CBC CMP Cardiac Markers Microbiology Hematology Stewardship Critical Values + 4 more
Base ModelLlama 3.1 8B
Fine-TuningLoRA r=16
Training409 cases
Lab Types11
InferenceLocal · no cloud
FallbackRaw passthrough
Anatomic Pathology
Pathology Reports
Generates structured pathology reports in Spanish across nine subspecialties — macroscopic description, microscopic findings, IHC interpretation, diagnosis, and recommendations. Purpose-built for anatomic pathology workflows and integrated with laboratory.carecompile.com.
Quirúrgica Oncológica Nefropatología Citología Ginecológica Hematopatología Dermatopatología Molecular BAAF
Base ModelLlama 3.1 8B
Fine-TuningLoRA r=16
Training184 cases
Subspecialties9
LanguageSpanish output
Portallaboratory.carecompile.com
Platform Features

Everything you need for clinical integration testing

Beyond patient generation — a full simulation ecosystem with real-time monitoring, clinical events, and automated workflows.

Live Bed Board
10 hospital units monitored in real time. Admissions auto-assign beds, transfers move them, discharges release them. Full floor state at a glance.
ER ICU CCU Telemetry NICU Nursery Med/Surg Step-Down PACU Ortho
Streaming Telemetry
Continuous ORU^R01 vital sign streams for ICU, CCU, and Telemetry patients. StreamingHub manages active streams — configurable interval, live send count, start/stop per patient.
ORU^R01 ICU CCU Telemetry StreamingHub
Clinical Events
One-click critical event bursts that simulate real emergency conditions. Code Blue triggers arrest vitals, resuscitation team notifications, and an emergency orders burst. Sepsis Cascade fires progressive deterioration across multiple HL7 messages.
Code Blue Sepsis Cascade Panic Lab Rapid Response Discharge Cascade
AI Agent
Natural-language control over the entire simulation engine powered by gemma4:31b. 19 tool-calling functions — admit patients, trigger clinical events, query the live census, and run deterioration sequences. No configuration required; the agent picks the right tool automatically.
19 Tools Natural Language Census Query Event Control
Nursing Module
Eight documentation types sent as MDM^T02, shift-aware across day, evening, and night rotations. Every admission, medication administration, wound check, and education session documented in the correct clinical format.
Admission Assessment Medication Admin Vital Signs Wound Care IV/Line Care Fall Risk Pain Assessment Patient Education
CI/CD Mode
Continuous unattended simulation — admits, runs labs, fires events, and discharges automatically. Built for pipelines that need a live HL7 target 24/7. MySQL audit trail. 7-day trends.
Unattended MySQL Audit 7-Day Trends Pipeline Ready

"Before CareCompile ever touches a real patient, it runs through thousands of synthetic encounters — every scenario, every edge case, every integration point. That's how we know it works."

The MediFlow guarantee — Zero PHI. Full clinical fidelity. Every time.
Delivery Targets

Four live clinical systems, every run

Every synthetic encounter is delivered simultaneously to all four target systems — each with its own protocol, acknowledgement path, and delivery confirmation.

CareCompile
Primary integration target — HL7 HTTP Bridge
ADT^A01 ORU^R01 MDM^T02 DFT^P03 CC Inbox Severity Filtering
VistA FHIR
WorldVistA FHIR R4 bridge at port 5003
FHIR R4 Patient Resource Observation DiagnosticReport MedicationRequest
WorldVistA Docker
Full VistA EHR instance at port 8081 — direct HL7
HL7 v2.5.1 Direct TCP ~1400 patients All synced
OpenEMR
Open-source EHR at port 8082
Viewer API Port 3001 Port 8082 (app) MySQL sync
Use Cases

Built for teams that can't afford to test with real patients

CareCompile QA
Every CareCompile release is stress-tested through thousands of synthetic patients before touching real hospital data.
EMR Integration
Hospitals validating HL7 outbound feeds before going live. Confirm message structure, ACK behavior, and segment compliance.
Healthcare IT Developers
Build FHIR R4 endpoints, clinical decision support, or HL7 parsers against realistic synthetic traffic on demand.
Clinical AI Research
Realistic synthetic clinical corpora for model training and evaluation — without IRB overhead or HIPAA exposure.
Physician AI
The live clinical data pipeline Physician AI runs on. Lab orders, NORA alerts, and deterioration trajectories flow from MediFlow in real time.
No PHI. Ever.
MediFlow generates data that is indistinguishable from real at the HL7 level — without any real patient data.
Real LOINC codes
Real ICD-10 diagnoses
Real OBX segment structure
Real MSH headers
AI-authored clinical narratives
The format is production-grade.
The patients are not.
Technical Specifications

What's inside every run

HL7 Message Types (27 total)
ADT^A01 — Admission
ADT^A03 — Discharge
ORU^R01 — Lab Results (×15)
MDM^T02 — Clinical Notes (×11)
ORU^R01 — Telemetry / Vital Signs
DFT^P03 — Billing / Charges
Lab Panels (15 ORU messages)
CBC · CMP · BMP · Coagulation
Urinalysis · Lipids · Cardiac Markers
Thyroid · ABG · Inflammatory
Endocrine · Tumor Markers
Drug Levels · Pathology · Molecular
Clinical Reports (11 MDM messages)
Radiology · Discharge Summary
Operative Report · Pathology
Consultation · Echocardiogram
Stress Test · Vascular Ultrasound
Billing · EKG-Critical · Cardiac Diagnostics
AI Models (Local Inference)
Clinical Documentation Model — 24 note types (8B)
Laboratory Intelligence Model — 11 lab types (8B)
Anatomic Pathology Model — 9 subspecialties (8B)
Conversational AI Agent (19 tools)
Fine-tuned via LoRA adaptation
Template fallback when offline
Nursing Module (8 types)
Admission Assessment · Medication Admin
Vital Signs · Wound Care · IV/Line Care
Fall Risk · Pain Assessment
Patient Education
Shift-aware (day/evening/night)
All sent as MDM^T02
Infrastructure
FastAPI backend — port 8100
Auto-restart service management
MySQL message persistence
WebSocket real-time updates
7-day trend analytics chart
Demo Scenarios (30+)
Critical: STEMI, Septic Shock, CVA Stroke
Critical: Respiratory Failure, Anaphylaxis
High: GI Bleed, PE, DKA, AKI
Standard: Pneumonia, CHF, UTI, COPD
Census: Near Discharge, Mixed Floor
Events: Code Blue, Sepsis, Panic Lab
Delivery Targets (4 systems)
CareCompile — HL7 HTTP bridge
VistA FHIR — R4 REST (port 5003)
WorldVistA Docker — port 8081
OpenEMR — Viewer API (port 3001)
ACK tracking per message per target
Failed message retry queue
HL7 v2.5.1 Compliant FHIR R4 Ready Zero Real PHI <30s Per Run Production-Grade Format 10 Hospital Units
Live Demo

Generate a patient right now

Pick a scenario, click Run — watch MediFlow build a complete encounter with AI notes, 27 HL7 messages, and 4-system delivery in under 30 seconds.

mediflow-v5 — simulation engine
--:--:--Select a scenario above and click Generate Patient to run a simulation.
--:--:--MediFlow v5 will build a complete patient encounter with AI-authored notes and send it to all 4 target systems.
Powered by CareCompile

Our confidence comes from running thousands of synthetic patients.

Before CareCompile ever touches a real patient, it runs through thousands of synthetic encounters — every scenario, every edge case, every integration point, with AI-authored notes and 4 live target systems. That's how we know it works. Zero PHI. Full clinical fidelity. Every time.

Questions? hello@carecompile.com