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

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 Version History

Version 1 Current »

/wiki/spaces/EN/pages/17591304241 (remove the link block before publishing the document)

Properties of a REST API method document

Document type

Метод REST API

Document title

[DRAFT] PIS. Get divisions (Bulk data export) [API-005-012-003-0479]

Guideline ID

GUI-0011

Author

@

Document version

1

Document status

DRAFT

Date of creation

ХХ.ХХ.ХХХХ (дата фінальної версії документа – RC або PROD)

Date of update

ХХ.ХХ.ХХХХ (дата зміни версії)

Method API ID

API-005-012-003-0479

Microservices (namespace)

IL

Component

Bulk export

Component ID

COM-005-012

Link на API-специфікацію

Resource

{{host}}

Scope

Protocol type

REST

Request type

Sync/Async

Sync

Public/Private

Public

Purpose

Method to Get number of declarations per practitioner and his current limit

Logic

Service logic

Data preparation

This data must be calculated on daily basis (or other intervals depending on cron configuration)

  1. Get all employees with a related party (party.id = employee.party_id)

  2. Get all declared specialities (where speciality_officio = true) per party

  3. Get current limit for each speciality from global parameters

    1. PEDIATRICIAN: pediatrician_declaration_limit

    2. THERAPIST: therapist_declaration_limit

    3. FAMILY_DOCTOR: family_doctor_declaration_limit

  4. Get lowest limit for each party (declarations_limit)

  5. Find and count all active (status active or pending_verification) declarations for all this employees (per party) (declarations_count)

Representation

  1. Get the latest snapshot to return calculated and aggregated report

  2. Put to response the date the report is valid for

Configuration parameters

N/A

Dictionaries

N/A

Input parameters

Input parameter

Mandatory

Type

Description

Example

1

 

 

 

 

 

2

 

 

 

 

 

Request structure

See on API-specification

 Example
 

Headers

Headers

Request data validation

Authorization

  • Verify that MIS API token exists in request

    • in case of error - return 401 (“Api key is not set")

  • Verify the validity of MIS API token

    • in case of error - return 401 (“Invalid api key”)

  • Verify that MIS API token is not expired

    • in case of error - return 401 (“Invalid api key”)

  • Check MIS scopes in order to perform this action (scope = 'declaration_bulk:read_pis')

    • return 403 (“Your scope does not allow to access this resource. Missing allowances: declaration_bulk:read_pis”) in case of invalid scope(s)

Processing

N/A

Response structure examples

See on API-specification

 Example
 

HTTP status codes

Response code

HTTP Status code

Message

Internal name

Description

1

Базові

2

 

 

 

 

 

3

 

 

 

 

 

4

Специфічні

5

 

 

 

 

 

Post-processing processes

N/A

Technical modules where the method is used

Название

  • No labels