Purpose
This WS is designed to get list of persons that require a decision about its verification by NHSwhich should be verified manually by authorized NHS employee.
Statements
This is a graphQl query method used in Administration panel only.
Only authenticated and authorized NHS employee with appropriate scope can search for unverified personsreview list of persons who according to predefined automatic rules should be verified manually.
User can filter list by search params
...
Page Properties |
---|
|
Link | API paragraph not found | Посилання на Apiary або Swagger | Resource | API paragraph not found | Посилання на ресурс, наприклад: /api/persons/create | Scope | person:read | Scope для доступу | Components | API paragraph not found | Зазначається перелік бізнес компонентів, які використовують цей метод, наприклад: ePrescription | Microservices | API paragraph not found | Перелік мікросервісів, які використовує метод API, наприклад: Auth, ABAC | Protocol type | API paragraph not found | Тип протоколу, який використовується запитом, наприклад: SOAP | REST | Request type | API paragraph not found | Тип запиту API, наприклад: GET, POST, PATCH… | Sync/Async | API paragraph not found | Метод є синхронним чи асинхронним? | Public/Private/Internal | Private | Потрібно зазначити тип методу за ступенем доступності |
|
Expand |
---|
title | unverifiedPersonsQuery |
---|
|
Code Block |
---|
| "Reads and enables pagination through a set of unverified `Person`."
unverifiedPersons(
"A condition to be used in determining which values should be returned by the collection."
filter: UnverifiedPersonFilter
"The method to use when ordering collection items."
orderBy: PersonOrderBy
"Read all values in the set after (below) this cursor."
after: String
"Read all values in the set before (above) this cursor."
before: String
"Only read the first _n_ values of the set."
first: Int
"Only read the last _n_ values of the set."
last: Int
): PersonConnection!
"""
Fields to filter unverified Persons
"""
input UnverifiedPersonFilter {
"Cumulative verification "Values to show whether person is unverified"
verificationStatus: UnverifiedPersonStatus
}
"""
status"
verificationStatus: UnverifiedPersonStatus
"Verification status according to DRACS death acts"
dracsDeathVerificationStatus: UnverifiedPersonStatus
"Verification reason according to DRACS death acts"
dracsDeathVerificationReason: PersonDracsVerificationReason
"Verification status according to manual rules"
manualRulesVerificationStatus: UnverifiedPersonStatus
"Option to filter persons who need verification by specific stream: DRACS or manual rules"
streamOption: PersonVerificationStreamOption
}
"""
List of values to filter persons by specific stream: DRACS or manual rules.
"""
enum PersonVerificationStreamOption {
"Filter persons who need to be verified by DRACS stream."
NEED_TO_BE_VERIFIED_BY_DRACS_STREAM
"Filter persons who need to be verified by manual rules stream."
NEED_TO_BE_VERIFIED_BY_MANUAL_RULES_STREAM
}
"""
List of person verification statuses. According to PERSON_VERIFICATION_STATUSES dictionary
"""
enum PersonVerificationStatus {
"Status `IN_REVIEW` for a person."
IN_REVIEW
"Status `NOT_VERIFIED` for a person."
NOT_VERIFIED
"Status `VERIFICATION_NEEDED` for a person."
VERIFICATION_NEEDED
"Status `VERIFIED` for a person."
VERIFIED
}
"""
List of values of `PersonVerificationStatus` that represent persons who has no decision about verification yet.
"""
enum UnverifiedPersonStatus {
"Status `VERIFICATION`IN_NEEDED`REVIEW` for an unverified person."
VERIFICATION_NEEDED
"Status `IN_REVIEW`IN_REVIEW
"Status `NOT_VERIFIED` for an unverified person."
NOT_VERIFIED
"Status `VERIFICATION_NEEDED` for an unverified person."
VERIFICATION_NEEDED
IN_REVIEW
} |
|
Logic
Get list of records from persons table (mpi db):
with verification status VERIFICATION_NEEDED
(with reason RULES_TRIGGERED
) or IN_REVIEW
, additionally filtered by search params and
which have is_active
= true
and
status
= active
Render list with Person data according to schema.
Request structure
API paragraph not found
}
"""
List of person verification status reasons. According to PERSON_VERIFICATION_STATUS_REASONS dictionary
"""
enum PersonVerificationReason {
"Verification reason `AUTO` for a person."
AUTO
"Verification reason `AUTO_OFFLINE` for a person."
AUTO_OFFLINE
"Verification reason `AUTO_ONLINE` for a person."
AUTO_ONLINE
"Verification reason `INITIAL` for a person."
INITIAL
"Verification reason `MANUAL` for a person."
MANUAL
"Verification reason `MANUAL_CONFIRMED` for a person."
MANUAL_CONFIRMED
"Verification reason `MANUAL_NOT_CONFIRMED` for a person."
MANUAL_NOT_CONFIRMED
"Verification reason `OFFLINE_VERIFIED` for a person."
OFFLINE_VERIFIED
"Verification reason `ONLINE_TRIGGERED` for a person."
ONLINE_TRIGGERED
"Verification reason `RULES_PASSED` for a person."
RULES_PASSED
"Verification reason `RULES_TRIGGERED` for a person."
RULES_TRIGGERED
}
"""
List of values of `PersonVerificationReason` that represent reasons for persons who are not verified by DRACS stream.
"""
enum PersonDracsVerificationReason {
"Verification reason `AUTO_OFFLINE` for a person."
AUTO_OFFLINE
"Verification reason `AUTO_ONLINE` for a person."
AUTO_ONLINE
"Verification reason `MANUAL` for a person."
MANUAL
"Verification reason `MANUAL_CONFIRMED` for a person."
MANUAL_CONFIRMED
"Verification reason `MANUAL_NOT_CONFIRMED` for a person."
MANUAL_NOT_CONFIRMED
"Verification reason `ONLINE_TRIGGERED` for a person."
ONLINE_TRIGGERED
} |
|
Authorize
Verify the validity of access token
in case of error return 401 ('Access denied')
Check user scope person:read in order to perform this action
Search params
There is following search parameters allowed:
verificationStatus. Search by cumulative verification statuses: IN_REVIEW
, VERIFICATION_NEEDED
, NOT_VERIFIED
dracsDeathVerificationStatus. Search by DRACS verification statuses: IN_REVIEW
, VERIFICATION_NEEDED
, NOT_VERIFIED
dracsDeathVerificationReason. Search by DRACS verification reasons: MANUAL_CONFIRMED
, MANUAL_NOT_CONFIRMED
.
manualRulesVerificationStatus. Search by NHS manual rules verification statuses: IN_REVIEW
, VERIFICATION_NEEDED
, NOT_VERIFIED
streamOption. Select persons who:
NEED_TO_BE_VERIFIED_BY_DRACS_STREAM
option - show persons who need to be verified by DRACS stream only
NEED_TO_BE_VERIFIED_BY_MANUAL_RULES_STREAM
option - show persons who need to be verified by manual rules stream only
without filter
Service logic
Get list of records from persons table (mpi db):
Persons who need NHS verification by DRACS stream:
with dracs_death_verification_status in IN_REVIEW
OR with dracs_death_verification_status in NOT_VERIFIED
:
OR with dracs_death_verification_status VERIFICATION_NEEDED
(with reasons: MANUAL_CONFIRMED
, MANUAL_NOT_CONFIRMED
)
OR Persons who need NHS verification by manual rules stream:
with nhs_verification_status IN_REVIEW
OR with nhs_verification_status VERIFICATION_NEEDED
(with reason RULES_TRIGGERED
)
OR with drfo_verification_status NOT_VERIFIED
additionally filtered by search params
AND which have is_active
= true
AND status
= active
Render list with Person data according to schema.
Request structure
API paragraph not found
API paragraph not found
...
Extract client_id from token.
Check client has scope person:read
Check legal entity type = NHS
Processing
There There is following search parameters allowed:
verificationStatus. Search by verification status values: VERIFICATION_NEEDED
(with reason RULES_TRIGGERED
), IN_REVIEW
(with any reason).
Comment: for optimal code selection is conducted on wider clause, such as VERIFICATION_NEEDED, IN_REVIEW with any of these two reasons: RULES_TRIGGERED
, MANUAL.
Response structure
...