There are several types of access to patient medical data in eHealth, such as:
- Primary care doctor access
- Secondary care doctor acsess
- Emergency room acsess
- Public information
Primary care doctor
- Authorization
- Authorize user using standard flow (Auth)
- Search for declarations
- Select declarations.patient_id from OPS where
- employee = user_id
- status = active
- Write selected declarations.id into Redis
- Select declarations.patient_id from OPS where
- Refresh declarations in Redis
- Delete information from Redis after N minutes (N = 15 by default)
- If new declaration was signed with the Doctor, delete information from Redis
- Declarations validation
- Search for declarations in Redis
- If Redis.? is null, search for declarations (2)
- If Redis.? is not null, search for patient_id in array
- If there are no row with such patient_id return error -"Access denied - you have no declaration with the patient"
- If there is a row - allow access
Secondary care doctor
Will be implemented in next phases
Emergency room
Will be implemented in next phases
Public information
A set of public patient medical data such as blood type, allergies intolerances, medications intolerances e.t.c are known as Patient Summary. Patient Summary could be requested by any doctor.