Electronic Health Record Service
Core EHR system managing comprehensive patient medical records, clinical documentation, and longitudinal health history
Overview
The EHR Service is the system of record for all patient clinical data. It maintains longitudinal health records, supports clinical decision-making, and ensures healthcare data is accessible when and where it’s needed.
This is the authoritative source for all patient clinical data. All downstream systems sync from the EHR via FHIR APIs or HL7 messages.
Messages
Messages for this service
Sends messages (4)
Quickly find the message you need by searching for the name, type, or summary.Receives messages (5)
Quickly find the message you need by searching for the name, type, or summary.Use FHIR APIs for real-time queries. Subscribe to events for real-time updates. See the flows below for detailed workflows.
Key Responsibilities
Patient Record Management
- Demographics and identifiers (MRN, SSN)
- Insurance and coverage information
- Emergency contacts
- Advance directives
- Patient preferences and consent
Clinical Documentation
- SOAP notes (Subjective, Objective, Assessment, Plan)
- Progress notes
- Consultation notes
- Discharge summaries
- Structured data entry templates
Problem & Diagnosis Lists
- Active problems
- Past medical history
- Surgical history
- Family history
- Social history
Medication Management
- Current medication list
- Historical medications
- Medication reconciliation
- Administration records (MAR)
Allergies & Adverse Reactions
- Drug allergies
- Food allergies
- Environmental allergies
- Severity classification
- Reaction descriptions
FHIR API Endpoints
Patient Resources
GET /fhir/Patient/{id}GET /fhir/Patient?identifier={mrn}POST /fhir/PatientPUT /fhir/Patient/{id}Core patient demographics and identifiers.
Clinical Resources
GET /fhir/Condition?patient={id}GET /fhir/AllergyIntolerance?patient={id}GET /fhir/MedicationStatement?patient={id}GET /fhir/Encounter?patient={id}Patient clinical data including conditions, allergies, medications, and visits.
Bulk Data Export
GET /$export - System level exportGET /Patient/$export - All patient dataFHIR Bulk Data API for large-scale data export. Used for analytics and reporting.
All APIs follow HL7 FHIR R4 specification. See hl7.org/fhir for details.
Technical Details
Technology Stack:
- Runtime: Java 17
- Framework: Spring Boot
- Database: PostgreSQL (clinical data), MongoDB (unstructured documents)
- FHIR Server: HAPI FHIR
- Message Broker: Apache Kafka
- Cache: Redis (session data)
- Search: Elasticsearch (clinical data search)
Performance:
- Availability: 99.99% (critical healthcare system)
- API Response Time: < 500ms (p95)
- FHIR Query Performance: < 2s for complex queries
- Concurrent Users: 10,000+
Data Volume:
- 5 million+ patient records
- 50 million+ encounters
- 200 million+ observations
- 100GB+ daily data growth
Clinical Decision Support
- Health maintenance gaps (cancer screening, immunizations)
- Drug interaction warnings
- Allergy alerts
- Duplicate order prevention
- Clinical guideline reminders
CDS rules fire in real-time during order entry and documentation.
- Chronic disease risk scores
- Readmission risk prediction
- Fall risk assessment
- Sepsis early warning scores
Predictive models run nightly to identify high-risk patients.
Risk stratification models are continuously improved using historical outcomes data while maintaining patient privacy.
Audit & Compliance
Complete Audit Trail
- All PHI access logged
- User, timestamp, action, data accessed
- Search and export capabilities
- Retention: 7 years minimum
Access Controls
- Role-based access (RBAC)
- Relationship-based (treating provider)
- Break-the-glass for emergencies
- Minimum necessary principle
Integration Points
- Lab Systems: HL7 v2 ORU messages
- Imaging: DICOM, HL7 v2
- Pharmacy: E-prescriptions, medication lists
- HIE: Care everywhere, patient matching
- State Registries: Immunizations, reportable diseases
Disaster Recovery
- RPO: 15 minutes (data loss tolerance)
- RTO: 4 hours (recovery time)
- Daily backups with 30-day retention
- Geo-redundant replication
- Annual DR drills