Fetching report status
Client can check the status of the report generation by sending a GET request to the endpoint returned by the report generation request. For example:
curl -sS "https://${server}/fhir/r5/api/DiagnosticReport/482c9449-add0-4312-a6ba-07831d5ffa5b/$status?reportType=AgpPersonal" \
-H "client_id: ${client_id}" \
-H "client_secret: ${client_secret}" \
-H "org_id: ${org_id}" \
-H "certificate: ${certificate}" | jq
The above request checks the status of the report generation using the Content-Location
URL returned by the initial report generation request. This process follows the Asynchronous Interaction Request Pattern.The reportType
query parameter is used to specify the type of report being requested, in this case, an AGP (Ambulatory Glucose Profile) report (i,e AgpPersonal).
The client should poll for the status of the report generation until the server responds with HTTP 200 OK
status code, which indicates that the report generation is completed. The recommended polling interval is as specified by the Retry-After
header in the response.
Response
Report generation Pending
The server respond with HTTP 202 Accepted
status code if the Report generation is still in-progress
.
Report generation completed successfully
In accordance with the Asynchronous Interaction Request Pattern, when a status request is made for a report generation operation that succeeded, the server responds with an HTTP 200 OK
status code and includes a Bundle resource in the payload.
The first entry in the Bundle represents the outcome, with 200 OK
in its response.status
field.
The second entry in the Bundle is a DiagnosticReport
resource that contains the details of the report. This entry also includes a list of Observation
resources as contained resources.
Example of a successful AGP report generation completed with adequate data:
{
"id": "rdc-Bundle-response-AGP-report",
"type": "batch-response",
{
},
{
"fullUrl": "urn:uuid:550e8400-e29b-41d4-a716-446655440000",
"id": "rdc-DiagnosticReport-agp-report",
"https://roche.com/fhir/iop/StructureDefinition/rdc-DiagnosticReport"
]
},
{
"system": "https://roche.com/fhir/CodeSystem/general",
"display": "CGM Ambulatory Glucose Profile (AGP) During Reporting Period"
}
]
},
{
"https://roche.com/fhir/iop/StructureDefinition/rdc-Observation-CGM"
]
},
{
"system": "http://snomed.info/sct",
"display": "Interstitial fluid glucose concentration (observable entity)"
}
]
},
"reference": "Patient/34605fdc-74aa-4587-a5f0-92e6c5f64527"
},
"start": "2020-10-14T02:01:00+01:00",
"end": "2020-10-14T02:06:00+01:00"
},
"system": "http://unitsofmeasure.org",
},
{
"url": "https://roche.com/fhir/iop/StructureDefinition/ext-CGMFlags",
}
]
},
{
"url": "https://roche.com/fhir/iop/StructureDefinition/ext-CalibrationStatus",
}
],
"reference": "Device/6ae8bff3-910a-419d-96f6-de0e8fd1d64d"
}
},
{
"https://roche.com/fhir/iop/StructureDefinition/rdc-Observation-CGM"
]
},
{
"system": "http://snomed.info/sct",
"display": "Interstitial fluid glucose concentration (observable entity)"
}
]
},
"reference": "Patient/34605fdc-74aa-4587-a5f0-92e6c5f64527"
},
"start": "2020-10-15T02:01:00+01:00",
"end": "2020-10-15T02:06:00+01:00"
},
"system": "http://unitsofmeasure.org",
},
{
"url": "https://roche.com/fhir/iop/StructureDefinition/ext-CGMFlags",
}
]
},
{
"url": "https://roche.com/fhir/iop/StructureDefinition/ext-CalibrationStatus",
}
],
"reference": "Device/6ae8bff3-910a-419d-96f6-de0e8fd1d64d"
}
},
{
"https://roche.com/fhir/iop/StructureDefinition/rdc-Observation-Report"
]
},
{
"display": "Average glucose [Mass/ volume] in Interstitial fluid during Reporting Period"
}
]
},
"start": "2020-10-15T02:01:00+01:00",
"end": "2020-10-15T02:06:00+01:00"
},
"system": "http://unitsofmeasure.org",
}
},
{
"https://roche.com/fhir/iop/StructureDefinition/rdc-Observation-Report"
]
},
{
"system": "https://roche.com/fhir/CodeSystem/general",
"display": "CGM Glycemic Variability (%GV), during reporting period"
}
]
},
"start": "2020-10-15T02:01:00+01:00",
"end": "2020-10-15T02:06:00+01:00"
},
"system": "http://unitsofmeasure.org",
}
},
{
"https://roche.com/fhir/iop/StructureDefinition/rdc-Observation-Report"
]
},
},
"start": "2020-10-15T02:01:00+01:00",
"end": "2020-10-15T02:06:00+01:00"
},
"system": "http://unitsofmeasure.org",
}
},
{
"https://roche.com/fhir/iop/StructureDefinition/rdc-Observation-Report"
]
},
{
"display": "Glucose management indicator"
}
]
},
"start": "2020-10-15T02:01:00+01:00",
"end": "2020-10-15T02:06:00+01:00"
},
"system": "http://unitsofmeasure.org",
}
},
{
"https://roche.com/fhir/iop/StructureDefinition/rdc-Observation-Report"
]
},
{
"display": "Amount of time, in percent, as measured by CGM (continuous glucose monitor) device, spent above target glucose range, very high (TAR-VH >250 mg/dL (>13.9 mmol/L) (hyperglycemic) during reporting period"
}
]
},
"start": "2020-10-15T02:01:00+01:00",
"end": "2020-10-15T02:06:00+01:00"
},
"system": "http://unitsofmeasure.org",
}
},
{
"https://roche.com/fhir/iop/StructureDefinition/rdc-Observation-Report"
]
},
{
"display": "Amount of time, in percent, as measured by CGM (continuous glucose monitor) device, spent above target glucose range, high (TAR-H) 181-250 mg/ dL (10.1-13.9 mmol/L) (hyperglycemic) during reporting period"
}
]
},
"start": "2020-10-15T02:01:00+01:00",
"end": "2020-10-15T02:06:00+01:00"
},
"system": "http://unitsofmeasure.org",
}
},
{
"https://roche.com/fhir/iop/StructureDefinition/rdc-Observation-Report"
]
},
{
"display": "Amount of time, in percent, as measured by CGM (continuous glucose monitor) device, spent in target glucose range (70-180 mg/dL [3.9-10.0 mmol/L]) during reporting period. The primary goal for effective and safe glucose control is to increase the TIR whil"
}
]
},
"start": "2020-10-15T02:01:00+01:00",
"end": "2020-10-15T02:06:00+01:00"
},
"system": "http://unitsofmeasure.org",
}
},
{
"https://roche.com/fhir/iop/StructureDefinition/rdc-Observation-Report"
]
},
{
"display": "Amount of time, in percent, as measured by CGM (continuous glucose monitor) device, spent below target glucose range, low (TBR-L) 54-69 mg/dL (3.0-3.8 mmol/L) (hypoglycemic) during reporting period"
}
]
},
"start": "2020-10-15T02:01:00+01:00",
"end": "2020-10-15T02:06:00+01:00"
},
"system": "http://unitsofmeasure.org",
}
},
{
"https://roche.com/fhir/iop/StructureDefinition/rdc-Observation-Report"
]
},
{
"display": "Amount of time, in percent, as measured by CGM (continuous glucose monitor) device, spent below target glucose range, very low (TBR-VL) <54 mg/dL (<3.0 mmol/L) (hypoglycemic) during reporting period"
}
]
},
"start": "2020-10-15T02:01:00+01:00",
"end": "2020-10-15T02:06:00+01:00"
},
"system": "http://unitsofmeasure.org",
}
}
],
},
"start": "2023-10-03T06:32:00+01:00",
"end": "2023-10-03T07:30:00+01:00"
},
],
{
},
{
},
{
},
{
},
{
},
{
},
{
},
{
},
{
},
{
},
{
}
],
{
"url": "https://aws-cloud-location-of-AGP-Report",
"data": "QUdQIHJlcG9ydA==",
"hash": "2c9fa2fc8f4fd1b3184821e27dfc0b6960724633",
"creation": "2023-10-03T07:30:00+01:00",
}
]
},
"location": "DiagnosticReport/550e8400-e29b-41d4-a716-446655440000"
}
}
]
}
- If the patient does not have sufficient data to generate an report, the server responds with an HTTP 404 NOT_FOUND status code and includes a Bundle resource in the payload.
- The payload contains a report without data. Example of a successful report generation completed with insufficient data:
{
"id": "rdc-Bundle-response-AGP-report-not-found",
"type": "batch-response",
{
{
"diagnostics": "Report could not be generated due to insufficient data."
}
]
}
}
},
{
"fullUrl": "urn:uuid:550e8400-e29b-41d4-a716-446655450000",
"id": "550e8400-e29b-41d4-a716-446655450000",
{
"system": "https://roche.com/fhir/CodeSystem/general",
"display": "CGM Ambulatory Glucose Profile (AGP) During Reporting Period"
}
]
},
},
"start": "2011-05-23T00:00:00+00:00",
"end": "2011-05-27T23:59:59+00:00"
},
],
{
"url": "https://emr-integration-data-store-s3.s3.amazonaws.com/in/reports/AGP/EMR/PDF/08cbb4b5-5a58-457c-8a7f-da7e001071db-0.pdf?X-Amz-Security-Token=7Y4mB7WPG73gP5Ftn3evL0%2BogqgA%2F%2FWayx3bfrwIq8vbO%2FFOVRcpV5kMjKVZa81w%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20241211T070308Z&X-Amz-SignedHeaders=host&X-Amz-Credential=ASIAQJARWRBBZZUKPMD3%2F20241211%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Expires=1800&X-Amz-Signature=0461cb4f4e200bec04b79918c20fae45bdc6e52f47990f7805f99877634b4622",
}
]
},
"location": "DiagnosticReport/550e8400-e29b-41d4-a716-446655450000"
}
}
]
}
Report generation completed with failure
In accordance with the Asynchronous Interaction Request Pattern, when a status request is made for a report generation operation that failed, the server also responds with an HTTP 200 OK
status code (indicated that the status was successfully returned) and includes a Bundle resource in the payload. The Bundle has a single entry that represents the outcome in its response
field. The details of the error are provided in the response.status
and response.outcome
subfields.
This example illustrates a situation where the report generation process fails. The server returns a 500 INTERNAL_SERVER_ERROR status code along with an OperationOutcome resource detailing the error. The payload includes a Bundle that does not contain a PDF.
{
"id": "rdc-Bundle-response-AGP-report-internal-server-error",
"type": "batch-response",
{
"status": "500 INTERNAL_SERVER_ERROR",
}
}
},
{
"fullUrl": "urn:uuid:550e8400-e29b-41d4-a716-446655430000",
"id": "550e8400-e29b-41d4-a716-446655430000",
{
"system": "https://roche.com/fhir/CodeSystem/general",
"display": "CGM Ambulatory Glucose Profile (AGP) During Reporting Period"
}
]
},
},
"start": "2024-01-01T00:00:00+00:00",
"end": "2024-02-28T00:00:00+00:00"
},
]
},
"location": "DiagnosticReport/550e8400-e29b-41d4-a716-446655430000"
}
}
]
}
Report generation status request processing failed.
If there is an error while processing the status request, the server returns an OperationOutcome resource. Here is an example of an error response:
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Unable to check report generation status."
}
]
}