Specialist and channel recommender

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.

Request

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"}
        ]
}'

Response

The response contains the following items:

  • the id of the recommended specialty
  • a recommended specialist
  • a channel recommendation
{
        "recommended_specialist": {
          "id": "sp_17",
          "name": "Neurologist"
        },
        "recommended_channel": "personal_visit"
}

Specialty mapping

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"
}'

Specialty list for conditions

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"
    },

...

List of channel recommendation types

  • Personal visit (In-person visit)
  • Video teleconsultation (Video consultation)
  • Audio teleconsultation (Telephone or any other consultation with audio only)
  • Text teleconsultation (Chat)

List of specialists

  • Allergologist (id: sp_23)
  • Angiologist (id: sp_21)
  • Cardiologist (id: sp_12)
  • Dentist (id: sp_18)
  • Dermatologist (id: sp_9)
  • Diabetologist (id: sp_22)
  • Endocrinologist (id: sp_10)
  • ENT doctor (id: sp_14)
  • Gastroenterologist (id: sp_5)
  • General Practitioner (id: sp_1)
  • Gynecologist (id: sp_15)
  • Hematologist (id: sp_25)
  • Infectologist (id: sp_19)
  • Internal Medicine Specialist (id: sp_2)
  • Maxillofacial surgeon (id: sp_29)
  • Neonatologist (id: sp_26)
  • Nephrologist (id: sp_24)
  • Neurologist (id: sp_17)
  • Oncologist (id: sp_13)
  • Ophthalmologist (id: sp_7)
  • Orthopedist (id: sp_6)
  • Pediatrician (id: sp_3)
  • Psychiatrist (id: sp_16)
  • Pulmonologist (id: sp_27)
  • Rheumatologist (id: sp_20)
  • Surgeon (id: sp_4)
  • Toxicologist (id: sp_8)
  • Urologist (id: sp_11)

Extras

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 required
  • unit - 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"
            }
        }
    ],
...
}