Functional standard / Interactions / PatientInstance
JournalEntry
A patient log through a journal plugin. Mapped fields become patient-perceived observations.
- Kind
- journal_entry
- Collection
- /v1/journal-entries
- Initial state
- recorded
- Classification
- Operational
Scope and usage
The patient, or staff on their behalf, records the plugin's fields. The row is frozen once recorded. Correct with entered_in_error.
Boundaries and relationships
- The field list is the journal_plugin Definition.
- A care action of type journal points at the plugin. The entry is the log.
Resource content
Elements this resource adds. It also carries the Instance, including patient_id.
| Name | Card. | Type | Flags | Description |
|---|---|---|---|---|
| plugin_key | 1..1 | code | — | journal_plugin definition key. |
| care_action_id | 0..1 | id | — | The journal action this log fulfils. |
| data | 0..1 | object | — | Field key to value. |
| recorded_at | 1..1 | dateTime | — | When the patient recorded it. |
State machine
recorded/ initial — Stored. Frozen.entered_in_error— Withdrawn.
recorded → entered_in_error.
Frozen: recorded and entered_in_error.
Invariants
ccs-jou-1— Fields with an observation code become Observations with perceived_by patient.
Operations
| Method | Path | Meaning |
|---|---|---|
| GET | /v1/journal-entries | List journal entry. Filter by patient_id, status, and where the model has them, encounter_id or definition_key. |
| POST | /v1/journal-entries | Create a journal entry. Body is the resource minus harness-owned elements. |
| GET | /v1/journal-entries/{id} | Read one journal entry. |
| PATCH | /v1/journal-entries/{id} | Update elements that are not immutable, frozen, or harness-owned. |
| POST | /v1/journal-entries/{id}/transition | Move status. Body is { to, reason }. A gated move returns 202 and an Approval. |
Example
{ "patient_id": "pat_…", "plugin_key": "journal_plugin_mood_diary", "data": { "mood": 3 } }