Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

...

Page Properties

Link

graphQl method

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

Resource

graphQl method

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

Scope

diagnoses_group:write

Scope для доступу

Components

Medical events

Зазначається перелік бізнес компонентів, які використовують цей метод, наприклад: 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

Internal

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

Expand
titleSpecification deactivateDiagnosesGroup
Code Block
languagegraphql
"Deactivates a single `DiagnosesGroup` using its globally unique ID."
  deactivateDiagnosesGroup(
    input: DeactivateDiagnosesGroupInput!
  ): DeactivateDiagnosesGroupPayload
Code Block
languagegraphql
"""
Input for `deactivateDiagnosesGroup` mutation.
User must have a scope **diagnoses_group:write**
"""
input DeactivateDiagnosesGroupInput {
  "Globally unique ID of the `DiagnosesGroup` which should be deactivated."
  id: ID!
}
Code Block
languagegraphql
"""
Return type for `deactivateDiagnosesGroup` mutation.
"""
type DeactivateDiagnosesGroupPayload {
  "Deactivated `DiagnosesGroup`."
  diagnosesGroup: DiagnosesGroup
}

...

  1. Update data:

    1. diagnoses_groups table

      1. set is_active = false

      2. set deactivation_reason = $.deactivation_reason

      3. set updated_at, updated_by

  2. Deactivate all approvals with approval.diagnoses_group_id = $.diagnoses_group_id

Authorize

  • 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 = 'diagnoses_group:write')

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

...