Table of Contents |
---|
Status
Page Properties | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Purpose
This WS is design to update flags "is_active" for Medical Program.
APIary
...
Purpose validation: Check on active program medication. Only medical program without active program medication can 't be deactivated. In case on existing active program medication linked with medical program error must be shown.
- Check exist `program_medication` by $.medical_program_id=$.id & `is`is_active`= falsefalse
- if invalid - return 409 error (message: "There are This program has active participants on this program. Only medical programs without participants can be deactivated.")
Validate PK Program Medications
...
Check exist `Medical_program` by $.id.
if invalid - return 404 error (message: "Medical program with id={$.id} doesn't exist.")
Validate status
...
- if invalid - return 409 error (message: "Medical program is not active and can't be deactivated again")
Deactivate Program Medications
Update medical program record by $.id set values:
Destination | Source |
---|---|
is_active | FALSE |
updated_at | :timestamp |
updated_by | user_id |
Prepare & return response data structure
...