Versions Compared

Key

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

Table of Contents

...

Purpose

This WS is designed to describe the process of creating create new medical program.

APIary 

http://docs.uaehealthapi.apiary.io/#reference/internal.-nhs-admin/medical-programs/create-medical-program

Input parameters 

...

Authorize

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

Validate request (JSON schema)

...

Create new Medical Program

  1. Create new record in Medical_programs Fill data 
Destination
Source
Description
id
Autogenerated
nameRequest: $.name
is_activeConst: true
inserted_at:timestampTimestamp: now()Get current date-time
inserted_byToken: user_idExtract user from token
updated_at:timestampTimestamp: now()Get current date-time
updated_byToken: user_idExtract user from token

Prepare & return response data structure

  1. Fill response WS data structure Validate response using JSON schemas (TBD)Return 422 with list of validation errors in case validation fails (422 EView)structure