private ArrayList getDrugHistoryForACMedHx(Patient patient, ArrayList<EligibilityCheck> checks)
      throws IOException {
    logger.info("Entering DrugHistoryProcessor.getDrugHistoryForACMedHx()");
    int interval = getDrugHistoryInterval();

    if (interval <= 0) {
      Debug.println("BET: auto-check of drug history disabled.");
      return null;
    }

    Debug.println("BET: Checking Drug History...");
    DrugHistoryChecker checker = DrugHistoryChecker.create(user, SERVICE);

    Date endDate = new Date();
    Date startDate = DateConverter.add(endDate, Calendar.DATE, -interval);

    checker.setDates(startDate, endDate);
    checker.setPatient(patient);
    checker.setEligibilityChecK(checks);
    checker.setService(SERVICE);
    /** Main thread waits for DH to be done. */
    checker.run();
    logger.info("Exiting DrugHistoryProcessor.getDrugHistoryForACMedHx()");
    return checker.getResults();
  }
 public DrugHistoryProcessor(RcopiaUser user) {
   // Added by rnuthalapati for ACMEDHX1.21.2.12 story
   this.user = user;
   logger = Logger.getDualLogger();
   ;
   drugHistoryInterval = (GlobalProperties.getInt(RCOPIA_DRUG_HISTORY_INTERVAL, DEFAULT_ONE_YEAR));
   if (drugHistoryInterval <= 0) {
     drugHistoryInterval = DEFAULT_ONE_YEAR; // Defaulting to 1 year.
   }
 }
Exemple #3
0
 private void reportError(Throwable e, int requestNumber, Logger logger) {
   logger.fatal("[" + requestNumber + "] Error", e);
 }