Overview
In terms of functionality, anything that is available in the JavaScript programming language is available for use in Subject Reports. Thus, there is considerable power that can be leveraged by Subject Reports (e.g., automated clinic note generator).
...
for (var index=0; index < ENCOUNTERS.Count; index++) {
var encounter = ENCOUNTERS.GetEncounter(index);
var encounterName = encounter.#IntervalName.displayValue.toString();
var encounterDate = encounter.#EncounterDate.displayValue.toString();
var encounterScore1 = encounter.#score1.displayValue.value;
var encounterScore2 = encounter.#score2.displayValue.value;
var encounterScore3 = encounter.#score3.displayValue.value;
var encounterScore4 = encounter.#score4.displayValue.value;
Output.Write("<tr><td>" + encounterName + "</td>");
Output.Write("<td>" + encounterDate + "</td>");
Output.Write("<td>" + encounterScore1 + "</td>");
Output.Write("<td>" + encounterScore2 + "</td>");
Output.Write("<td>" + encounterScore3 + "</td>");
Output.Write("<td>" + encounterScore4 + "</td></tr>");
}
Output.Write("</table>");
%>