Using the <if> <then> <else> Statement

The basic syntax for the <if> <then> <else> statement is as follows:

<if> . . . </if> <cond> . . . </cond> <then> . . . </then> <else> . . . </else>

The following general rules govern the use of the <if> <then> <else> statement:

The application ignores any statements inside <if>…</if> but not inside either <then>…</then> or <else>…</else>.

All <if> statements must be followed by a <then> statement.

Usage of the <else> statement is optional.

You must enclose pre-defined values in double-quotes.

The <then> and <else> nodes assign values to VAR or NARRATIVE.

Do not use operator symbols (>, <, >=, or <=) in text within the conditional statements. Instead, use HTML encoded formats as follows:

For this operator Use this HTML encoded format

<

&lt;

>

&gt;

<=

&lt;=

>=

&gt;=

In the following example, the statement checks the value of Q1. If Q1 is equal to 3, then the application assigns the a value of 4 to VAR1. Otherwise, it assigns the string value for the narrative NAR1.

<if> <cond>Q1="3"</cond> <then><let>VAR1="4"</let></then> <else><let>{NAR1}="There were no cases related to {#TRADE_NAME}"</let></else> </if>

The following table lists and describes how to use each of the elements in the template script.

Element Name Syntax Usage Rules

IF

<if> . . . </if>

Use the IF element or condition to logically direct template processing flow.

IF elements must begin with <if> and end with </if>.

COND

<cond> . . . </cond>

Use the COND node to evaluate a logical Boolean based on the following operations:

Equals To: =

Not Equal To: !=

Greater Than: >

Greater Than or Equal To: >=

Less Than: <

Less Than or Equal to: <=

Logical AND: AND

Logical OR: OR

Each operator in a condition can be:

Declared in the template

A constant placed within quotation marks ( " ")

An implicit variable

Use the AND or OR logical operators to combine multiple conditions and to evaluate a combined result.

Enclose each condition in parentheses [ ( . . . ) ] to separate them

The application evaluates the combined conditions from left to right

All COND elements must start with <cond> and end with </cond>.

THEN

<then> . . . </then>

If the specified condition is TRUE, the application executes the THEN block.

This block can have single or multiple instruction tags including <if> . . . </if>.

All THEN elements must start with <then> and end with </then>.

ELSE

<else> . . . </else>

If the specified condition is FALSE, the application executes the ELSE block.

The ELSE block can have single or multiple instruction tags including <if> . . . </if>.

All ELSE elements must start with <else> and end with </else>.

LET

<let> . . . </let>

Use the LET element to assign a value to a variable or a narrative.

The value you assign must be enclosed in double quotes ( "VAR1" ) and can be one of the following:

A string with variables

Another variable

Use the <var> or <narrative> tag to declare the variable before assigning it.

NARRATIVE

<narrative> . . . </narrative

Use the NARRATIVE element to assign pre-defined paragraphs.

NARRATIVE values can be a maximum of 10,000 characters.

All NARRATIVE elements must start with <narrative> and end with </narrative>.

You can include variables or other elements in the NARRATIVE. During processing, the application replaces these variables or other elements with their current values.

Use one of these tags to declare all user-defined narrative variables used in the template.

Use one of the following methods to assign a value when declaring the variable:

<narrative name ="nar1"> This is a paragraph for patient history . . . . </narrative>

<narrative name = "nar1"> </narrative>

Let {nar1}= "This is a paragraph for patient history . . . . " </let>

INCLUDE

<include name-" "/>

Use the INCLUDE element to include the contents of an existing RTF document in a report during the template build process.

All INCLUDE elements must be written in the following manner:

<include name " "/>.

The source files can be Argus reports or user-created custom reports that have been created off line and uploaded to the server in the Other Content section of the View ePSUR screen.

Periodic reports support the page layouts for the source documents. For example, the application retains a landscape layout in the resulting document.

The name of the files must exactly match the name specified in the report configuration (View ePSUR Template screen).

You can include files in one of the following sections of the output document:

Line Listing

Summary Tabulation

UD Summary

Other Content

If the file you are including is from the Other Contents section, the file name must have an RTF extension.

You must use Microsoft Word or another tool to convert document files to RTF format. For example, <include name = "CDA-PSUR1.rtf"/>

All files in the Other Contents section must have unique names.

Do not use the same filename in the <include> tag more than once in a single configuration. This can cause processing error. If you need to include the same content more than once, add multiple files with the same content and different filenames and <include> tags.

Argus-generated include files (Line Listing, Summary Tabulation, and reports in UD Summary) must not have and extension and must be exactly as displayed on the View ePSUR screen.

For example: <include name = "List Listing"/>

COMMENT

<comment> . . . </comment>

Use the COMMENT element to provide the report author with instructions for editing the report.

All COMMENT elements must start with <comment> and end with </comment>.

The comment text:

Remains in the report until the report is published. When the report is published, the application removes the comment.

Will not be used to replace any variables, if used.

Usage Example

<comment>Please review the document and verified top 5 BODY systems affected.</comment>

WRITE

<write> . . . </write>

The WRITE elements output content to the RTF document.

All WRITE elements must start with <write> and end with </write>.

The application applies formatting defined in the <write> . . . </write> tags to the content of the output document.

Usage Example

<write>example text to be written</write>

OR

<write> The following paragraph has {VAR1} cases</write>

OR

<write>{NAR1}</write>

where:

NAR 1 is a previously declared narrative and the content of NAR 1 is written to the document