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

RC_Get Short Procedures by Service Groups (CSI-1834)

Purpose

This WS is designed to search Procedures grouped by Service Groups. If the user has approval on the Group of Services, he will receive a list of Procedures (short information), which contain service from this Group. To receive full Procedure data user must have the access according to ABAC rules (EN) and use Get Procedures by id endpoint.

Also https://e-health-ua.atlassian.net/wiki/x/lQBrLQE logic includes this method.

Specification

https://ehealthmedicaleventsapi.docs.apiary.io/reference/medical-events/procedures/get-short-procedures-by-service-groups

Authorization

  • Verify the validity of access token

    • Return (401, 'Invalid access token') in case of validation fails

  • Verify that token is not expired

    • in case of error - return (401, 'Invalid access token')

  • Check user scopes in order to perform this action (scope = 'procedure:read')

    • Return (403, 'Your scope does not allow to access this resource. Missing allowances: procedure:read') in case of invalid scope(s)

Service logic

Service returns list of short Procedures, which contain services from Groups of Services user has approval on, filtered by submitted parameters:

  1. Select list of employees from PRM.employees related to the current user in the current legal_entity, using data from the token.

  2. Select all active approvals on service_groups from ME.approvals (Mongo DB), where these employees referenced as granted_to.

  3. Get services (PRM.service_inclusions DB) by service_group_id. Save service to services list.

  4. Get Procedures by person_id from ME.procedures (Mongo DB) where:

    1. code.identifier.value is in services list (from previous step)

  5. Filter Procedures by submitted search params (service_group_id, managing_organization_id…).

  6. Order Proedures by inserted_at and render a response according to specification

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