示例#1
0
  public void addPreventionWithExts(Prevention prevention, HashMap<String, String> exts) {
    if (prevention == null) return;

    preventionDao.persist(prevention);
    if (exts != null) {
      for (String keyval : exts.keySet()) {
        if (StringUtils.filled(keyval) && StringUtils.filled(exts.get(keyval))) {
          PreventionExt preventionExt = new PreventionExt();
          preventionExt.setPreventionId(prevention.getId());
          preventionExt.setKeyval(keyval);
          preventionExt.setVal(exts.get(keyval));
          preventionExtDao.persist(preventionExt);
        }
      }
    }
  }
示例#2
0
 public ArrayList<String> getPreventionTypeList(LoggedInInfo loggedInInfo) {
   if (preventionTypeList.isEmpty()) {
     PreventionDisplayConfig pdc = PreventionDisplayConfig.getInstance(loggedInInfo);
     for (HashMap<String, String> prevTypeHash : pdc.getPreventions(loggedInInfo)) {
       if (prevTypeHash != null && StringUtils.filled(prevTypeHash.get("name"))) {
         preventionTypeList.add(prevTypeHash.get("name").trim());
       }
     }
   }
   return preventionTypeList;
 }
示例#3
0
  /*
   *
  Form
  Field         MSP  MSP
  Label  REC #  REC  SEQ     Data Element Name      MAND   Wcb Specific   Should be check with bill
  DR08  1 of 4  C02  P120  WCB-Claim-Number                 Yes
  DR09  1 of 4  C02  P110  OIN-SURNAME              Yes     No
  DR10  1 of 4  C02  P106  OIN-FIRST-NAME           Yes     No
  DR11  1 of 4  C02  P108  OIN-SECOND-NAME-INITIAL          No
  DR12  1 of 4  C02  P112  OIN-SEX-CODE             Yes     No
  DR13  1 of 4  C02  P104  OIN-BIRTHDATE            Yes     No
  DR19  1 of 4  C02  P14   MSP-REGISTRATION         Yes     No
  DR20  1 of 4  C02  P114  WCB-Date-of-Injury       Yes     Yes
  DR21  1 of 4  C02  P30   SERVICE-DATE             Yes     No            **
  DR30  1 of 4  C02  P116  WCB-Area-of-Injury       Yes     Yes
  DR31  1 of 4  C02  P116  WCB-Anatomical-Position  Yes     Yes
  DR32  1 of 4  C02  P118  WCB-Nature-of-Injury     Yes     Yes
  DR34  1 of 4  C02  P36   DIAGNOSTIC-CODE-1        Yes     No            **
  DR50  1 of 4  C02  P06   PAYEE-NUM                Yes     No            **
  DR51  1 of 4  C02  P08   PRACTITIONER-NUM         Yes     No            **
   */
  public List verifyFormNotNeeded() {
    List errors = new ArrayList();
    checkNullOrBlankValue(w_lname, errors, "oscar.billing.CA.BC.billingBC.wcb.error.w_lname");
    checkNullOrBlankValue(w_fname, errors, "oscar.billing.CA.BC.billingBC.wcb.error.w_fname");
    checkNullOrBlankValue(w_dob, errors, "oscar.billing.CA.BC.billingBC.wcb.error.w_dob");
    checkNullOrBlankValue(w_gender, errors, "oscar.billing.CA.BC.billingBC.wcb.error.w_gender");
    checkNullAndNumericValue(w_phn, errors, "oscar.billing.CA.BC.billingBC.wcb.error.w_phn");
    checkNullOrBlankValue(w_doi, errors, "oscar.billing.CA.BC.billingBC.wcb.error.w_doi");
    checkNullOrBlankValue(w_noi, errors, "oscar.billing.CA.BC.billingBC.wcb.error.w_noi");

    if ((w_noi != null && w_noi.length() > 0) && !StringUtils.isNumeric(w_noi)) {
      errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_noi.numeric");
    }
    if ((w_bp != null && w_bp.length() > 0) && !StringUtils.isNumeric(w_bp)) {
      errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_bp.numeric");
    }

    // DR31  1 of 4  C02  P116  WCB-Anatomical-Position  Yes     Yes  Not checked because it's a
    // drop box in the interface.
    return errors;
  }
