Start a follow-up 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 plan a follow-up
    Patient--)Empego APP (Patient view):  6. Patient complete the follow-up
    activate Empego APP (Patient view)
    par
       Empego APP (Patient view)-)Patient:  Emit browser follow-up update event
    deactivate Empego APP (Patient view)
    Event delivery service-)Event delivery service:  Emit follow-up update event
    end
    Employee->>Empego API: 7. Request iframe url with follow-up identifier provided in the Event
    Empego API-->>Employee: 8. Return iframe url
    Employee->>Empego APP (Employee view): 9. Open iframe url to view follow-up details
  1. 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.
  2. Request an iframe url to Plan a follow-up using the patient identifier.
  3. Use the iframe url to create a follow-up with the prefilled patient in the Empego App.
  4. Patient receive and complete the follow-up
  5. Upon completion of the follow-up a Follow-up Event is fired on the SSE endpoint.
  6. With the followupKey of Follow-Up Event from the server an employee can view the follow-up details.