Table of Contents |
---|
...
Schemas:
Table of Contents |
---|
Purpose
This WS is design to create relationship for reorganized legal entities by NHS admin using DS. Before the request is created new LE must be created (in case if needed) and employee from old legal entity must be registered in the new one. After that NHS admin must set relationship via signed content. After basic validation
I
...
Specification
Schemas:
Page Properties | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||
|
Logic
API paragraph not found
Input parameters
Input is signed data in PKCS7 format. The data must be unpacked and validated using Json Schema.
Fields to sign:
field
Input parameter | Values | Type | Description | Example |
---|---|---|---|---|
merged_from_legal_entity | id | uuid | required | |
name | string | required | ||
edrpou | string | required | ||
merged_to_legal_entity | id | id | required | |
name | string | required | ||
edrpou | string | required | ||
reason | sring | required |
Request structure
API paragraph not found
Authorize
Verify the validity of access token
in case of error return 401 ('Access denied')
Check user scope legal_entity:merge in order to perform this action
in case of error generate 401 response ('Invalid scopes')
Headers
API paragraph not found
Request data validation
Validate Digital signature
Decode content that is encrypted in an electronic digital signature.
Use Digital signature WS. Method checks digital signature and returns result.
...
merged_from | merged_to |
---|---|
MSP | PRIMARY_CARE, MSP |
MSP_PHARMACY | MSP_PHARMACY |
PHARMACY | PHARMACY |
PRIMARY_CARE | PRIMARY_CARE, MSP |
OUTPATIENT | OUTPATIENT |
EMERGENCY | EMERGENCY |
Response
...
Processing
Create job
Async job must be created and started (scope to get job - legal_entity_merge_job:read)
...
field | value |
---|---|
id | generate id |
merged_from_id | $merged_from.id |
merged_to_id | $merged_to.id |
is_active | true |
reason | $reason |
inserted_at | now() |
inserted_by | $user_id |
Response structure
In response can be received validation error or the job will be started.
Post-processing processes
API paragraph not found
HTTP status codes
API paragraph not found