Data Format Changes

When moving from Qure Legacy APIs to Platform APIs, the most significant changes are observed in the JSON design of the /results API response. To facilitate a smooth transition without necessitating a complete overhaul of the existing integration, we've implemented a custom logic. This allows you to opt for the Legacy JSON response format if preferred.

If you opt to continue receiving the Legacy JSON format, Qure will add the following configuration to your SourceRunConfig file.

{
  "client_config": {
    "client": "CXRAPI",
    "enable_client_results": true
  }
} 

Here is an overview of how it works:

The configuration is set up by Qure's backend team, and a new Authorization token is issued for your account. When you request the /results API with this token, the response format (Legacy or Platform) is determined by the SourceRunConfig associated with your token.

Understanding JSON Structure Changes

Legacy JSON Response

When you opt for the Legacy result format, the top-level structure of the JSON response you receive from the /results API will appear as follows:

{
  "success": true,
  "message": "Results retrieved successfully",
  "files": {...},
  "metadata": {...},
  "tags": [...],
  "patient": "<patient_id>",
  "report": "<report_text>\\n\\n<additional_report_text>\\n\\n<more_report_text>",
  "raw": "<image_id>",
  "integrity": true
}
  • files: An object listing all related assets like images and various reports, each identified by a URL.

  • metadata: An object containing metadata associated with the DICOM image.

  • tags: An array detailing conditions, presence indicators, and diagnostic metrics for nuanced patient assessments.

  • patient: A string representing the Patient ID.

  • report: A string containing a summary of predictions.

  • raw: A string denoting the image ID.

  • integrity: A boolean value; true indicates that the DICOM image is chest X-ray.

Example Legacy JSON Response

{
	"success": true,
	"message": "Results retrieved successfully",
	"files": {
		"sc": "<https://exampleurl.com>",
		"sc_full_png": "<https://exampleurl.com>",
		"sc_dicom_thumbnail": "<https://exampleurl.com>",
		"original": "<https://exampleurl.com>",
		"sc_png": "<https://exampleurl.com>",
		"original_png": "<https://exampleurl.com>",
		"reports": {
			"pdf": "<https://exampleurl.com>",
			"sr": "<https://exampleurl.com>",
			"dcm": "<https://exampleurl.com>"
		}
	},
	"metadata": {},
	"tags": [
		{
			"tag": "<tag_name>",
			"presence": "..",
			"location": [],
			"results": "...",
			"description": "<description>"
		},
		...
	],
	"patient": "<patient_id>",
	"report": "<report_text>\\n\\n<additional_report_text>\\n\\n<more_report_text>",
	"raw": "<image_id>",
	"integrity": true
}

Platform JSON Response

When you opt for the Platform result format, the top-level structure of the JSON response you receive from the /results API will appear as follows:

{
  "success": true,
  "message": "Results retrieved successfully!",
  "triage_status": "<triage_status>",
  "result": {...},
  "usecase": "qxr"
}
  • triage_status: A string indicating the triage status.

  • result: An object containing:

    • report: An object with detailed findings, impressions related to the image analysis.

    • files: An object providing a list of related assets, such as images and various reports, each with a URL.

  • usecase: A string describing the API use case, e.g., qXR.

Example Platform JSON Response

{
	"success": true,
	"message": "Results retrieved successfully!",
	"triage_status": "critical",
	"result": {
		"report": {
			"findings": "<findings_text>\\n\\n<additional_findings_text>\\n\\n<more_findings_text>",
			"impression": "Abnormal study",
			"findings_list": [
				[
					"<report_key>",
					"<findings_text>\\n\\n"
				],
				...
			]
		},
		"files": {
			"sc": [
				"<https://exampleurl.com>"
			],
			"sc_full_png": [
				"<https://exampleurl.com>"
			],
			"sc_thumbnail": [
				"<https://exampleurl.com>"
			],
			"sc_dicom_thumbnail": [
				"<https://exampleurl.com>"
			],
			"original_thumbnail": [
				"<https://exampleurl.com>"
			],
			"original": [
				"<https://exampleurl.com>"
			],
			"report_pdf": [
				"<https://exampleurl.com>"
			],
			"report_dcm": [
				"<https://exampleurl.com>"
			],
			"report_sr": [
				"<https://exampleurl.com>"
			]
		}
	},
	"usecase": "qxr"
}

Last updated