Inpatient EHR Overview - hmislk/hmis GitHub Wiki
Inpatient EHR — Overview
The Inpatient Electronic Health Record (EHR) is the clinical documentation layer of the BHT. It stores all clinical information recorded during the admission — allergies, assessments, ward medications, discharge medications, clinical discharge, and supporting clinical data such as investigations, images, and the diagnosis card.
All EHR data is linked to a single BHT (PatientEncounter). Access is from the Admission Profile Dashboard → Clinical Data panel.
Controller: InpatientClinicalDataController (@SessionScoped)
EHR Sections
| Section | What it stores | Article |
|---|---|---|
| Allergies | Drug/substance allergies recorded for the patient | Inpatient EHR — Allergies |
| Clinical Assessment & Notes | Doctor notes, ward rounds, clinical observations | Inpatient EHR — Clinical Assessment and Notes |
| Ward Medications | Inpatient prescriptions during the stay, the Medicine Timeline, and Request Selected from Pharmacy | Inpatient EHR — Ward Medications |
| Discharge Medications | Take-home prescriptions at discharge, with Create Discharge Issue Bill | Inpatient EHR — Discharge Medications |
| Clinical Discharge | Doctor's decision to clinically discharge the patient | Inpatient EHR — Clinical Discharge |
| Investigations | Lab results and investigation items linked to the BHT | Inpatient EHR — Clinical Data |
| Images | Clinical photographs and radiology images | Inpatient EHR — Clinical Data |
| Diagnosis Card | Structured diagnosis summary, printable | Inpatient EHR — Clinical Data |
Data Model
EHR data is stored as ClinicalFindingValue records. Each record carries:
clinicalFindingValueType— the type of finding (e.g.,PatientAllergy,WardMedicine,DischargeMedicine,EncounterDiagnosis)patientEncounter— the BHT this record belongs topatient— the patientitemValue— the drug or item (linked to theItementity, which participates in the VTM/VMP/AMP hierarchy for medications)prescription— for medication records: dose, frequency, duration, route, indoor/outdoor flagstringValue— free-text notes associated with the findinglobValue— long text (for clinical notes, diagnosis narrative)createdAt/createdBy— audit fields
Allergy Checking at Prescribing
When a prescriber adds a ward medication or discharge medication, the system checks the new drug against the patient's recorded allergies at the VTM (Virtual Therapeutic Moiety) level:
- If the drug's VTM matches any recorded allergen VTM → a yellow ALLERGY ALERT growl message is shown
- The prescriber can still proceed, but the alert is visible and logged
This is implemented in InpatientClinicalDataController.getAllergyWarning() and fires from addAdmissionWardMedicine(), addEncounterMedicine(), and addPatientMedicine().
See GitHub Issue #20831 for implementation details and Issue #20832 for the planned ATC/VMP/AMP hierarchy upgrade.
Features Not Yet Implemented
The following capabilities are on the roadmap but not yet available in the current codebase:
- Drug-drug interaction (DDI) checking engine
- Allergy auto-check at ATC / VMP / AMP hierarchy level (Issue #20832)
- Structured nursing care-plan template library
- Discharge TAT monitoring dashboard
Related Articles
- Inpatient Admission Profile (Dashboard) — EHR is accessed from Column 3
- Inpatient — Nursing Workbench — nursing-side EHR access
- Electronic Health Record (EHR) — EHR overview across all modules