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

RC_(GraphQL) Get UNZR info (DMS)

Purpose

This WS is designed to allow NHS employee with assigned appropriate scopes to get related information about person’s unzr from eHealth (MIMIR db), that in turn was received from EIS MVS register by a job.

Key points 

  1. This is a graphQl query method used in Administration panel only.

  2. Only authenticated and authorized NHS employee with appropriate scope can get person’s information related to unzr.

  3. The method gets result of a Job triggered by RC_(GraphQL) Sync UNZR info (DMS) mutation, that stored in unzr_info table (MIMIR db)

 

Specification

"Gets an info related to unzr stored in MIMIR DB after it was got by the job from EIS MVS register." unzrInfoRegister(unzr: String!): 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 **person: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 "Date and time of the last syncronization" syncedAt: DateTime "Date and time when record was inserted" insertedAt: DateTime! "Identifier of the user who created the record" insertedBy: UUID! "Date and time when the record was changed" updatedAt: DateTime! "Identifier of the user who changed the record" updatedBy: UUID! } """ 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 }

Authorize

  • 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 = 'unzr:read')

    • Return (403, 'Your scope does not allow to access this resource. Missing allowances: person:read') 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. Get unzr_info record (MIMIR DB)

  2. Render and return UnzrInfo node in response

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