Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Data Across Encounters

*** Please note code below is no longer needed.  Use the point-and-click method using the Repeater control Image Modified  ***

Data Across Encounters

Displaying a table with one row per encounter

...

for (var index=0; index < ENCOUNTERS.Count; index++) {
     var encounter = ENCOUNTERS.GetEncounter(index);
         var encounterDate = encounter.#EncounterDate.displayValue.toString();
         var encounterName = encounter.#IntervalName.displayValue.toString();
         var variable1value = encounter.#Variable1.value.value;
         var variable2value = encounter.#Variable2.value.value;

   Output.Write("<tr><td>" + encounterDate + "</td>");
   Output.Write("<td>" + encounterName + "</td>");
   Output.Write("<td>" + variable1value + "</td>");
   Output.Write("<td>" + variable2value + "</td></tr>");

...

     var encounter = encountersSorted.GetEncounter(index);
         var encounterDate = encounter.#EncounterDate.displayValue.toString();
         var encounterName = encounter.#IntervalName.displayValue.toString();
         var variable1value = encounter.#Variable1.value.value;
         var variable2value = encounter.#Variable2.value.value;

   Output.Write("<tr><td>" + encounterDate + "</td>");
   Output.Write("<td>" + encounterName + "</td>");
   Output.Write("<td>" + variable1value + "</td>");
   Output.Write("<td>" + variable2value + "</td></tr>");

...

     var encounter = encountersSorted.GetEncounter(index);
         var encounterDate = encounter.#EncounterDate.displayValue.toString();
         var encounterName = encounter.#IntervalName.displayValue.toString();
         var variable1value = encounter.#Variable1.value.value;
         var variable2value = encounter.#Variable2.value.value;

 if (variable1value >= 150) }

...

for (var index=0; index < ENCOUNTERS.Count; index++) {
  var encounter = ENCOUNTERS.GetEncounter(index);
  var encounterName = encounter.#IntervalName.displayValue.toString();
      if (encounterName =="Baseline") var BaselineIndex=index;
      else if (encounterName=="Month 1") var Month1Index=index;
      else if (encounterName=="Month 2") var Month2Index=index;
}

...