Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

The service is designed to upload a new medication registry. The process uses the Jabba service. Upon execution of the request, a job is created, on the basis of which tasks are created. Each task is one request to create an entity from the registry.

Key points

  1. NHS admin user download file with fields according to its structure.

  2. The file should be in .csv format.

Specification

...

Link

...

Посилання на Apiary або Swagger

...

Resource

...

Посилання на ресурс, наприклад: /api/persons/create

...

Scope

...

medication_registry:write

...

Scope для доступу

...

Components

...

Зазначається перелік бізнес компонентів, які використовують цей метод, наприклад: ePrescription

...

Microservices

...

API paragraph not found

...

Перелік мікросервісів, які використовує метод API, наприклад: Auth, ABAC

...

Protocol type

...

API paragraph not found

...

Тип протоколу, який використовується запитом, наприклад: SOAP | REST

...

Request type

...

API paragraph not found

...

Тип запиту API, наприклад: GET, POST, PATCH…

...

Sync/Async

...

API paragraph not found

...

Метод є синхронним чи асинхронним?

...

Public/Private/Internal

...

Internal

...

Потрібно зазначити тип методу за ступенем доступності

Expand
titleSpecification for Create full medication registry
Code Block
languagegraphql
  "Creates a single `MedicationRegistry`."
  createMedicationRegistry(
    input: CreateMedicationRegistryInput!
  ): CreateMedicationRegistryPayload
Code Block
languagegraphql
"""
Input for `createMedicationRegistry` mutation.

User must have a scope **medication_registry:write**
"""
input CreateMedicationRegistryInput {
  "Type of register originating medication registry data. The value should be present in the `REGISTER_TYPE` dictionary."
  registerType: String!
  "Create medication registry reason description."
  reasonDescription: String!
  "Input file in csv format with medication register."
  csvData: Upload!    
}

"""
Return type for `createMedicationRegistry` mutation.
"""
type CreateMedicationRegistryPayload {
  "Created `MedicationRegistryJob`."
  medicationRegistryJob: MedicationRegistryJob
}

"""
An object for MedicationRegistryJob.
"""
type MedicationRegistryJob implements Node {
  "The ID of an object"
  id: ID!
  "Primary key identifier from the database"
  databaseId: UUID!
  "Job name."
  name: String
  "Medication registry Job status."
  status: JobStatus!
  "Job execution strategy."
  strategy: JobStrategy!
  "Date and time when the job starts."
  startedAt: DateTime!
  "Date and time when the job ends."
  endedAt: DateTime
  "Tasks within this job."
  tasks(
    "A condition to be used in determining which values should be returned by the collection."
    filter: TaskFilter
    "The method to use when ordering collection items."
    orderBy: TaskOrderBy
    "Read all values in the set after (below) this cursor."
    after: String
    "Read all values in the set before (above) this cursor."
    before: String
    "Only read the first _n_ values of the set."
    first: Int
    "Only read the last _n_ values of the set."
    last: Int
  ): MedicationRegistryTaskConnection!
  "Type of register originating medication registry data. The value should be present in the `REGISTER_TYPE` dictionary."
  registerType: String!
  "Medication registry job reason description."
  reasonDescription: String!
}

"""
A connection to a list of `MedicationRegistryTask` values.
"""
type MedicationRegistryTaskConnection {
  "Information to aid in pagination."
  pageInfo: PageInfo!
  "A list of nodes."
  nodes: [MedicationRegistryTask]
  "A list of edges."
  edges: [MedicationRegistryTaskEdge]
}

"""
Reads and enables pagination through a set of `MedicationRegistryTask`.
"""
type MedicationRegistryTaskEdge {
  "The item at the end of the edge."
  node: MedicationRegistryTask!
  "A cursor for use in pagination."
  cursor: String!
}

"""
A child of a `MedicationRegistryJob`, contains the result of task execution.
"""
type MedicationRegistryTask implements Node {
  "The ID of an object"
  id: ID!
  "Primary key identifier from the database"
  databaseId: UUID!
  "Task name."
  name: String
  "Task status, is set automatically."
  status: TaskStatus!
  "Task meta data."
  meta: MedicationRegistryTaskMeta
  "Date and time when task was executed."
  endedAt: DateTime
  "Task error."
  error: TaskError
  "Technical information when task was inserted into the DB."
  insertedAt: DateTime!
  "Technical information when task was updated in the DB."
  updatedAt: DateTime!
}

