The sections of this guide are:

Prepopulated Text

This is a great feature to help customize your forms. It draws from the optional demographic user information saved in your profile.

The Prepopulated Text Tags include: “organization”, “address_line_1”, “address_line_2”, “city”, “state”, “postal_code”, “phone”, “fax”, “website”, and “email”.

Additionally, there are three ‘general-use’ Prepopulated Text Tags that may be used however you wish. These are “blurb_1”, “blurb_2”, and “blurb_3”.

Note for example below: You can see the working examples at www.soapnote.org/sample/prepopulated-text/. To switch views between the Active Form and Markup Code, click on “View” in the upper right of the page. Then choose “Form” to see the Active Form or choose “Markup” to reveal the Markup Code. You can use the example below, as well. But – you’ll need to replace → and ← with [ and ] .

Example (the only Prepopulated Text Tag that would work for most (logged on) users is the “email” tag):
My email address is: →email←.

Using Variables

You can display named variables from other parts entered above in a form. It displays in the output, not in the form.
This uses the Var Tag.
The required parameter is name.

Note for example below: You can see the working examples at www.soapnote.org/sample/using-variables/. To switch views between the Active Form and Markup Code, click on “View” in the upper right of the page. Then choose “Form” to see the Active Form or choose “Markup” to reveal the Markup Code. You can use the example below, as well. But – you’ll need to replace → and ← with [ and ] .



Example:
→var name=”xxx”←


Note: if you want perform a calculation earlier in a form and display it toward the bottom, you don’t use a variable. Instead, you should enter the calculation where you need it up above in the form but set the calculation’s show parameter to false. Then you can recall the value of the calculation later in the form by setting the value equal to the prior calculation’s value. More on calculations in a little while.

Reserved Variables

A variable can have any name that you choose. However, you may wish to name the variables for your forms using the Reserved Variable Names.

The purpose of Reserved Variables is that these may be used for exporting and importing form data from your computer.

The Reserved Variable Names are “variable_1”, “variable_2”, … all the way to “variable_50”.

Each SOAPnote that you make may use any or all of these variables.

Adding Conditions

This powerful feature involves an opening and a closing Conditional Tag – both are needed for it to work.
You can set conditions for showing or hiding of form elements. If the condition is met, everything between the opening and closing Conditional Tags will be shown. If it is not met, it will not be displayed on the form and will be ignored in the output.

An optional (but strongly recommended) parameter is “field”. This is used to identify the variables you are going to be setting up to a condition. These forms will work if you don’t identify a variable (or variables) with the “field” parameter, but they may go quite a bit more slowly. To identify multiple variables, separate the variable names with pipes “|”.

Operators are required to evaluate the condition.
These are operators within an individual comparison:
isLess
isGreater
isLessOrEqual
isGreaterOrEqual
is
isNot


These are operators for combining multiple comparisons
&& is the “AND” operator
|| is the “OR” operator

Note for example below: You can see the working examples at www.soapnote.org/sample/adding-conditions/. To switch views between the Active Form and Markup Code, click on “View” in the upper right of the page. Then choose “Form” to see the Active Form or choose “Markup” to reveal the Markup Code. You can use the example below, as well. But – you’ll need to replace → and ← with [ and ] .

Example:
Employment type: →radio value="Full Time|Part Time|Unemployed"←
→conditional field="job" condition="(job).is('Full Time')||(job).is('Part Time')"←Job title: →text name="job_title"←→/conditional←


Another good example is www.soapnote.org/sample/conditional-comparison.

Please note that with these comparison operators, blank/empty fields would be considered as 0, so
(field1).isLess(5) will always be true if “field1” is blank. (Because 0 is less than 5)

Performing Calculations

You can perform calculations that manipulate variables.
This powerful feature of the site and can be used in two ways – computing numbers and interpreting results (ranges of numbers).
Parameters include value, memo, and show.
“value” has some special formatting which can be tricky.
“memo” is used to label the calculation or for some helper text.
“show” is useful for hiding a calculation performed earlier in a form that you don’t want to reveal until further on down in the form (this seems esoteric but it does come up occasionally).

Calculations – Simple Computations

Note for example below: You can see the working examples at www.soapnote.org/sample/performing-calculations/. To switch views between the Active Form and Markup Code, click on “View” in the upper right of the page. Then choose “Form” to see the Active Form or choose “Markup” to reveal the Markup Code. You can use the example below, as well. But – you’ll need to replace → and ← with [ and ] .

In the example below, basic computations such as addition, subtraction, multiplication, and division is performed on numbers gathered with Text () input fields.

Example:
This calculator performs simple computations
→text name="A"← <-- A (enter a number)
→text name="B"← <-- B (enter a number)

A + B --> →calc value="score1=(A)+(B)" memo="addition"←
A - B --> →calc value="score2=(A)-(B)" memo="subtraction"←
A x B --> →calc value="score3=(A)*(B)" memo="multiplication"←
A / B --> →calc value="score4=(A)/(B)" memo="division"←
A raised to the power of B --> →calc value="score5=Math.pow((A),(B))" memo="exponent"←


You can see that the Calc Tag has a certain format to it.
value” contains the entire computation in double quotes.
score1” is a required name for the computation. In the sample, you see that value is set equal to “score1“, “score2“, “score3“, “score4“, and “score5“. A new name is needed for each computation, but it can be more descriptive than “score1”.
“A” refers to the name of the first Text Box Tag.
“B” refers to the name of the second Text Box Tag.
In between “A” and “B” is the operator (+, -, *, and /).
The result shows up in the result box after “Calculate Result” is pressed.

There are more sample calculators at www.soapnote.org/sample/calculation.

Calculations – Interpreted Results

Interpreted Results are a special type of calculation. A sample with an interpreted result is www.soapnote.org/sample/interpreted-computation.
This feature is valuable because it allows you to group ranges of results.

Note for example below: To switch views between the Active Form and Markup Code, click on “View” in the upper right of the page. Then choose “Form” to see the Active Form or choose “Markup” to reveal the Markup Code. You can see the active code at www.soapnote.org/sample/interpreted-results/

Example:
This calculator performs interpreted calculation
→text name="A"← <-- A (enter a number)
→text name="B"← <-- B (enter a number)

A + B –> →calc value="score2=(A)+(B);score2>1000?'Sum is greater than 1000':score2>100?'Sum is greater than 100 and less than or equal to 1000':score2>10?'Sum is greater than 10 and less than or equal to 100':score2>0?'Sum is greater than 0 and less than or equal to 10':'sum is 0 or less'" memo="interpretation"←

As you can see above, it has most of the same elements as a simple calculation. The interpretation information follows the calculation after a semicolon.
Since an interpretation is a separate calculation it must have a distinct name (score2).
The computation follows ((A)+(B)).
Semicolon separates the computation from the interpretation (;).
Ranges are then interpreted from highest to lowest, each is separated by a colon (:).
The highest value is score2>1000?. The output follows this in single quotes. Then a colon.
The next value is score2>100?. The output follows this in single quotes. Then a colon.
The next value is score2>10?. The output follows this in single quotes. Then a colon.
The lowest value is not specifically labeled like the others. The output alone is listed for everything lower than the range above it.
This is definitely best understood by looking at the example again – it’s at www.soapnote.org/sample/interpreted-computation.