Table of Contents |
---|
...
Validate person data according to https://e-health-ua.atlassian.net/wiki/spaces/PCABEH/pages/1741514359817525605954/Rules+to+validate+patient+data#Person-with-confidant
Check that
confidant_person.person_id
is the same person who signed request (confidant_person.person_id
=x-person-id
)in case of error - return 422 ('Confidant person and signer must be the same')
Check
patient_signed
field value equals to ‘true’in case of error - return 422 ('expected true but got false for attribute %{attribute}')
Check
process_disclosure_data_consent
field value equal to ‘true’in case of error - return 422 ('expected true but got false for attribute %{attribute}')
...
Search for existing active person in mpi database with data from person registration request according to existing process, described here https://e-health-ua.atlassian.net/wiki/spaces/EH/pages/589266986/Create+Update+person+request#Search-person
Calculate score of comparison between found active persons and person registration request using existing deduplication process, described here /wiki/spaces/PCAB/pages/17427464424 Deduplication process NEW
Compare found score with PIS_ONLINE_DEDUPLICATION_MATCH_SCORE config parameter, set to ‘0.95’:If one active person with match score > PIS_ONLINE_DEDUPLICATION_MATCH_SCORE was found - save its
person_id
and proceed to https://e-health-ua.atlassian.net/wiki/spaces/PCABEH/pages/1741688024317525605827/PIS.+Confidant+patient+sign-up+registration#Check-confidant-person-relationshipIf more than one active person with match score > PIS_ONLINE_DEDUPLICATION_MATCH_SCORE was found - return 401 ('It is impossible to uniquely identify the person.')
If no active person with match score > PIS_ONLINE_DEDUPLICATION_MATCH_SCORE was found - proceed to https://e-health-ua.atlassian.net/wiki/spaces/PCABEH/pages/1741688024317525605827/PIS.+Confidant+patient+sign-up+registration#Create-person
Result | Actions |
---|---|
One active person with match score > PIS_ONLINE_DEDUPLICATION_MATCH_SCORE was found | |
More than one active person with match score > PIS_ONLINE_DEDUPLICATION_MATCH_SCORE was found |
|
No active person with match score > PIS_ONLINE_DEDUPLICATION_MATCH_SCORE was found |
...
Create new person in mpi database, set values in following tables based on person registration request:
persons
tableperson_phones
tableperson_addresses
tableperson_documents
tableperson_authentication_methods
table
Save signed content to media storage
Submit person on verification - create record in person_verifications table for person_id, set values for each verification stream:
Manual NHS verifiation
if
$.person.confidant_person
exists in person registration request or$.person.documents
contains document with type = 'PERMANENT_RESIDENCE_PERMIT' or$.person.unzr
is not empty and first 8 digits of$.person.unzr
!=$.person.birth_date
set nhs_verification_status = NOT_VERIFIED
set nhs_verification_reason = DOCUMENTS_TRIGGERED
else - scan copies of persons documents are not needed, set verification status according to logic, described here: https://e-health-ua.atlassian.net/wiki/spaces/DRACSEH/pages/17249206422589430849/IL.Sign+person+request+modified+EN#Manualrequest#Manual-NHS-verification
DRFO registry verification - according to logic, described here: https://e-health-ua.atlassian.net/wiki/spaces/DRACSEH/pages/17249206422589430849/IL.Sign+person+request+modified+EN#DRFOrequest#DRFO-registry-verification
DRACS death acts registry verification - according to logic, described here: https://e-health-ua.atlassian.net/wiki/spaces/DRACSEH/pages/17249206422589430849/IL.Sign+person+request+modified+EN#DRACSrequest#DRACS-death-acts-registry-verification
Calculate cumulative person verifiation status according to logic, described here: https://e-health-ua.atlassian.net/wiki/spaces/DRACSEH/pages/17249206422589430849/IL.Sign+person+request+modified+EN#Calculaterequest#Calculate-cumulative-verification-status
Create confidant person relationship
...
If relationship doesn’t exist - Create relationship https://e-health-ua.atlassian.net/wiki/spaces/PCABEH/pages/1741688024317525605827/PIS.+Confidant+patient+sign-up+registration#Create-confidant-person-relationship
...