Versions Compared

Key

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

Table of Contents

Purpose

This WS is designed to update Innm (post).

APIary 

update-innm

Input parameters (filters)

  • name (optional)
  • innm_

...

  • identifier (optional)
  • status (optional)

    Info

    WS should work if there is at least one parameter present on payload.


Authorize

  1. Verify the validity of access token
  2. Check user scope (scope = 'innm: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 unique for Innms

...

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

Validate statuses linked medication

Purpose validation:  Status innm must be is equal to statuses linked medication.

  1. if $.status present in payload
    1. check availability linked medications 
    2. check status for linked medications 

      Code Block
      SELECT * FROM medications M
      	INNER JOIN ingridients ING 
      		ON 
      	


Update innm data

  1. Update