Table of Contents | ||||
---|---|---|---|---|
|
...
This graphQl method is used in Administration panel only
Only authenticated and authorized NHS employee with appropriate scope can verify persons.
If person was marked as NOT VERIFIED by NHS employee - there will be some limitations for such record. It is not possible to create new declaration and some medical events until appropriate changes conducted and documents provided.
NHS employee is obliged to provide comment if he is setting NOT VERIFIED verification status.
Specification
Expand | |||||
---|---|---|---|---|---|
| |||||
|
...
Check it is submitted
in case of error - return 422 ('required property <name/creation_reason> was not present')
Check value is allowed according to https://e-health-ua.atlassian.net/wiki/spaces/RNOKPP/pages/17271129409. Person verification status model_EN .
in case of error - return 422 ('value is not allowed in enum')
Check status transition allowed according to https://e-health-ua.atlassian.net/wiki/spaces/RNOKPP/pages/17271129409 Person verification status model_EN . For transition VERIFICATION_NEEDED to IN_REVIEW it is required to have verification reason = RULES_TRIGGERED, if there are other reasons - an error should be returned.
If transition is allowed then
(if (initial
verificationStatus
=VERIFICATION_NEEDED
and (verificationReason
=RULES_PASSED
or verificationReason =INITIAL
)) thenreturn error, 409 ('Such person can't be transferred into manual verification process')
else
Ok)
else show error
return 409 ('Can\'t update verification status from <old status value> to <new status value>')
...
if verification_status = NOT_VERIFIED
in case of error - return 409 ('verification status comment is required')
Service logic
Set fields person_verifications table (mpi database):
nhs_verification_status = $.verification_status
nhs_verification_comment = $.verification_comment
nhs_verification_reason = MANUAL
updated_by = user_id (from token)
updated_at = current timestamp
Calculate 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/RNOKPPEH/pages/1727112940916755458061/Person+verification+status+model_EN#Cumulative-verification-status :Set calculated status to persons.verification_status field
Create StatusChangeEvent in event manager with new verification status if it was changed
Create StatusChangeEvent in event manager with verification_status