Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Purpose

This method is designed to reject previously created Medication dispense.

Key points

  1. Only authenticated and authorized users of legal entity who has created Medication dispense can reject Medication dispense.

  2. Medication dispense can be rejected only from ‘NEW' status.

Specification

Page Properties

Link

https://ehealthmisapi1.docs.apiary.io/#reference/public.-reimbursement/medication-dispense/reject-medication-dispense-by-pharmacy-user

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

Resource

/api/pharmacy/medication_dispenses/{{id}}/actions/reject

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

Scope

medication_dispense:reject

Scope для доступу

Components

ePrescription

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

Microservices

API paragraph not found

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

Protocol type

REST

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

Request type

PATCH

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

Sync/Async

Sync

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

Logic

  1. Update Medication dispense data in OPS DB:

    1. set status  =  ‘REJECTED’

    2. updated_by = user_id

    3. updated_at = now().

...

Page Properties

HTTP status code

Message

What caused the error

200

Response

 

401

Invalid access token

 

403

Your scope does not allow to access this resource. Missing allowances: medication_dispense:reject.

404

Not found

  • Medication dispense exists in DB (OPS) check fails.

  • Medication dispense belongs to legal entity check fails.

  • In case employee didn’t create medication dispense.

409

Can't update medication dispense status from {status} to REJECTED

Backward compatibility

API paragraph not found