Versions Compared

Key

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

Purpose

This WS is designed to sign Request fo Medication request (patch). If successful signed - automatically create Medication request.

Key points

  1. Only authenticated and authorized users with appropriate scope can Sign Medication request Request (MRR)

  2. Request should be signed with DS.

  3. MRR data should be changed when it has been submitted to the method.

Specification

...

Project Name

...

Електронний рецепт

...

COVID-certificate

...

Project abreviation

...

ePrescription

...

SVC

...

Developer

...

Edenlab

...

Розробник методу API. Наприклад, Edenlab

...

Project Manager

...

Mari Hulko (Unlicensed)

...

Tech Lead

...

Mynchenko Andrii (SoE eHealth)

...

Product Owner

...

Igor Kostyria

...

Вusiness analyst

...

Iryna Lishtaba (SoE eHealth) Oleksandr Zhuk (SoE eHealth) Oksana Demchenko

...

Status

Status
colourGreen
titleAPPROVED
Status
colourGreen
titleAPPROVED

...

Version

...

API paragraph not found

...

1.0

...

Date of release

...

PROD

...

Table of Contents

Purpose

This WS is designed to sign Request fo Medication request (patch). If successful signed - automatically create Medication request.

Key points

  1. Only authenticated and authorized users with appropriate scope can Sign Medication request Request (MRR)

  2. Request should be signed with DS.

  3. MRR data should be changed when it has been submitted to the method.

Specification

Page Properties

Link

https://ehealthmisapi1.docs.apiary.io/#reference/public.-reimbursement/medication-request-requests/sign-medication-request-request

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

Resource

/api/medication_request_requests/{{id}}/actions/sign

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

Scope

medication_request_request:sign

Зазначається потрібний scopeScope для доступу

Components

ePrescription

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

Microservices

API paragraph not found

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

Protocol type

REST

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

Request type

PATCH

Тип HTTP методу, який використовується запитом, запиту API, наприклад: GET, POST | GET…, PATCH…

Sync/Async

Sync

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

Logic

Method receives signed message (pkcs7) including signed content, digital signature and signer public key in signed_content property. All signature fields will be validated (including signer certificate authority).

...

Destination

Source

id

request_number

<rd>.request_number

verification_code

<rd>.verification_code

created_at

<rd>.created_at

started_at

<rd>.started_at

ended_at

<rd>.ended_at

dispense_valid_from

<rd>.dispense_valid_from

dispense_valid_to

<rd>.dispense_valid_to

person_id

<rd>.person_id

employee_id

<rd>.employee_id

division_id

<rd>.division_id

medication_id

<rd>.medication_id

medication_qty

<rd>.medication_qty

medical_program_id

<rd>.medical_program_id

status

ACTIVE

is_active

true

recall_at

NULL

recalled_by

NULL

recall_reason

NULL

request_for_medication_request_id

$.id

inserted_at

:timestamp

inserted_by

user_id

updated_at

:timestamp

updated_by

user_id

intent

<rd>.intent

category

<rd>.category

context

<rd>.context

dosage_instructions

<rd>.dosage_instructions

container_dosage

<rd>.container_dosage

priority

<rd>.priority

prior_prescription

<rd>.prior_prescription

Generate printout form

Invoke ael.api in order to render MEDICATION_REQUEST_TEMPLATE

...

Parameter

Source

<%=get_in(assigns, ~w(request_number)a) %>

bar code

<%= render_barcode(assigns[:request_number], xdim: 2, margin: 0) %>

request_number

<%=get_in(assigns, ~w(created_at)a) %>

created_at

<%=get_in(assigns, ~w(dispense_valid_to)a) %>

dispense_valid_to

<%=get_in(assigns, ~w(program name)a) %>

program.name

<%=get_in(assigns, ~w(person short_name)a) %>

person.short_name

<%=get_in(assigns, ~w(person age)a) %>

person.age

<%=get_in(assigns, ~w(medication name)a) %>

medication.name

<%=get_in(assigns, ~w(medication_qty)a) %>

medication_qty

<%=get_in(assigns, ~w(started_at)a) %>

started_at

<%=get_in(assigns,~w(ended_at)a) %>

ended_at

<%=get_in(assigns, ~w(dosage_instruction_text)a) %>

dosage_instruction_text

<%=get_in(assigns, ~w(employee short_name)a) %>

employee.short_name

<%=get_in(assigns, ~w(employee phone_number)a) %>

employee.phone_number

