Skip to main content

Suggesting Next Assessment Question

/next-question POST

This endpoint suggests the next most informative question based on current information about the patient.

Parameters

This is a POST endpoint, and it takes information about a patient encoded as the evidence data structure as the input.

Example of evidence for a 35-year-old patient who is an active smoker (N00004), decided not to disclose his drinking habits (N00007) and with diagnosed hypertension (node id C00020) and complaining about cough that lasts over a month (N04116). Additionally, to show error reporting, we included an incorrect node identifier that is present in the API (N09999).

{
"sex": "MALE",
"age": 35,
"observations": [
{
"nodeId": "C00020",
"outcome": "present"
},
{
"nodeId": "N00004",
"outcome": "active_smoking"
},
{
"nodeId": "N00007",
"outcome": "unknown"
},
{
"nodeId": "N00008",
"outcome": "33"
},
{
"nodeId": "N09999",
"outcome": "present"
}
]
}

Response

The endpoint is intended to provide one most informative question for improving knowledge about the patient.

The response structure is defined as follows:

  • success - indicates if the query was successfully executed (values true or false)
  • data - query specific data
    • type - a type of the question SINGLE or a group question.
    • text - a human-friendly description of the question
    • nodes - a collection of nodes, typically containing one element, unless a group question, related to the next most informative question
  • errors - a list of (possibly non-critical) errors that occurred during the query processing
    • code - code for type of error (e.g. INVALID_UUID)
    • message - human-friendly description of the error

A representative response to the query presented above may look like:

{
"success": true,
"data": {
"type": "SINGLE",
"text": "Small Shallow Ulcer in Mouth",
"nodes": [
{
"id": "N03583",
"title": "Small Shallow Ulcer in Mouth",
"outcomes": [
{
"outcome": "unknown",
"label": "Don't know"
},
{
"outcome": "present",
"label": "present"
},
{
"outcome": "absent",
"label": "absent"
}
],
"type": "DISCRETE",
"unitOfContinuousType": null
}
]
},
"errors": [
{
"code": "INVALID_UUID",
"message": "No observation with uuid: N09999"
},
{
"code": "INVALID_UUID",
"message": "Invalid uuid: N09999"
},
{
"code": "INVALID_UUID",
"message": "No observation with uuid: N09999"
}
],
"emergencies": []
}