RDC Interoperability Guide
1.2.0

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:

{
"resourceType": "Bundle",
"id": "rdc-Bundle-response-AGP-report",
"type": "batch-response",
"entry": [
{
"status": "200 OK"
}
},
{
"fullUrl": "urn:uuid:550e8400-e29b-41d4-a716-446655440000",
"resourceType": "DiagnosticReport",
"id": "rdc-DiagnosticReport-agp-report",
"meta": {
"profile": [
"https://roche.com/fhir/iop/StructureDefinition/rdc-DiagnosticReport"
]
},
"status": "final",
"code": {
"coding": [
{
"code": "R7786-7",
"system": "https://roche.com/fhir/CodeSystem/general",
"display": "CGM Ambulatory Glucose Profile (AGP) During Reporting Period"
}
]
},
{
"resourceType": "Observation",
"id": "Obs-1",
"meta": {
"profile": [
"https://roche.com/fhir/iop/StructureDefinition/rdc-Observation-CGM"
]
},
"status": "final",
"code": {
"coding": [
{
"code": "434910001",
"system": "http://snomed.info/sct",
"display": "Interstitial fluid glucose concentration (observable entity)"
}
]
},
"subject": {
"reference": "Patient/34605fdc-74aa-4587-a5f0-92e6c5f64527"
},
"start": "2020-10-14T02:01:00+01:00",
"end": "2020-10-14T02:06:00+01:00"
},
"origin": {
"value": 0,
"code": "mg/dL",
"system": "http://unitsofmeasure.org",
"unit": "mg/dL"
},
"interval": 60000,
"intervalUnit": "ms",
"data": "100 99 89 89",
{
"url": "https://roche.com/fhir/iop/StructureDefinition/ext-CGMFlags",
"valueString": "HI; X; X; LO"
}
]
},
{
"url": "https://roche.com/fhir/iop/StructureDefinition/ext-CalibrationStatus",
"valueString": "calibrated"
}
],
"device": {
"reference": "Device/6ae8bff3-910a-419d-96f6-de0e8fd1d64d"
}
},
{
"resourceType": "Observation",
"id": "Obs-2",
"meta": {
"profile": [
"https://roche.com/fhir/iop/StructureDefinition/rdc-Observation-CGM"
]
},
"status": "final",
"code": {
"coding": [
{
"code": "434910001",
"system": "http://snomed.info/sct",
"display": "Interstitial fluid glucose concentration (observable entity)"
}
]
},
"subject": {
"reference": "Patient/34605fdc-74aa-4587-a5f0-92e6c5f64527"
},
"start": "2020-10-15T02:01:00+01:00",
"end": "2020-10-15T02:06:00+01:00"
},
"origin": {
"value": 0,
"code": "mg/dL",
"system": "http://unitsofmeasure.org",
"unit": "mg/dL"
},
"interval": 60000,
"intervalUnit": "ms",
"data": "100 99 89 89",
{
"url": "https://roche.com/fhir/iop/StructureDefinition/ext-CGMFlags",
"valueString": "HI; X; X; LO"
}
]
},
{
"url": "https://roche.com/fhir/iop/StructureDefinition/ext-CalibrationStatus",
"valueString": "calibrated"
}
],
"device": {
"reference": "Device/6ae8bff3-910a-419d-96f6-de0e8fd1d64d"
}
},
{
"resourceType": "Observation",
"id": "Obs-3",
"meta": {
"profile": [
"https://roche.com/fhir/iop/StructureDefinition/rdc-Observation-Report"
]
},
"status": "final",
"code": {
"coding": [
{
"code": "97507-8",
"system": "http://loinc.org",
"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",
"code": "mg/dL",
"unit": "mg/dL",
"value": 136
}
},
{
"resourceType": "Observation",
"id": "Obs-4",
"meta": {
"profile": [
"https://roche.com/fhir/iop/StructureDefinition/rdc-Observation-Report"
]
},
"status": "final",
"code": {
"coding": [
{
"code": "R9599-2",
"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",
"code": "mg/dL",
"unit": "mg/dL",
"value": 35.5
}
},
{
"resourceType": "Observation",
"id": "Obs-5",
"meta": {
"profile": [
"https://roche.com/fhir/iop/StructureDefinition/rdc-Observation-Report"
]
},
"status": "final",
"code": {
"coding": [
{
"code": "97504-5",
"system": "http://loinc.org",
"display": "Percent sensor usage"
}
]
},
"start": "2020-10-15T02:01:00+01:00",
"end": "2020-10-15T02:06:00+01:00"
},
"system": "http://unitsofmeasure.org",
"code": "%",
"unit": "%",
"value": 100
}
},
{
"resourceType": "Observation",
"id": "Obs-6",
"meta": {
"profile": [
"https://roche.com/fhir/iop/StructureDefinition/rdc-Observation-Report"
]
},
"status": "final",
"code": {
"coding": [
{
"code": "97506-0",
"system": "http://loinc.org",
"display": "Glucose management indicator"
}
]
},
"start": "2020-10-15T02:01:00+01:00",
"end": "2020-10-15T02:06:00+01:00"
},
"system": "http://unitsofmeasure.org",
"code": "%",
"unit": "%",
"value": 6.6
}
},
{
"resourceType": "Observation",
"id": "Obs-7",
"meta": {
"profile": [
"https://roche.com/fhir/iop/StructureDefinition/rdc-Observation-Report"
]
},
"status": "final",
"code": {
"coding": [
{
"code": "104639-0",
"system": "http://loinc.org",
"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",
"code": "%",
"unit": "%",
"value": 3
}
},
{
"resourceType": "Observation",
"id": "Obs-8",
"meta": {
"profile": [
"https://roche.com/fhir/iop/StructureDefinition/rdc-Observation-Report"
]
},
"status": "final",
"code": {
"coding": [
{
"code": "104640-8",
"system": "http://loinc.org",
"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",
"code": "%",
"unit": "%",
"value": 14
}
},
{
"resourceType": "Observation",
"id": "Obs-9",
"meta": {
"profile": [
"https://roche.com/fhir/iop/StructureDefinition/rdc-Observation-Report"
]
},
"status": "final",
"code": {
"coding": [
{
"code": "97510-2",
"system": "http://loinc.org",
"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",
"code": "%",
"unit": "%",
"value": 78
}
},
{
"resourceType": "Observation",
"id": "Obs-10",
"meta": {
"profile": [
"https://roche.com/fhir/iop/StructureDefinition/rdc-Observation-Report"
]
},
"status": "final",
"code": {
"coding": [
{
"code": "104641-6",
"system": "http://loinc.org",
"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",
"code": "%",
"unit": "%",
"value": 5
}
},
{
"resourceType": "Observation",
"id": "Obs-11",
"meta": {
"profile": [
"https://roche.com/fhir/iop/StructureDefinition/rdc-Observation-Report"
]
},
"status": "final",
"code": {
"coding": [
{
"code": "104642-4",
"system": "http://loinc.org",
"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",
"code": "%",
"unit": "%",
"value": 0
}
}
],
"subject": {
"reference": "Patient-Reference"
},
"start": "2023-10-03T06:32:00+01:00",
"end": "2023-10-03T07:30:00+01:00"
},
{
"reference": "Organization-Reference"
},
{
"reference": "Practitioner-Reference"
}
],
"result": [
{
"reference": "#Obs-1"
},
{
"reference": "#Obs-2"
},
{
"reference": "#Obs-3"
},
{
"reference": "#Obs-4"
},
{
"reference": "#Obs-5"
},
{
"reference": "#Obs-6"
},
{
"reference": "#Obs-7"
},
{
"reference": "#Obs-8"
},
{
"reference": "#Obs-9"
},
{
"reference": "#Obs-10"
},
{
"reference": "#Obs-11"
}
],
{
"url": "https://aws-cloud-location-of-AGP-Report",
"data": "QUdQIHJlcG9ydA==",
"hash": "2c9fa2fc8f4fd1b3184821e27dfc0b6960724633",
"contentType": "application/pdf",
"creation": "2023-10-03T07:30:00+01:00",
"title": "AGP-Report"
}
]
},
"status": "200 OK",
"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:

{
"resourceType": "Bundle",
"id": "rdc-Bundle-response-AGP-report-not-found",
"type": "batch-response",
"entry": [
{
"status": "404 NOT_FOUND",
"outcome": {
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Report could not be generated due to insufficient data."
}
]
}
}
},
{
"fullUrl": "urn:uuid:550e8400-e29b-41d4-a716-446655450000",
"resourceType": "DiagnosticReport",
"id": "550e8400-e29b-41d4-a716-446655450000",
"status": "final",
"code": {
"coding": [
{
"code": "R7786-7",
"system": "https://roche.com/fhir/CodeSystem/general",
"display": "CGM Ambulatory Glucose Profile (AGP) During Reporting Period"
}
]
},
"subject": {
"reference": "Patient/123"
},
"start": "2011-05-23T00:00:00+00:00",
"end": "2011-05-27T23:59:59+00:00"
},
{
"reference": "Organization/org1234"
}
],
{
"contentType": "application/pdf",
"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",
"title": "AGP-Report",
"creation": "2024-12-09T05:27:12+00:00"
}
]
},
"status": "200 OK",
"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.

{
"resourceType": "Bundle",
"id": "rdc-Bundle-response-AGP-report-internal-server-error",
"type": "batch-response",
"entry": [
{
"status": "500 INTERNAL_SERVER_ERROR",
"outcome": {
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Report could not be generated."
}
]
}
}
},
{
"fullUrl": "urn:uuid:550e8400-e29b-41d4-a716-446655430000",
"resourceType": "DiagnosticReport",
"id": "550e8400-e29b-41d4-a716-446655430000",
"status": "final",
"code": {
"coding": [
{
"code": "R7786-7",
"system": "https://roche.com/fhir/CodeSystem/general",
"display": "CGM Ambulatory Glucose Profile (AGP) During Reporting Period"
}
]
},
"subject": {
"reference": "Patient/123"
},
"start": "2024-01-01T00:00:00+00:00",
"end": "2024-02-28T00:00:00+00:00"
},
{
"reference": "Organization/org1234"
}
]
},
"status": "200 OK",
"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."
    }
  ]
}