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 scenarios
This page is informative. It shows the main scenarios of TA Workflow with their own instances. The requirements are in the TA. Instances with the same Task.identifier (or ServiceRequest.identifier) are one resource in successive states; the ids differ only because the IG holds one instance per id (TA section Identifiers of Tasks and Subscriptions). The type of work is SNOMED CT 308292007 (eOverdracht); hosts, identifiers and the topic URL are invented.
Standard dataset and available entries
A standard dataset, described by the Library of the ActivityDefinition or PlanDefinition in ServiceRequest.instantiatesCanonical, is a guideline for what a Fulfiller expects, not a requirement. The Placer states for each Request what it makes available, in Task.input entries with type available-resource (a reference in valueReference) or available-query (a search in valueString, relative to the Placer's FHIR base). It adds them when it selects the candidate, at creation in the Single Fulfiller Pattern, or where the use case makes the Patient readable before selection. The Fulfiller retrieves what these entries refer to, and may ask for missing information with an information-request entry (scenario 7). The Placer's server supports the reads and searches behind the entries it puts in Task.input; it is not required to support the searches of the dataset itself.
1. Single Fulfiller
| Step |
What happens |
Instances |
| 1 |
The Placer creates the Coordination Task with code fulfill, for and the available entries. ServiceRequest.performer refers to A; priority is populated. |
Request, created |
| 2 |
The Fulfiller accepts. |
accepted |
| 3 |
The Fulfiller starts the work: in-progress, executionPeriod.start. |
in progress |
| 4 |
The Fulfiller completes the work: completed, executionPeriod.end. |
completed |
2. Multiple Fulfillers with bidding and selection
| Step |
What happens |
Instances |
| 1 |
One Request, two candidates A and B, each with a Coordination Task with code request-fulfillment; for is set at creation, as in every Coordination Task. Each candidate may read the Request from the creation of its Coordination Task; until selection the Placer keeps data that directly identifies the patient out of the Request. Both accept and record a bid in output. |
Request, A accepted, B accepted |
| 2 |
The Placer selects A: code fulfill and businessStatus selected in one update, with the available entries. From code fulfill on, A may read the Patient. The Task of B is cancelled with statusReason not-selected. |
A selected, B not selected |
3. Deselection and renewed solicitation
See Example: reselection: the Coordination Task of the selected Fulfiller is cancelled before in-progress while the Request stays active, and a new Coordination Task is created for the same Request.
4. Cancellation before in-progress by the Placer
| Step |
What happens |
Instances |
| 1 |
The Fulfiller has accepted; the work has not started. |
Request, accepted |
| 2 |
The Placer sets the Coordination Task to cancelled, with its reason in statusReason.text. |
cancelled |
5. Cancellation Request after in-progress
6. Authorization Cancellation Request by the Fulfiller
| Step |
What happens |
Instances |
| 1 |
The Fulfiller of scenario 1 asks the Placer to withdraw the Request: intent proposal, code abort, focus the Request, reason in reasonCode. |
requested |
| 2 |
The Placer accepts. |
accepted |
| Step |
What happens |
Instances |
| 1 |
The Fulfiller sets businessStatus awaiting-information with statusReason.text, and adds an entry with type information-request to input. |
requests information |
| 2 |
The Placer answers with a further entry with type available-resource, referring to a wound assessment. |
Placer answers |
| 3 |
The Fulfiller removes businessStatus, statusReason and its information-request entry. |
has the information |
The Fulfiller may change only status, businessStatus, statusReason, executionPeriod, lastModified and output, and may add and remove entries with type information-request in input; the type information-request is reserved for the Fulfiller. All other input entries are set by the Placer (TA section Write access).
Subscriptions
Per organization, topic and base URL, a Fulfiller has either one Subscription per HealthcareService or one Subscription for the organization, not both. For a Subscription on owner-assigner, channel.endpoint begins with the address of an Endpoint with payloadType Notification in Organization.endpoint.