public Encounter getSpecificEncounter(int index) {
   init();
   if (index < 0) {
     index = 0;
   }
   if (index > (data.size() - 1)) {
     index = data.size() - 1;
   }
   Encounter obj = data.get(index);
   Long id = obj.getId();
   return encounterService.findEncounter(id);
 }
 public void setEncounterType(Encounter obj, int index) {
   CodedConceptValueObject embeddedClass = new CodedConceptValueObject();
   setEncounterTypeCode(embeddedClass, index);
   setEncounterTypeCodeSystem(embeddedClass, index);
   setEncounterTypeDisplayName(embeddedClass, index);
   setEncounterTypeCodeSystemName(embeddedClass, index);
   setEncounterTypeOriginalText(embeddedClass, index);
   setEncounterTypeCodeSystemVersion(embeddedClass, index);
   obj.setEncounterType(embeddedClass);
 }
 public void setEncounterEventTime(Encounter obj, int index) {
   Date encounterEventTime =
       new GregorianCalendar(
               Calendar.getInstance().get(Calendar.YEAR),
               Calendar.getInstance().get(Calendar.MONTH),
               Calendar.getInstance().get(Calendar.DAY_OF_MONTH),
               Calendar.getInstance().get(Calendar.HOUR_OF_DAY),
               Calendar.getInstance().get(Calendar.MINUTE),
               Calendar.getInstance().get(Calendar.SECOND)
                   + new Double(Math.random() * 1000).intValue())
           .getTime();
   obj.setEncounterEventTime(encounterEventTime);
 }
 public Encounter getRandomEncounter() {
   init();
   Encounter obj = data.get(rnd.nextInt(data.size()));
   Long id = obj.getId();
   return encounterService.findEncounter(id);
 }
 public void setEncounterFreeText(Encounter obj, int index) {
   String encounterFreeText = "encounterFreeText_" + index;
   obj.setEncounterFreeText(encounterFreeText);
 }