Create sequence diagrams with simple online tool

Swimlanes.io is a free webapp for making sequence diagrams. You simply edit the text on the left and the diagram is updated in real time. You can download your sequence diagrams as images or distribute with a link.

Title: Generic SIU "Push + pull" - Patient Creation + pathway start + pathway update + pathway stop alias Customer: {fal-server} Customer alias Mirth: {fal-server} Awell Mirth alias App: {fas-browser} Awell API Customer -> Mirth: Send SIU message Mirth -> Mirth: Extract necessary information from SIU message note:**TBD** all info that will have to be extracted: hospital patient id + information needed for baseline information + information needed to decide which pathway has to be started (probably AIS 3.1 = surgery type) Mirth -> App: Check if patient exists note: ```GET /v1.2/patients?hospital_patient_id=<hospital_patient_id>``` if: If patient does NOT exist App --> Mirth: Will return 200 HTTP status code note: ``` { "status": 200, "message": "Patient not found" } ``` Mirth -> Mirth: Add log with the following format: note: SIU message with status <SIU message status> received. Patient with <hospital-patient-id> does not exist. if: If status = S12 (Creation of surgery) OR status = S14 (Surgery was changed) Mirth -> Customer: Send HL7 A19 query to get patient information note: IP: **TBD**, Port: **TBD** Remark: If wanted, instead of HL7 A19 queries, we can call a web service to get the patient information. {fas-lock-alt} Connection secured through a VPN Customer --> Mirth: Send patient profile Mirth -> App: Create patient note: `POST /v1.2/patients` ``` [escape-left-curley-bracket] ... "physician_email": TBD, ... } ``` Remarks: 1. Do not send the email address of the patient! 2. Do not send the pathway_id App --> Mirth: Will return newly created patient note: Awell patient ID will be received too and will have to be used later to start the pathway and update the baseline information Mirth -> Mirth: Add log with the following format: note: Patient with <hospital-patient-id> was created. if: If patient email address was received Mirth -> App: Update the patient to add the email address note: `POST /v1.2/patients/{awellPatientId}` ``` { "email": "<patient_email>" } ``` end Mirth -> App: Start pathway associated with surgery type received + set baseline information note: ```POST /v1.2/patients/{awellPatientId}/pathway_instances``` ``` { "pathway_id": TBD, "baseline_info": { TBD } } ``` Mirth -> Mirth: Add log with the following format: note: - If the call to start pathway was successful: ```Pathway with ID <pathway-id> was started for patient with <hospital-patient-id>.``` - If an error is received when trying to start the pathway: ```Pathway with ID <pathway-id> was not started for patient with <hospital-patient-id> because <error message>``` else: If status = S15 (Surgery was canceled) note: Do nothing (patient does not exist => pathway was not started => nothing to stop) end else: If patient exists App --> Mirth: Will return the patient information note: Including Awell patient ID and the list of pathways that are / were already started Mirth -> Mirth: Add log with the following format: note: SIU message with status <SIU message status> received. Patient with <hospital-patient-id> already exists. if: If status = S12 Mirth -> Customer: Send HL7 A19 query to get patient information note: IP: **TBD**, Port: **TBD** Remark: If wanted, instead of HL7 A19 queries, we can call a web service to get the patient information. {fas-lock-alt} Connection secured through a VPN Customer --> Mirth: Send patient profile Mirth -> App: Update patient note: `POST /v1.2/patients/{awellPatientId}` Make sure to send all patient information received from the customer Mirth -> App: Start pathway associated with surgery type received + set baseline information note: ```POST /v1.2/patients/{awellPatientId}/pathway_instances``` ``` { "pathway_id": TBD, "baseline_info": { TBD } } ``` Mirth -> Mirth: Add log with the following format: note: - If the call to start pathway was successful: ```Pathway with ID <pathway-id> was started for patient with <hospital-patient-id>.``` - If an error is received when trying to start the pathway: ```Pathway with ID <pathway-id> was not started for patient with <hospital-patient-id> because <error message>``` else: If status = S14 (Surgery was changed) Mirth -> Customer: Send HL7 A19 query to get patient information note: IP: **TBD**, Port: **TBD** Remark: If wanted, instead of HL7 A19 queries, we can call a web service to get the patient information. {fas-lock-alt} Connection secured through a VPN Customer --> Mirth: Send patient profile Mirth -> App: Update patient note: `POST /v1.2/patients/{awellPatientId}` Make sure to send all patient information received from the customer Mirth -> Mirth: Check if pathway was already started and is active note: **TBD** criteria (pathway ID & surgery type from baseline information ??) if: If pathway was already started Mirth -> App: Update the baseline information of the corresponding pathway note: ```POST /v1.2/patients/{awellPatientId}/pathway_instances/{pathwayInstanceId}``` ``` { TBD } ``` Mirth -> Mirth: Add log with the following format: note: Pathway with ID <pathway-id> was updated for patient with <hospital-patient-id>. else: If pathway was not already started Mirth -> App: Start pathway associated with surgery type received + set baseline information note: ```POST /v1.2/patients/{awellPatientId}/pathway_instances``` ``` { "pathway_id": TBD, "baseline_info": { TBD } } ``` Mirth -> Mirth: Add log with the following format: note: - If the call to start pathway was successful: ```Pathway with ID <pathway-id> was started for patient with <hospital-patient-id>.``` - If an error is received when trying to start the pathway: ```Pathway with ID <pathway-id> was not started for patient with <hospital-patient-id> because <error message>``` end else: If status = S15 (Surgery was canceled) Mirth -> Mirth: Check if pathway was already started and is active note: **TBD** criteria (pathway ID & surgery type from baseline information ??) if: If pathway was already started Mirth -> App: Stop pathway note: ```POST /v1.2/patients/{awellPatientId}/pathway_instances/{pathwayInstanceId}/stop``` ``` { "reason": TBD, "user_id": TBD } ``` Mirth -> Mirth: Add log with the following format: note: Pathway with ID <pathway-id> was stopped for patient with <hospital-patient-id>. else: If pathway was not already started note: Do nothing (patient does not exist => pathway was not started => nothing to stop) Mirth -> Mirth: Add log with the following format: note: No pathway to stop for patient with <hospital-patient-id>. end end end autonumber