Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
stylenone

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_DOSAGEs for which there is no registered BRANDs in the system

Specification

Apiary

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:

  1. Get all medications (PRM database):

    1. Get active INNM_DOSAGEs (is_active = true and type = INNM_DOSAGE)

      1. Search for program_medications associated with each INNM_DOSAGE (is_active = true)

        1. Put it to the same level as INNM_DOSAGE in response

      2. Get active BRANDs (is_active = true and type = BRAND) related to this INNM_DOSAGE

        1. Group result by container_dosage

        2. Search for program_medications associated with each BRAND (is_active = true)

          1. Put it to the same level as container_dosage in response

  2. Filter list above by submitted search parameters

    1. In case of filter parameters associated with BRANDs are applied - INNM_DOSAGEs without BRANDs should not be returned

  3. Render a response according to specification with found medications entities.

Приклад СТРУКТУРИ відповіді для лікарської форми, що є учасником програми

...