Purpose

This WS allows to deactivate forbidden group from Admin panel. The group will be deactivated with the all included items.

Key points

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

  2. Only authenticated and authorized NHS employee with appropriate scope can deactivate a Forbidden group.

  3. Forbidden group should be deactivated with DS.

  4. Only active groups can be deactivated.

  5. If deactivate a group than all included items deactivates too

Specification

Document status

PROD

Resource

/graphql

Посилання на Apiary або Swagger

Resource

API paragraph not found

Посилання на ресурс, наприклад: /api/persons/create

Scope

forbidden_group:write

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

Потрібно зазначити тип методу за ступенем доступності

"""
Input for `deactivateForbiddenGroup` mutation.
User must have a scope **forbidden_group:write**
"""
input DeactivateForbiddenGroupInput {
  "The ID of a `ForbiddenGroup` to deactivate."
  id: ID!
  "Reason for deactivating the `ForbiddenGroup`."
  deactivationReason: String!
}

"""
Return type for `deactivateForbiddenGroup` mutation.
"""
type DeactivateForbiddenGroupPayload {
  "Deactivated `ForbiddenGroup`."
  forbiddenGroup: ForbiddenGroup
}

Logic

  1. Save signed content to media storage

  2. Update data:

    1. forbidden_groups table

      1. set is_active = false

      2. set deactivation_reason = $.deactivation_reason

      3. set updated_at, updated_by

    2. Deactivate each active item in the group. Set item deactivation_reason = group deactivation_reason

Request structure

API paragraph not found

Authorize

Headers

API paragraph not found

Request data validation

Validate legal entity

Validate Digital Sign

Validate request

Processing

 API paragraph not found

Response structure

 API paragraph not found

Post-processing processes

 API paragraph not found

HTTP status codes

API paragraph not found