Start a consultation with an existing patient
sequenceDiagram
actor Employee
participant Empego API
participant Empego APP (Employee view)
participant Empego APP (Patient view)
actor Patient
participant Event delivery service
Employee->>Empego API: 1. Create/Update Patient resource
alt Valid Request
Empego API-->>Employee: 2. Return Patient Response
else
Empego API-->>Employee: 2. Return error code
end
Employee->>Empego API: 3. Request iframe url with patient identifier provided in the patient response
Empego API-->>Employee: 4. Return iframe url
Employee->>Empego APP (Employee view): 5. Open iframe url and create the consultation
Empego APP (Employee view)-)Employee: Emit Consultation create browser event
Event delivery service-)Event delivery service: Emit Consultation create event
Patient->>Empego APP (Patient view): 6. Patient Complete Consultation
activate Empego APP (Patient view)
par
Empego APP (Patient view)-)Patient: Emit Consultation update browser event
deactivate Empego APP (Patient view)
Event delivery service-)Event delivery service: Emit Consultation update event
end
Employee->>Empego API: 7. Request iframe url to view consultation details.
Empego API-->>Employee: 8. Return iframe url
Employee->>Empego APP (Employee view): 9. Open iframe url to view consultations details
- Create/Update a Patient using this operation -> Create Patient
-
- Success : A Patient response is return with the patient identifier set in the id field.
- Failure: An error code is set accordingly.
- Request an iframe url to Start a consultation using the patient identifier.
- Use the iframe url to create a consultation with the prefilled patient in the Empego App.
- Patient receive and complete the consultation.
- Upon completion of the consultation a message is fired in the browser through the Message Event and a Consultation Event on the SSE endpoint.
- With the
id
provided in the browser Message Event or theconsultationKey
of the Consultation Event from the server an employee can view the consultation details.