Emergency Card & Crisis Tools
Relevant source files
The following files were used as context for generating this wiki page:
The Emergency Card and Crisis Tools module provides immediate, actionable guidance for caregivers and patients facing urgent hospice-related situations. Its primary purpose is to consolidate critical contact information, clinical red flags, and step-by-step stabilization procedures into a highly accessible interface. This module ensures that users can quickly determine whether a situation requires an immediate call to the hospice team or emergency services (911).
Within the broader "Hospice Roadmap" ecosystem, these tools act as a safety layer that bridges the gap between educational resources and active clinical intervention. The system prioritizes speed and clarity, offering offline access to critical guidance to ensure reliability in environments with poor connectivity.
Sources: replit.md, attached_assets/Pasted-The-goal-of-the-application-is-to-give-caregivers-patie_1773648532398.txt
Emergency Information Card
The Emergency Information Card is a persistent feature accessible throughout the application. It functions as a centralized repository for the patient's essential data, allowing caregivers to communicate efficiently with healthcare professionals during a crisis.
Core Data Components
The card aggregates multiple data points necessary for clinical handoffs and immediate response:
| Data Field | Description |
|---|---|
| Hospice Contact | 24/7 main and after-hours phone numbers for the assigned hospice agency. |
| DNR/POLST Status | Prominent display of "Do Not Resuscitate" or "Physician Orders for Life-Sustaining Treatment" status. |
| Medical Equipment | Inventory of equipment in the home (e.g., oxygen concentrators, hospital beds) and provider contacts. |
| Pharmacy Info | Contact details for the hospice-affiliated pharmacy for medication refills or queries. |
| Caregiver Contacts | Primary and secondary contact information for family or professional caregivers. |
Sources: artifacts/mobile/app/emergency-card.tsx, attached_assets/Pasted-The-goal-of-the-application-is-to-give-caregivers-patie_1773648532398.txt
Privacy and Storage Logic
Information on the Emergency Card is stored locally on the user's device to facilitate quick access and ensure offline functionality. While the data is not automatically shared with third parties, profile details may be utilized by the "Ragna" AI companion if the user chooses to initiate a diagnostic chat.
Crisis Intelligence and Planning
The backend "Hospice Intelligence Engine" processes user input to determine the urgency of a situation and generate a structured response plan. This logic is primarily handled in planner.ts, which categorizes concerns into urgency levels: critical, urgent, moderate, or routine.
Urgency Detection Flow
The following diagram illustrates how the system evaluates incoming messages to trigger crisis protocols.
The diagram shows the logic flow from user input to the final urgency-based action plan.
Sources: artifacts/api-server/src/intelligence/hospice/planner.ts:20-30
Mandatory Response Sections
When an urgency level is identified as critical or urgent, the buildResponsePlan function enforces specific content requirements in the output provided to the user:
- Critical Urgency: Must include "What to do RIGHT NOW" (numbered steps) and "Call 911 — when and why."
- Urgent Urgency: Must include "What may be happening," "Specific steps to take now," and "When to call hospice now."
Sources: artifacts/api-server/src/intelligence/hospice/planner.ts:44-53
Structured Guidance for High-Urgency Scenarios
The mobile application uses a structured UI template for guidance (found in guidance/[id].tsx) to ensure consistency during stressful events. Scenarios labeled as "immediate" urgency level trigger specific visual indicators, such as the Urgency Banner.
Guidance Component Structure
Each urgent guidance screen is required to contain specific elements to minimize cognitive load:
- Observational Cues: "What you may be noticing" (physical signs).
- Contextual Meaning: "What this may mean" (plain-language explanation).
- Immediate Actions: "What you can do right now" (numbered steps).
- Contraindications: "What to avoid" (safety warnings).
- Escalation Triggers: "When to call hospice" (specific clinical thresholds).
Sources: artifacts/mobile/app/guidance/[id].tsx:128-175, attached_assets/Pasted-The-goal-of-the-application-is-to-give-caregivers-patie_1773648532398.txt
Call Hospice CTA Logic
The application includes a CallHospiceCTA component that dynamically changes its appearance based on the scenario's urgency. If a scenario is marked as urgent, the button background color switches to Colors.error (red) to signal high priority.
function CallHospiceCTA({ urgent }: { urgent: boolean }) {
return (
<Pressable
onPress={() => Linking.openURL("tel:hospice")}
style={({ pressed }) => [
styles.ctaCard,
{ backgroundColor: urgent ? Colors.error : Colors.primary },
pressed && { opacity: 0.88 },
]}
>
<Feather name="phone" size={22} color="#fff" />
<View style={styles.ctaText}>
<Text style={styles.ctaTitle}>
{urgent ? "Call Hospice Now" : "Questions? Call Hospice"}
</Text>
</View>
</Pressable>
);
}
Sources: artifacts/mobile/app/guidance/[id].tsx:244-262
Symptom Management & Comfort Kits
A key component of crisis tools is the Comfort Kit (or "Crisis Kit"), which contains pre-prescribed medications kept in the home. The system provides guidance on when to utilize these medications for acute symptoms.
| Symptom | Primary Medication (Example) | Crisis Threshold |
|---|---|---|
| Pain | Morphine / Oxycodone | Pain score 7-10 or uncontrolled by breakthrough dose. |
| Breathlessness | Sublingual Morphine | Severe air hunger not resolved by fan or positioning. |
| Agitation | Haloperidol / Lorazepam | Terminal restlessness or hyperactive delirium. |
| Secretions | Glycopyrrolate | Wet, rattling breathing causing caregiver distress. |
Sources: artifacts/mobile/data/resources.ts: (res-020), artifacts/api-server/src/routes/anthropic/systemPrompt.ts: (Clinical Pharmacology section)
Conclusion
The Emergency Card & Crisis Tools module is designed to function as a fail-safe for hospice caregivers. By combining local data storage for offline reliability, automated urgency detection in the Intelligence Engine, and a highly structured mobile UI for guidance, the system ensures that clinical safety remains the priority during the most difficult moments of the hospice journey.