示例#4
0
  public ActionForward getBillingArgs(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {
    HashMap<String, Object> hashMap = new HashMap<String, Object>();

    LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request);

    DemographicDao demographicDao = (DemographicDao) SpringUtils.getBean("demographicDao");
    OscarAppointmentDao appointmentDao =
        (OscarAppointmentDao) SpringUtils.getBean("oscarAppointmentDao");

    Appointment appointment = null;
    try {
      appointment = appointmentDao.find(Integer.parseInt(request.getParameter("appointment_no")));
    } catch (Exception e) {
      // appointment_no is not a number, I guess
      appointment = null;
    }

    Demographic demographic = demographicDao.getDemographic(request.getParameter("demographic_no"));

    hashMap.put("ohip_version", "V03G");

    if (demographic != null) {
      Integer sex = null;
      if (demographic.getSex().equalsIgnoreCase("M")) sex = 1;
      else if (demographic.getSex().equalsIgnoreCase("F")) sex = 2;

      String dateOfBirth =
          StringUtils.join(
              new String[] {
                demographic.getYearOfBirth(),
                demographic.getMonthOfBirth(),
                demographic.getDateOfBirth()
              },
              "");

      hashMap.put("hin", demographic.getHin());
      hashMap.put("ver", demographic.getVer());
      hashMap.put("hc_type", demographic.getHcType());
      hashMap.put("sex", sex);
      hashMap.put("demographic_dob", dateOfBirth);
      hashMap.put("demographic_name", demographic.getLastName() + "," + demographic.getFirstName());
    }

    if (appointment != null) {
      hashMap.put("apptProvider_no", appointment.getProviderNo());
      hashMap.put("start_time", appointment.getStartTime().toString());
      hashMap.put("appointment_date", appointment.getAppointmentDate().getTime());
    }

    hashMap.put("current_provider_no", loggedInInfo.getLoggedInProviderNo());
    hashMap.put("demo_mrp_provider_no", demographic.getProviderNo());

    JsonConfig config = new JsonConfig();
    config.registerJsonBeanProcessor(java.sql.Date.class, new JsDateJsonBeanProcessor());

    JSONObject json = JSONObject.fromObject(hashMap, config);
    response.getOutputStream().write(json.toString().getBytes());

    return null;
  }
示例#5
0
  public List verifyOnForm() {
    List errors = new ArrayList();

    checkNullOrBlankValue(w_lname, errors, "oscar.billing.CA.BC.billingBC.wcb.error.w_lname");
    checkNullOrBlankValue(w_fname, errors, "oscar.billing.CA.BC.billingBC.wcb.error.w_fname");
    checkNullOrBlankValue(w_dob, errors, "oscar.billing.CA.BC.billingBC.wcb.error.w_dob");
    checkNullOrBlankValue(w_gender, errors, "oscar.billing.CA.BC.billingBC.wcb.error.w_gender");

    if (!StringUtils.isNumeric(w_phn)) {
      errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_phn");
    }
    checkNullOrBlankValue(w_doi, errors, "oscar.billing.CA.BC.billingBC.wcb.error.w_doi");
    checkNullOrBlankValue(w_noi, errors, "oscar.billing.CA.BC.billingBC.wcb.error.w_noi");

    if ((w_noi != null && w_noi.length() > 0) && !StringUtils.isNumeric(w_noi)) {
      errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_noi.numeric");
    }
    if ((w_bp != null && w_bp.length() > 0) && !StringUtils.isNumeric(w_bp)) {
      errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_bp.numeric");
    }

    if ("1".equals(formNeeded)) {
      checkNullOrBlankValue(w_empname, errors, "oscar.billing.CA.BC.billingBC.wcb.error.w_empname");
      checkNullOrBlankValue(
          w_opaddress, errors, "oscar.billing.CA.BC.billingBC.wcb.error.w_opaddress");
      checkNullOrBlankValue(w_opcity, errors, "oscar.billing.CA.BC.billingBC.wcb.error.w_opcity");

      if (this.w_emparea == null || !StringUtils.isNumeric(w_emparea)) {
        errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_emparea");
      }

      if (w_empphone == null || !StringUtils.isNumeric(w_empphone)) {
        errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_empphone");
      }

      checkNullOrBlankValue(
          w_diagnosis, errors, "oscar.billing.CA.BC.billingBC.wcb.error.w_diagnosis");
    }

    // From injury or since last report, has the worker been disabled from work?
    if ("Y".equals(w_work)) {
      checkNullValue(w_workdate, errors, "oscar.billing.CA.BC.billingBC.wcb.error.w_workdate");
    } else if (w_work == null) {
      errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_rphysician");
    }

    // Is the worker now medically capable of working full duties, full time?
    if ("N".equals(w_capability)) {
      checkNullOrBlankValue(
          w_capreason, errors, "oscar.billing.CA.BC.billingBC.wcb.error.w_capreason");
    } else if (w_capability == null) {
      errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_capability");
    }

    // If appropriate, is the worker now ready for a rehabilitation program?
    if ("Y".equals(w_rehab)) {
      checkNullOrBlankValue(
          w_rehabtype, errors, "oscar.billing.CA.BC.billingBC.wcb.error.w_rehabtype");
    } else if (w_rehab == null) {
      errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_rehab");
    }

    checkNullValue(w_rphysician, errors, "oscar.billing.CA.BC.billingBC.wcb.error.w_rphysician");
    checkNullValue(w_estimate, errors, "oscar.billing.CA.BC.billingBC.wcb.error.w_estimate");
    checkNullValue(w_tofollow, errors, "oscar.billing.CA.BC.billingBC.wcb.error.w_tofollow");
    ////            if (w_reportype == null) {
    ////                errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_reportype");
    ////            }

    return errors;
  }
