Table of Contents | ||||
---|---|---|---|---|
|
Purpose
...
The process is initiated by responsible person from NHS side which created and approved contract request previously and involves the transfer of a signed contract request with electronic digital signature.
...
Contract must be 2 time signed: from legal_entity and NHS sides. There is a particular order who must signed first - NHS side. After that legal entity owner can either sign contract request (will be created contract) or terminate contract request.
Specification
...
Page Properties | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Logic
...
This WS is designed to sign contract request from NHS side. Contract request's status must be ='PENDING_NHS_SIGN'. Method receives signed message (pkcs7) including signed content, digital signature, digital stamp and signer public key in signed_content property. All signature fields will be validated (including signer certificate authority).This service will store signed copy of Contract Request in Media Content Storage. Signed content MUST consists of JSON object with Contract Request data and printout template. Object that need to be signed is returned by Get Contract request details response, JSON.Path: $.data. data.prinout content must be changed to Print out content taken from Get Contract Request Printout Content
...
Input parameter | Values | Type | Description | Example |
---|---|---|---|---|
id | String |
|
Request structure
...
See on Apiary
Example:
Expand | ||
---|---|---|
| ||
|
Authorize
...
Verify the validity of access token
Check user scopes in order to perform this action
In case error - generate 401 response
Request to process the request using a token in the headers
Headers
...
Наприклад:
Content-Type:application/json
Authorization:Bearer c2778f3064753ea70de870a53795f5c9
...
Validate request using JSON schema
In case validation fails - generate 422 error
Check contract request status
If status is not PENDING_NHS_SIGN - return error 422 'Incorrect status'
Validate contractor_divisions
Check divisions belongs to legal_entity and divisions.status='active'
in case of error return 422 error view $divisions ('Division must be active and within current legal_entity')
Capitation only: Validate contractor_employee_divisions
Employees from employee_divisions has employee_type='DOCTOR', status='APPROVED'
in case of error return 422 error view $employee ('Employee must be an active DOCTOR')
Check contractor_employee_divisions.division_id is present in contractor_divisions.id
in case of error return 422 error $divisions ('The division is not belong to contractor_divisions')
Check contract_number is null
in case of error return 422 error view $employee ('Employee can't be updated via Contract Request')
Validate start_date
start_date>now()
in case of error return 422 error $start_date ('Start date must be greater than create date')
Check whether all id is resolved and valid. For
- contractor_legal_entity_id and nhs_legal_entity_id in status='active' and nhs_verified = true (prm.legal_entities)
- contractor_owner_id and nhs_signer_id in status = 'APPROVED' (prm.employees)Invoke service Get Printout Form by Contract Request ID and compare to $printout_content from request
in case of error return 422 error $printout_content ('Invalid printout content')
Reimbursement only: Validate medical_program_id is an ID of an ACTIVE medical program with type 'medication'
in case of error return 409: "Program is not active"
For Capitation only: do not sing optional fields
contractor_employee_divisions, external_contractor_flag and external_contractors
Processing
...
Save signed contract to media storage
...
field | value |
---|---|
|
|
| Contract_request |
| $.id |
| $.status |
| $.update_at |
| $. |
Response structure
...
See on Apiary
Example:
Expand | ||
---|---|---|
| ||
|
Expand | ||
---|---|---|
| ||
|
Post-processing processes
...
API paragraph not found
HTTP status codes
...