Please note that the /recommend_specialist
endpoint is an optional feature and its
logic is linked to the /triage
endpoint.
The /recommend_specialist
endpoint extends the /triage
recommendation by providing the most appropriate
specialist and channel as a part of next step advice. Similar to the /triage
endpoint,
the /recommend_specialist
takes
into account not only the severity of the most likely conditions but also the presence of alarming symptoms or risk factors.
This allows the inference engine to guide patients to a specialist who can help handle potentially serious symptoms and states.
Specialist and channel recommendations are not available in cases with “emergency” or “emergency ambulance” triage levels.
The /recommend_specialist
endpoint responds to POST
requests and accepts the same JSON object as the /diagnosis
and
/triage
endpoints.
curl "https://api.infermedica.com/v3/recommend_specialist" \
-X "POST" \
-H "App-Id: XXXXXXXX" -H "App-Key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-H "Content-Type: application/json" -d '{
"sex" : "male",
"age" : {"value": 30},
"evidence" : [
{"id": "s_1193", "choice_id": "present"},
{"id": "s_488", "choice_id": "present"},
{"id": "s_418", "choice_id": "present"}
]
}'
The response contains the following items:
{
"recommended_specialist": {
"id": "sp_17",
"name": "Neurologist"
},
"recommended_channel": "personal_visit"
}
The /recommend_specialist
endpoint allows for the remapping of specified
specialties in a many-to-one fashion. This is useful when some specialties are not appropriate for the
regional, regulatory, or clinical setting (or unwanted for any other reason).
The specialty mapping functionality does more than just replacing specialties with other specialties: the mapping is also taken into account in the specialist recommender algorithm to provide the best possible experience.
Please note that adding new specialties or changing the names of existing ones is not supported.
Below is an example of how to map two categories onto another single one:
curl "https://api.infermedica.com/v3/recommend_specialist" \
-X "POST" \
-H "App-Id: XXXXXXXX" -H "App-Key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-H "Content-Type: application/json" -d '{
"sex" : "male",
"age" : {"value": 30},
"evidence" : [
{"id": "s_1193", "choice_id": "present"},
{"id": "s_488", "choice_id": "present"},
{"id": "s_418", "choice_id": "present"}
],
"extras": {
"specialist_mapping": {
"sp_17": "sp_1",
"sp_14": "sp_1"
}
}
}'
{
"recommended_specialist": {
"id": "sp_1",
"name": "General Practitioner"
},
"recommended_channel": "personal_visit"
}'
The /conditions
endpoint allows an additional parameter of
“include_specialists=true” which expands the response for that endpoint to include a specialists list.
This expansion is helpful for identifying the default mapping of specialties to available conditions.
curl "https://api.infermedica.com/v3/conditions?age.value=20&include_specialists=true" \
-X "GET" \
-H "App-Id: XXXXXXXX" -H "App-Key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-H "Content-Type: application/json" -d
[
{
"id": "c_926",
"name": "ACE inhibitor-induced cough",
"common_name": "ACE inhibitor-induced cough",
"sex_filter": "both",
"categories": [
"Cardiology"
],
"specialists": [
{
"id": "sp_1",
"name": "General Practitioner"
}
],
"prevalence": "very_rare",
"acuteness": "chronic",
"severity": "mild",
"extras": {
"icd10_code": "R05, T88.7, Y52.4",
"hint": "Your symptoms may be due to medications you have used. Please report this symptom to your GP."
},
"triage_level": "consultation",
"recommended_channel": "audio_teleconsultation"
},
...
The extras
attribute may contain additional or experimental options that control the behavior of the inference engine. Some are only valid with custom models or selected partners.
enable_symptom_duration
Flag enable_symptom_duration
enables using a duration
object for initial evidence (observations with "source": "initial"
) in /suggest
endpoint when {"suggest_method": "symptoms"}
is used.
"extras": {
"enable_symptom_duration": true
}
A duration object is composed of two fields:
value
- numeric value, this attribute is requiredunit
- text value, this attribute is required and the allowed values are:week
day
hour
minute
{
...
"evidence": [
{
"id": "s_13",
"choice_id": "present",
"source": "initial",
"duration": {
"value": 2,
"unit": "day"
}
}
],
...
}