' SPDX-FileCopyrightText: 2025 Bram Wesselo ' ' SPDX-License-Identifier: EUPL-1.2 @startuml workflow-base-f skinparam roundcorner 20 skinparam defaultFontName Arial !pragma teoz true box Sending Organization\n-Care Provider 1- #e8d0a9 actor "Practitioner 1" as P1 participant "Sending\nsystem" as C1 #LightGray end box box mCSD Directory Provider #c1dad6 participant "mCSD\nDirectory" as D1 #LightGray end box box Receiving Organization\n-Care Provider 2- #acd1e9 participant "Receiving\nsystem" as C2 #LightGray actor "Practitioner 2" as P2 end box hide footbox activate P1 autonumber P1 -> D1 : Select Performer or Healthcare service\n (for some specific request / order) P1 -> C1 : Create service request\n with optional (Activity / Plan) Definition P1 -> C1 : Create Task &C1 -> C2 : Notify C2 -> C1 : Get Task and\n related resources C2 -> C2 : evaluate Task & note over P2 #WhiteSmoke Evaluating a Task may involve checking on required data and capacity. It may result in a new Task for Care Provider 1 e.g. to fill in a Questionnaire end note C2 -> C1 : Update Task &C2 o-> P2 : Notify C1 -> P1 : 'Your task is now in state \n received / rejected / accepted' deactivate P1 group Act on Task activate P2 P2 -> C2 : Act accordingly\n (may involve creating Events) note right C2 #WhiteSmoke May involve multiple updates to the Task changing status or output end note C2 -> C2 : Update Task C2 -> C1 : Update Task &C1 -> P1 : Notify deactivate P2 end P1 -> C1 : If Task status completed / failed\nUpdate Request completed @enduml