When a patient submits a questionnaire, all of the questions in that questionnaire are automatically converted into text variables. And text variables can be used insert information - in this case, their submitted answer(s) - into your encounter notes or messages via Chart Parts.


The primary use case for questionnaire variables is to push specific questionnaire answers into your encounter note text in the place(s) and order of your choice and/ or incorporate patient-submitted answers into the flow of a comprehensive Chart Part charting template. If you just want to push whole sections or the entire form, you don't need these variables. You can instead use the pre-existing functionality to push a submitted form into the encounter note text.


When you use a Chart Part containing a questionnaire variable, the corresponding answer from the patient's most recently-submitted copy of that questionnaire will populate into the encounter text area in place of the variable.


To give a simple example, you might have the following text in your Chart Part, where the part enclosed in double brackets is the questionnaire variable:


Alcoholic drinks per week: [[quest::patient_intake_form::Alcohol_intake_per_week]]


If the patient answered 3, what you would see in your encounter text when you used that Chart Part is:


Alcoholic drinks per week: 3


Finding Questionnaire Variables

To look up the variables for a particular questionnaire in your system, go to the patient's chart, and open a submitted questionnaire. Then click on the link below the document save buttons to "Look up associated variables." That will show a list of the variables that were generated for all of the questions in that questionnaire, in the same order as they appear in the questionnaire.


You can click on any of the variables in the list to copy it to your clipboard, then paste it into your Chart Part template where you would like the patient's answer to go.


Variable Structure and Additional Features

The basic variable structure consists of three required segments that together identify the variable. Each segment is separated by a :: (double colon), and the entire variable is enclosed in double brackets [[ ]] like other text variables.

  1. Segment 1 identifies the variable as a questionnaire-type variable.
  2. Segment 2 identifies which questionnaire the variable comes from. This questionnaire name is set by Cerbo when the form is uploaded to your build.
  3. Segment 3 identified which question within that questionnaire corresponds to this particular variable. The question names are set by Cerbo when building the questionnaire.



If you want to get fancy, there are additional optional segments that you can add to the variable definition to control how the output is displayed.

  1. Segment 4 is a place for defining text to output if the patient left the question blank. By default, nothing is output for questions that are left blank. If you want something to be output to specifically indicate that the question was not answered, you can define this in segment 4.
  2. Segment 5 defines text to precede the patient's answer when the Chart Part is used - like the question prompt - but that will show only if the question was answered.
  3. Segment 6 defines text to follow the patient's answer when the Chart Part is used - like units of measurement - but that will show only if the question was answered..


If you don't need one of these optional segments (4-6), you can:

  • If there are no additional segments to the right that you need, you can leave it out of the variable definition entirely, including its enclosing double colons. You will end the variable definition with the closing double bracket ]] after the last segment that you want to use.
  • If there ARE additional segments to the right that you need, you can define an in-between segment as blank by putting one set of double colons right after the other :::: followed by the next segment. This preserves the ordering of the segments.


Special Considerations & Examples


Segment 5 (question prompt) & 6 (text to follow answer) only print if the patient answered the question.


If the question is left blank, the text that you defined in segment 5 or 6 will not print when the Chart Part containing the corresponding variable is used. This is true even if you use segment 4 to define something to output if the question was blank. So you generally would NOT define segment 4 and put the question prompt in segment 5: 


[[quest::patient_intake_form::Alcohol_intake_per_week:: No answer::Alcohol intake: ::/ week]]


✓  If the patient answered "3", the output is Alcohol intake: 3/ week

If the patient did not answer, the output is just No answer (oops! No way to know what question was unanswered!)


PRO TIP: include any spaces that you want to appear before or after your text in segments 5 or 6 that should appear before/ after the answer when the variable is run. Spaces are not automatically inserted between the answer and the preceding or following text that you define.


To define text to precede or follow the patient's answer, which appears whether or not the question was answered, just put that text directly in your Chart Part outside of the variable definition like this:


Alcohol intake: [[quest::patient_intake_form::Alcohol_intake_per_week:: No answer::::/ week]]


✓  If the patient answered "3", the output is Alcohol intake: 3/ week

✓  If the patient did not answer, the output is Alcohol intake: No answer


Or, if you don't want anything to print when the question is not answered, you would define the question prompt in segment 5 and not directly as static text in your Chart Part. You would also leave segment 4 undefined, like this:


[[quest::patient_intake_form::Alcohol_intake_per_week::::Alcoholic drinks/week: ]]


✓  If the patient answered "3", the output is: Alcoholic drinks/week: 3

✓  If the patient did not answer, the output is completely blank (because segment 4 is not defined)


PRO TIP: unanswered questions as blank lines in your note. Note that if:
  • Segment 4 is not defined :::: or omitted from the variable definition &
  • The text variable is given its own line in your Chart Part template &
  • The patient did not answer the question

Then a blank line will be output at that spot when the Chart Part is run. To avoid this, you would avoid putting each variable in a new line in your Chart Part template.