Introduction
There are several types of access to patient medical data in eHealth, such as:
Access type | Release |
---|---|
Primary care doctor access | 1 |
Public information | 1 |
Emergency room access | TBD |
Secondary care doctor access | TBD |
Primary care doctor
Authorization
- Authorize user using standard flow (Auth)
Search for declarations using token
- Select party_id from PRM.Party_users where user_id = token.user_id
- Select id from PRM.Employee where
- party_id = a.
- legal_entitty_id= token.client_id
- Select patient_id from OPS.Declarations where
- employee_id = b.
- status = active
- Write selected records into Redis
Refresh record in Redis
- Delete record from Redis after N minutes (N = 15 by default)
- If new declaration was signed with the Doctor, delete the record from Redis where key = declarations.employee_id
Declarations validation
- Search for a record in Redis where the key = token.user_id
- If there is no record, perform point 2 - Search for declarations using token
- If there is a record, search for patient_id in array
- If there are no records with such patient_id return error -"Access denied - you have no active declaration with the patient"
- If there is a record - grand access
- Search for a record in Redis where the key = token.user_id
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.