Table of Contents | ||||
---|---|---|---|---|
|
Purpose
...
This WS is designed to create new innm dosage (post).
Specification
...
Page Properties | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Logic
...
This method is used to create INNM Dosage. Fields descriptions are listed in request Example view.
Request structure
...
See on Apiary
Example:
Expand | ||
---|---|---|
| ||
|
Authorize
...
Verify the validity of access token
Check user scope (scope = 'innm_dosage:write') in order to perform this action
In case error - generate 401 response
Request to process the request using a token in the headers
Headers
...
Наприклад:
Content-Type:application/json
Authorization:Bearer c2778f3064753ea70de870a53795f5c9
Request data validation
...
Validate FK
Purpose validation: Check on existing Inmm/Innm dosage in ingredients
...
Validate request using JSON schemas (new_medication_type_innm_dosage_schema.json):
Return 422 with list of validation errors in case validation fails (422 EView)
Processing
...
Create new Medication
Create new record in Medications
Fill data
...
Destination | Source |
id | |
dosage | Ing.dosage |
parent_id | med_id |
innm_id | Ing.innm_id |
medication_id | NULL |
is_primary | Ing.is_primary |
inserted_at | :timestamp |
inserted_by | user_id |
updated_at | :timestamp |
updated_by | user_id |
Response structure
...
See on Apiary
Example:
Expand | ||
---|---|---|
| ||
|
Expand | ||
---|---|---|
| ||
|
...
API paragraph not found
HTTP status codes
...
Page Properties | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
...