ediverse Explore the platform

Spotlight PEPPOL BIS Billing 3.0 The EU e-invoicing mandate is here — France Sept 2026, Belgium Jan 2026, Germany 2025.

Task — Operational FHIR activity

Where ServiceRequest says what, Task says where we are: received, accepted, in progress, completed. The operational workflow pivot.

Purpose

Task describes an activity to perform or being performed: process a request, deliver a medication, get a prescription approved, run a questionnaire. Where ServiceRequest carries the request, Task carries the operational follow-up: who executes, when, in what state, with what inputs and outputs.

Common pattern: a clinician creates a ServiceRequest; a Task with focus = ServiceRequest/... is created to notify the laboratory it must fulfill it. The lab advances the Task through receivedacceptedin-progresscompleted.

Key fields

FieldTypeCardinalityRole
statuscode1..1Mandatory. Lifecycle: draft, requested, received, accepted, rejected, ready, cancelled, in-progress, on-hold, failed, completed, entered-in-error.
statusReasonCodeableReference0..1Reason for the current status.
businessStatusCodeableConcept0..1Free-form business status — finer-grained than status.
intentcode1..1Mandatory. unknown, proposal, plan, order, original-order, reflex-order, filler-order, instance-order, option.
prioritycode0..1routine, urgent, asap, stat.
codeCodeableConcept0..1Task nature (often fulfill, abort, replace, change).
focusReference(Any)0..1Resource acted on.
forReference(Any)0..1Beneficiary (typically Patient).
encounterReference(Encounter)0..1Care context.
requestedPeriodPeriod0..1Requested period.
executionPeriodPeriod0..1Actual execution period.
authoredOndateTime0..1Creation date.
lastModifieddateTime0..1Last modification — key for worklists.
requesterReference(Device | Organization | Patient | Practitioner | PractitionerRole | RelatedPerson)0..1Requester.
ownerReference(...)0..1Assigned executor.
partOfReference(Task)0..*Parent task (decomposition).
inputBackboneElement[]0..*Input data.
outputBackboneElement[]0..*Produced outputs.

Statuses and transitions

The canonical state diagram: draftrequestedreceivedaccepted or rejected. An accepted task goes readyin-progresscompleted on success, or failed / cancelled. on-hold is reversible.

JSON example

A fulfill Task for a CBC order, assigned to the central lab:

json task-fulfill-cbc.json
{
  "resourceType": "Task",
  "id": "fulfill-labtest-001",
  "status": "in-progress",
  "intent": "order",
  "priority": "routine",
  "code": {
    "coding": [{
      "system": "http://hl7.org/fhir/CodeSystem/task-code",
      "code": "fulfill",
      "display": "Fulfill the focal request"
    }]
  },
  "description": "Fulfill CBC order for Mr. Doe",
  "focus": { "reference": "ServiceRequest/sr-cbc-001" },
  "for": { "reference": "Patient/doe-john" },
  "encounter": { "reference": "Encounter/enc-2026-05-15" },
  "executionPeriod": {
    "start": "2026-05-15T08:30:00+02:00"
  },
  "authoredOn": "2026-05-15T08:25:00+02:00",
  "lastModified": "2026-05-15T09:10:00+02:00",
  "requester": { "reference": "Practitioner/dr-smith" },
  "owner": { "reference": "Organization/lab-central" },
  "businessStatus": {
    "coding": [{
      "system": "http://example.org/CodeSystem/lab-status",
      "code": "in-analyzer"
    }]
  },
  "input": [{
    "type": { "text": "Specimen" },
    "valueReference": { "reference": "Specimen/spec-001" }
  }]
}

Common pitfalls

  • Confusing Task with ServiceRequest — ServiceRequest = the request, Task = the execution follow-up. A ServiceRequest can spawn multiple Tasks (per step, per executor).
  • Invalid status transition — going from completed to in-progress isn't allowed without flipping through entered-in-error.
  • Missing owner — without an owner, the task is orphaned: no worklist will surface it.
  • Confusing requestedPeriod with executionPeriod — the former is planned, the latter actual. Mixing them up skews delay KPIs.
  • Polling instead of Subscription — for active task lists, a Subscription on Task?owner=...&status=ready,in-progress beats polling load.