ЕСОЗ - публічна документація

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Purpose

This WS is designed to create new medication (post).

APIary 

create-medication

Input parameters (filters)

  • name
  • start_at
  • route
  • container_dosage info
  • package_qty
  • package_min_qty
  • code_ATX
  • manufacturer_name_country info
  • certificate
  • expired_certificate_date
  • ingridients info
    • innm_id
    • dosage info
    • is_active_substance

Authorize

  1. Verify the validity of access token
  2. Check user scope (scope = 'medication:write') in order to perform this action
    1. In case error - generate 401 response

Validate request (JSON schema)

Validate request using JSON schema (link !!! TBD)

Validate Innm

  1. Check unique by `innm_identifier`. 
    1. if  found - return 409 error (message: "Duplicate innm identifier!")

Validate Dosage & Container dosage

Purpose validation: Denum unit from Dosage must be is equal Denum unit from Container dosage. See examples: Medications model  

  1. Check exist 

  2. Validate Response $.data.employee_type == DOCTOR AND $.data.employee_status == APPROVED

    1. if invalid - return 422 error (message: "Denum unit from Dosage ingridients must be is equal Denum unit from Container dosage medication!")

Create new Innm

  • No labels