Exposes tasks as the FHIR Task resource: listing an organisation's employee tasks or a companion's (patient's) tasks, creating and updating a task from a Task resource, fetching one, and changing its status through the FHIR $status operation. This is a separate surface from the Task API, which is the plain JSON CRUD surface (/v1/task) for the same underlying tasks and their libraries/templates — this router is mounted at /fhir/v1/task and both request bodies and responses are FHIR Task resources rather than the plain-JSON shapes TaskController uses.
Endpoints
GET /organisation/:organisationId
- Auth:
requireWebAuth - RBAC:
withOrgPermissions, requirePermission - Params:
organisationId - Query:
status,audience - Controller:
TaskFhirController.listEmployeeTasks - Response:
403: keysmessage(caller lackstasks:view:anyand has no verified session id),200: FHIRBundleofTaskresources
GET /companion/:patientId
- Auth:
requireWebAuth - RBAC:
withOrgPermissions, requirePermission - Params:
patientId - Query:
status,audience(EMPLOYEE_TASK|PARENT_TASK) - Controller:
TaskFhirController.listCompanionTasks - Response:
400: keysmessage(no organisation on the authorized request),200: FHIRBundleofTaskresources
POST /organisation/:organisationId
- Auth:
requireWebAuth - RBAC:
withOrgPermissions, requirePermission - Params:
organisationId - Body: FHIR
Taskresource (resourceType: "Task") - Controller:
TaskFhirController.create - Response:
201: FHIRTaskresource
GET /organisation/:organisationId/:taskId
- Auth:
requireWebAuth - RBAC:
withOrgPermissions, requirePermission - Params:
organisationId,taskId - Controller:
TaskFhirController.getById - Response:
404: keysmessage(task not found),403: keysmessage(wrong organisation, or caller lackstasks:view:anyand is neither assignee nor creator),200: FHIRTaskresource
PATCH /organisation/:organisationId/:taskId
- Auth:
requireWebAuth - RBAC:
withOrgPermissions, requirePermission - Params:
organisationId,taskId - Body: FHIR
Taskresource - Controller:
TaskFhirController.update - Response:
404: keysmessage,403: keysmessage,200: FHIRTaskresource
POST /organisation/:organisationId/:taskId/$status
- Auth:
requireWebAuth - RBAC:
withOrgPermissions, requirePermission - Params:
organisationId,taskId - Body: FHIR
Taskresource (onlystatusis read) - Controller:
TaskFhirController.changeStatus - Response:
404: keysmessage,403: keysmessage,200: FHIRTaskresource