You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 12
Next »
Purpose*
This WS is designed to return INNM detail.
Specification*
Logic*
Method returns Medication details by ID.
Input parameter | Values | Type | Description | Example |
---|
id | | String | | d290f1ee-6c54-4b01-90e6-d701748f0851
|
Request structure*
API paragraph not found
Authorize*
Request to process the request using a token in the headers
Наприклад:
Request data validation*
Validate PK Medication
Purpose validation: Check on existing Medication record
Check exist Medication by $.id.
if invalid - return 404 error (message: "Medication is not found!")
Validate type
Purpose validation: Medication should be necessary type
Validate `type` == MEDICATION
if invalid - return 409 eror (message: "Type of record by id is not MEDICATION !")
Processing*
Logic WS
Verify the validity of access token
Check user scopes in order to perform this action (scope = 'medication:read')
Response structure*
See on Apiary
Example:
Response example
{
"meta": {
"code": 200,
"url": "https://example.com/resource",
"type": "object",
"request_id": "req-adasdoijasdojsda"
},
"data": {
"id": "09b2bffb-699a-43c0-bc9a-5066d9b9b5a8",
"name": "Амідарон",
"manufacturer": {
"name": "ПАТ \"Київський вітамінний завод\"",
"country": "UA"
},
"code_atc": [
"М01АЕ01",
"C01BD01"
],
"form": "PILL",
"container": {
"numerator_unit": "PILL",
"numerator_value": 1,
"denumerator_unit": "PILL",
"denumerator_value": 1
},
"package_qty": 30,
"package_min_qty": 10,
"daily_dosage": "12",
"certificate": "UA/4514/01/01",
"certificate_expired_at": "2021-02-09",
"ingredients": [
{
"id": "1349a693-4db1-4a3f-9ac6-8c2f9e541982",
"name": "Амідарон",
"dosage": {
"numerator_unit": "MG",
"numerator_value": 200,
"denumerator_unit": "PILL",
"denumerator_value": 1
},
"is_primary": true
}
],
"is_active": true,
"inserted_at": "2017-04-20T19:14:13Z",
"inserted_by": "e1453f4c-1077-4e85-8c98-c13ffca0063e",
"updated_at": "2017-04-20T19:14:13Z",
"updated_by": "2922a240-63db-404e-b730-09222bfeb2dd"
}
}
Post-processing processes*
API paragraph not found
HTTP status codes*