Versions Compared

Key

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

Table of Contents

Status

Apiary
JSON Schema request

Status
colourRed
titleSPECS

JSON Schema response
Status
colourRed
titlespecs

Purpose

This WS  is design to update reimbursement and/or flags "is_active", "medication_request_allowed" for Medication brand within Medical program. 

WS logic

Authorize

  1. Verify the validity of access token
    1. In case of error - generate 401 response
  2. Check user scope (scope = 'program_medication:write') in order to perform this action
    1. In case of error - generate 403 response

...

    1. if invalid  - return 409 eror (message: "Medication brand within the program is inactive")

...

To deactivate Participant (to update is_active == FALSE for medication brand within the program with id={id}) medical_request_allowed must be inactive (medical_request_allowed == FALSE) 

...

    1. if invalid  - return 409 eror (message: "To deactivate medication brand within the program firstly disable medical_request_allowed")

Update Program medication

...

Destination

Source

Description
reimbursement$.reimbursement
wholesale_price$wholesale_price
consumer_price$consumer_price
daily_dosage$daily_dosage
reimbursement_daily_dosage$reimbursement_daily_dosage
estimated_payment_amount$estimated_payment_amount
is_active

$.is_active


medical_request_allowed$.medical_request_allowed
inserted_at:timestampGet current date-time
inserted_byuser_idExtract user from token
updated_at:timestampGet current date-time
updated_byuser_idExtract user from token