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 requests
url = "https://api.sandbox.metriport.com/medical/v1/patient/{patientId}/consolidated/query/{requestId}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sandbox.metriport.com/medical/v1/patient/{patientId}/consolidated/query/{requestId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.metriport.com/medical/v1/patient/{patientId}/consolidated/query/{requestId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.metriport.com/medical/v1/patient/{patientId}/consolidated/query/{requestId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sandbox.metriport.com/medical/v1/patient/{patientId}/consolidated/query/{requestId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.metriport.com/medical/v1/patient/{patientId}/consolidated/query/{requestId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyimport { MetriportMedicalApi } from "@metriport/api-sdk";
const metriport = new MetriportMedicalApi(apiToken);
const status =
await metriport.getSingleConsolidatedQueryStatus(
patientId,
requestId
);
FHIR
Get Single Consolidated Data Query Status
Get the status of a single query for patient’s consolidated data.
Listen to this pageabout 1 min
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 requests
url = "https://api.sandbox.metriport.com/medical/v1/patient/{patientId}/consolidated/query/{requestId}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sandbox.metriport.com/medical/v1/patient/{patientId}/consolidated/query/{requestId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.metriport.com/medical/v1/patient/{patientId}/consolidated/query/{requestId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.metriport.com/medical/v1/patient/{patientId}/consolidated/query/{requestId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sandbox.metriport.com/medical/v1/patient/{patientId}/consolidated/query/{requestId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.metriport.com/medical/v1/patient/{patientId}/consolidated/query/{requestId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyimport { 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
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
);
The start date (inclusive) for which to filter resources to count - formatted
YYYY-MM-DD as per
ISO 8601.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"
}

