Info |
---|
REST API method / Метод REST API (настанова) (remove the link block before publishing the document) |
...
Page Properties | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||
|
...
Person request must be approved.
Logic
Description of the working algorithm of the API method and the interaction of services with each other add Service logic (if necessary)
Digital signature
Decode content that is encrypted in an electronic digital signature.
Use Digital signature WS. Method checks digital signature and returns result.
See service specification.
Configuration parameters
Description of the configuration parameters that are used when processing a request in the system
Dictionaries
Provides a list of links to dictionaries that are available in Confluence
Input parameters
Input parameter | Mandatory | Type | Description | Example | |
---|---|---|---|---|---|
1 | id |
| String | Required | eeebb86d-5cba-43c9-885b-6482ecaf826b |
2 |
Request structure
See on API-specificationDescription of the REST API request structure, example
Expand | ||
---|---|---|
| ||
|
...
Also to table person_auth_methods add this method as default(field `default` = TRUE) - it's for all auth_method.type
Check if Person should be sent for verification
Please note, (GraphQL) Update person refers to this validation.
if person’s data match any of the following rules:
validate all Rules 01-05
Person has OFFLINE auth method
if create Person process, check Request
if update Person process, check within MPI.person_athentication_methods tablePerson's age >= no_self_auth_age and no_tax_id = true (check in Request)
Person's age >= no_self_auth_age and Person’s tax_id is invalid (i.e. not match with birth date or gender or invalid checksum) (check in Request)
Person’s age < no_self_auth_age and has document with type BIRTH_CERTIFICATE_FOREIGN (check in Request)
Person’s age >= no_self_auth_age and has document with type PERMANENT_RESIDENCE_PERMIT (check in Request)
then
manual verification is needed
Set
MPI.persons.verification_status
=VERIFICATION_NEEDED
andSet
MPI.persons.verification_reason
=RULES_TRIGGERED
andCreate StateChangeEvent in event manager with new verification status
else
person will be verified with Registers
Set
MPI.persons.verification_status
=VERIFICATION_NEEDED
andSet
MPI.persons.verification_reason
=RULES_PASSED
andSet
MPI.persons.verification_comment
=NULL
andCreate StateChangeEvent in event manager with new verification status
Submit person on verification
Info |
---|
Please note, (GraphQL) Update person refers to this section. |
Create or update existing record in person_verifications table for a person according to logic in sections below. Also, set:
updated_at = now()
updated_by = user uuid
inserted_at = now() (for new records)
inserted_by = user uuid (for new records)
Manual NHS verification
If person’s data match any of the following rules:
Person has OFFLINE auth method
if create Person process, check Request
if update Person process, check within MPI.person_athentication_methods tablePerson's age >= no_self_auth_age and no_tax_id = true(check in Request)Person's age >= no_self_auth_age and Person’s tax_id is invalid (i.e. not match with birth date or gender or invalid checksum)(check in Request)Person’s age < no_self_auth_age and has document with type BIRTH_CERTIFICATE_FOREIGN (check in Request, within $.person.documents and $.person.confidant_person[:].documents_relationship[:])
Person’s age >= no_self_auth_age and has document with type PERMANENT_RESIDENCE_PERMIT (check in Request)
thenmanual verification is needed. Set to person verification record:
nhs_verification_status = VERIFICATION_NEEDED
nhs_verification_reason = RULES_TRIGGERED
else manual verification is not needed. Set to person verification record:
nhs_verification_status = VERIFIED
nhs_verification_reason = RULES_PASSED
nhs_verification_comment = NULL
DRFO registry verification
Set to person verification record:
drfo_data_id = NULL
drfo_data_result = NULL
drfo_synced_at = NULL
drfo_verification_status = VERIFICATION_NEEDED
drfo_verification_reason = ONLINE_TRIGGERED
Then person will be verified online with DRFO registry via separate process: https://e-health-ua.atlassian.net/wiki/spaces/DRACS/pages/17250713607/DRFO+data+synchronization+for+Persons#Data-flow
DRACS death acts registry verification
Set to person verification record as ready for online verification with DRACS death acts registry:
dracs_death_verification_status = VERIFICATION_NEEDED
dracs_death_verification_reason = ONLINE_TRIGGERED
dracs_death_online_status = READY
Then person will be verified online with DRACS death acts registry via separate process: /wiki/spaces/DRACS/pages/17249763472
Calculate cumulative verification status
Calculate persons cumulative verification status based on persons verification status in each stream: Manual NHS verification, DRFO registry verification, DRACS death acts registry verification according to logic described at https://e-health-ua.atlassian.net/wiki/spaces/DRACS/pages/17250582534/Person+verification+status+model#Cumulative-verification-status:
Set calculated status to persons.verification_status field
Create StatusChangeEvent in event manager with new verification status
Response structure examples
See on API-specificationDescription of the REST API response structure, example
Expand | ||
---|---|---|
| ||
|
...
Response code | HTTP Status code | Message | Internal name | Description | |
---|---|---|---|---|---|
1 | Базові | ||||
2 | 200 | Response |
| ||
3 | 401 | Access token validation failed | |||
4 | 401 | Check that ID in URL exists in the system failed | |||
5 | 403 | Check that patient request belongs to the same legal entity as the user failed | |||
6 | 422 | Incorrect status | |||
7 | 422 | Required property patient_signed was not present | |||
8 | 422 | Signed content does not match the previously created content | |||
9 | 422 | Value is not allowed in enum | |||
10 | |||||
11 | Специфічні | ||||
12 | 422 | Only for active MPI record can be created medication request! |
Post-processing processes
Description of actions performed on data after processing
Technical modules where the method is used
List of pages describing technical modules where the method is used
Page Properties Report | ||||
---|---|---|---|---|
|
...