"""
Metadata of a `MedicationRegistryTask`.
"""
type MedicationRegistryTaskMeta {
  "Primary key identifier of an entity from the database."
  databaseId: UUID
  "Line number of csv file from input."
  csvDataLine: Int  
}

Logic*

Потрібно по пунктах описати логіку методу API або додати діаграму

Preconditions

Які передумови мають бути виконані системою/користувачем. Наприклад:

  • створений запис в MedicationRequest;

  • рецепт відпущений (COMPLETED)

Global and configurable parameters

Потрібно вказати глобальні та конфігураційні параметри.

Наприклад:

...

Variable

...

Values

...

Description

...

CARE_PLAN_<category>_ICD10_AM_CONDITIONS_ALLOWED

 

 

...

Values that matches with dictionaryeHealth/ICD10_AM/condition_codes

Example: “E10.32, E11.92”

...

(Example: CARE_PLAN_CLASS_1_ICD10_AM_CONDITIONS_ALLOWED)

Input parameters

Потрібно вказати вхідні параметри запиту. Наприклад, для GET /patients/composition/job/{{asyncJobId}} вхідний параметр:

...

Input parameter

...

Values

...

Type

...

Description

...

Example

...

asyncJobId

...

String

...

Async Job Object ID

Filters

Потрібно вказати фільтри. Наприклад, для GET /api/medication_requests/{{id}}/dispenses?status=PROCESSED фільтр:

...

Filter

...

Values

...

Type

...

Description

...

Example

...

status

...

String

...

Optional

...

PROCESSED

Dictionaries

Потрібно вказати довідники, які використовує метод API

Request structure*

See on Apiary

Example:

Expand
titleRequest example
Code Block
{
  "category": {
    "coding": [
      {
        "system": "eHealth/composition_categories",
        "code": "LIVE_BIRTH"
      }
    ]
  },
  "type": {
    "coding": [
      {
        "system": "eHealth/composition_types",
        "code": "NEWBORN"
      }
    ]
  },
  "event": [
    {
      "code": {
        "coding": [
          {
            "system": "eHealth/composition_events",
            "code": "COMPOSITION_VALIDITY_PERIOD"
          }
        ]
      },
      "period": {
        "start": "2020-06-26T15:22:53.403Z",
        "end": "2020-07-26T15:22:53.403Z"
      }
    }
  ],
  "subject": {
    "type": {
      "coding": [
        {
          "system": "eHealth/composition",
          "code": "string"
        }
      ],
      "text": "string"
    },
    "value": "e49abc30-6d17-11ea-b83c-673680173afa"
  },
  "encounter": {
    "type": {
      "coding": [
        {
          "system": "eHealth/composition",
          "code": "string"
        }
      ],
      "text": "string"
    },
    "value": "e49abc30-6d17-11ea-b83c-673680173afa"
  },
  "author": {
    "type": {
      "coding": [
        {
          "system": "eHealth/composition",
          "code": "string"
        }
      ],
      "text": "string"
    },
    "value": "e49abc30-6d17-11ea-b83c-673680173afa"
  },
  "section": {
    "focus": {
      "type": {
        "coding": [
          {
            "system": "eHealth/composition",
            "code": "string"
          }
        ],
        "text": "string"
      },
      "value": "e49abc30-6d17-11ea-b83c-673680173afa"
    }
  },
  "extension": [
    {
      "valueCode": "AUTHORIZE_WITH",
      "valueUuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
    },
    {
      "valueCode": "IS_ACCIDENT",
      "valueBoolean": true
    },
    {
      "valueCode": "TREATMENT_VIOLATION",
      "valueString": "late_arrival"
    },
    {
      "valueCode": "TREATMENT_VIOLATION_DATE",
      "valueDate": "2020-12-12"
    },
    {
      "valueCode": "IS_INTOXICATED",
      "valueBoolean": true
    },
    {
      "valueCode": "IS_FOREIGN_TREATMENT",
      "valueBoolean": true
    },
    {
      "valueCode": "IS_FORCE_RENEW",
      "valueBoolean": true
    }
  ]
}

Authorize*

Вимоги до авторизації: яким чином надається доступ до використання методу

Request to process the request using a token in the headers

Headers*

