Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel3

Purpose

This method Service returns all service Service requests related to specified episode of carethe person filtered by submitted parameters.

Specification

Page Properties

Link

https://medicaleventsmisapi.docs.apiary.io/#reference/service-requests/manage-service-requests-in-patient-context/get-service-requests-by-search-params

Resource

/api/patients/{{patient_id}}/service_requests

Scope

service_request:read

Components

Service request

Microservices

API paragraph not found

Protocol type

REST

Request type

GET

Sync/Async

Async

Public/Private/Internal

Public

Logic

...

Public

Filters

Filter

Values

Type

Description

Example

patient_id

String

Unique patient identifier

7075e0e2-6b57-47fd-aff7-324806efa7e5

episode_id

String

Unique episode identifier

ef30f210-5328-4f48-bfe6-c7150d4737a6

status

String

active

requester_legal_entity

String

7075e0e2-6b57-47fd-aff7-324806efa7e5

used_by_legal_entity

String

8075e0e2-6b57-47fd-aff7-324806efa7e6

code

String

9075e0e2-6b57-47fd-aff7-324806efa7e6

care_plan_id

String

Unique care plan identifier

8075e0e2-6b57-47fd-aff7-324806efa7e6

Request structure

API paragraph not found

Authorize

structure

See on Apiary

Authorize

  • Verify the validity of access token

    • Return (401, 'unauthorized') in case of validation fails

  • Verify that token is not expired

    • in case of error - return (401, 'unauthorized')

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

    1. Return (403, 'invalid scopes') in case of invalid scope(s)

Request to process the request using a token in the headers

Headers

Наприклад:

  • Content-Type:application/json

  • Authorization:Bearer mF_9.B5f-4.1JqM

  • api-key:aFBLVTZ6Z2dON1V

Request data validation

API paragraph not found

Processing

...

  • {{access_token}}

  • API-key:{{secret}}

 

Request data validation

API paragraph not found

Processing

  1. Get all Service requests by person_id from service_request (MongoDB)

  2. Validate data consistency:

    • Ensure that requested Service requests have ABAC context

      • Return 403 ('Access denied') in case of error

  3. Filter list above by submitted search parameters

  4. Render a response according to specification with found Service requests entities.

Response structure

See on Apiary

...

Page Properties

HTTP status code

Message

What caused the error

 200

 

 

 404401

 

Unauthorized

403

 

Invalid scopes

404

 

Episode or patient not found