Caregiver Journal & Goal Tracking
Relevant source files
The following files were used as context for generating this wiki page:
The Caregiver Journal & Goal Tracking systems within the Hospice Roadmap application serve as a centralized hub for documenting the end-of-life journey and defining patient-centered priorities. These modules enable caregivers to capture daily observations and formalize "Goals of Care" (GoC), which act as a clinical and emotional compass for both the family and the AI companion, Ragna.
The data captured in these modules is primarily stored locally on the device using AsyncStorage. However, this information is critical for personalizing AI interactions; when a user engages with Ragna, relevant journal entries and GoC details are transmitted to the server to provide contextually aware guidance.
Sources: replit.md, attached_assets/Pasted-Make-a-truth-alignment-pass-across-the-current-React-Na_1774837201847.txt
Caregiver Journal System
The journal is a specialized documentation tool designed for the "During Hospice" stage. It allows caregivers to track various types of entries, ranging from clinical observations to emotional reflections.
Data Model and Context
Journal entries are managed via the JournalContext, which handles persistence and state. Each entry is structured to support categorization and chronological sorting.
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the entry |
type | JournalEntryType | Category: observation, emotional, medical, or note |
content | string | The text body of the journal entry |
timestamp | Date | Time of creation or last edit |
Sources: artifacts/mobile/context/JournalContext.tsx, replit.md
Information Flow
The following diagram illustrates how a journal entry moves from user input to persistent storage and finally to the AI intelligence engine.
The system uses a "rolling observations" pattern where significant events, such as writing a journal entry, are tracked by the RagnaLearningContext to inform the AI's living profile of the family.
Sources: replit.md, artifacts/mobile/app/journal.tsx
Goals of Care (GoC) Tracking
The Goals of Care module is a decision-support tool that prompts users to define what matters most to the patient. This information is used to ensure that medical interventions align with the patient's values rather than default clinical protocols.
Key Data Pillars
The GoC feature focuses on four primary qualitative fields that shape the care plan:
- What matters most (
whatMattersMost): The primary anchor for all care decisions (e.g., staying pain-free or remaining at home). - A good day (
goodDayLooksLike): Qualitative descriptions of what constitutes quality of life for the patient. - Things to avoid (
thingsToAvoid): Explicit vetos, such as avoiding hospitalizations or invasive machines. - Resuscitation preference (
dnrStatus): The patient's formal status regarding CPR and natural death.
Sources: artifacts/api-server/src/routes/anthropic/systemPrompt.ts:696-745, artifacts/mobile/app/goals-of-care.tsx
AI Integration and Prompting
The AI companion, Ragna, uses GoC data to personalize responses. The system prompt instructs the AI to reference these goals to avoid generic advice.
Privacy and Data Handling
The application maintains a specific stance on data privacy for these modules. While the primary storage is local, the "Truth Alignment" pass ensures users are informed of data transmission.
- Local Storage: Journal entries and GoC answers are stored on the device using standard local app storage.
- AI Context: If a user chooses to chat with Ragna, relevant details from the patient profile, journal, and goals are sent securely to the server to generate personalized responses.
- User Control: Users can edit or remove locally stored information directly within the application.
Sources: attached_assets/Pasted-Make-a-truth-alignment-pass-across-the-current-React-Na_1774837201847.txt
Summary of Core Features
| Feature | Primary Purpose | Key Components |
|---|---|---|
| Symptom Tracker Integration | Informs GoC by showing trends | SymptomContext, JournalContext |
| SBAR Call Scripts | Translates journal/GoC into clinical language | systemPrompt.ts (SBAR logic) |
| DNR/POLST Visibility | High-level status captured in GoC | goals-of-care.tsx |
| Living Profile Synthesis | AI merges journal/GoC into a "human" summary | RagnaLearningContext |
Sources: replit.md, artifacts/api-server/src/routes/anthropic/systemPrompt.ts:635-655
Caregiver Journal & Goal Tracking acts as the bridge between raw daily experiences and structured clinical priorities. By combining local persistence with AI context injection, the system ensures that the guidance provided remains deeply grounded in the patient's documented wishes and the caregiver's real-time observations.