Introduction to Hospice Roadmap
Relevant source files
The following files were used as context for generating this wiki page:
- replit.md
- artifacts/api-server/src/routes/anthropic/systemPrompt.ts
- artifacts/api-server/src/intelligence/hospice/catalog.ts
- attached_assets/Pasted-Build-a-production-ready-native-iPhone-mobile-app-using_1773627288076.txt
- artifacts/mobile/data/resources.ts
- attached_assets/Pasted-Build-the-next-major-intelligence-architecture-for-Hosp_1774852812580.txt
- artifacts/api-server/src/routes/anthropic/index.ts
Hospice Roadmap is a specialized healthcare navigation platform designed to provide comprehensive support, education, and actionable guidance for individuals, caregivers, and clinicians throughout the entire hospice journey. The system is architected as a production-ready mobile ecosystem comprising a React Native Expo application and a robust Node.js/Express API server integrated with advanced hospice intelligence.
The platform's primary mission is to support users across three broad stages: researching hospice before care begins, navigating active care, and seeking bereavement support after hospice. It differentiates itself from general medical encyclopedias by focusing on real-world caregiver scenarios, actionable symptom management, and role-aware AI assistance.
Sources: replit.md:3-12, attached_assets/Pasted-Build-a-production-ready-native-iPhone-mobile-app-using_1773627288076.txt:10-25
System Architecture
The project is structured as a pnpm workspace monorepo utilizing a modern TypeScript stack. It bridges a native mobile experience with a server-side intelligence engine that enhances AI-driven interactions with expert palliative care knowledge.
High-Level Component Overview
| Component | Technology | Primary Responsibility |
|---|---|---|
| Mobile App | Expo, React Native, TS | User interface, offline guidance, symptom tracking, and Ragna AI client. |
| API Server | Express 5, Node.js 24 | Proxying CMS data, managing Anthropic Claude integrations, and running the Intelligence Engine. |
| Intelligence Engine | TypeScript | Deterministic retrieval of knowledge blocks and response planning for AI. |
| Database | PostgreSQL, Drizzle ORM | Storage for conversations, messages, and user-generated context. |
Sources: replit.md:25-50, replit.md:85-95
Data Flow and AI Integration
The system employs a "Hospice Intelligence Engine" that sits between user requests and the LLM (Anthropic Claude). This engine analyzes incoming messages to retrieve relevant knowledge blocks before generating a response plan.
The Planner module derives the user's role, journey stage, urgency level, and potential care gaps to select the most relevant 4 to 8 knowledge blocks from the catalog.
Sources: replit.md:92-100, attached_assets/Pasted-Build-the-next-major-intelligence-architecture-for-Hosp_1774852812580.txt:100-115
Core Features and User Goals
Hospice Roadmap is designed around specific user goals supported by structured data models and clinical governance.
Guidance and Education
The application provides detailed guidance across multiple domains, ensuring users understand what is happening and what actions to take safely.
- Symptom Support: Comprehensive management for pain, breathlessness (dyspnea), agitation, and terminal secretions.
- Caregiver Training: Hands-on instructions for tasks like repositioning, transfers, and hygiene.
- Equipment Guidance: Troubleshooting for oxygen concentrators, hospital beds, and suction machines.
- After-Hospice Support: Grief resources and practical steps after loss.
Sources: artifacts/mobile/data/resources.ts:5-450, attached_assets/Pasted-Build-a-production-ready-native-iPhone-mobile-app-using_1773627288076.txt:20-50
Ragna AI Companion
Ragna is the platform's AI expert system. Unlike a generic chatbot, Ragna is role-aware and uses an "Intelligence Package" to provide grounded, clinically-safe advice.
Knowledge Catalog and Data Models
The server-side intelligence is powered by a structured knowledge catalog containing over 35 knowledge blocks across 13 domains.
Knowledge Block Structure
Each block in the HOSPICE_KNOWLEDGE_CATALOG follows a strict schema to ensure consistency in AI responses:
- Summary & Explanation: Plain-language definitions of the topic.
- What to Do Now: Actionable, prioritized steps for the caregiver.
- What to Say: Scripting for communicating with nurses or family.
- Hard Stops: Situations where the AI must stop giving advice and trigger an escalation (e.g., calling 911).
Sources: artifacts/api-server/src/intelligence/hospice/catalog.ts:5-30, attached_assets/Pasted-Build-the-next-major-intelligence-architecture-for-Hosp_1774852812580.txt:60-75
Disease and Symptom Models
The system explicitly models the trajectories of major terminal illnesses to provide stage-specific guidance:
| Disease Model | Key Focus Areas |
|---|---|
| Advanced Cancer | Rapid decline in final weeks, cachexia, pain patterns. |
| Heart Failure | "Roller coaster" trajectory, fluid management, ICD deactivation. |
| Dementia | FAST Scale stages, swallowing changes, behavioral symptoms. |
| COPD | Dyspnea management, CO2 retention risks, airflow (fans). |
Sources: artifacts/api-server/src/routes/anthropic/systemPrompt.ts:120-250
Clinical and Safety Governance
The application prioritizes safety through a multi-layered escalation strategy.
- Safety Banners: Mobile UI indicates when a user is offline or in a critical situation.
- Urgency Levels: The Intelligence Planner categorizes requests as
critical,urgent,moderate, orroutine. - 911 Triggers: Explicit instructions to bypass hospice and call 911 for non-hospice emergencies like fire, major trauma, or caregiver collapse.
- DNR/POLST Awareness: Ragna is instructed to honor "Allow Natural Death" orders while still managing comfort.
Sources: artifacts/api-server/src/intelligence/hospice/catalog.ts:240-270, artifacts/api-server/src/routes/anthropic/systemPrompt.ts:570-590
Conclusion
Hospice Roadmap serves as a high-fidelity bridge between clinical expertise and home-based care. By combining a monorepo architecture with a deterministic intelligence engine, it provides caregivers with the tools to manage complex medical situations while ensuring the patient's goals of care remain central to the experience.
Sources: replit.md:5-15, attached_assets/Pasted-Build-a-production-ready-native-iPhone-mobile-app-using_1773627288076.txt:200-210