<%=get_in(assigns, ~w(legal_entity name)a) %>

legal_entity.name

<%=get_in(assigns, ~w(division name)a) %>

 

division.name

<% division_address = get_in(assigns, ~w(division address)a) %>

 

Expand

<%=Keyword.get(division_address, :zip) %>
<%=Keyword.get(division_address, :street_type) %>
<%=if Keyword.get(division_address, :street) do %>
<%=Keyword.get(division_address, :street) %>, <% end %>
<%=if Keyword.get(division_address, :building) do %> буд.
<%=Keyword.get(division_address, :building) %>, <% end %>
<%=if Keyword.get(division_address, :apartment) do %> кв.
<%=Keyword.get(division_address, :apartment) %>, <% end %>
<%=Keyword.get(division_address, :settlement_type) %>
<%=if Keyword.get(division_address, :settlement) do %>
<%=Keyword.get(division_address, :settlement) %>, <% end %>
<%=if Keyword.get(division_address, :region) do %>
<%=Keyword.get(division_address, :region) %> район, <% end %>
<%=if Keyword.get(division_address, :area) do %>
<%=Keyword.get(division_address, :area) %> область <% end %>

legal_entity.address

<%=get_in(assigns, ~w(legal_entity edrpou)a) %>

legal_entity.edrpou

<% legal_entity_license = get_in(assigns, ~w(legal_entity license)a) %>

legal_entity.license

<%=Keyword.get(legal_entity_license, :license_number) %>

legal_entity.license.license_number

<%=Keyword.get(legal_entity_license, :what_licensed) %>

legal_entity.license.what_licensed

<%=Keyword.get(legal_entity_license, :issued_date) %>

legal_entity.license.issued_date

<%=Keyword.get(legal_entity_license, :issued_by) %>

legal_entity.license.issued_by

<%=Keyword.get(legal_entity_license, :active_from_date) %>

legal_entity.license.active_from_date

<%=Keyword.get(legal_entity_license, :expiry_date) %><

legal_entity.license.expiry_date

<%=Keyword.get(legal_entity_license, :order_no) %>

legal_entity.license.order_no

<%=get_in(assigns,
~w(person authentication_method)a) %>

person.authentication_method

<%=get_in(assigns, ~w(program mr_blank_type)a) %>

program.mr_blank_type

getFromDictionary(<rd>.container-dosage.unit;'MR_BLANK_TYPES')

<%=get_in(assigns, ~w(program funding_source)a) %>

 

Code Block
<% funding_source = get_in(assigns, ~w(program funding_source)a) %>
   <%= if funding_source = "PERSON" do %>повна оплата пацієнтом<% else if funding_source in ["NHS", "LOCAL"]) %>з доплатою/безоплатно<% else %><% end %>

 

program.funding_source

 

 

Code Block
<%= if funding_source == "PERSON" do %><% else %><%= if funding_source in ["NHS", "LOCAL"] do %>
    <tr>
        <td>Власник програми:</td>
        <td><%=get_in(assigns, ~w(program funding_source_text)a) %></td>
    </tr>
<% end %><% end %>

program.funding_source_text

if {program.funding_source}<>"PERSON" then

getFromDictionary({program.funding_source},'FUNDING_SOURCE)'

else ""

endif

<%=get_in(assigns, ~w(person age_unit)a) %>

person.age_unit

returns in years ("р.")

<%=get_in(assigns, ~w(medication innm_primary_denumerator_unit)a) %>

medication.innm_primary_denumerator_unit

getFromDictionary({innm_primary.dosage.denumerator_unit};'MEDICATION_UNIT'),

<%=get_in(assigns, ~w(container_dosage value)a) %>

container_dosage.value

<rd>container_dosage.value

<%=get_in(assigns, ~w(container_dosage unit)a) %>

container_dosage.unit

getFromDictionary(<rd>container_dosage.unit;'MEDICATION_UNIT')

Medication request form example: 

...

Code Block
UPDATE medication_request_requests SET status = 'SIGNED' WHERE id = {:id}

Send SMS for person 

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

Else:

  1. Get authentication_method of MPI

  2. If authentication_method == OTP -  send SMS:

    1. Generate text SMS (call Man method- templates rendering service with template "TEMPLATE_SMS_FOR_SIGN_MEDICATION_REQUEST".

    2. Sending SMS for MPI

  3. If authentication_method == OFFLINE (or medication_request_notification_disabled = true) -  set medication_request_request.verification_code to MEDICATION_REQUEST_TEMPLATE

...