Versions Compared

Key

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

Purpose

This WS is designed to block previously created Medication request with indicating block_reason_code and block_reason

...

Page Properties

Link

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

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

Resource

/api/pharmacy/medication_requests/{{id}}/actions/block

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

Scope

medication_request:block_pharm

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

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

Public/Private/Internal

Public

...

  • Validate $.block_reason_code is a value from MEDICATION_REQUEST_BLOCK_REASON dictionary

    • in case of error - return 422 ("value is not allowed in enum").

  • Check that $.block_reason_code is present in PHARMACIST_MEDICATION_REQUEST_BLOCK_REASON_CODES chart parameter for validated user

    • in case of error - return 422 ("Block reason code is not allowed for PHARMACIST").

Dictionaries

  • MEDICATION_REQUEST_BLOCK_REASON

  • MEDICATION_REQUEST_PRIORITY

  • MEDICATION_FORM

  • MEDICATION_UNIT

  • FUNDING_SOURCE

  • MR_BLANK_TYPES

  • PROVIDING_CONDITION

  • eHealth/clinical_impression_patient_categories

  • LICENSE_TYPE

  • MEDICATION_REQUEST_INTENT

  • MEDICATION_REQUEST_CATEGORY

  • eHealth/SNOMED/additional_dosage_instructions

  • eHealth/SNOMED/anatomical_structure_administration_site_codes

  • eHealth/SNOMED/route_codes

  • eHealth/SNOMED/administration_methods

  • eHealth/dose_and_rate

  • eHealth/ucum/units

  • MEDICATION_REQUEST_REJECT_REASON

Processing

  1. Update Medication request in OPS DB:

    1. set is_blocked = true

    2. set block_reason_code = $.block_reason_code

    3. set block_reason = $.block_reason

    4. set updated_by = user_id

    5. set updated_at = now().

  2. Send SMS for person

    1. If Medication request has program with medical program setting medication_request_notification_disabled = true, then don't send SMS.

      Else:

      1. Get authentication_method of person from MPI

      2. If authentication_method == OTP, then send SMS to a person from Medication request:

        1. Generate SMS text

          1. get template from block_template_sms parameter

          2. enrich template with data from Medication request.

        2. Send SMS to a person

  3. Return Medication request data with trimmed information about legal entity, division and employee.

  4. Add new record in Event manager:

field

value

event_type

StateChangeEvent

entity_type

MedicationRequest

entity_id

$.id

properties.is_blocked.new_value

true

event_time

$.update_at

changed_by

$.changed_by

Response structure

Example:

...