Streaming Endpoint API Reference
How does Clair streaming endpoints work?
Unlike a traditional REST API, streaming in the Clair is event-driven and uses SSE under the hood to send tokens to your frontend as soon as they generate. The process is at follow:
- You make a request to our server with your query
- Our server responds with a query id and a unique streaming channel name
- Your frontend using the Clair SDK listens to the events sent to your unique channel for that specific query
- As events get generated and sent by our server, your frontend gets notified and receive their content
- You don't have to manage websockets or any complicated setup. The Clair SDK manages this for your under the hood
- You simply need to
- Get a streaming channel id and a query id from our servers via a traditional REST API
- Render the contents of the events as they come to your frontend
The integration is possible using any frontend framework or technology. It also works, by simply including the Clair SDK script tag in your html.
We are available to help!
In addition to this documentation Swagger and ReDoc style documentations are available.
Get Clinical Query Streaming Channel
The "Get Clinical Query Streaming Channel" endpoint allows you to create a streaming channel for a clinical query. By making a POST request to the endpoint https://prod.askclair.ai/api/v1/get-clinical-query-streaming-channel/, you can initiate the creation of a channel.
In addition to your query, you can supply the following optional flags for additional functionalities.
- Clinical summary: When set to true, the model will summarize the literature about the topic (drug or disease). Rather than answer a quesstion.
- override: By default, our model will not answer out of scope questions. When set to true, this will expand the search even if its out of scope.
- limit: This flag when set to true will limit the response back to 25 words. Helpful when testing or for demos.
Once the request is successful, the API will respond with the channel name and query ID, both of which will be returned with a status code of 200. The channel name and query ID are crucial for listening to the answer, context, and references using our Clair SDK in your frontend application.
To enable streaming in your frontend, you can utilize the Clair SDK library, which can be accessed at the following URL: https://prod.askclair.ai/static/js/galenSDK.min.js.
For a demonstration of how to implement the streaming functionality, you can refer to the example application available on GitHub at https://github.com/Jonathan-Adly/clair_streaming_demo. This example application provides a practical illustration of how to integrate and use the Clair SDK for streaming clinical query results.
Events that will be received and should be handled by your frontend:
- start
- Event data =
{"text": "question asked"}
- Event data =
- answer
- Event data =
{"text" : "generated tokens"}
- Event data =
- answer_done (optional to handle - conveinence event with the full answer in html)
- Event data =
{"text" : "Full answer in HTML"}
- Event data =
- context
- Event data =
{"text": "generated tokens"}
- Event data =
- references
- Event data =
{"title": "reference title", "doi": "reference doi", "abstract": "reference abstract", "url": "reference url"}
- Event data =
- end
- Event data =
{"text": "query_id"}
- Event data =
import requests
token = f"token {your_token}"
url = "https://prod.askclair.ai/api/v1/get-clinical-query-streaming-channel/"
headers = {'Authorization': token, 'Content-Type': 'application/json'}
payload = {
"query": "string",
"clinical_summary_mode": false, #optional
"override": false, #optional
"limit": false #optional
}
response = requests.post(url, json=payload, headers=headers)
return response.json()
const fetch = require('node-fetch');
const token = `token ${your_token}`;
const url = "https://prod.askclair.ai/api/v1/get-clinical-query-streaming-channel/";
const headers = {
'Authorization': token,
'Content-Type': 'application/json'
};
const payload = {
"query": "string",
"clinical_summary_mode": false, //optional
"override": false, //optional
"limit": false //optional
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => {
console.log(data);
})
.catch(error => {
console.error(error);
});
This returns two string values. channel_name is the name of the channel and query_id is the query ID.
Here is an example of how to handle the events on your frontend:
<p id="answer"> Answer: </p>
<script src="https://prod.askclair.ai/static/js/galenSDK.min.js"> </script>
<script>
//call start to start the streaming process
function start() {
// channelName and queryID comes from our server after a post request
clairConnect(channelName, queryID).then(function(channel) {
channel.bind('start', function(data) {
console.log("started stream..");
});
channel.bind("answer", function (data) {
let text = data.text;
document.getElementById("answer").innerHTML += text;
});
// handle rest of events
}).catch(function(error) {
console.log("Error: " + error);
});
// Call the ready to listen function when your are ready to reveive event.
// note - this function, must be called after the channel is connected.
clairReadyToListen(channelName, queryID);
}
</script>
Get Query Details
The "Get Query Details" endpoint allows you to retrieve the answer, context, and references for a clinical query after the streaming process is completed. To obtain the results, you need to make a GET request to the endpoint https://prod.askclair.ai/api/v1/get-query-details/{query_id}/, where {query_id} represents the unique identifier of the specific query for which you want to retrieve the details.
This endpoint is particularly useful when you have completed the streaming process and need to obtain the final results for a specific query. By using the query ID, you can retrieve the answer, context, and references associated with the clinical query you have previously streamed.
By sending the GET request, the API will respond with the relevant details associated with the specified query. This includes the generated answer, the context or evidence summary, and the references that support the answer.
const fetch = require('node-fetch');
const url = "https://prod.askclair.ai/api/v1/get-query-details/{query_id}/";
const token = "YOUR_TOKEN";
fetch(url,{
headers: {
"Authorization": `token ${token}`,
"Content-Type": "application/json"
}
})
.then(response => response.json())
.then(data => {
console.log(data);
})
.catch(error => {
console.error(error);
});
Ensure that you replace {query_id} in the URL with the actual query identifier you want to retrieve details for. Once you receive the response, you can process it based on your application's requirements.
{
"question": "string",
"answer": "string",
"context_summary": "string",
"references": [
{
"abstract": "string",
"title": "string",
"link": "http://example.com",
"doi": "string"
}
],
"helpful_links": [
{
"title": "string",
"link": "http://example.com",
}
],
"FDA_monographs": [
"title": "string",
"link": "http://example.com",
],
"guidelines": [
"title": "string",
"link": "http://example.com",
]
}
Create Bulk ICD10 Streaming Channel
The "Create Bulk ICD10 Streaming Channel" endpoint allows you to create a streaming channel for a bulk ICD10 query (up to 5 codes at a time). By making a POST request to the endpoint https://prod.askclair.ai/api/v1/create-bulk-icd10-streaming-channel/, you can initiate the creation of a channel.
Once the request is successful, the API will respond with the channel name and query ID, both of which will be returned with a status code of 200. The channel name and query ID are crucial for listening to the answer using our Clair SDK in your frontend application.
To enable streaming in your frontend, you can utilize the Clair SDK library, which can be accessed at the following URL: https://prod.askclair.ai/static/js/galenSDK.min.js.
For a demonstration of how to implement the streaming functionality, you can refer to the example application available on GitHub at https://github.com/Jonathan-Adly/clair_streaming_demo. This example application provides a practical illustration of how to integrate and use the Clair SDK for streaming clinical query results.
Events that will be received and should be handled by your frontend:
- start
- Event data =
{"text": "codes submitted"}
- Event data =
- answer
- Event data =
{"text": "generated tokens}
- Event data =
- end
- Event data =
{"text: "query id"}
- Event data =
import requests
token = f"token {your_token}"
url = "https://prod.askclair.ai/api/v1/create-bulk-icd10-streaming-channel/"
headers = {'Authorization': token, 'Content-Type': 'application/json'}
payload = {
"codes": ["string"],
}
response = requests.post(url, json=payload, headers=headers)
return response.json()
const fetch = require('node-fetch');
const token = `token ${your_token}`;
const url = "https://prod.askclair.ai/api/v1/create-bulk-icd10-streaming-channel/";
const headers = {
'Authorization': token,
'Content-Type': 'application/json'
};
const payload = {
"codes": ["string"],
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => {
console.log(data);
})
.catch(error => {
console.error(error);
});
This returns two string values. channel_name is the name of the channel and query_id is the query ID.
Get Bulk ICD10 Query Details
The "Get Bulkd ICD10 Query Details" endpoint allows you to retrieve the answer for an ICD10 query after the streaming process is completed. To obtain the results, you need to make a GET request to the endpoint https://prod.askclair.ai/api/v1//get-bulk-icd10-query-details/{query_id}/, where {query_id} represents the unique identifier of the specific query for which you want to retrieve the details.
By sending the GET request, the API will respond with the relevant details associated with the specified query.
const fetch = require('node-fetch');
const url = "https://prod.askclair.ai/api/v1/get-bulk-icd10-query-details/{query_id}/";
const token = "YOUR_TOKEN";
fetch(url,{
headers: {
"Authorization": `token ${token}`,
"Content-Type": "application/json"
}
})
.then(response => response.json())
.then(data => {
console.log(data);
})
.catch(error => {
console.error(error);
});
Ensure that you replace {query_id} in the URL with the actual query identifier you want to retrieve details for. Once you receive the response, you can process it based on your application's requirements.
This endpoint is particularly useful when you have completed the streaming process and need to obtain the final results for a specific query. By using the query ID, you can retrieve the clinical summary, and the icd10 codes associated with the query you have previously streamed.
Create Stewardship Streaming Channel
The "Create Stewardship Streaming Channel" endpoint allows you to create a streaming channel for a stewardship query. By making a POST request to the endpoint https://prod.askclair.ai/api/v1/create-stewardship-streaming-channel/, you can initiate the creation of a channel.
Once the request is successful, the API will respond with the channel name and query ID, both of which will be returned with a status code of 200. The channel name and query ID are crucial for listening to the answer using our Clair SDK in your frontend application.
To enable streaming in your frontend, you can utilize the Clair SDK library, which can be accessed at the following URL: https://prod.askclair.ai/static/js/galenSDK.min.js.
For a demonstration of how to implement the streaming functionality, you can refer to the example application available on GitHub at https://github.com/Jonathan-Adly/clair_streaming_demo. This example application provides a practical illustration of how to integrate and use the Clair SDK for streaming stewardship query results.
Events that will be received and should be handled by your frontend:
- start
- Event data =
{"text": "question asked"}
- Event data =
- answer
- Event data =
{"text" : "generated tokens"}
- Event data =
- answer_done (optional to handle - conveinence event with the full answer in html)
- Event data =
{"text" : "Full answer in HTML"}
- Event data =
- context
- Event data =
{"text": "generated tokens"}
- Event data =
- references
- Event data =
{"title": "reference title", "doi": "reference doi", "abstract": "reference abstract", "url": "reference url"}
- Event data =
- end
- Event data =
{"text": "query_id"}
- Event data =
import requests
token = f"token {your_token}"
url = "https://prod.askclair.ai/api/v1/create-stewardship-streaming-channel/"
headers = {'Authorization': token, 'Content-Type': 'application/json'}
payload = {
"infection": "string",
"age": 120, #optional
"weight": 300, #optional
"crcl": 200, #optional
"liver_disease": true #optional
}
response = requests.post(url, json=payload, headers=headers)
return response.json()
const fetch = require('node-fetch');
const token = `token ${your_token}`;
const url = "https://prod.askclair.ai/api/v1/create-stewardship-streaming-channel/";
const headers = {
'Authorization': token,
'Content-Type': 'application/json'
};
const payload = {
"infection": "string",
"age": 120,
"weight": 300,
"crcl": 200,
"liver_disease": true
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => {
console.log(data);
})
.catch(error => {
console.error(error);
});
This returns two string values. channel_name is the name of the channel and query_id is the query ID.
Get Stewardship Query Details
The "Get Stewardship Query Details" endpoint allows you to retrieve the answer for a stewardship query after the streaming process is completed. To obtain the results, you need to make a GET request to the endpoint https://prod.askclair.ai/api/v1/get-stewardship-query-details/{query_id}/, where {query_id} represents the unique identifier of the specific query for which you want to retrieve the details.
By sending the GET request, the API will respond with the relevant details associated with the specified query.
const fetch = require('node-fetch');
const url = "https://prod.askclair.ai/api/v1/get-stewardship-query-details/{query_id}/";
const token = "YOUR_TOKEN";
fetch(url,{
headers: {
"Authorization": `token ${token}`,
"Content-Type": "application/json"
}
})
.then(response => response.json())
.then(data => {
console.log(data);
})
.catch(error => {
console.error(error);
});
Ensure that you replace {query_id} in the URL with the actual query identifier you want to retrieve details for. Once you receive the response, you can process it based on your application's requirements.
This endpoint is particularly useful when you have completed the streaming process and need to obtain the final results for a specific query. By using the query ID, you can retrieve the answer, and the case associated with the query you have previously streamed.
{
"question": "string",
"answer": "string",
"context_summary": "string",
"references": [
{
"abstract": "string",
"title": "string",
"link": "http://example.com",
"doi": "string"
}
],
"helpful_links": [
{
"title": "string",
"link": "http://example.com",
}
],
"FDA_monographs": [
"title": "string",
"link": "http://example.com",
],
"guidelines": [
"title": "string",
"link": "http://example.com",
]
}
Create Interaction Streaming Channel
The "Create Interactions Streaming Channel" endpoint allows you to create a streaming channel for a drug interactions query (up to 25 drugs at a time). By making a POST request to the endpoint https://prod.askclair.ai/api/v1/create-interactions-streaming-channel/, you can initiate the creation of a channel.
Once the request is successful, the API will respond with the channel name and query ID, both of which will be returned with a status code of 200. The channel name and query ID are crucial for listening to the answer using our Clair SDK in your frontend application.
To enable streaming in your frontend, you can utilize the Clair SDK library, which can be accessed at the following URL: https://prod.askclair.ai/static/js/galenSDK.min.js.
For a demonstration of how to implement the streaming functionality, you can refer to the example application available on GitHub at https://github.com/Jonathan-Adly/clair_streaming_demo. This example application provides a practical illustration of how to integrate and use the Clair SDK for streaming drug interactions results.
Events that will be received and should be handled by your frontend:
- start
- Event data =
{"text": "Interacting drug pairs"},
- Event data =
- new_interaction
- Event data =
{"id": "unique id for each interaction"}
- Event data =
- drug_pair
- Event data =
{"text": "drug pair, example: 'simvastatin, atorvastatin' ", "id": "id referenced in new_interaction"}
- Event data =
- severity
- Event data =
{"text": "severity of interaction, example: Major", "id": "id referenced in new_interaction"}
- Event data =
- recommendation
- Event data =
{"text": "short recommendation, example: Contraindicated", "id": "id referenced in new_interaction"}
- Event data =
- description
- Event data =
{"text": "interaction description", "id": "id referenced in new_interaction"}
- Event data =
- management
- Event data =
{"text": "management ", "id": "id referenced in new_interaction"}
- Event data =
- references
- Event data =
{"title": "title", "doi": "doi", "url": "url", "abstract": "abstract", "id": id}
- Event data =
- end
- Event data =
{"query_id": "query_id"}
- Event data =
import requests
token = f"token {your_token}"
url = "https://prod.askclair.ai/api/v1/create-interactions-streaming-channel/"
headers = {'Authorization': token, 'Content-Type': 'application/json'}
payload = {
"drugs": ["string", "string"] #min 2 drugs, max 25 drugs.
}
response = requests.post(url, json=payload, headers=headers)
return response.json()
const fetch = require('node-fetch');
const token = `token ${your_token}`;
const url = "https://prod.askclair.ai/api/v1/create-interactions-streaming-channel/";
const headers = {
'Authorization': token,
'Content-Type': 'application/json'
};
const payload = {
drugs": ["string", "string"] //min 2 drugs, max 25 drugs.
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => {
console.log(data);
})
.catch(error => {
console.error(error);
});
This returns two string values. channel_name is the name of the channel and query_id is the query ID.
Get Interaction Query Details
The "Get Interaction Query Details" endpoint allows you to retrieve the answer for a stewardship query after the streaming process is completed. To obtain the results, you need to make a GET request to the endpoint https://prod.askclair.ai/api/v1/get-interactions-query-details/{query_id}/, where {query_id} represents the unique identifier of the specific query for which you want to retrieve the details.
By sending the GET request, the API will respond with the relevant details associated with the specified query.
const fetch = require('node-fetch');
const url = "https://prod.askclair.ai/api/v1/get-stewardship-query-details/{query_id}/";
const token = "YOUR_TOKEN";
fetch(url,{
headers: {
"Authorization": `token ${token}`,
"Content-Type": "application/json"
}
})
.then(response => response.json())
.then(data => {
console.log(data);
})
.catch(error => {
console.error(error);
});
Ensure that you replace {query_id} in the URL with the actual query identifier you want to retrieve details for. Once you receive the response, you can process it based on your application's requirements.
This endpoint is particularly useful when you have completed the streaming process and need to obtain the final results for a specific query. By using the query ID, you can retrieve the answer, and the case associated with the query you have previously streamed.
{
"question": "string",
"answer": "string",
"context_summary": "string",
"references": [
{
"abstract": "string",
"title": "string",
"link": "http://example.com",
"doi": "string"
}
]
}
Get BYOD Query Streaming Channel
The "Create Bring Your Own Document Streaming Channel" endpoint allows you to create a streaming channel for a BYOD query. By making a POST request to the endpoint https://prod.askclair.ai/api/v1/create-byod-streaming-channel/, you can initiate the creation of a channel.
You can search all your documents, or optionally further filter by specific collection name or a user identifier that you supply at the time of document upload. For example, if you have users or departments within your system. You can filter your documents depending on who is making the query.
Once the request is successful, the API will respond with the channel name and query ID, both of which will be returned with a status code of 200. The channel name and query ID are crucial for listening to the answer, context, and references using our Clair SDK in your frontend application.
To enable streaming in your frontend, you can utilize the Clair SDK library, which can be accessed at the following URL: https://prod.askclair.ai/static/js/galenSDK.min.js.
For a demonstration of how to implement the streaming functionality, you can refer to the example application available on GitHub at https://github.com/Jonathan-Adly/clair_streaming_demo. This example application provides a practical illustration of how to integrate and use the Clair SDK for streaming clinical query results.
Events that will be received and should be handled by your frontend:
- start
- Event data =
{"text": "question asked"}
- Event data =
- answer
- Event data =
{"text" : "generated tokens"}
- Event data =
- answer_done (optional to handle - conveinence event with the full answer in html)
- Event data =
{"text" : "Full answer in HTML"}
- Event data =
- context
- Event data =
{"text": "generated tokens"}
- Event data =
- references
- Event data =
{"title": "your document title", "confident": "80.25", "text": "relevant text in your document", "chunk_id": "the id of relevant text in our database"}
- Event data =
- end
- Event data =
{"text": "query_id"}
- Event data =
Please note, references are your own documents in that case. They are structered as a JSON with title (of your document), confidence (90.23), and text.
import requests
token = f"token {your_token}"
url = "https://prod.askclair.ai/api/v1/create-byod-streaming-channel/"
headers = {'Authorization': token, 'Content-Type': 'application/json'}
payload = {
"query": "string",
"collection_name: "string", #optional
"user_identifier": "string" #optional
}
response = requests.post(url, json=payload, headers=headers)
return response.json()
const fetch = require('node-fetch');
const token = `token ${your_token}`;
const url = "https://prod.askclair.ai/api/v1/create-byod-streaming-channel/";
const headers = {
'Authorization': token,
'Content-Type': 'application/json'
};
const payload = {
"query": "string",
"collection_name: "string", //optional
"user_identifier": "string" //optional
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => {
console.log(data);
})
.catch(error => {
console.error(error);
});
This returns two string values. channel_name is the name of the channel and query_id is the query ID.
Get BYOD Query Details
The "Get BYOD Query Details" endpoint allows you to retrieve the answer, context, and references for a BYOD query after the streaming process is completed. To obtain the results, you need to make a GET request to the endpoint https://prod.askclair.ai/api/v1/get-byod-query-details/{query_id}/, where {query_id} represents the unique identifier of the specific query for which you want to retrieve the details.
This endpoint is particularly useful when you have completed the streaming process and need to obtain the final results for a specific query. By using the query ID, you can retrieve the answer, context, and references associated with the byod query you have previously streamed.
By sending the GET request, the API will respond with the relevant details associated with the specified query. This includes the generated answer, the context or evidence summary, and the references that support the answer.
const fetch = require('node-fetch');
const url = "https://prod.askclair.ai/api/v1/get-byod-query-details/{query_id}/";
const token = "YOUR_TOKEN";
fetch(url,{
headers: {
"Authorization": `token ${token}`,
"Content-Type": "application/json"
}
})
.then(response => response.json())
.then(data => {
console.log(data);
})
.catch(error => {
console.error(error);
});
Ensure that you replace {query_id} in the URL with the actual query identifier you want to retrieve details for. Once you receive the response, you can process it based on your application's requirements.
{
"question": "string",
"answer": "string",
"context_summary": "string",
"references": [
{
"title": "string",
"confidence": "90.23",
"text": "string"
}
]
}
Create Medication Review Streaming Channel
The "Create Medication Review Streaming Channel" endpoint allows you to create a streaming channel for a medication review query. You send a list of medical conditions and medications and our models generates helpful recommendations.
You can send up to 10 ICD10 codes or 10 diseases and 15 drugs at a time.. By making a POST request to the endpoint https://prod.askclair.ai/api/v1/create-med-review-streaming-channel/, you can initiate the creation of a channel.
Please note, this end point requires a list ICD10 code or diseases (medical conditions) plus a list of drugs. Submitting both ICD10 codes AND diseases will result in an error.
Once the request is successful, the API will respond with the channel name and query ID, both of which will be returned with a status code of 200. The channel name and query ID are crucial for listening to the answer using our Clair SDKin your frontend application.
To enable streaming in your frontend, you can utilize the Clair SDKlibrary, which can be accessed at the following URL: https://prod.askclair.ai/static/js/galenSDK.min.js.
For a demonstration of how to implement the streaming functionality, you can refer to the example application available on GitHub at https://github.com/Jonathan-Adly/clair_streaming_demo. This example application provides a practical illustration of how to integrate and use the Clair SDKfor streaming clinical query results.
Events that will be received and should be handled by your frontend:
- start
- Event data =
{"text": "patient case generated from your query"}
- Event data =
- answer
- Event data =
{"text": "generated tokens}
- Event data =
- end
- Event data =
{"text: "query id"}
- Event data =
import requests
token = f"token {your_token}"
url = "https://prod.askclair.ai/api/v1/create-med-review-streaming-channel/"
headers = {'Authorization': token, 'Content-Type': 'application/json'}
payload = {
"codes": ["list of ICD 10 codes"], #or "diseases": ["list of medical conditions"],
"drugs": ["list of drugs"],
"notes": "Any relevant patient notes", #optional
"focus": "Any focus area for interventions" #optional
}
response = requests.post(url, json=payload, headers=headers)
return response.json()
const fetch = require('node-fetch');
const token = `token ${your_token}`;
const url = "https://prod.askclair.ai/api/v1/create-med-review-streaming-channel/";
const headers = {
'Authorization': token,
'Content-Type': 'application/json'
};
const payload = {
"codes": ["list of ICD 10 codes"], //or "diseases": ["list of medical conditions"],
"drugs": ["list of drugs"],
"notes": "Any relevant patient notes", //optional
"focus": "Any focus area for interventions" //optional
}
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => {
console.log(data);
})
.catch(error => {
console.error(error);
});
This returns two string values. channel_name is the name of the channel and query_id is the query ID.
Get Medication Review Query Details
The "Get Medication Review Query Details" endpoint allows you to retrieve the answer for medication review query after the streaming process is completed. To obtain the results, you need to make a GET request to the endpoint https://prod.askclair.ai/api/v1/get-med-review-query-details/{query_id}/, where {query_id} represents the unique identifier of the specific query for which you want to retrieve the details.
By sending the GET request, the API will respond with the relevant details associated with the specified query.
const fetch = require('node-fetch');
const url = "https://prod.askclair.ai/api/v1/get-med-review-query-details/{query_id}/";
const token = "YOUR_TOKEN";
fetch(url,{
headers: {
"Authorization": `token ${token}`,
"Content-Type": "application/json"
}
})
.then(response => response.json())
.then(data => {
console.log(data);
})
.catch(error => {
console.error(error);
});
Ensure that you replace {query_id} in the URL with the actual query identifier you want to retrieve details for. Once you receive the response, you can process it based on your application's requirements.
This endpoint is particularly useful when you have completed the streaming process and need to obtain the final results for a specific query. By using the query ID, you can retrieve the clinical summary, and the icd10 codes associated with the query you have previously streamed.