示例#6
0
 void checkNullAndNumericValue(Object s, List errors, String code) {
   if (s == null || !StringUtils.isNumeric("" + s)) {
     errors.add(code);
   }
 }
示例#7
0
  public List verify() {
    List errors = new ArrayList();

    if (w_lname == null || "".equals(w_lname)) {
      errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_lname");
    }
    if (w_fname == null || "".equals(w_fname)) {
      errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_fname");
    }
    if (w_dob == null || "".equals(w_dob)) {
      errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_dob");
    }
    if (w_gender == null || "".equals(w_gender)) {
      errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_gender");
    }

    if (!StringUtils.isNumeric(w_phn)) {
      errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_phn");
    }
    if (w_doi == null || "".equals(w_doi)) {
      errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_doi");
    }

    if ((w_feeitem == null
        || "".equals(w_feeitem) && (w_extrafeeitem == null || "".equals(w_extrafeeitem)))) {
      errors.add("oscar.billing.CA.BC.billingBC.wcb.error.enterfee");
    }
    if (w_icd9 == null || "".equals(w_icd9)) {
      errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_icd9");
    }
    //        } else if (!per.dxcodeExists(w_icd9)) {
    //            errors.add("oscar.billing.CA.BC.billingBC.error.invaliddxcode", w_icd9);
    //        }

    if (w_noi == null || "".equals(w_noi)) {
      errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_noi");
    }

    if ((w_noi != null && w_noi.length() > 0) && !StringUtils.isNumeric(w_noi)) {
      errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_noi.numeric");
    }

    if ((w_feeitem != null && w_feeitem.length() > 0) && !StringUtils.isNumeric(w_feeitem)) {
      errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_feeitem.numeric");
    }

    if ((w_extrafeeitem != null && w_extrafeeitem.length() > 0)
        && !StringUtils.isNumeric(w_extrafeeitem)) {
      errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_extrafeeitem.numeric");
    }

    if (!StringUtils.isNumeric(w_icd9)) {
      errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_icd9.numeric");
    }

    if ((w_bp != null && w_bp.length() > 0) && !StringUtils.isNumeric(w_bp)) {
      errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_bp.numeric");
    }

    if ("1".equals(formNeeded)) {
      if (w_empname == null || "".equals(w_empname)) {
        errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_empname");
      }
      if (this.w_opaddress == null || "".equals(w_opaddress)) {
        errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_opaddress");
      }
      if (this.w_opcity == null || "".equals(w_opcity)) {
        errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_opcity");
      }
      if (this.w_emparea == null || !StringUtils.isNumeric(w_emparea)) {
        errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_emparea");
      }

      if (w_empphone == null || !StringUtils.isNumeric(w_empphone)) {
        errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_empphone");
      }

      if (w_diagnosis == null || "".equals(w_diagnosis)) {
        errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_diagnosis");
      }

      // From injury or since last report, has the worker been disabled from work?
      if ("Y".equals(w_work)) {
        if (w_workdate == null) {
          errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_workdate");
        }
      } else if (w_work == null) {
        errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_rphysician");
      }

      // Is the worker now medically capable of working full duties, full time?
      if ("N".equals(w_capability)) {
        if (w_capreason == null || "".equals(w_capreason)) {
          errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_capreason");
        }
      } else if (w_capability == null) {
        errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_capability");
      }

      // If appropriate, is the worker now ready for a rehabilitation program?
      if ("Y".equals(w_rehab)) {
        if (w_rehabtype == null || "".equals(w_rehabtype)) {
          errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_rehabtype");
        }
      } else if (w_rehab == null) {
        errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_rehab");
      }

      if (w_rphysician == null) {
        errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_rphysician");
      }
      ////            if (w_reportype == null) {
      ////                errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_reportype");
      ////            }
      if (w_estimate == null) {
        errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_estimate");
      }
      if (w_tofollow == null) {
        errors.add("oscar.billing.CA.BC.billingBC.wcb.error.w_tofollow");
      }
    }
    return errors;
  }
 public String getCommentStr() {
   return StringUtils.maxLenString(getComment(), 23, 20, "...");
 }
  public boolean getInfo(
      EctSessionBean bean,
      HttpServletRequest request,
      NavBarDisplayDAO Dao,
      MessageResources messages) {
    boolean a = true;
    Vector v = OscarRoleObjectPrivilege.getPrivilegeProp("_newCasemgmt.episode");
    String roleName =
        (String) request.getSession().getAttribute("userrole")
            + ","
            + (String) request.getSession().getAttribute("user");
    a = OscarRoleObjectPrivilege.checkPrivilege(roleName, (Properties) v.get(0), (Vector) v.get(1));
    a = true;
    if (!a) {
      return true;
    } else {
      try {
        String appointmentNo = request.getParameter("appointment_no");

        // Set lefthand module heading and link
        String winName = "episode" + bean.demographicNo;
        String pathview, pathedit;

        pathview =
            request.getContextPath()
                + "/Episode.do?method=list&demographicNo="
                + bean.demographicNo;
        pathedit =
            request.getContextPath()
                + "/Episode.do?method=edit&demographicNo="
                + bean.demographicNo;

        String url = "popupPage(500,900,'" + winName + "','" + pathview + "')";
        Dao.setLeftHeading(messages.getMessage(request.getLocale(), "global.episode"));
        Dao.setLeftURL(url);

        // set right hand heading link
        winName = "AddEpisode" + bean.demographicNo;
        url = "popupPage(500,600,'" + winName + "','" + pathedit + "'); return false;";
        Dao.setRightURL(url);
        Dao.setRightHeadingID(cmd);

        EpisodeDao episodeDao = SpringUtils.getBean(EpisodeDao.class);
        List<Episode> episodes = episodeDao.findAllCurrent(Integer.parseInt(bean.demographicNo));

        for (Episode episode : episodes) {
          NavBarDisplayDAO.Item item = NavBarDisplayDAO.Item();
          String itemHeader =
              StringUtils.maxLenString(
                  episode.getDescription(), MAX_LEN_TITLE, CROP_LEN_TITLE, ELLIPSES);
          item.setLinkTitle(itemHeader);
          item.setTitle(itemHeader);
          item.setDate(episode.getStartDate());
          int hash = Math.abs(winName.hashCode());
          url =
              "popupPage(500,900,'"
                  + hash
                  + "','"
                  + request.getContextPath()
                  + "/Episode.do?method=edit&episode.id="
                  + episode.getId()
                  + "'); return false;";
          item.setURL(url);
          Dao.addItem(item);
        }

      } catch (Exception e) {
        MiscUtils.getLogger().error("Error", e);
        return false;
      }
      return true;
    }
  }