Наприклад:

  • Content-Type:application/json

  • Authorization:Bearer c2778f3064753ea70de870a53795f5c9

  • api-key:uXhEczJ56adsfh3Ri9SUkc4en

Request data validation*

Валідація даних

Наприклад:

  1. Validate request using JSON schema

    1. In case validation failed - generate 422 error

Expand
titleJSON schema
Code Block
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "verification_code": {
      "type": "string"
    }
  },
  "required": [
    "verification_code"
  ],
  "additionalProperties": false
}

Processing*

Потрібно описати процеси, які відбуваються з даними

1. Using global parameters

Потрібно викликати глобальні параметри (Global parameters), щоб отримати наведені нижче параметри

Response structure*

See on Apiary

Example:

Expand
titleResponse example
Code Block
{
  "data": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "status": "PENDING",
    "eta": "string",
    "doneAt": "string",
    "links": [
      {
        "entity": "eHealth/composition",
        "href": "composition/0daaad78-6cfb-11ea-9cd6-afab698838bc",
        "error": "string"
      }
    ]
  }
}

Post-processing processes*

Що має відбутися в ЦБД після опрацювання та відправлення відповіді, тощо

HTTP status codes*

...

HTTP status code

...

Message

...

What caused the error

...

 

...

 

...

 

...

 

...

 

...

 

Backward compatibility

...

Table of Contents

Purpose

The service is designed to uploading new medication registry. The process uses the jabba service. Upon execution of the request, a job is created, on the basis of which tasks are created. Each task is one request to create entity from registry.

Key points

  1. NHS admin user download file with fields according to its structure.

  2. File should be in .csv format.

  3. Full medication registry input data for GraphQL mutatiuon should be in .csv format and with escaped symbols (i.e. quotes, new lines - " as \"; new line replaced as \r\n ). Please note that UI of NHS Admin panel converts csv file to appropriate GraphQL input.

Specification

Page Properties
idAPI_Specification

Link

GraphQL method

Посилання на Apiary або Swagger

Resource

GraphQL method

Посилання на ресурс, наприклад: /api/persons/create

Scope

medication_registry:write

Scope для доступу

Components

ePrescription

Зазначається перелік бізнес компонентів, які використовують цей метод, наприклад: ePrescription

Microservices

API paragraph not found

Перелік мікросервісів, які використовує метод API, наприклад: Auth, ABAC

Protocol type

API paragraph not found

Тип протоколу, який використовується запитом, наприклад: SOAP | REST

Request type

API paragraph not found

Тип запиту API, наприклад: GET, POST, PATCH…

Sync/Async

Async

Метод є синхронним чи асинхронним?

Public/Private/Internal

Internal

Потрібно зазначити тип методу за ступенем доступності

Expand
Code Block
languagegraphql
  "Creates a single `MedicationRegistry`."
  createMedicationRegistry(
    input: CreateMedicationRegistryInput!
  ): CreateMedicationRegistryPayload

"""
Input for `createMedicationRegistry` mutation.

User must have a scope **medication_registry:write**
"""
input CreateMedicationRegistryInput {
  "Type of register originating medication registry data. The value should be present in the `REGISTER_TYPE` dictionary."
  registerType: String!
  "Create medication registry reason description."
  reasonDescription: String!
  "Input file in csv format with medication register."
  csvData: Upload!    
}

"""
Return type for `createMedicationRegistry` mutation.
"""
type CreateMedicationRegistryPayload {
  "Created `MedicationRegistryJob`."
  medicationRegistryJob: MedicationRegistryJob
}

"""
An object for MedicationRegistryJob.
"""
type MedicationRegistryJob implements Node {
  "The ID of an object"
  id: ID!
  "Primary key identifier from the database"
  databaseId: UUID!
  "Job name."
  name: String
  "Medication registry Job status."
  status: JobStatus!
  "Job execution strategy."
  strategy: JobStrategy!
  "Date and time when the job starts."
  startedAt: DateTime!
  "Date and time when the job ends."
  endedAt: DateTime
  "Tasks within this job."
  tasks(
    "A condition to be used in determining which values should be returned by the collection."
    filter: TaskFilter
    "The method to use when ordering collection items."
    orderBy: TaskOrderBy
    "Read all values in the set after (below) this cursor."
    after: String
    "Read all values in the set before (above) this cursor."
    before: String
    "Only read the first _n_ values of the set."
    first: Int
    "Only read the last _n_ values of the set."
    last: Int
  ): MedicationRegistryTaskConnection!
  "Type of register originating medication registry data. The value should be present in the `REGISTER_TYPE` dictionary."
  registerType: String!
  "Medication registry job reason description."
  reasonDescription: String!
}

"""
A connection to a list of `MedicationRegistryTask` values.
"""
type MedicationRegistryTaskConnection {
  "Information to aid in pagination."
  pageInfo: PageInfo!
  "A list of nodes."
  nodes: [MedicationRegistryTask]
  "A list of edges."
  edges: [MedicationRegistryTaskEdge]
}

"""
Reads and enables pagination through a set of `MedicationRegistryTask`.
"""
type MedicationRegistryTaskEdge {
  "The item at the end of the edge."
  node: MedicationRegistryTask!
  "A cursor for use in pagination."
  cursor: String!
}

"""
A child of a `MedicationRegistryJob`, contains the result of task execution.
"""
type MedicationRegistryTask implements Node {
  "The ID of an object"
  id: ID!
  "Primary key identifier from the database"
  databaseId: UUID!
  "Task name."
  name: String
  "Task status, is set automatically."
  status: TaskStatus!
  "Task meta data."
  meta: MedicationRegistryTaskMeta
  "Date and time when task was executed."
  endedAt: DateTime
  "Task error."
  error: TaskError
  "Technical information when task was inserted into the DB."
  insertedAt: DateTime!
  "Technical information when task was updated in the DB."
  updatedAt: DateTime!
}

"""
Metadata of a `MedicationRegistryTask`.
"""
type MedicationRegistryTaskMeta {
  "Primary key identifier of an entity from the database."
  databaseId: UUID
  "Line number of csv file from input."
  csvDataLine: Int  
}

Authorization

  • Verify the validity of access token

    • in case of error - 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 = 'medication_registry:write')

    • return 403 (“Your scope does not allow to access this resource. Missing allowances: medication_registry:write”) in case of invalid scope(s)

