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

RC_(GraphQL) Get DRACS Change Name Act details (DRACS 2.0)

Purpose

This WS is designed to allow NHS employee with assigned appropriate scopes to get DRACS Change Name Act details

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 DRACS Change Name Act details.

Specification

"Reads a single `DracsChangeNameAct` using its globally unique ID." dracsChangeNameAct(id: ID!): DracsChangeNameAct
type DracsChangeNameAct implements Node { id: ID! databaseId: UUID! arRegDate: Date arRegNumber: String opDate: Date arOpName: String regNumb: String composeDate: String composeOrg: String isRestore: Int oldSurname: String oldName: String oldPatronymic: String newSurname: String newName: String newPatronymic: String numident: String dateBirth: String sex: String citizenship: Int citizenshipAnother: String docType: String docName: String seriesNumb: String DocDate: String DocOrgName: String BirthState: String BirthRegion: String BirthDistrict: String BirthLocalityType: String BirthLocality: String State: String Region: String District: String LocalityType: String Locality: String Street: String House: String BuildingPart: String BuildingPartType: String Apartment: String }

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 = 'person: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')

  • Check client type (type = NHS)

    • In case of error - return 403 ('You don't have permission to access this resource')

Validate request

Validate $.id

Check id is ID from mimir.dracs_change_name_acts

  • in case of error, return 404, "Such Change Name Act doesn't exist"

Service logic

  1. Get Divorce Act data from mimir.dracs_change_name_acts by id

  2. Render a response according to specification.

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