Versions Compared

Key

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

Table of Contents

Status

Page Properties


Specification

Status
colourGreen
titledone

Apiary
Status
colourGreen
titledone
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 within Medical_program. 

Specification

Apiary                                      

...

  1. Validate request using JSON schemas:
    1. Return 422 with list of validation errors in case validation fails (422 EView)

Validate PK Program

...

Medications

1. Check participant Program_medication ($.id) exists in PRM.medications

In case of error - return 422 error (message: "ID for Medication within the Medical program is not found")

...

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

...

To deactivate Participant (to update is_active == FALSE for medication 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 within the program firstly disable medical_request_allowed")

Update Program Medication

...

Destination

Source

Description
reimbursement$.reimbursement
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