Task
Overview
The Task resource represents actionable items assigned to patients or professionals. Tasks are typically generated from care plan activities and include questionnaire assignments, measurement reminders, and medication schedules.
API Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /api/tasks/ | List tasks |
| GET | /api/tasks/{id}/ | Get task details |
| POST | /api/tasks/{id}/accept/ | Accept a task |
| POST | /api/tasks/{id}/complete/ | Complete a task |
| POST | /api/tasks/{id}/cancel/ | Cancel a task |
| POST | /api/tasks/{id}/mark-error/ | Mark task as entered-in-error |
State Transitions
Tasks follow a FHIR-compliant state machine:
| Action | Valid From | Target Status |
|---|---|---|
accept | requested | accepted |
start | accepted | in-progress |
complete | in-progress, accepted | completed |
cancel | requested, accepted | cancelled |
fail | in-progress | failed |
mark-error | any | entered-in-error |
Example
{
"id": 789,
"status": "requested",
"intent": "order",
"description": "Complete daily blood pressure measurement",
"for": { "reference": "Patient/12345" },
"execution_period": {
"start": "2024-01-15T08:00:00Z",
"end": "2024-01-15T20:00:00Z"
}
}