Table of Contents | ||
---|---|---|
|
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.
Приклад СТРУКТУРИ відповіді для лікарської форми, що є учасником програми
...