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

RC_(GraphQL) Sync UNZR info (DMS)

Purpose

This WS is designed to allow NHS employee with assigned appropriate scopes to trigger a job that will get related information about person’s unzr from EIS MVS register and store it in eHealth.

Key points 

  1. This is a graphQl mutation used in Administration panel only.

  2. Only authenticated and authorized NHS employee with appropriate scope can trigger a job to get data from EIS MVS register.

  3. The mutation triggers a Job to get updated info from EIS MVS register into eHealth. Status and result of such request could be obtained by RC_(GraphQL) Get UNZR info (DMS) in any time.

Specification

"Triggers an oban job to get an info related to unzr from EIS MVS register." syncUnzrInfoRegister(unzr: string!, unzr: ID!): UnzrInfo
""" Input for `syncUnzrInfoRegister` mutation. User must have a scope **unzr:write** """ input SyncUnzrInfoRegisterInput { "unzr value" unzr: String! } """ Return type for `syncUnzrInfoRegister` mutation. """ type SyncUnzrInfoRegisterPayload { "An information related to unzr." unzrInfo: UnzrInfo } """ UnzrInfo data contains all information related to the unzr from EIS MVS register and status of its request. Describes respons of `unzr` - external Trembita service. In order to obtain this data user must have a scope **unzr:read** """ type UnzrInfo implements Node { "The ID of an object." id: ID! "Primary key identifier from the database." databaseId: UUID! "unzr value" unzr: String! "Job status" jobStatus: String! "Information related to unzr" info: UnzrInfoDetails } """ Detailed information related to unzr from EIS MVS register """ type UnzrInfoDetails { "First name" firstName: String "Last name" lastName: String "Middle name" middleName: String "Tax identigfier" rnokpp: String "Gender" gender: String "Date of birth" dateBirth: String "Document" documents: UnzrInfoDocument } """ Information about documments returned fron EIS MVS register bu unzr """ type UnzrInfoDocument { "Document type" type: UnzrInfoDocumentType "Document number" number: String "Document series" series: String "Document issue date" dateIssue: String "Document expiry date" dateExpiry: String } """ Type of documents returned from EIS MVS register by unzr """ enum UnzrInfoDocumentType { "Passport in form of ID card" ID "Foreign passport" P }

Authorization

  • Verify the validity of access token

    • in case of error - 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 = 'unzr:write')

    • in case of error - return 403 (“Your scope does not allow to access this resource. Missing allowances: person:verify”) in case of invalid scope(s)

Validate legal entity

  • Extract client_id from token.

  • Check legal entity status (status = ACTIVE)

    • In case of error - return 409 ('client_id refers to legal entity that is not active')

Validate request

1. unzr

Validate value in the field unzr, string, required

  • Check it is submitted

    • in case of error - return 422 ('required property <property name> was not present')

Service logic

  1. Run the RC_UNZR info synchronization (DMS) job

  2. Return UnzrInfo node in response

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