Red flags

API v3 is already available!

API v3 introduces significant improvements including enhanced reasoning algorithm, which provides better diagnostic and triage accuracy. The current version API v2 will be supported for the next six months, although the medical content updates will only be continued on v3. We recommend you to adapt your application to the v3 version.

Check the API v3 migration guidelines >>

Go to the API v3 documentation >>

The /red_flags endpoint allows you to display a list of observations that may be related to potentially life-threatening conditions. We advise to use this feature before starting the adaptive interview. Adding this step to your symptom checker flow not only increases the chance of detecting emergency situations but also feeds the question selection algorithm with more evidence needed for a meaningful interview. The result of the query depends on the initially reported symptoms, risk factors, and demographics. Using /red_flags endpoint is similar to /suggest.

The /red_flags endpoint is available in all languages, but can only work with the Infermedica default model.

Request

The /red_flags endpoint responds to POST requests of the same structure as /diagnosis:

curl "https://api.infermedica.com/v2/red_flags" \
  -X "POST" \
  -H "App-Id: XXXXXXXX" -H "App-Key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
  -H "Content-Type: application/json" -d '{
        "age" : 33,
        "sex" : "male",
        "evidence" : [ 
            {
                "choice_id" : "present",
                "id" : "s_50"
            }
        ]
}'

The example above describes the case of a 33 year old male patient who has already reported chest pain (represented here by the symptom ID s_50).

Response

The response contains a list of red flag observations that may be related to potential emergency situations. Each returned symptom is represented by a JSON object with the following attributes: id, name, name_common, and question. These values are consistent with the database of medical concepts understood by Infermedica API.

[
    {
        "id": "s_1197",
        "name": "Chest pain, severe",
        "common_name": "Severe chest pain"
    },
    {
        "id": "s_88",
        "name": "Dyspnea",
        "common_name": "Shortness of breath"
    },
    {
        "id": "s_261",
        "name": "Tachycardia",
        "common_name": "Fast heartbeat"
    },
    {
        "id": "s_1925",
        "name": "Chest pain, pressure",
        "common_name": "Pressing chest pain"
    },
    {
        "id": "s_216",
        "name": "Excessive sweating",
        "common_name": "Excessive sweating"
    },
    {
        "id": "s_227",
        "name": "Tachypnea",
        "common_name": "Accelerated breathing"
    },
    {
        "id": "s_2074",
        "name": "Chest pain, radiating to left upper limb",
        "common_name": "Chest pain, radiating to left upper limb"
    },
    {
        "id": "s_31",
        "name": "Chest pain, continues after rest",
        "common_name": "Chest pain continuing after rest"
    }
]

Please note that the free trial plan for Infermedica API allows for only a limited number of calls to the /red_flags endpoint. Please contact us for other plan options.