Table of Contents | ||
---|---|---|
|
Purpose
This method allows to get a list of Composition in patient context. Also, this list can be filtered using search parameters.
Key points
Only authenticated and authorized employee with appropriate scope can use this method
Method returns a short information of Compositions that belongs to the specified patient.
List can be filtered by search params.
Specification
Authorization
Verify the validity of access token
in case of error - 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 and client scopes in order to perform this action (scope = 'composition:read')
return 403 “Your scope does not allow to access this resource. Missing allowances: composition:read” in case of invalid scope(s)
Access to the resource is also managed by ABAC module
Validate Patient
Get Patient identifier from the URL
Check it exists in Mongo DB
Return 404 ('not found') in case of error
Input parameters
Input parameter | Mandatory | Type | Description | Example | |
---|---|---|---|---|---|
1 | patient_id | M | string($uuid) | patient identifier | 25878134-7592-472a-adc1-f9532ce7f048 |
Filters
Filter | Values | Type | Description | Example | |
---|---|---|---|---|---|
1 | encounter_id | string($uuid) | encounterId | 89678f60-4cdc-4fe3-ae83-e8b3ebd35c59 | |
2 | context_episode_id | string($uuid) | composition.context_episode_id | 89678f60-4cdc-4fe3-ae83-e8b3ebd35c59 | |
3 | type | DRIVERS ADOPTION | string(query) | COMPOSITION_TYPES dictionary value | ADOPTION |
4 | category | DRIVERS_GROUP1 DRIVERS_GROUP2 ADOPTER ADOPTER_RELATIVE | string(query) | COMPOSITION_CATEGORIES dictionary value | ADOPTER |
5 | title | string | composition.title | 1111-P696-E34T-X4T2 | |
6 | status |
| string(query) | COMPOSITION_STATUS dictionary value | ENTERED_IN_ERROR |
7 | author | string | author of Composition (composition.author.identifier.value) | 97d57238-ffbe-4335-92ea-28d4de117ea2 | |
8 | attester | string | attester of Composition (composition.attester.party.value) | 97d57238-ffbe-4335-92ea-28d4de117ea2 | |
9 | custodian | string | LE where Composition was created (composition.custodian.identifier.value) | 97d57238-ffbe-4335-92ea-28d4de117ea2 | |
10 | date_from | Number | the date from which the Composition was signed | 2023-12-25 | |
11 | date_to | Number | the date to which the Composition was signed | 2023-12-25 | |
12 | page | filter list by page number | 2 | ||
13 | page_size | a limit on the number of objects to be returned, between 1 and 100. Default: 50 | 30 |
Dictionaries
COMPOSITION_TYPES
COMPOSITION_CATEGORIES
COMPOSITION_STATUS
Service logic
Service returns all Compositions related to the patient, filtered by submitted parameters:
Get all Composition by subject from
compositions
collection (MongoDB)Filter list above by submitted search parameters
Render a response according to specification with a list of found Composition entities.