Versions Compared

Key

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

Table of Contents

Specification

Apiary

Purpose

This web service returns list of all available already created capitation reports.

Authorize

    1. Verify the validity of access token
      1. in case of error return 401 ('Access denied')
    2. Check user scope capitation_report:read in order to perform this action
      1. in case of error generate 401 response ('Invalid scopes')

Verify role

Extract from token:

  1. Validate client_id (is_blocked=false)
    1. in case of error return 403 Error ('Client is blocked')
  2. In case WS was called by MSP check contractor_legal_entity is active
    • in case error return 403 - ('Client is not active')

Response

  1. Generate synthetical id for each object in response
    1. id = edrpou + billing date, concatenate and trim
  2. In case WS was called by NHS
    1. Select all capitation_report_details by id
    2. Return the result
  3. In case WS was called by MSP
    1. Extract legal_entity_id from token
    2. Select capitation_report_details where legal_entity_id legal_entity_id from step a
    3. Return the result