Handlebar statements are like blanks you can fill in on a form. They sit inside curly brackets {{ }} and get replaced with real words or numbers—like someone’s name, today’s date, or an answer from a patient—when the page shows up.
Breaking Down the Parts
Every handlebar statement has the same building blocks:
Opening “if” →
#ifstarts the statement.Prefix → tells the system where the question lives:
customQuestionspharmacistQuestionsphysical
Key → the exact name of the question or attribute you are referring to (like
runnyNose).Answer to look for → either
"yes","no",1(checked), or2(unchecked).Text to display → what you want to appear in the note.
Closing “if” →
{{/if}}ends the statement (like a period in a sentence).
Once you know these parts, you can build any handlebar statement you need.
Example: Check-the-Box Question
{{#if pharmacistQuestions.patientReceivingCareFromMoreThanOnePrescriber equals 1}}
- They receive prescriptions from more than one provider.
{{/if}}
What’s happening here?
There was a question in the Pharmacist Assessment: “Do you receive prescriptions from more than one prescriber?”
If the patient checks the box, that equals 1. If not checked, that equals 2.
This handlebar statement tells the system:
If the answer = 1, then show “They receive prescriptions from more than one provider.”
If the answer ≠ 1, then show nothing.
So, by adding this to your template, you’re telling it to only show that sentence when the patient checks the box.
Where to Use Handlebars
You can add handlebar statements anywhere in the “Notes” sections of your template.
They can be used in two big ways:
1. Fill in the Blank Automatically
Example: Eye Color
Add a question with a text answer:
“What color are your eyes?”Note the key that gets auto-generated, e.g.
whatColorEyes.Add this handlebar statement in your template notes:
The patient has {{whatColorEyes}} eyes.
When you use the template, it will insert the actual color the patient typed.
It is helpful to have your template open on two screens so you can refer to the key on one screen and add it to the notes on the other.
2. Report Answers to Questions
Example: Runny Nose
Add a Yes/No question:
“Do you have a runny nose?”Note the key that appears in the field below where you added the question:
runnyNose.Build a handlebar statement on a Notes page:
If Yes:
{{#if customQuestions.runnyNose equals "yes"}}
The patient reports having a runny nose.
{{/if}}
If No:
{{#if customQuestions.runnyNose equals "no"}}
The patient reports they do not have a runny nose.
{{/if}}
If you want both yes and no covered:
{{#if customQuestions.runnyNose equals "yes"}}
The patient reports having a runny nose.
{{else}}
The patient does not have a runny nose.
{{/if}}
✅ With these building blocks, you can make your notes smart and dynamic—only showing what applies to each patient.