@startuml CreateRx participant TD as TD participant SW as SW participant UI as UI control Wait_Retry as Wait_Retry actor USER as US collections Pre_Tx as Pre_Tx 'Possible actions and interaction tuypes ' TD -> SW: MSG: Message ' SW -> TD: MSG: Message ' SW -> UI: CMD: command ' UI -> SW: ACT: Action ' US -> UI: User actions are: ' ENT: User enters a value or string ' TCH: User touches a button (RadioButton, CheckBox, ...) ' SET: User sets/slides a slider ' SCL: User scrolls a flipable area ' 'Messages conventions: '[x \n ,] '[x \n ,# certain amount of parameters according to the content] '[x \n ,X The rest of the parameters do not matter.] == Normal Bootup == TD -> SW: MSG: [x12: 3,1] \n OpMode - Standby Dat SW -> UI: CMD: MainHome Screen UI ->o Wait_Retry: ⟲: MainHome Screen == Create Rx - Simplified == TD -> UI: [x12] OpMode - Standby UI -> TD: [x45] Create Treatment Req TD -> UI: [x46] Create Treatment Rsp UI -> TD: [x3F] Prameters Validation Req TD -> UI: [x40] Prameters Validation Rsp UI -> TD: [x44] Prameters Confirmation Req TD -> UI: [x12] OpMode - Pre-Tx == Create Rx - Detailed == US -> UI: TCH: Create Treatment Button UI -> SW: ACT: Create Treatment SW -> TD: MSG: [x45: 1] Req \n Initiate Treatment alt Accepted: Initiate Treatment TD -> SW: MSG: [x46: 1,X] Rsp \n Initiate Treatment TD -> SW: MSG: [x12: 4,1] Dat \n OpMode - Parameters SW -> UI: CMD: Create Rx Screen UI ->o Wait_Retry: ⟲: Create Rx Screen !include common_puml/CreateRxCommon.puml else #Pink Rejected x46: Initiate Treatment TD -> SW: MSG: [x46: 0,RR] SW -> UI: CMD: Rejection Reason (RR) Notification UI ->o Wait_Retry: ⟲: MainHome Screen end alt Back US -> UI: TCH: Back Button UI -> SW: ACT: Back alt Is Validated? SW -> TD: MSG: [x44: 0] Req \n Prescription Parameters Confirmations: Back SW -> UI: ACT: Set to not validated UI -> UI: ACT: Enable Fields UI ->o Wait_Retry: ⟲: Create Rx Screen else UI -> UI: ACT: Clear Create Rx Screen SW -> TD: MSG: [x45: 0] Req \n Initiate Treatment Cancel TD -> SW: MSG: [x12: 3,1] Dat \n OpMode - Standby SW -> UI: CMD: MainHome Screen UI ->o Wait_Retry: ⟲: MainHome Screen end end !include common_puml/CreateRxControls.puml @enduml