sequenceDiagram
autonumber
title Medical Files - Data Flows
actor C as Doctoralia App User
participant B as DP Backend
participant S as Feegow SSO
participant M as Feegow Medical Records
participant D as Feegow DWH
participant A as Feegow Rest API
C ->>B: Authenticate
B ->>B: Validade Patient
activate S
B ->>S: Get client OAuth2 token
Note right of B: Client credentials grant
S ->>B: Return a client token
deactivate S
B ->>M: Get list of medical files
activate M
Note left of M: with parameters: CPF and Phone
M ->>M: Check cached data in Medical Records database
alt if the medical records API don't know patient
activate D
M ->>D: Search for patient in all clinics
D ->>M: Return the patient's list of clinics (updated D-1)
deactivate D
end
M ->>M: Validate clinics consent
loop per clinic
activate A
M ->>A: Get patient files from one clinic
A ->>M: Return a list of patient files in this clinic
deactivate A
end
M ->>M: Merge patient files from all clinics
M ->>B: Return medical files list
deactivate M
Created
November 27, 2023 13:28
-
-
Save douglasgsouza/b846d81fcc89518cd5108e2cfe036291 to your computer and use it in GitHub Desktop.
Medical Records Flow
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment