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

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 13 Next »

Specification

Apiary

create-medical-program

JSON Schema request

SPECS

JSON Schema response

calSPECS


Purpose

This WS is designed to create new medical program.


WS logic

Authorize

  1. Verify the validity of access token

    1. In case error - generate 401 response

  2. Check user scope (scope = 'medical_program:write') in order to perform this action

    1. In case error - generate 403 response

Validate request (JSON schema)

  1. Validate request using JSON schemas (TBD):

    1. Return 422 with list of validation errors in case validation fails (422 EView)

Create new Medical Program

  1. Create new record in Medical_programs 

Destination

Source

Description

id


Autogenerated

name

Request: $.name


same_mnn_in_treatment_period

Request: $.same_mnn_in_treatment_period


is_active

Const: true


inserted_at

Timestamp: now()

Get current date-time

inserted_by

Token: user_id

Extract user from token

updated_at

Timestamp: now()

Get current date-time

updated_by

Token: user_id

Extract user from token




  • No labels