Documentation
API: Intake
Fetching Survey Results

Fetching survey results

To be able to fetch the collected information from the survey, the patient must complete the survey then call the GET query to /api/v2/surveys/{survey_id}/summary.

Example response

JSON
{
  "patient": {
    "id": "user-unique-id",
    "sex": "male",
    "age": {
      "type": "year",
      "value": 31
    },
    "email": "user@example.com",
    "phone": "+11231231234",
    "full_name": "Jon Smith"
  },
  "visit_reasons": [
    {
      "id": "other",
      "name": "Other"
    }
  ],
  "chronic_diseases": [
    {
      "id": "c_1191",
      "name": "Diabetic foot infection",
      "severity": "moderate"
    }
  ],
  "specialists": [
    {
      "id": "sp_10",
      "name": "Endocrinologist"
    }
  ],
  "hospitalizations": [
    {
      "id": "p_318",
      "name": "History of COVID infection",
      "last_occurred": "less_than_1_month"
    }
  ],
  "medications": [
    {
      "id": "2914",
      "name": "Adipine",
      "common_name": "Amlodipinum",
      "dose": "10 mg",
      "category": "Tablets"
    }
  ],
  "allergies": [
    {
      "name": "allergic to pollen"
    }
  ],
  "present_symptoms": [
    {
      "id": "s_13",
      "name": "Abdominal pain",
      "source": "initial",
      "choice_id": "present",
      "seriousness": "normal"
    },
    {
      "id": "s_1528",
      "name": "Abdominal pain, right upper quadrant",
      "source": "",
      "choice_id": "present",
      "seriousness": "normal"
    },
    {
      "id": "s_1840",
      "name": "Abdominal pain, lasting less than 2 days",
      "source": "",
      "choice_id": "present",
      "seriousness": "normal"
    }
  ],
  "risk_factors": [],
  "additional_comment": "Message to doctor"
}

Error responses

HTTP status code: 409

The survey hasn't been completed. It is not possible to fetch this data if the survey is new or pending.

Response object

patient (object, required)

  • id (str, required) – the unique patient identifier from the client system
  • sex (str, optional) – patient's biological sex. Can only have one of two possible values: female and male
  • age (object, optional)
    • type (str) – year
    • value (numeric, required) – a numeric value that represents age
  • email (str, optional) – patient's email
  • Phone (str, optional) – patient's phone number
  • birth_date (date, optional) – patient's date of birth
  • full_name (str, optional) – patient’s full name

visit_reasons (List[visit_reason])

  • id (str, required) – visit reason ID
  • name (str, required) – display name

chronic_diseases (List[visit_reason])

  • id (str, optional) – chronic_diseases ID, null if element is provided manually by user
  • name (str, required) – display name
  • severity (str, optional) – possible values: mild, moderate, severe

specialists (List[specialist])

  • id (str, optional) – specialist ID, null if element is provided manually by user
  • name (str, required) – display name

hospitalizations (List[hospitalization])

  • id (str, optional) – hospitalization ID, null if element is provided manually by user
  • name (str, required) – display name
  • last_occurred (str, required) – possible values: less_than_1_month, 1_3_months, 4_11_months, 1_5_years, over_5_years

medications (List[medication])

  • id (str, optional) – medication ID, null if element is provided manually by user
  • name (str, required) – display name
  • category (str, optional) – category
  • dose (str, optional) – dose

allergies (List[allergy])

  • name (str, required) – display name

present_symptoms, absent_symptoms, risk_factors (List[evidence])

  • id (str) – evidence ID
  • name (str) – display name
  • source (str)
  • "source": "initial" – evidence reported by user,
    • "source": "suggest" – evidence from /suggest endpoint,
    • "source": "red_flags" – evidence from /suggest with "red_flags" method or /red_flags endpoint,
    • no value – for evidence gathered during the interview the source attribute should be entirely omitted.
    • seriousness (str) – possible values: serious, emergency, emergency_ambulance. Observations with emergency or emergency_ambulance seriousness are particularly urgent and may require immediate attention.

additional_comment (str)

  • message from patient to doctor