Functional standard / What is being done / Instance
Task
Work for the care team: a checklist, or a request to complete a note or an assessment.
- Kind
- task
- Collection
- /v1/tasks
- Initial state
- open
- Classification
- Operational
Scope and usage
May be tied to a patient, a plan, an encounter, a person, or a role. Routines generate tasks when they fall due.
Boundaries and relationships
- Patient work is CareAction.
- A task can point at a definition to fill. Filling it creates that resource. The task does not contain the clinical content.
Resource content
Elements this resource adds. It also carries the Instance.
| Name | Card. | Type | Flags | Description |
|---|---|---|---|---|
| patient_id | 0..1 | id | — | Patient, when the task is about one. |
| title | 1..1 | string | — | What to do. |
| careplan_id | 0..1 | id | — | Plan that spawned it. |
| encounter_id | 0..1 | id | — | Encounter. |
| assignee_role | 0..1 | code | — | Role that should do it. |
| usage_id | 0..1 | id | — | Reference to a calculator or assessment run, when there is one. |
| assignee_id | 0..1 | id | — | Specific person. |
| due_at | 0..1 | dateTime | — | Due time. |
| checklist | 0..* | ChecklistItem | — | item and done. |
| target_kind | 0..1 | code | — | Resource this task asks for, such as assessment or note_page. |
| target_definition_key | 0..1 | code | — | Definition to use. |
| target_id | 0..1 | id | R | Filled when that record exists. |
| routine_id | 0..1 | id | — | Routine that generated this occurrence. |
| occurrence | 0..1 | dateTime | — | Which occurrence. |
| priority | 1..1 | code | B | low, normal, high, or urgent. |
State machine
open/ initial — Not started.in_progress— Someone is doing it.done— Finished. Frozen.cancelled— Withdrawn. Frozen.
open → in_progress, done, cancelled. in_progress → open, done, cancelled.
Frozen: done and cancelled.
Terminology bindings
| Element | Strength | Values |
|---|---|---|
| priority | required | low | normal | high | urgent |
Invariants
No invariant beyond the common operation rules.
Operations
| Method | Path | Meaning |
|---|---|---|
| GET | /v1/tasks | List task. Filter by patient_id, status, and where the model has them, encounter_id or definition_key. |
| POST | /v1/tasks | Create a task. Body is the resource minus harness-owned elements. |
| GET | /v1/tasks/{id} | Read one task. |
| PATCH | /v1/tasks/{id} | Update elements that are not immutable, frozen, or harness-owned. |
| POST | /v1/tasks/{id}/transition | Move status. Body is { to, reason }. A gated move returns 202 and an Approval. |
| DELETE | /v1/tasks/{id}?reason= | Soft-delete. Reason is required. Refused when the resource is not deletable or is frozen. |
Notes
- patient_id is optional, so the resource is mixed scope. Definition kind task.
Example
{ "patient_id": "pat_…", "title": "Call after the new prescription", "assignee_role": "nurse", "priority": "normal" }