예제 #1
0
 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);
 }
예제 #2
0
 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);
 }
예제 #3
0
 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);
 }
예제 #4
0
 public Encounter getRandomEncounter() {
   init();
   Encounter obj = data.get(rnd.nextInt(data.size()));
   Long id = obj.getId();
   return encounterService.findEncounter(id);
 }
예제 #5
0
 public void setEncounterFreeText(Encounter obj, int index) {
   String encounterFreeText = "encounterFreeText_" + index;
   obj.setEncounterFreeText(encounterFreeText);
 }