Table of Contents | ||||
---|---|---|---|---|
|
...
Link | https://app.swaggerhub.com/apis/ehealthua/compositions/2.32.2#/main/signComposition |
Resource | /patients/composition/{compositionId}/sign |
Scope | composition:sign |
Components | |
Using Dictionaries | API paragraph not foundeHealth/resources |
Using Microservices | API paragraph not found |
Protocol type | REST |
Request type | PATCH |
Sync/Async | Async |
Public/Private/Internal | Public |
...
MIS/Medical employee->Compositions: Create Composition POST/patients/composition
Compositions->Compositions: Check user scopes authorization composition:create
Compositions-->MIS/Medical employee: In case of error HTTP/401
Compositions->Compositions: Async job planning
Compositions->MIS/Medical employee: Async job details
Compositions<->eHealth:data clarification and verification about author, custodsancustodian, diagnosis etc
Compositions->Compositions:Create and save Composition according to the XML template
Compositions->Compositions:Async job Completed
MIS/Medical employee->Compositions: GET/patients/composition/job/{asyncJobId}
Compositions->MIS/Medical employee:Async job completed (conclusionAsyncJobListItem.href)
MIS/Medical employee->Compositions:GET/patients/{patientId}/composition/{compositionId}/episode/{episodeId}/encounter/{encounterId}
Compositions->MIS/Medical employee: Composition in PRELIMINARY status
MIS/Medical employee->MIS/Medical employee:Signs document and gives to patient
MIS/Medical employee->Compositions:Sign Composition PATCH /patients/composition/{compositionId}/sign
Compositions->Compositions:Check user scopes authorization composition:sign
Compositions-->MIS/Medical employee: In case of error HTTP/401
Compositions->MIS/Medical employee: HTTP/200 Async job Created
Compositions<->eHealth:Signature and author validation
Compositions->Compositions:Save object on SWIFT/S3
Compositions->Compositions:Schedule of trigger interactions (DIIA,MJU_DRACZ,ERLN,MPI,Closure)
MIS/Medical employee->Compositions:GET /patients/composition/job/{asyncJobId}
Compositions->MIS/Medical employee:Async job completed (conclusionAsyncJobListItem.href)
MIS/Medical employee->Compositions:GET/patients/{patientId}/composition/{compositionId}/episode/{episodeId}/encounter/{encounterId}
Compositions->MIS/Medical employee:Composition in FINAL status
...
Content-Type: application/json
Authorization: Bearer mF_9.B5f-4.1JqM{token}
api-key: aFBLVTZ6Z2dON1V{secret}
Validation data request
API paragraph not found
...
Checking the existence of other Composition tasks for signing. Logic - to check if there are other tasks in the system for the same Composition waiting for signature verification. Such a procedure is necessary to prevent several parallel requests for signing the same Composition.
Checking the signing delay: сheck if Check that allowed delay time between the creation of the draft and the direct signing of the Composition match with current configuration.
Overlay Check: Checks that the signature is overlaid correctly and the signature is valid
Validation of signed content: checks that the signature was applied to the corresponding Composition’s object record without any modifications after creating the draft
Signer Check: Checks the data in the signature certificate against the author data according to Composition.author and Employee data
Checking the related Composition: Check that specified in relatesTo Composition exists and has an appropriate status
Status update: Changes the Composition status in the database and related Composition’s status (in case of refinement Temporary Disability Composition)
Saving Composition: Saves the data of the signed Composition in the object drive (ceph)
For Temporary Disability Composition (for tasks that were successfully completed at this stage): Planning CREATE ERLN RECORD task (in PENDING status)
Response structure
...