How rahul-gits/longitudinal-health-intelligence-engine works
Heal Engine is a clinical decision-support application for complex, longitudinal care. Patients and clinicians use the portal and workspaces to review health history, screening, risks, evidence, and care options; clinicians retain approval authority, and follow-up supports ongoing monitoring. The README describes distinct ingestion, patient-state, orchestration, deterministic safety, evidence, and review stages, plus virtual-doctor, reporting, and governance capabilities. The tree supports those module paths, but sampled excerpts do not establish all runtime wiring; edges therefore show only documented architecture or evidenced API calls, not a complete implementation trace.
Main entry points: workflowRoutes.ts Workflow API · clinicalOrchestrator.ts Clinical Orchestrator · apiClient.ts API Client · patientRoutes.ts Patient API
Components 25
Experience
- Application Shell
src/App.tsx - Patient Portal
src/components/PatientPortalDashboard.tsx - Clinical Workspaces
src/components/CommandCenter.tsx - Virtual Doctor
src/components/VirtualDoctorScreeningWorkspace.tsx - Care Follow-up
src/components/CareFollowUpWorkspace.tsx
API and Security
- API Client
src/services/apiClient.ts - Express Server
server/index.ts - Patient API
server/routes/patientRoutes.ts - Workflow API
server/routes/workflowRoutes.ts - Access Controls
server/middleware/securityRbacMiddleware.ts
Clinical Decision Support
- Clinical Orchestrator
src/engine/clinicalOrchestrator.ts - Screening Engine
src/engine/virtualDoctorScreeningEngine.ts - Care Workflow
src/engine/endToEndWorkflowEngine.ts - Safety Gate
src/engine/safetyEngine.ts - Specialist Consensus
src/engine/clinicalConferenceEngine.ts
State and Evidence
- Patient State
src/engine/patientStateEngine.ts - Evidence Intelligence
src/engine/evidenceIntelligenceEngine.ts - FHIR Normalization
server/services/fhirNormalizationService.ts - Vector Search
server/services/vectorDbService.ts
Governance and Operations
- Reports and FHIR
server/routes/reportRoutes.ts - Audit Trail
server/routes/auditRoutes.ts - AI Governance
server/services/aiGovernanceService.ts - Session Records
server/services/virtualDoctorSessionService.ts
Other components
- Patient
- Clinician
Connections 30
- Patient → Patient Portal: uses
- Clinician → Clinical Workspaces: reviews
- Application Shell → Patient Portal: renders
- Application Shell → Clinical Workspaces: renders
- Application Shell → Virtual Doctor: renders
- Application Shell → Care Follow-up: renders
- Patient Portal → API Client: requests data
- Clinical Workspaces → API Client: requests data
- Virtual Doctor → API Client: requests sessions
- Care Follow-up → API Client: requests plans
- API Client → Patient API: calls patient endpoints
- API Client → Workflow API: runs workflow
- Express Server → Patient API: mounts routes
- Express Server → Workflow API: mounts routes
- Patient API → Access Controls: enforces isolation
- Patient API → Patient State: serves patient state
- Workflow API → Clinical Orchestrator: dispatches workflow
- Clinical Orchestrator → Screening Engine: coordinates screening
- Clinical Orchestrator → Care Workflow: coordinates care
- Clinical Orchestrator → Safety Gate: checks constraints
- Clinical Orchestrator → Specialist Consensus: coordinates specialists
- Clinical Orchestrator → Patient State: uses longitudinal state
- Clinical Orchestrator → Evidence Intelligence: retrieves evidence
- Workflow API → Vector Search: searches vectors
- Workflow API → FHIR Normalization: normalizes FHIR
- Workflow API → Session Records: records turns
- Workflow API → AI Governance: serves registry
- Workflow API → Audit Trail: exposes audit trail
- Workflow API → Reports and FHIR: exposes reports
- Patient API → Audit Trail: records decisions