Purpose
The method is designed to get the execution task status of an asynchronous job: it returns the composition creation asynchronous job status after the signComposition request has been executed.
Used in processes:
Create/Sign composition (general process)
RC_5. Extension / reduction MVTN
RC_6. Refinement (preperson -> person) for MVTN
RC_7. Creating "a replacement" composition
Specification
Link | https://app.swaggerhub.com/apis/ehealthua/compositions/2.32.2#/async/getAsyncJobStatus |
Resource | /patients/composition/job/{{asyncJobId}} |
Scope | composition:read |
Components | |
Using Dictionaries | API paragraph not found |
Using Microservices | API paragraph not found |
Protocol type | REST |
Request type | GET |
Sync/Async | Async |
Public/Private/Internal | Public |
Logic
Creation of composition: Asynchronous tasks
Sequence:
MIS/Medical employee->Compositions: Creating or updating compositions POST patients/composition/
Compositions->Compositions: AsyncJob planning
Compositions->MIS/Medical employee: AsyncJob scheduled (eta)
MIS/Medical employee->MIS/Medical employee: asynJob.data.eta timer on
MIS/Medical employee-->Compositions: GET /patients/composition/job/{asyncJobId}
Compositions-->MIS/Medical employee: AsincJob pending (eta)
MIS/Medical employee-->MIS/Medical employee: asynJob.data.eta timer on
Compositions->Compositions: AsyncJob completed
MIS/Medical employee->Compositions: GET /patients/composition/job/{asyncJobId}
Compositions->MIS/Medical employee: AsincJob completed (compositionAsyncJobStateData.links)
MIS/Medical employee->Compositions: GET /patients/{patientId}/encounter/{encounterId}/composition/{compositionId}
Compositions->MIS/Medical employee: The composition is received
Input parameters
Input parameter | Values | Type | Description | Example |
---|---|---|---|---|
asyncJobId | String | Async Job Object ID | 89678f60-4cdc-4fe3-ae83-e8b3ebd35c59 |
Request structure
Authorize
Check user scopes in order to perform this action (scope = 'composition:search')
return 401 (Unauthorized) in case of invalid scope(s)
Headers
Content-Type: application/json
Authorization: Bearer {token}
api-key: {secret}
Validation data request
Parameters validation:
asyncJobId
Response structure
Example:
HTTP status codes
HTTP status code | Message | What caused the error |
---|---|---|
200 | Task found | Correct answer with one of the possible statuses: PENDING, FAILED, DONE |
400 | Invalid request format | Error in query syntax or other error |
404 | Task not found | The task with the specified ID does not exist or was not found |