Table of Contents |
---|
...
Input parameters (filters)
- name
- start_at
- route
- container_dosage info
- package_qty
- package_min_qty
- code_ATX
- manufacturer_name_country info
- certificate
- expired_certificate_date
- ingridients info
- innm_id
- dosage info
- is_active_substance
Authorize
- Verify the validity of access token
- Check user scope (scope = 'medication:write') in order to perform this action
- In case error - generate 401 response
...
Validate request using JSON schema (link !!! TBD)
Validate Innm
...
Purpose validation: Check on existing Innm in ingridients
Check exist Innm by $.ingridients[].innm_id.
if invalid - return 422 error (message: "
Duplicate innm identifierInnm in ingridients not found!")
Validate Dosage & Container dosage
...
Check exist any Denum unit from Dosage ($.ingridients[].dosage.denumerator_unit) with Denum unit Container dosage ($.container_dosage.denumerator_unit).
if invalid - return 422 error (message: "Denum unit from Dosage ingridients must be is equal Denum unit from Container dosage medication!")
Create
...
new Medication
- Create new record in medications
- Fill data
Destination | Source |
---|---|
id | |
name | $.name |
innm_identifier | $.innm_identifier |
status | INACTIVE |
is_active | TRUE |
inserted_at | :timestamp |
inserted_by | user_id |
updated_at | :timestamp |
updated_by | user_id |