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

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Purpose

This WS is designed to allow NHS employee with assigned appropriate scopes to get DRACS Divorce 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 Divorce Act details.

Specification

 dracsDivorceAct
  "Reads a single `DracsDivorceAct` using its globally unique ID."
  dracsDivorceAct(id: ID!): DracsDivorceAct
type DracsDivorceAct implements Node {
  id: ID!
  databaseId: UUID!
  arRegDate: Date
  arRegNumber: String
  opDate: Date
  arOpName: String
  regNumb: String
  composeDate: String
  composeOrg: String
  isRestore: Int
  mnOldSurname: String
  mnSurname: String
  mnName: String
  mnPatronymic: String
  mnNumident: String
  mnDateBirth: String
  mnCitizenship: Int
  mnCitizenshipAnother: String
  mnDocType: String
  mnDocName: String
  mnSeriesNumb: String
  mnDocDate: String
  mnDocOrgName: String
  mnBirthState: String
  mnBirthRegion: String
  mnBirthDistrict: String
  mnBirthLocalityType: String
  mnBirthLocality: String
  mnState: String
  mnRegion: String
  mnDistrict: String
  mnLocalityType: String
  mnLocality: String
  mnStreet: String
  mnHouse: String
  mnBuildingPart: String
  mnBuildingPartType: String
  mnApartment: String
  wmnOldSurname: String
  wmnSurname: String
  wmnName: String
  wmnPatronymic: String
  wmnNumident: String
  wmnDateBirth: String
  wmnCitizenship: Int
  wmnCitizenshipAnother: String
  wmnDocType: String
  wmnDocName: String
  wmnSeriesNumb: String
  wmnDocDate: String
  wmnDocOrgName: String
  wmnBirthState: String
  wmnBirthRegion: String
  wmnBirthDistrict: String
  wmnBirthLocalityType: String
  wmnBirthLocality: String
  wmnState: String
  wmnRegion: String
  wmnDistrict: String
  wmnLocalityType: String
  wmnLocality: String
  wmnStreet: String
  wmnHouse: String
  wmnBuildingPart: String
  wmnBuildingPartType: String
  wmnApartment: 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_divorce_acts

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

Service logic

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

  2. Render a response according to specification.

  • No labels