Skip to main content

Searching for Concepts

/search GET

This endpoint allows to search the medical knowledge base behind the API for concepts using free text. For example, it allows searching Kyla API for nodes related to a concepts such as headache or hypertension, resulting with the list of nodes relevant to those concepts allowing the user to search for nodes just by knowing plain English for the concept.

As the number of returned results can be potentially large, the results are returned in batches (pagination).

Parameters

This is a GET endpoint with the following parameters:

  • query (required) - a string containing text to search for, e.g. headache.
  • types (optional) - a list of strings defining categories of nodes the results should be limited to. Allowed values are: CONDITION, RISK_FACTOR, SYMPTOM, LAB_TEST, ALL. The default value is equivalent to all.
  • page (optional) - a page number for the results, starting from 0. The default value is 0.
  • limit (optional) - the number of items per page, the default value is 10.

Response

An example of a representative response for the hypertension concept with the limit to 3 results per page (limit=3) is presented below.

The response includes:

  • content - a list of relevant nodes. For detailed information on response format see sub-section
  • number - page number (starting from 0) of the results
  • size - number of the results returned in this batch
  • totalPages - the total number of pages returned the query
  • totalElements - the total number of elements (nodes) returned by the query
{
"content": [
{
"id": "N05351",
"title": "Triglycerides (TRIG) for Hypertension",
"outcomes": [
{
"outcome": "unknown",
"label": "Don't know"
},
{
"outcome": "normal",
"label": "normal"
},
{
"outcome": "abnormal",
"label": "abnormal"
}
],
"type": "DISCRETE",
"unitOfContinuousType": null
},
{
"id": "N05352",
"title": "Creatinine (CRE) for Hypertension",
"outcomes": [
{
"outcome": "unknown",
"label": "Don't know"
},
{
"outcome": "normal",
"label": "normal"
},
{
"outcome": "abnormal",
"label": "abnormal"
}
],
"type": "DISCRETE",
"unitOfContinuousType": null
},
{
"id": "N05331",
"title": "Hepatic Venous Pressure Gradient for Portal Hypertension",
"outcomes": [
{
"outcome": "unknown",
"label": "Don't know"
},
{
"outcome": "normal",
"label": "normal"
},
{
"outcome": "abnormal",
"label": "abnormal"
}
],
"type": "DISCRETE",
"unitOfContinuousType": null
}
],
"number": 0,
"size": 3,
"totalPages": 12,
"totalElements": 34
}