Validate request

  1. Validate request

    1. Check that request using schema

      1. Return 422 with the list of validation errors in case validation fails.

    2. Check that registerType = 'FULL_MEDICATIONS_REGISTRY'

      1. Return 422 with the list of validation errors in case validation fails.

    3. Check csv_data input according to file structure

      1. Return 422 with the list of validation errors in case validation fails

    4. Check csv_data input file size - csv file with max 30000 lines is allowed.

      1. Return 422 The number of tasks for the job with a sequential execution strategy is limited to 30,000 in case validation fails

    File example:

View file
namemedication registry (NO BRENDS exmp).csv

*Note. Fields innms.sctid, innms.name, innms.name_original, innm_dosage_ingredients.is_primary, innm_dosage_ingredients.dosage.numerator_value, innm_dosage_ingredients.dosage.numerator_unit, innm_dosage_ingredients.dosage.denumerator_value, innm_dosage_ingredients.dosage.denumerator_unit, brand.code_atc can exist as an array. Values should be separated as | (respectively).

Service logic

  1. Validate input according to schema

  2. Create job with type create_medication_registry

  3. For each line of input file create separate task of job

  4. Each task must validate existing and create new entities of medications registry:

    1. Extract and search medications with type = INNM_DOSAGE, is_active = TRUE, innm_dosage.name, innm_dosage.form and innm_dosage.ingredients.dosage, innm_dosage.ingredients.is_primary:

      1. in case more than one medication with type = INNM_DOSAGE ,is_active = TRUE, innm_dosage.name, innm_dosage.form is found - return FAILED task status with error ('More than one INNM_DOSAGE with such name and form exist in medications table')

      2. in case more than one ingredient is found - return FAILED task status with error ('More than one INNM_DOSAGE ingredient with such fields exist in ingredients table')

      3. in case single medication with type = INNM_DOSAGE is found then check ingredients, in case ingredients of INNM_DOSAGE in DB are not equal to ingredients in uploaded register - return FAILED task status with error ('INNM_DOSAGE has different INNMS in ingredients table')

      4. in case medication with type = INNM_DOSAGE is not found - insert it according to Create full medication registry | medications (type = INNM_DOSAGE), its ingredients according to Create full medication registry | ingredients (for INNM_DOSAGE), brand according to Create full medication registry | medications (type = BRAND), its ingredient according to Create full medication registry | ingredients (for BRAND) and program medication with brand according to Create full medication registry | program_medications

        1. check existence of INNMs by innms.name_original

          1. in case innm is not found - insert it according to Create full medication registry | innms

          2. in case innm is found - skip innm creation.

          3. in case more than one innm is found - return FAILED task status with error ('More than one INNM with such name_original exist in innms table')

      5. in case medication with type = INNM_DOSAGE is found - proceed to brand.

    2. Extract and search connected medications with type = BRAND, is_active = TRUE, brand.name, brand.form, brand.package_qty, brand.package_min_qty, brand.certificate, brand.container, brand.manufacturer.name, brand.manufacturer.country, brand.certificate_expired_at and brand.ingredients.dosage, brand.ingredients.is_primary, brand.drlz_sku_id:

      1. in case more than one medication with such params is found - return FAILED task status with error ('More than one BRAND with such fields exist in medications table')

      2. in case single medication with type = BRAND is found then check ingredients, in case ingredient of BRAND in DB is not equal to ingredient of a brand in uploaded register - return FAILED task status with error ('Invalid BRAND ingredients in ingredients table')

      3. in case medication with type = BRAND is not found OR is absent in registry - insert brand according to Create full medication registry | medications (type = BRAND), its ingredient according to Create full medication registry | ingredients (for BRAND) and program medication with brand according to Create full medication registry | program_medications

      4. in case medication with type = BRAND is found - proceed to program medication.

    3. Extract and search connected program medication by:
      In case registry_number = NULL then search by medication_id (with type = BRAND) and program_medications.medical_program_id and program_medication.registry_number IS NULL;
      In case registry_number has id then search by medication_id (with type = BRAND) and program_medications.medical_program_id and program_medication.registry_number;

      1. in case more than one program medication with such params is found - return FAILED task status with error ('More than one PROGRAM_MEDICATION with such fields exist in program_medications table')

      2. in case program medication is not found - insert program medication with brand OR with innm_dosage according to Create full medication registry | program_medication

      3. in case program medication is found - return FAILED task status with error ('Such medication already exist')

  5. Return job identifier with result.

