{"ok":true,"module":"module-2-symptom-checker","meta":{"title":"Module 2 — AI Symptom Checker","moduleRegistryPrefix":"CD","sourcePath":"reference/concept-platform/Platform pahse 3 mvp/Module 2","specStack":"healthcare_platform_api (FastAPI)","layers":5,"overallCompletionPct":48,"safetyPosture":"Never diagnoses · never recommends drug+dose · always ends with consult doctor · emergency = call 112/108","integratedWith":"hospitalnode.in — Hospital AI chat (unstructured) + appointments scaffold","updated":"June 2026"},"integration":{"layers":5,"completionPct":48,"liveLayers":0,"partialLayers":4,"gapLayers":1},"layers":[{"layer":1,"id":"intake","name":"Structured symptom intake","status":"partial","routes":[{"label":"Symptom check","href":"/symptom-check","status":"live"},{"label":"Hospital AI chat","href":"/shop?view=ai","status":"partial"},{"label":"Portal search","href":"/","status":"partial"}],"gaps":["DPDP consent for symptom data storage not separate from general terms","Mobile Expo intake wired; web at /symptom-check"]},{"layer":2,"id":"emergency-gate","name":"Deterministic red-flag triage (no LLM)","status":"partial","routes":[{"label":"Symptom check gate","href":"/symptom-check","status":"live"},{"label":"Hospital AI system hint (108/102)","href":"/shop?view=ai","status":"partial"},{"label":"Footer emergency disclaimer","href":"/","status":"live"}],"gaps":["Red-flag rules are placeholder in spec — physician sign-off still required","Hospital AI free-text chat still lacks deterministic gate (use /symptom-check path)","Mental health helplines surfaced on emergency path in symptom check UI"]},{"layer":3,"id":"elaboration","name":"OpenAI elaboration (non-emergency only)","status":"partial","routes":[{"label":"Symptom check (safe path)","href":"/api/symptom/check","status":"partial"},{"label":"Hospital AI orchestrator","href":"/api/shop/hospital-ai/chat","status":"partial"},{"label":"NestJS hospital-ai-api","href":"/admin/hospital-ai","status":"partial"}],"gaps":["Free-text Hospital AI chat still runs LLM without Layer 2 gate","No separate POST .../elaborate endpoint (inline on check)","Layer 3 cannot change urgency (spec) — enforced on symptom check path"]},{"layer":4,"id":"doctor-handoff","name":"Doctor consultation request queue","status":"gap","routes":[{"label":"Appointments browse","href":"/appointments","status":"partial"},{"label":"Customer appointments","href":"/customer/appointments","status":"partial"},{"label":"Frontline consult entry","href":"/frontline","status":"partial"}],"gaps":["No consultation_requests table keyed to symptom session","Emergency sessions cannot request consult (spec 409) — not implemented","Doctor claim/complete workflow for symptom follow-up missing","Module 5 teleconsult/video closes this gap later","require_active_role(doctor) for queue not wired"]},{"layer":5,"id":"clinician-audit","name":"Mandatory doctor review gate (AI output blocked until approved)","status":"partial","routes":[{"label":"Doctor review queue","href":"/clinical/symptom-review","status":"live"},{"label":"Patient status poll","href":"/api/clinical/symptom-check/[sessionId]","status":"live"},{"label":"Human Intelligence admin","href":"/admin/hospital-ai","status":"partial"}],"gaps":["No missed_red_flag flag-creation workflow to grow RED_FLAG_RULES from reviewed sessions","Consultation outcome cross-reference with triage classification missing","DPDP consent for staff review of symptom data — open legal question in spec","No SLA/notification when a session sits pending review too long"]}],"safetyRules":[{"rule":"Never give a diagnosis","platformRoute":"Prompt says draft differential only","status":"partial"},{"rule":"Never recommend specific drug + dose","platformRoute":"Catalog match may suggest products","status":"partial"},{"rule":"Always recommend doctor consult","platformRoute":"In system hint + disclaimer","status":"partial"},{"rule":"Emergency → call 112/108 immediately","platformRoute":"/symptom-check deterministic gate","status":"partial"},{"rule":"Layer 3 never changes emergency status","platformRoute":"symptom_check_sessions urgency enum","status":"partial"}],"acuteJourney":[{"step":"Symptom describe","layer":"L1 intake","route":"/symptom-check","status":"partial"},{"step":"Emergency gate","layer":"L2 triage","route":"/symptom-check","status":"partial"},{"step":"AI elaboration","layer":"L3 OpenAI","route":"/api/symptom/check","status":"partial"},{"step":"Book doctor","layer":"L4 handoff","route":"/module5","status":"partial"},{"step":"Clinical audit","layer":"L5 review","route":"/clinical/symptom-review","status":"partial"}],"apiMap":[{"spec":"POST /symptom-checker/sessions","platformRoute":"POST /api/symptom/check","status":"partial"},{"spec":"POST .../elaborate","platformRoute":"POST /api/shop/hospital-ai/chat","status":"partial"},{"spec":"POST .../request-consultation","platformRoute":"POST /api/appointments/book (unlinked)","status":"gap"},{"spec":"GET /consultations/queue","platformRoute":"—","status":"gap"},{"spec":"GET /symptom-checker/admin/sessions","platformRoute":"GET /api/clinical/symptom-check/review","status":"live"},{"spec":"POST .../admin/.../flag","platformRoute":"—","status":"gap"}],"dashboard":"/module2","note":"Layer 2 red-flag rules in spec are placeholder — physician review required before production."}