Twiin Workflow
0.4.0-draft - Draft – normative only when referenced by the Twiin afsprakenstelsel

This page is part of the Twiin Workflow (v0.4.0-draft: Release 1 Draft) based on FHIR (HL7® FHIR® Standard) R4. No current official version has been published yet. For a full list of available versions, see the Directory of published versions

Example: reselection

This page is informative. It shows one scenario in the Multiple Fulfillers Pattern: a selected Fulfiller is deselected before the work starts, the Placer solicits again on the same Request, and another candidate is selected. The requirements are in the TA: Multiple Fulfillers Pattern; Cancellation (Before in-progress); Handling the End of a Coordination Task; Patient context and readability.

One Placer, one Patient, one Request and three HealthcareServices of three Fulfillers: A (wondzorg-thuis), B (wijkverpleging-noord) and C (thuiszorg-zuid). The type of work is SNOMED CT 308292007 (eOverdracht).

Steps

Step What happens Instances
1 The Placer invites A and B: one Coordination Task each, code request-fulfillment, for set at creation, only the type of work in input. Both accept. A accepted, B accepted, Request
2 The Placer selects A: businessStatus selected and code fulfill set in one update. The Task of B is cancelled with statusReason not-selected. ServiceRequest.performer is set to A. A selected, B not selected, Request with performer
3 The patient prefers another facility. The Placer cancels the Task of A before in-progress: status cancelled, the reason in statusReason.text, no not-selected, because no other candidate has been selected. The Placer clears ServiceRequest.performer. The Request stays active. A cancelled, Request
4 The Placer solicits again on the same Request: a new Coordination Task for B, whose earlier Task has ended, and one for C. Both have code request-fulfillment and for set at creation. B invited again, C invited
5 C accepts and the Placer selects C, as in step 2. The new Task of B is cancelled with not-selected. ServiceRequest.performer is set to C. C selected, B not selected, Request with performer C

Reading the instances

  • Successive states of one resource. Instances with the same Task.identifier are the same Coordination Task in successive states; the three ServiceRequests with the same ServiceRequest.identifier are the same Request in successive states. The TA requires ids to be stable (TA section Identifiers of Tasks and Subscriptions): in reality the id of a Task or a Request does not change, only its content and version. The ids differ here only because the IG holds one instance per id.
  • The Request is shown with performer unset (steps 1, 3 and 4), set to A (step 2) and set to C (step 5). The Tasks refer to the first variant.
  • B has two Coordination Tasks for the same Request, one per solicitation: the first ended at step 2, the second is created at step 4. The Placer may then create new Coordination Tasks for the same Request, also for a Fulfiller whose earlier Coordination Task for that Request has ended (TA section Cancellation (Before in-progress)).
  • Between steps 3 and 4 no open Coordination Task refers to the active Request, because the Placer is about to create new ones (TA section Handling the End of a Coordination Task).
  • In step 3 the Task of A keeps code fulfill and for, and businessStatus is no longer set: selected belongs to status accepted (TA section Business status), and the Placer removes it when it cancels the Task of the selected Fulfiller.
  • The Task of C in step 5 follows the requirement that the Placer selects only a candidate whose Task has status accepted; the instance shows the state after selection.

Not visible in the instances

When a Coordination Task is cancelled, the Placer ends the read access of its owner to the Request and the Patient resource, also after selection. In step 2 this concerns B, in step 3 A, in step 5 B. This is access control and is not expressed in the instances.