Purpose
This method is designed to reject previously created Medication dispense.
Key points
Only authenticated and authorized users of legal entity who has created Medication dispense can reject Medication dispense.
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
Update Medication dispense data in OPS DB:
set status = ‘REJECTED’
updated_by = user_id
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