innms

Attribute

Source and Logic

Type and Constraints

O/M

id

uuid_generate_v4(), auto

uuid

M

sctid

innms.sctid, from request

varchar(255)

O

name

innms.name, from request

varchar(255)

M

name_original

innms.name_original, from request

varchar(255)

M

is_active

true, auto

bool

M

inserted_by

user_id, from token

uuid

M

updated_by

user_id, from token

uuid

M

inserted_at

now(), auto

timestamp

M

updated_at

now(), auto

timestamp

M

medications (type = INNM_DOSAGE)

Attribute

Source and Logic

Type and Constraints

O/M

id

uuid_generate_v4(), auto

uuid

M

name

innm_dosage.name

varchar(255)

M

type

auto (INNM_DOSAGE)

varchar(255)

M

is_active

true, auto

bool

M

form

innm_dosage.form

varchar(255)

Dictionary MEDICATION_FORM

M

inserted_by

user_id, from token

uuid

M

updated_by

user_id, from token

uuid

M

inserted_at

now(), auto

timestamp

M

updated_at

now(), auto

timestamp

M

daily_dosage

innm_dosage.daily_dosage

float

O

max_daily_dosage

innm_dosage.max_daily_dosage

float

O

mr_blank_type

innm_dosage.mr_blank_type

varchar(64)

Dictionary MR_BLANK_TYPES

M

dosage_form_is_dosed

innm_dosage.dosage_is_dosed

bool

M

ingredients (for INNM_DOSAGE)

Attribute

Source and Logic

Type and Constraints

O/M

id

uuid_generate_v4(), auto

uuid

M

dosage

numerator_value

innm_dosage_ingredients.dosage.numerator_value, from request

jsonb

float8

M

numerator_unit

innm_dosage_ingredients.dosage.numerator_unit, from request

varchar(255)

Dictionary MEDICATION_UNIT

M

denumerator_value

innm_dosage_ingredients.dosage.denumerator_value, from request

float8

M

denumerator_unit

innm_dosage_ingredients.dosage.denumerator_unit, from request

varchar(255)

Dictionary MEDICATION_UNIT

M

is_primary

innm_dosage_ingredients.is_primary, from request

bool

At least one of the ingredients must be is_primary = true
Two or more ingredients can be is_primary = true

M

innm_child_id

