/
Update Person verification status

ЕСОЗ - публічна документація

Update Person verification status

Purpose

This WS allows to update current verification status of specified person. Now updating of DRACS death stream verification status is allowed.

Specification

Apiary

Authorization

  • Verify the validity of access token

    • Return (401, 'Invalid access token') in case of validation fails

  • Verify that token is not expired

    • in case of error - return (401, 'Invalid access token')

  • Check user scopes in order to perform this action (scope = 'person_verification:write')

    • Return (403, 'Your scope does not allow to access this resource. Missing allowances: person_verification:write') in case of invalid scope(s)

Validations

Validate schema

  1. Validate request according to JSON Schema

    • Check presence of extra parameters

      • In case of error - return 422 ('schema does not allow additional properties')

    • Check presence of required parameters

      • In case of error - return 422 ('required property %{property} was not present')

Validate DRACS verification status

  1. Validate $.dracs_death.verification_status

    • Check if $.dracs_death.verification_status value is "NOT_VERIFIED" (from PERSON_VERIFICATION_STATUSES dictionary)

      • In case of error - return 422 error ("value is not allowed in enum")

Validate DRACS verification reason

  1. Validate $.dracs_death.verification_reason

    • Check if $.dracs_death.verification_reason value is MANUAL_CONFIRMED or MANUAL_NOT_CONFIRMED from PERSON_VERIFICATION_STATUS_REASONS dictionary

      • in case of error - return 422 ("verification reason (<$.dracs_death.verification_reason>) is not allowed for person DRACS death status")

Validate Patient

  • Get Patient identifier from the URL

  • Check it exists in mpi DB, persons table

    • Return 404 ('not found') in case of error

  • Check if person verification record exists in mpi.person_verifications table

    • Return 404 ('not found') in case of error

  • Check if person.dracs_death.verification_status is equal to “VERIFICATION_NEEDED”

    • in case of error - return 422 (“verification details for person in <person.dracs_death.verification_status> status can not be updated)

Service logic

  • Set person DRACS verification status to mpi.person_verifications table:

    • person.dracs_death_verification_status = $.dracs_death.verification_status

    • person.dracs_death_verification_reason = $.dracs_death.verification_reason

    • person.dracs_death_verification_comment = $.dracs_death.verification_comment

  • 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 Person verification status model_EN :

    • Set calculated status to persons.verification_status field

    • Create StatusChangeEvent in event manager with new verification status if it was changed

  • Render a response according to specification

 

Related content

RC_(CSI-2672) Update Person verification status
RC_(CSI-2672) Update Person verification status
More like this
Person verification status model_EN
Person verification status model_EN
Read with this
RC_Update Person verification status (DRACS 2.0)
RC_Update Person verification status (DRACS 2.0)
More like this
Get Person verification details
Get Person verification details
Read with this
Процеси роботи з ручною верифікацією пацієнта
Процеси роботи з ручною верифікацією пацієнта
Read with this
Scopes model
Scopes model
Read with this

ЕСОЗ - публічна документація