Providing initial symptoms and risk factors is crucial for the /diagnosis
to return meaningful results. There are different ways of gathering the initial evidence from a user, with the /search
and /parse
endpoints being the most useful. The /suggest
endpoint aims to further enhance this process in interactive applications by encouraging users to provide additional symptoms. This is achieved by suggesting other possible symptoms that have frequently been reported by other users of the same sex and similar age. The /suggest
endpoint also takes into account previously reported evidence. The AI behind the /suggest
endpoint has been trained on data from several million interviews already performed by the Infermedica API.
After a user of your application selects some symptoms with /search
or /parse
, you can use /suggest
to generate suggestions of other symptoms that might be present (think of a recommendation system such as "Other users with your symptoms also reported..."). The /suggest
endpoint can also be used without sending any selected symptoms, to generate a list of the most commonly reported symptoms. This can be useful before or instead of /search
in some scenarios.
Please note, however, that /suggest
shouldn't be used as a replacement for /diagnosis
. The /suggest
endpoint cannot perform differential diagnosis and uses a different statistical engine. After you've gathered 3-6 initial symptoms, you're safe to start making calls to /diagnosis
.
The /suggest
endpoint is available in all languages, but can only work with the Infermedica default model.
The /suggest
endpoint responds to POST requests and accepts a list of IDs of already selected observations and, optionally, the patient’s sex and age:
curl "https://api.infermedica.com/v2/suggest" \
-X "POST" \
-H "App-Id: XXXXXXXX" -H "App-Key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-H "Content-Type: application/json" -d '{
"sex": "female",
"age": 25,
"selected": ["s_305"]
}'
The example above describes the case of a 25-year-old female patient who has already reported vomiting (represented here by the symptom ID s_305
).
The response contains a list of symptoms that have often been reported together with the provided observations by other patients of the same sex and similar age. Each returned symptom is represented by a JSON object with the following attributes: id
, name
and name_common
. These values are consistent with the database of medical concepts
understood by the Infermedica API.
[
{
"id": "s_156",
"name": "Nausea",
"common_name": "Nausea"
},
{
"id": "s_13",
"name": "Abdominal pain",
"common_name": "Abdominal pain"
},
{
"id": "s_119",
"name": "Lethargy",
"common_name": "Feeling weak and tired"
},
{
"id": "s_12",
"name": "Abdominal pain, sudden",
"common_name": "Sudden abdominal pain"
},
{
"id": "s_8",
"name": "Diarrhea",
"common_name": "Diarrhea"
},
{
"id": "s_21",
"name": "Headache",
"common_name": "Headache"
},
{
"id": "s_98",
"name": "Fever",
"common_name": "Fever"
},
{
"id": "s_284",
"name": "Diminished appetite",
"common_name": "Diminished appetite"
}
]
Please note that the free trial plan of the Infermedica API allows for only a limited number of calls to the /suggest
endpoint. Please contact us
for other plan options.