ЕСОЗ - публічна документація
Get Drugs v3
Purpose
This method extends the functionality of the Get Drugs v2 method, allowing to display program participant parameters for INNM_DOSAGE
. Also, it returns INNM_DOSAGE
s for which there is no registered BRAND
s in the system
Specification
Authorization
Verify the validity of access token
Return (401, 'Invalid access token') in case of validation fails
Verify that token is not expired
in case of error - return (401, 'Invalid access token')
Check user scopes in order to perform this action (scope = 'drugs:read')
Return (403, 'Your scope does not allow to access this resource. Missing allowances: drugs:read') in case of invalid scope(s)
Service logic
Service returns all medications filtered by submitted parameters:
Get all medications (PRM database):
Get active INNM_DOSAGEs (is_active = true and type = INNM_DOSAGE)
Search for program_medications associated with each INNM_DOSAGE (is_active = true)
Put it to the same level as INNM_DOSAGE in response
Get active BRANDs (is_active = true and type = BRAND) related to this INNM_DOSAGE
Group result by container_dosage
Search for program_medications associated with each BRAND (is_active = true)
Put it to the same level as container_dosage in response
Filter list above by submitted search parameters
In case of filter parameters associated with BRANDs are applied - INNM_DOSAGEs without BRANDs should not be returned
Render a response according to specification with found medications entities.
Приклад СТРУКТУРИ відповіді для лікарської форми, що є учасником програми
[Responce] - {
"data": [
{
"daily_dosage": null,
"dosage_form_is_dosed": true,
"form": "ORAL_DROPS",
"id": "bd2c8723-f30f-4cb6-8301-eca50459b808",
"ingredients": [
{
"dosage": {
"denumerator_unit": "ML",
"denumerator_value": 1.0,
"numerator_unit": "MG",
"numerator_value": 10.0
},
"id": "2781decd-e5b4-4935-a214-cec398468f1e",
"is_primary": true,
"name": "Не містить МНН",
"name_original": "NO INN",
"sctid": null
}
],
"mr_blank_type": "F-3",
"name": "Тетрагідроканнабінол 10 мг/мл, краплі оральні",
"packages": [],
"program_medications": [
{
"care_plan_activity_allowed": true,
"end_date": null,
"id": "62ea7951-c59d-4e3a-aecf-a7a17ef89ec9",
"max_daily_dosage": null,
"medication_request_allowed": true,
"package_qty_divisible": null,
"registry_number": null,
"start_date": null
}
]
}
],
"meta": {
"code": 200,
"type": "list",
"url": "http://api-svc.il/api/v3/drugs",
"request_id": "53aa0f68-646b-46c7-b724-ac702992dca8#262"
},
"paging": {
"page_size": 50,
"page_number": 1,
"total_entries": 2,
"total_pages": 1
}
}
ЕСОЗ - публічна документація