Versions Compared

Key

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

...

Link

https://ehealthmedicaleventsapi.docs.apiary.io/#reference/device-requests/qualify-device-request-by-id/qualify-device-request-by-id

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

Resource

/api/device_requests/{{device_request_id}}/actions/qualify

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

Scope

device_request:read

Scope для доступу

Components

Devices

Зазначається перелік бізнес компонентів, які використовують цей метод, наприклад: ePrescription

Microservices

Перелік мікросервісів, які використовує метод API, наприклад: Auth, ABAC

Protocol type

REST

Тип протоколу, який використовується запитом, наприклад: SOAP | REST

Request type

POST

Тип запиту API, наприклад: GET, POST, PATCH…

Sync/Async

Sync

Метод є синхронним чи асинхронним?

Public/Private/Internal

Public

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

Input parameters

Input parameter

Values

Type

Description

Example

device_request_id

String

Device request identifier

2848a935-5fd7-48ba-b235-a9b5d475c647

Request structure

See on Apiary

Expand

...

title

...

Request example
Code Block
{
  "location": {
    "identifier": {
      "type": {
        "coding": [
          {
            "system": "eHealth/resources",
            "code": "division"
          }
        ]
      },
      "value": "9183a36b-4d45-4244-9339-63d81cd08d9c"
    }
  },
  "programs": [
    {
      "identifier": {
        "type": {
          "coding": [
            {
              "system": "eHealth/resources",
              "code": "medical_program"
            }
          ]
        },
        "value": "9183a36b-4d45-4244-9339-63d81cd08d9c"
      }
    }
  ]
}

Authorization

  1. Verify the validity of access token

    • in case of error - return 401 (“Invalid access token”) in case of validation fails

  2. Verify that token is not expired

    • in case of error - return 401 (“Invalid access token”)

  3. Check user and client scopes in order to perform this action (scope = 'device_request:read')

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

...

Response structure

See on Apiary

Expand

...

title

...

Response example
Code Block
{
  "meta": {
    "code": 200,
    "url": "http://example.com/resource",
    "type": "object",
    "request_id": "req-adasdoijasdojsda"
  },
  "data": [
    {
      "program_id": "59781de0-2e64-4359-b716-bcc05a32c10f",
      "program_name": "Доступні медичні вироби",
      "status": "INVALID",
      "rejection_reason": "No appropriate participants found for this medical program",
      "participants": [
        {
          "id": "0f2fbf93-3041-4c0d-a3cf-ff558c861df8",
          "device_definition": {
            "id": "3e34da3d-9b8c-4aaf-be8e-24a161279b6a",
            "device_names": [
              {
                "name": "Тест-смужки Accu-Chek Active для глюкометра",
                "type": "user_friendly"
              }
            ],
            "classification_type": "30221",
            "manufacturer": {
              "name": "ПАТ \"Київський вітамінний завод\"",
              "country": "UA"
            },
            "model_number": "M23N76",
            "packaging": {
              "packaging_type": "undefined",
              "packaging_count": 50,
              "packaging_unit": "pcs"
            }
          },
          "reimbursement": {
            "type": "FIXED",
            "percentage_discount": 12.45,
            "reimbursement_amount": 50.98
          },
          "wholesale_price": 25.14,
          "consumer_price": 34.03,
          "reimbursement_daily_count": 5,
          "estimated_payment_amount": 5.15,
          "max_daily_count": 10,
          "registry_number": "REG-1111",
          "start_date": "2019-01-01",
          "end_date": "2019-06-30"
        }
      ]
    }
  ]
}
Expand

...

titleResponse example
Code Block
{
  "meta": {
    "code": "422",
    "url": "http://example.com/resource",
    "type": "object",
    "request_id": "req-adasdoijasdojsda"
  },
  "error": {
    "type": "unverified",
    "message": "Division is not active"
  }
}

HTTP status codes

HTTP status code

Message

What caused the error

 200

 

 

 422