GET
/
medical
/
v1
/
patient
/
{patientId}
/
consolidated
/
query
/
{requestId}
Get Single Consolidated Data Query Status
curl --request GET \
  --url https://api.sandbox.metriport.com/medical/v1/patient/{patientId}/consolidated/query/{requestId} \
  --header 'x-api-key: <api-key>'
import { MetriportMedicalApi } from "@metriport/api-sdk";

const metriport = new MetriportMedicalApi(apiToken);

const status =
  await metriport.getSingleConsolidatedQueryStatus(
    patientId,
    requestId
  );
This endpoint returns the status of a single query. To list all queries currently in progress, see Get Consolidated Data Query Status. To trigger a new query you can start a consolidated query.

Path Params

patientId
string
required
The ID of the Patient.
requestId
string
required
The ID of consolidated query request.

Response

Returns the status of the specified query.
import { MetriportMedicalApi } from "@metriport/api-sdk";

const metriport = new MetriportMedicalApi(apiToken);

const status =
  await metriport.getSingleConsolidatedQueryStatus(
    patientId,
    requestId
  );
requestId
string
required
The ID of the request.
status
string
required
The status of the request. Can be one of processing, completed, or failed.
conversionType
string
required
The format of the resulting data. Can be one of pdf, html, or json.
startedAt
string
The date and time the request was started - formatted YYYY-MM-DDTHH:MM:SSZ as per ISO 8601.
resources
string[]
Comma-separated list of resource types.
dateFrom
string
The start date (inclusive) for which to filter resources to count - formatted YYYY-MM-DD as per ISO 8601.
dateFrom
string
The end date (inclusive) for which to filter resources to count - formatted YYYY-MM-DD as per ISO 8601.
{
  "requestId": "5f4b3b4b-4b3b-4b3b-4b3b-4b3b4b3b4b3b",
  "status": "processing",
  "startedAt": "2021-01-01T00:00:00Z",
  "dateFrom": "2021-01-01",
  "dateTo": "2021-01-31",
  "resources": ["Observation", "MedicationRequest"],
  "conversionType": "pdf"
}