uuid_generate_v4(), auto

uuid

innm_id

M

parent_id

uuid_generate_v4(), auto

uuid

medication_id (type = INNM_DOSAGE)

M

inserted_at

now(), auto

timestamp

M

updated_at

now(), auto

timestamp

M

medications (type = BRAND) (may be absent)

Attribute

Source and Logic

Type and Constraints

O/M

id

uuid_generate_v4(), auto

uuid

M

name

brand.name

varchar(255)

M

type

auto (BRAND)

varchar(255)

M

manufacturer

name

brand.manufacturer.name

jsonb

varchar(255)

M

country

brand.manufacturer.country

varchar(255)

Dictionary COUNTRY

M

code_atc

brand.code_atc

jsonb

varchar(255)

M

is_active

true, auto

bool

M

form

brand.form

varchar(255)

Dictionary MEDICATION_FORM

M

container

numerator_value

brand.container.numerator_value

jsonb

float8

M

numerator_unit

brand.container.numerator_unit

varchar(255)

Dictionary MEDICATION_UNIT

M

denumerator_value

brand.container.denumerator_value

float8

M

denumerator_unit

brand.container.denumerator_unit

varchar(255)

Dictionary MEDICATION_UNIT

M

package_qty

brand.package_qty

float

O

package_min_qty

brand.package_min_qty

float

O

certificate

brand.certificate

varchar(255)

O

certificate_expired_at

brand.certificate_expired_at

date

O

inserted_by

user_id, from token

uuid

M

updated_by

user_id, from token

uuid

M

inserted_at

now(), auto

timestamp

M

updated_at

now(), auto

timestamp

M

form_pharm

brand.form_pharm

varchar(255)

O

max_request_dosage

brand.max_request_dosage

int

O

ingredients (for BRAND)

Attribute

Source and Logic

Type and Constraints

O/M

id

uuid_generate_v4(), auto

uuid

M

is_primary

brand_ingredients.is_primary, from request

bool

Only one ingredient should be is_primary = true

M

dosage

numerator_value

brand_ingredients.dosage.numerator_value, from request

jsonb

float8

M

numerator_unit

brand_ingredients.dosage.numerator_unit, from request

varchar(255)

Dictionary MEDICATION_UNIT

M

denumerator_value

brand_ingredients.dosage.denumerator_value, from request

float8

M

denumerator_unit

brand_ingredients.dosage.denumerator_unit, from request

varchar(255)

Dictionary MEDICATION_UNIT

M

medication_child_id

uuid_generate_v4(), auto

uuid

medication (type = INNM_DOSAGE)

M

parent_id

uuid_generate_v4(), auto

uuid

M

inserted_at

now(), auto

timestamp

M

updated_at

now(), auto

timestamp

M

program_medications

Attribute

Source and Logic

Type and Constraints

O/M

id

uuid_generate_v4(), auto

uuid

M

reimbursement

type

program_medications.reimbursement.type

varchar(64)

Dictionary REIMBURSEMENT_TYPE

M

reimbursement_amount

program_medications.reimbursement.reimbursement_amount

float

M

percentage_discount

program_medications.reimbursement.percentage_discount

float

M

is_active

true, auto

bool

M

medication_request_allowed

true, auto

bool

M

care_plan_activity_allowed

true, auto

bool

M

inserted_by

user_id, from token

uuid

M

updated_by

user_id, from token

uuid

M

medication_id

medication_id (type = BRAND OR INNM_DOSAGE), auto

uuid

M

medical_program_id

program_medications.medical_program_id

uuid

M

inserted_at

now(), auto

timestamp

M

updated_at

now(), auto

timestamp

M

wholesale_price

program_medications.wholesale_price

float8

O

consumer_price

program_medications.consumer_price

float8

O

reimbursement_daily_dosage

program_medications.reimbursement_daily_dosage

float8

O

estimated_payment_amount

program_medications.estimated_payment_amount

float8

O

start_date

program_medications.start_date

date

O

end_date

program_medications.end_date

date

O

registry_number

program_medications.registry_number

varchar(255)

O

max_daily_dosage

program_medication.max_daily_dosage

float8

O

HTTP status codes

Page Properties
idAPI_HTTP status codes

HTTP status code

Message

What caused the error

401

 Invalid access token

 

403

Your scope does not allow to access this resource. Missing allowances: medication_registry:write

 

422

 

Validation error