DeveloperCare plansCare planFuture state
LHR Completion Plan: FHIR Resource Coverage
Goal: Complete all FHIR resource coverage in LHR before adding Episode of Care
Current Status
| Category | Implemented | Partial | Missing | Coverage |
|---|---|---|---|---|
| Core Patient Data | 3 | 0 | 0 | 100% |
| Clinical Data | 4 | 4 | 0 | 75% |
| History | 0 | 2 | 2 | 25% |
| Planning | 0 | 2 | 1 | 33% |
| Total | 7 | 8 | 3 | 65% |
Target: 95% coverage (18/19 components, excluding Imaging which is specialty-specific)
Phase 1: Quick Wins (Low Effort, High Value)
Components where backend exists, just need frontend integration.
1.1 Add Allergies to LHR Dashboard
- FHIR:
AllergyIntolerance - Backend: Already exists (
AllergyIntolerancemodel) - Task: Add Allergies card to PatientSummaryDashboard
- Effort: 2-4 hours
// Add to PatientSummaryDashboard.tsx
<AllergiesCard allergies={patientData.allergies} />1.2 Add Care Plan Summary to LHR
- FHIR:
CarePlan - Backend: Already exists (
CarePlanmodel withcare_plan_problems) - Task: Display active care plans in LHR
- Effort: 4-6 hours
1.3 Add Clinical Notes to LHR Timeline
- FHIR:
DocumentReference,ClinicalImpression - Backend: Already exists (
ClinicalImpression,ClinicalObservation) - Task: Include notes in EncounterHistory timeline
- Effort: 4-6 hours
1.4 Add Procedures to LHR
- FHIR:
Procedure - Backend: Already exists (
Proceduremodel) - Task: Create ProcedureHistory component for LHR
- Effort: 4-6 hours
1.5 Add Referrals to LHR
- FHIR:
ServiceRequest - Backend: Already exists (
ServiceRequestmodel) - Task: Show referral history and status in LHR
- Effort: 4-6 hours
Phase 1 Total: ~20-28 hours | Coverage after Phase 1: ~80%
Phase 2: Enhancements (Medium Effort)
Components that need frontend improvements.
2.1 Lab Results Trending
- FHIR:
Observation(category: laboratory),DiagnosticReport - Backend:
DiagnosticReportexists - Tasks:
- Create
LabResultsTrend.tsxcomponent with Recharts - Add reference range highlighting
- Add critical value alerts (visual indicators)
- Support common lab panels (lipid, metabolic, CBC)
- Create
- Effort: 8-12 hours
2.2 Immunizations (Adult Support)
- FHIR:
Immunization - Backend:
Immunizationmodel exists - Tasks:
- Verify
Immunizationmodel supports adults (not just children) - Create
ImmunizationRecord.tsxcomponent - Show immunization history in LHR
- Add due/overdue indicators
- Verify
- Effort: 6-8 hours
Phase 2 Total: ~14-20 hours | Coverage after Phase 2: ~85%
Phase 3: New Models (Higher Effort)
Components that need backend models created.
3.1 Family History
- FHIR:
FamilyMemberHistory - Backend: NEW model needed
- Tasks:
- Create
FamilyMemberHistorymigration and model - Create backend endpoints (CRUD)
- Create
FamilyHistoryManager.tsxcomponent - Add to LHR dashboard
- Create
- Effort: 12-16 hours
# Migration
class CreateFamilyMemberHistories < ActiveRecord::Migration[7.0]
def change
create_table :family_member_histories do |t|
t.references :patient, null: false, foreign_key: true
t.references :clinic, foreign_key: true
t.string :relationship, null: false # mother, father, sibling, etc.
t.string :condition_name
t.string :condition_code # ICD-10
t.boolean :deceased, default: false
t.integer :age_at_onset
t.integer :age_at_death
t.text :notes
t.timestamps
end
end
end3.2 Social History (Structured)
- FHIR:
Observation(category: social-history) - Backend: Extend Patient or create SocialHistory model
- Tasks:
- Add structured fields to Patient or create new model
- Create
SocialHistoryPanel.tsxcomponent - Fields: smoking, alcohol, occupation, exercise, diet, stress
- Effort: 8-12 hours
# Option A: Add to Patient model
add_column :patients, :smoking_status, :string # never, former, current
add_column :patients, :alcohol_use, :string # none, occasional, moderate, heavy
add_column :patients, :occupation, :string
add_column :patients, :exercise_frequency, :string # sedentary, light, moderate, active
add_column :patients, :marital_status, :string
# Option B: Create SocialHistory model (better for history tracking)
class CreateSocialHistories < ActiveRecord::Migration[7.0]
def change
create_table :social_histories do |t|
t.references :patient, null: false, foreign_key: true
t.string :category # smoking, alcohol, occupation, etc.
t.string :status
t.string :value
t.date :recorded_date
t.text :notes
t.timestamps
end
end
end3.3 Goals
- FHIR:
Goal - Backend: NEW model needed
- Tasks:
- Create
Goalmigration and model - Create backend endpoints
- Create
GoalTracker.tsxcomponent - Link goals to problems and care plans
- Create
- Effort: 10-14 hours
class CreateGoals < ActiveRecord::Migration[7.0]
def change
create_table :goals do |t|
t.references :patient, null: false, foreign_key: true
t.references :clinic, foreign_key: true
t.references :patient_problem, foreign_key: true, optional: true
t.references :care_plan, foreign_key: true, optional: true
t.string :description, null: false
t.string :category # clinical, behavioral, functional
t.string :status, default: 'in_progress' # proposed, in_progress, achieved, cancelled
t.string :priority # high, medium, low
t.date :start_date
t.date :target_date
t.string :target_value # e.g., "HbA1c < 7.0"
t.string :current_value
t.text :notes
t.timestamps
end
end
endPhase 3 Total: ~30-42 hours | Coverage after Phase 3: ~95%
Implementation Summary
| Phase | Components | Effort | Coverage |
|---|---|---|---|
| Phase 1 | Allergies, Care Plans, Notes, Procedures, Referrals | 20-28 hrs | 65% → 80% |
| Phase 2 | Lab Trending, Immunizations | 14-20 hrs | 80% → 85% |
| Phase 3 | Family History, Social History, Goals, Imaging | 40-50 hrs | 85% → 95% |
| Total | 74-98 hrs | 95% |
Component Checklist
Phase 1 Checklist
- 1.1 Allergies card in LHR dashboard
- 1.2 Care Plan summary in LHR
- 1.3 Clinical notes in timeline
- 1.4 Procedure history component
- 1.5 Referral history component
Phase 2 Checklist
- 2.1 Lab results trending chart
- 2.2 Immunization record (adult support)
Phase 3 Checklist
- 3.1 FamilyMemberHistory model + UI
- 3.2 Social history structured fields + UI
- 3.3 Goal model + UI
- 3.4 ImagingStudy model + UI
After LHR Completion
Once LHR is at 95% coverage:
- Episode of Care - Add program containers
- Multi-Practitioner Documents - Add EncounterDocument model
- Role-Based Views - Customize LHR by practitioner type
FHIR Resource Mapping (Complete)
| LHR Component | FHIR Resource | Status After Plan |
|---|---|---|
| Demographics | Patient | Complete |
| Problems | Condition | Complete |
| Medications | MedicationRequest | Complete |
| Allergies | AllergyIntolerance | Complete (Phase 1) |
| Vital Signs | Observation | Complete |
| Lab Results | Observation, DiagnosticReport | Complete (Phase 2) |
| Procedures | Procedure | Complete (Phase 1) |
| Immunizations | Immunization | Complete (Phase 2) |
| Family History | FamilyMemberHistory | Complete (Phase 3) |
| Social History | Observation | Complete (Phase 3) |
| Encounters | Encounter | Complete |
| Care Plans | CarePlan | Complete (Phase 1) |
| Clinical Notes | DocumentReference | Complete (Phase 1) |
| Documents | DocumentReference | Complete |
| Goals | Goal | Complete (Phase 3) |
| Referrals | ServiceRequest | Complete (Phase 1) |
| Appointments | Appointment | Complete |
| Imaging | ImagingStudy | Complete (Phase 3) |
| Episode of Care | EpisodeOfCare | After LHR complete |
Related Documentation
- LHR Components Audit - Current gap analysis
- LHR Presentation Strategy - UI design
- Episode of Care Plan - Next phase after LHR