Awell Health Developer Hub
Dev Hub

Two queries are available for form-related data:

  1. formResponse: Get the form response from a given form activity.
  2. formActivityDataPoints: Get data points from a form activity with their qualified keys.

Request

Get form response

Query:

01

Note: The label field will be empty (null) for non-multi-choice questions; for multi-choice questions, it represents the text description of the selected option, pairing its value with a descriptive label. The order of labels in the array matches the values order in the value field.

Variables:

01

Deserialization:

In the table below you can find an overview of all question types, their corresponding data point value type, and examples of the values you will receive from the Awell API in this query.

Note that we undertake some conversion (particularly for boolean and numbers array value types) to ensure consistency in our system, regardless of the submitted value format.

Question typeData point value typeValue type you will receiveExamples
DateDATEISO-8601 String"2024-03-05T00:00:00.000Z"
NumberNUMBERstring"10"
Short TextSTRINGstring"Awell is great"
Long TextSTRINGstring"A long story about why Awell is so great"
Multiple ChoiceNUMBER

string
(value of selected option)

"1"
Multiple SelectNUMBERS_ARRAYstring

"[1, 2, 4]"


(note: we convert any array of strings submitted to a stringified array of numbers)

SliderNUMBERstring"50"
Yes/NoBOOLEANstring

"1" (yes) | "0" (no)


(note: we convert all forms of yes/no values in submission mutation to "1" or "0")

Inputs:

FieldRequiredDescriptionType
pathway_idYesthe id of the care flowstring
activity_idYesthe id of the form activity (note: not the form id)string

Get form activity data points

Retrieve data points from a form activity with their qualified keys. This query enriches the data points with their qualified keys from the data point definitions, making it easier to identify and use the data points in your application.

Query:

01

Variables:

01

Inputs:

FieldRequiredDescriptionType
careflow_idYesthe id of the care flowstring
activity_idYesthe id of the form activitystring

Response fields:

FieldDescriptionType
keyThe qualified key of the data point (e.g., "patient.age")string
valueThe value of the data pointstring
valueTypeThe type of the data point value (STRING, NUMBER, BOOLEAN, DATE, NUMBERS_ARRAY)DataPointValueType