--- type: "doc" source: "source/workflow-module.html" --- \[%settitle Workflow Module%\] \[%file newheader%\] \[%file newnavbar%\] | Responsible Owner: Work Group [\[%wgt fhir%\]]([%wg fhir%]) | [Standards Status](versions#std-process): [Informative](versions#std-process) | | --- | --- | ## Workflow Module The workflow module focuses on the coordination of activities within and across systems. This includes three primary aspects: - How do we ask for another person, device or system to do something? - How do we track the linkages and dependencies between activities - actions to their authorizations, complex activities to individual steps, protocols to plans to orders, etc.? - How do we define what activities are possible and the expected order and dependencies of the steps within those activities? i.e., process/orchestration definition For information about the relationship of specific domain resources, consult the modules that are specific to those resources. For example, the [Administration module](administration-module) contains an explanation of the relationship of [Appointment](appointment), [Slot](slot), [Encounter](encounter), etc. The [Diagnostics module](diagnostics-module) contains the relationship between [ObservationDefinition](observationdefinition), [ServiceRequest](servicerequest), [Observation](observation), [DiagnosticReport](diagnosticreport), etc. ## Index | Infrastructure | - Start here: [Overview](workflow) - Resource: [Task](task) - Patterns: [Definition](definition), [Request](request), [Event](event) - Documentation: [Communication Patterns](workflow-communications), [Ad-Hoc Patterns](workflow-ad-hoc), [Management Patterns](workflow-management) & [Examples](workflow-examples) | | --- | --- | | Scheduling | - Appointments: [Appointment](appointment) / [AppointmentResponse](appointmentresponse) - Availability: [Schedule](schedule) / [Slot](slot) | | Clinical Process | - Referrals: [ServiceRequest](servicerequest) - Orders: [NutritionOrder](nutritionorder), [VisionPrescription](visionprescription) - Definitions: [ActivityDefinition](activitydefinition), [PlanDefinition](plandefinition) - Miscellaneous: [DeviceRequest](devicerequest) & [DeviceUsage](https://build.fhir.org/ig/HL7/oo-incubator/StructureDefinition-DeviceUsage.html), [DeviceDispense](https://build.fhir.org/ig/HL7/oo-incubator/StructureDefinition-DeviceDispense.html), [DeviceAssociation](deviceassociation), [BiologicallyDerivedProductDispense](https://build.fhir.org/ig/HL7/oo-incubator/StructureDefinition-BiologicallyDerivedProductDispense.html), [SupplyRequest](https://build.fhir.org/ig/HL7/oo-incubator/StructureDefinition-SupplyRequest.html) & [SupplyDelivery](https://build.fhir.org/ig/HL7/oo-incubator/StructureDefinition-SupplyDelivery.html), [InventoryItem](https://build.fhir.org/ig/HL7/oo-incubator/StructureDefinition-InventoryItem.html) & [InventoryReport](https://build.fhir.org/ig/HL7/oo-incubator/StructureDefinition-InventoryReport.html), [Transport](https://build.fhir.org/ig/HL7/oo-incubator/StructureDefinition-Transport.html) | ### Introduction Workflows can be performed through direct posting of resources to a target server (combined with a specific tag), by using the [Task](task) resource, through the use of [messaging](messaging) or via FHIR [services](services). This specification includes a [workflow](workflow) page that describes the concepts underlying the discussion of workflows, and points to a number of different communication and architectural [workflow patterns](workflow-communications). In addition to the [Task](task) resource, this specification defines three logical models - [Definition](definition), [Request](request) and [Event](event) that define the patterns for resources that are typically involved in workflow. These patterns include elements defining common attributes of each type of resource as well as relationships between them. These relationships are summarized on the [workflow](workflow#relationships) page, along with a complete [list](workflow#list) of resources that follow (or are hoped to soon follow) the request and event patterns. Finally the [PlanDefinition](plandefinition) and [ActivityDefinition](activitydefinition) resources combine to support the creation of protocols, orders sets, guidelines and other workflow definitions by describing the types of activities that can occur and setting rules about their composition, sequencing, interdependencies and flow. ### Common use Cases Workflow manifests in many places in the healthcare environment: - Creating a [lab order](servicerequest), [drug prescription](medicationrequest), or other clinical order or an [insurance claim](claim), [enrollment request](enrollmentrequest), [Appointment](appointment) or similar administrative request and asking for it to be actioned by a specific organization or practitioner - Negotiating a fulfillment process, such as requesting further information before accepting a claim or referral or proposing an alternative therapy when processing an order - Letting an ordering physician know what the current progress is in fulfilling an order (e.g., blood has been drawn, sample is being processed, preliminary results are in, etc.) - Defining a [plan](careplan) or recommendation for a set of clinical and/or administrative activities to manage a patient's care and then tracking how those plans and recommendations are (or are not) acted upon over time. - Communicating a state change to a request or order (e.g., suspension, update, cancellation, etc.) to a fulfilling system so that they can take appropriate action - Asking for a state change, requesting the merge of a couple of patients or the invoking of some operation or decision support in an asynchronous manner - for example, one where human intervention is required - Designing or adhering to a study protocol, chemotherapy protocol, instantiating an order set or other [plan definition](plandefinition) FHIR provides multiple ways to enable these scenarios (and many others). Common mechanisms, along with their pros and cons can be found in the workflow sections on [patterns](workflow-communications#commpatternslist). ### Security and Privacy Resources related to workflow need to adhere to the same [security and privacy guidelines](security) that apply to all FHIR resources, including specific considerations for those that may contain personally-identifying information. There are a couple of additional security and privacy considerations specific to workflow: 1\. Some workflows are ad-hoc without pre-defined participants or flows. These can be challenging for security and privacy processes to manage appropriately 2\. Workflow can drive automated behavior. i.e., The mere existence of an electronic record can cause information to flow, procedures to be performed, records to be changed and money to be transferred, potentially without any intervention, oversight or sanity checking by a human being. As such, even greater care must be taken to ensure that: - constraints are placed on what systems (and users) can initiate workflow processes - requests for action are appropriately authenticated before action is taken - patient consents and other relevant policies are enforced either by the system storing the request or the system acting upon it (and that if enforcement is not performed by the actor, that they are confident that relevant policies have been enforced on the request prior to action) For more general considerations, see [the Security and Privacy module](secpriv-module). ### Developmental Roadmap Initial work has taken place on aligning most (though not yet all) resources with the [Definition](definition), [Request](request), [Event](event) and other patterns. We now have tooling that allows easier checking of alignment and documenting reasons for divergence. In the lead-up to R6, we'll be setting expectations for work groups to capture these reasons for divergence. Further alignment is also possible (where beneficial to implementers), though breaking changes will generally not be made solely to further alignment. Work is underway within the [Diagnostics](diagnostics-module) space on enhancing guidance around order fulfillment and the workflow pages will be updated to reflect this documentation. Additional IGs that take on various aspects of workflow are anticipated and further changes based on feedback from those IGs is also possible. We hope to develop tooling to render [ExampleScenario](examplescenario) instances as part of the core specification and start to leverage that to create more documentation about how to handle complex workflows, both within this core specification as well as within implementation guides. The [PlanDefinition](plandefinition) and [ActivityDefinition](activitydefinition) resources will continue to evolve based on feedback from the implementer community. We'll explore using them in a variety of ways, including clinical order sets, medication protocols, workflow protocols, clinical pathways, administrative protocols, etc. We hope to develop guidance and examples of using these resources to document expected interoperablity interactions at the system level. Additional topics for future work include: - We will continue working with work groups to evaluate when elements should be handled in core vs. using extensions, though we will take into account implementation levels before introducing breaking changes. - Creating "best practice" guides for how to implement workflow for different business patterns - Examining how workflow is used for [compensating actions](https://en.wikipedia.org/wiki/Compensating_transaction) e.g., account transactions and reversals \[%file newfooter%\]