DeveloperCare plans
Clinical Documentation System
Single Source of Truth for Care Plan, Longitudinal Health Record (LHR), Episodes, and Encounters
Clinical Data Hierarchy
Kulcare's clinical documentation system is built around a three-level hierarchy:
Patient
|
+-- Longitudinal Health Record (LHR) <-- AGGREGATE VIEW
| | (patient's complete health story)
| +-- Problems
| +-- Medications
| +-- Vitals/Measurements
| +-- Health Score
| +-- Encounter History
|
+-- Episodes of Care <-- PROGRAM CONTAINERS [PLANNED]
| | (treatment programs)
| +-- "Post-ACL Rehab" (physio)
| +-- "Anxiety Treatment" (therapy)
| +-- "Weight Management" (nutrition)
|
+-- Encounters <-- ATOMIC CLINICAL EVENTS
| (single visit/session)
+-- Prescriptions (doctors)
+-- Session Notes (therapists) [PLANNED]
+-- Physio Documentation [PLANNED]
+-- Nutrition Consultations [PLANNED]Key Concepts:
| Concept | Definition | Scope | Storage |
|---|---|---|---|
| LHR | Patient-centric aggregate view | Entire patient history | Computed |
| Episode of Care | Program-specific treatment container | One treatment program | Stored |
| Encounter | Single visit/session | One appointment | Stored |
See Architecture: Clinical Data Hierarchy for complete details.
Documentation Structure
docs/care-plan/
|
+-- README.md # This file - overview and navigation
|
+-- architecture/ # Core concepts and data models
| +-- clinical-data-hierarchy.md # LHR/Episode/Encounter relationships
| +-- multi-practitioner-encounter-types.md # EncounterDocument model
|
+-- current-state/ # What's implemented TODAY
| +-- README.md # Current implementation overview
| +-- lhr-feature.md # LHR implementation details
| +-- care-plan-feature.md # Care Plan/Prescription details
| +-- lhr-architecture.md # LHR technical architecture
|
+-- future-state/ # What's PLANNED for future
| +-- README.md # Roadmap overview
| +-- episode-of-care.md # Episode implementation plan
| +-- multi-practitioner-documents.md # EncounterDocument plan
|
+-- guides/ # Usage and troubleshooting
| +-- usage.md # How to use current features
| +-- troubleshooting.md # Common issues and solutions
| +-- mock-data.md # Mock data for development
|
+-- backend/ # Backend implementation details
| +-- backend-endpoints.md
| +-- system-design.md
| +-- implementation-progress.md
| +-- (other backend docs)
|
+-- testing/ # Testing documentation
| +-- manual-test-plan.md
| +-- manual-testing-guide.md
|
+-- e-prescription/ # E-Prescription feature
| +-- e-prescription-prd.md
| +-- e-prescription-technical-spec.md
| +-- (other e-prescription docs)
|
+-- lhr/ # LHR detailed architecture
| +-- database-design.md
| +-- api-design.md
| +-- service-architecture.md
| +-- (other LHR architecture docs)
|
+-- reference/ # Original requirements docs
| +-- care-plan-prd.md
| +-- care-plan-spec.md
|
+-- archive/ # Superseded documents
+-- (old plans and legacy docs)Quick Navigation
Understanding the System
| Start Here | Description |
|---|---|
| Clinical Data Hierarchy | Core concepts: LHR, Episode, Encounter |
| Current State Overview | What's implemented today |
| Future State Overview | What's planned |
Current Implementation
| Document | Description |
|---|---|
| LHR Feature | Longitudinal Health Record implementation |
| Care Plan Feature | Care Plan/Prescription implementation |
| Usage Guide | How to use current features |
Future Plans
| Document | Description |
|---|---|
| Episode of Care | Planned: Treatment program containers |
| Multi-Practitioner Documents | Planned: Practitioner-specific documentation |
Technical Details
| Document | Description |
|---|---|
| Backend Endpoints | API documentation |
| System Design | Backend architecture |
| LHR Database Design | Database schemas |
Implementation Status
Implemented (Current State)
| Feature | Status | Route |
|---|---|---|
| Longitudinal Health Record | Complete | /careplan/patient/:patientId |
| Care Plan / Prescription | Complete | /prescription/:appointmentId/:patientId/* |
| AI Scribe | Complete | Sidebar in Prescription |
| HIPAA Audit Trail | Complete | Settings > Security |
| Encounter Management | Complete | Integrated with Prescription |
Planned (Future State)
| Feature | Status | Priority |
|---|---|---|
| Episode of Care | Planning | High |
| Multi-Practitioner Documents | Planning | High |
| Clinical Measurements | Planning | Medium |
| Assessment Instruments | Planning | Medium |
Key Relationships
LHR and Encounters
- LHR is a computed view that aggregates data from all encounters
- LHR provides the "big picture" of patient health
- Encounters contribute data to LHR (vitals, medications, problems)
Episodes and Encounters (Planned)
- Episode is a container for related encounters
- Encounters can exist with or without an Episode
- Episodes track treatment progress and goals
Context-Dependent Navigation
| User Role | Primary Entry | Rationale |
|---|---|---|
| Doctor (general) | LHR Dashboard | Needs full patient context |
| Physiotherapist | Episode View | Works within specific program |
| Psychologist | Episode View | Tracks therapy progress |
| Dietitian | Episode View | Manages nutrition program |
| Receptionist | Encounter List | Schedules appointments |
Related Locations
Frontend Code
| Component | Location |
|---|---|
| LongitudinalHealthRecord | frontend/apps/cms/src/pages/care-plan/LongitudinalHealthRecord.tsx |
| CarePlanDashboard | frontend/apps/cms/src/pages/care-plan/CarePlanDashboard.tsx |
| EncounterPage | frontend/apps/cms/src/pages/care-plan/EncounterPage.tsx |
| AI Scribe | frontend/apps/cms/src/features/aiScribe/ |
| Encounter API | frontend/apps/cms/src/services/longitudinalHealthRecordApi.ts |
Backend Code
| Module | Location |
|---|---|
| Care Plan | backend/parts/care_plan/ |
| Prescriptions | backend/parts/prescriptions/ |
| Encounters | backend/parts/clinic/models/encounter.rb |
| LHR Controller | backend/parts/clinic/controllers/clinic_patients_lhr_controller.rb |
Last Updated: December 2025 Maintainer: Development Team