Extending the Hospice Intelligence Catalog
Relevant source files
The following files were used as context for generating this wiki page:
- artifacts/api-server/src/intelligence/hospice/catalog.ts
- artifacts/api-server/src/intelligence/hospice/documentationCoach.ts
- artifacts/api-server/src/routes/anthropic/systemPrompt.ts
- attached_assets/Pasted-Build-the-next-major-intelligence-architecture-for-Hosp_1774852812580.txt
- artifacts/mobile/content/guidance/items.ts
The Hospice Intelligence Catalog is a structured repository of clinical knowledge, communication playbooks, and procedural guidance designed to power the "Hospice Roadmap" platform. Its primary purpose is to transform a standard chatbot into a role-aware hospice expert system capable of supporting patients, caregivers, and clinicians through the end-of-life journey. Sources: attached_assets/Pasted-Build-the-next-major-intelligence-architecture-for-Hosp_1774852812580.txt:5-15
The catalog is built as a layered engine rather than a single prompt, ensuring that the AI remains grounded in deterministic, clinically-vetted knowledge blocks. Extending this catalog involves adding new structured data to defined domains such as symptom management, the dying process, and documentation coaching. Sources: attached_assets/Pasted-Build-the-next-major-intelligence-architecture-for-Hosp_1774852812580.txt:60-65
Catalog Architecture and Data Structures
The intelligence engine relies on several key data structures to organize and retrieve hospice knowledge. Each entry in the catalog must adhere to strict type definitions to ensure compatibility with the system's retrieval and planning modules. Sources: attached_assets/Pasted-Build-the-next-major-intelligence-architecture-for-Hosp_1774852812580.txt:100-110
Hospice Knowledge Blocks
Knowledge blocks are the fundamental units of information in the catalog. They provide detailed guidance for specific hospice scenarios. Sources: artifacts/api-server/src/intelligence/hospice/catalog.ts:5-10
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the block (e.g., HF001, DP001). |
domain | string | The functional area (e.g., symptom_management, care_gap). |
title | string | A clear, descriptive title of the scenario. |
urgency | string | Severity level: routine, moderate, urgent, or critical. |
journeyStages | string[] | Applicable stages like weeks_to_days, days, or after_death. |
summary | string | High-level overview of the information. |
explanation | string | Detailed clinical or operational background. |
whatToDoNow | string | Immediate, actionable steps for the user. |
whatToSay | string | Communication scripts or specific questions to ask. |
hardStops | string[] | Safety thresholds where standard care is insufficient. |
Sources: artifacts/api-server/src/intelligence/hospice/catalog.ts:13-35, attached_assets/Pasted-Build-the-next-major-intelligence-architecture-for-Hosp_1774852812580.txt:125-135
Information Flow in the Intelligence Engine
The following diagram illustrates how the intelligence catalog is utilized when a user message is processed by the system.
The retrieval system selects the most relevant 4 to 8 knowledge blocks based on the patient context, role, and urgency detected in the message. Sources: attached_assets/Pasted-Build-the-next-major-intelligence-architecture-for-Hosp_1774852812580.txt:235-245
Domain-Specific Models
Extending the catalog requires populating specialized models that address different aspects of the hospice journey. Sources: attached_assets/Pasted-Build-the-next-major-intelligence-architecture-for-Hosp_1774852812580.txt:140-145
Symptom Management
The symptom model provides clinical context for physical distress. For each symptom, the catalog defines what the situation may mean and what comfort measures to apply. Sources: artifacts/api-server/src/intelligence/hospice/catalog.ts:138-145
Example Symptom Entry: Breathlessness (SM002)
- What it means: Subjective distress of air hunger, often caused by fluid accumulation or anxiety. Sources: artifacts/api-server/src/intelligence/hospice/catalog.ts:161-165
- Actionable Steps: Positioning the patient upright, using a fan, and administering low-dose opioids as authorized. Sources: artifacts/api-server/src/intelligence/hospice/catalog.ts:166-170
- Sources Cited: Abernethy AP et al. BMJ 2003, Bruera E. JPSM 1990. Sources: artifacts/api-server/src/intelligence/hospice/catalog.ts:178
Dying Process and Time of Death
The catalog maps the progression from "weeks to days" to "final moments." Sources: artifacts/api-server/src/intelligence/hospice/catalog.ts:70-75
Documentation Coaching
Specialized guides exist to help users track clinical data effectively. This ensures that the information provided to the hospice team is accurate and useful for adjusting care plans. Sources: artifacts/api-server/src/intelligence/hospice/documentationCoach.ts:10-15
| Situation | Key Tracking Elements | Why It Matters |
|---|---|---|
| Symptom Tracking | Date/Time, Severity (0-10), Meds given, Response. | Helps physicians adjust doses effectively. |
| Hospice Call Log | Name of person, reported info, promised actions. | Evidence if care becomes inadequate. |
| Patient Wishes | Date of talk, who was present, specific preferences. | Acts as the patient's voice in family conflict. |
Sources: artifacts/api-server/src/intelligence/hospice/documentationCoach.ts:17-80
Communication and Advocacy Playbooks
The catalog includes scripts to help users navigate emotionally intense or operationally deficient scenarios. Sources: artifacts/api-server/src/intelligence/hospice/catalog.ts:240-250
SBAR Call Preparation
To ensure clear communication with clinical staff, the system generates scripts following the SBAR (Situation, Background, Assessment, Request) format. Sources: artifacts/api-server/src/intelligence/hospice/catalog.ts:258-270, artifacts/api-server/src/routes/anthropic/systemPrompt.ts:550-575
Care Gap Identification
The catalog defines "Care Gaps" where hospice service may be failing. It provides instructions on how to recognize and document these failures. Sources: artifacts/api-server/src/intelligence/hospice/catalog.ts:400-410
- Delayed Callbacks: Alerts users that a callback delay over 30 minutes for an urgent issue is a regulatory violation. Sources: artifacts/api-server/src/intelligence/hospice/catalog.ts:417-425
- Poor Education: Guides families who feel they were not taught how to use medications or what to expect during the dying process. Sources: artifacts/api-server/src/intelligence/hospice/catalog.ts:401-415
Implementation Guidelines
When extending the catalog, developers must adhere to the Ragna persona and safety protocols defined in the system prompt. Sources: artifacts/api-server/src/routes/anthropic/systemPrompt.ts:15-30
- Acknowledge Emotion First: Every piece of guidance must lead with warmth and acknowledgment before providing technical information. Sources: artifacts/api-server/src/routes/anthropic/systemPrompt.ts:40-50
- Use Plain Language: Clinical terms must be defined immediately (e.g., "Terminal secretions, sometimes called the 'death rattle'"). Sources: artifacts/api-server/src/routes/anthropic/systemPrompt.ts:195-200
- Grounding in Sources: Every entry in the catalog must cite clinical sources such as NHPCO guidelines or Medicare regulations. Sources: artifacts/api-server/src/intelligence/hospice/catalog.ts:35, attached_assets/Pasted-Build-the-next-major-intelligence-architecture-for-Hosp_1774852812580.txt:135-138
- Safety Escalation: If a "Hard Stop" or "Red Flag" is met (e.g., active choking or caregiver collapse), the system must prioritize an immediate instruction to call 911 or hospice. Sources: artifacts/api-server/src/intelligence/hospice/catalog.ts:375-390, artifacts/api-server/src/routes/anthropic/systemPrompt.ts:530-545
Extending the catalog ensures the platform provides deeply specific, role-aware, and actionable expert guidance across clinical, emotional, and practical domains. Sources: attached_assets/Pasted-Build-the-next-major-intelligence-architecture-for-Hosp_1774852812580.txt:60-75