Source:
public String bill(ModelMap model, @RequestParam(value = "billUuid", required = false) String billUuid, @RequestParam(value = "patientUuid", required = false) String patientUuid, HttpServletRequest request) { Timesheet timesheet = null; try { timesheet = TimesheetUtil.getCurrentTimesheet(); } catch (RuntimeException e) { LOG.error("Error retrieving provider for current user. ", e); timesheet = null; return "redirect:/login.htm"; } catch (Exception e) { LOG.error("An exception occured: ", e); timesheet = null; } if (timesheet == null && TimesheetUtil.isTimesheetRequired()) { return buildRedirectUrl(request); } model.addAttribute("timesheet", timesheet); model.addAttribute("user", Context.getAuthenticatedUser()); model.addAttribute("url", buildUrlModelAttribute(request)); boolean showAdjustmentReasonField = Boolean.parseBoolean(adminService.getGlobalProperty(ModuleSettings.ADJUSTMENT_REASEON_FIELD)); model.addAttribute("showAdjustmentReasonField", showAdjustmentReasonField); boolean showBillAdjustmentButton = Boolean.parseBoolean(adminService.getGlobalProperty(ModuleSettings.BILL_ADJUSTMENT_SETTING)); model.addAttribute("showBillAdjustmentButton", showBillAdjustmentButton); CashierOptions options = cashOptService.getOptions(); String roundingItemUuid = options.getRoundingItemUuid(); model.addAttribute("roundingItemUuid", roundingItemUuid); if (billUuid != null) { handleExistingBill(model, billUuid); } else { addPatientAttributes(model, patientUuid); model.addAttribute("showPrint", true); model.addAttribute("cashPoint", timesheet != null ? timesheet.getCashPoint() : null); } return CashierWebConstants.BILL_PAGE; }

Target:
public String bill(ModelMap model, @RequestParam(value = "billUuid", required = false) String billUuid, @RequestParam(value = "patientUuid", required = false) String patientUuid, HttpServletRequest request) { Timesheet timesheet = null; try { timesheet = TimesheetUtil.getCurrentTimesheet(); } catch (RuntimeException e) { LOG.error("Error retrieving provider for current user. ", e); timesheet = null; return "redirect:/login.htm"; } catch (Exception e) { LOG.error("An exception occured: ", e); timesheet = null; } if (timesheet == null && TimesheetUtil.isTimesheetRequired()) { return buildRedirectUrl(request); } model.addAttribute("timesheet", timesheet); model.addAttribute("user", Context.getAuthenticatedUser()); model.addAttribute("url", buildUrlModelAttribute(request)); boolean showAdjustmentReasonField = Boolean.parseBoolean(adminService.getGlobalProperty(ModuleSettings.ADJUSTMENT_REASEON_FIELD)); model.addAttribute("showAdjustmentReasonField", showAdjustmentReasonField); boolean showBillAdjustmentButton = Boolean.parseBoolean(adminService.getGlobalProperty(ModuleSettings.ALLOW_BILL_ADJUSTMENT)); model.addAttribute("showBillAdjustmentButton", showBillAdjustmentButton); CashierOptions options = cashOptService.getOptions(); String roundingItemUuid = options.getRoundingItemUuid(); model.addAttribute("roundingItemUuid", roundingItemUuid); if (billUuid != null) { handleExistingBill(model, billUuid); } else { addPatientAttributes(model, patientUuid); model.addAttribute("showPrint", true); model.addAttribute("cashPoint", timesheet != null ? timesheet.getCashPoint() : null); } return CashierWebConstants.BILL_PAGE; }