src/main/java/org/openimmunizationsoftware/pt/servlet/BillCodesServlet.java
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {
    AppReq appReq = new AppReq(request, response);
    try {
      WebUser webUser = appReq.getWebUser();
      if (appReq.isLoggedOut()) {
        forwardToHome(request, response);
        return;
      }
      Session dataSession = appReq.getDataSession();
      String action = appReq.getAction();
      PrintWriter out = appReq.getOut();
      SimpleDateFormat sdf = webUser.getDateFormat();


      Query query;

      appReq.setTitle("Track");
      printHtmlHead(appReq);


      query = dataSession.createQuery(
          "from BillCode where provider = :provider and visible = 'Y' order by billCode");
      query.setParameter("provider", webUser.getProvider());
      List<BillCode> billCodeList = query.list();
      out.println("<table class=\"boxed\">");
      out.println("  <tr>");
      out.println("    <th class=\"title\" colspan=\"7\">Bill Codes</th>");
      out.println("  </tr>");
      out.println("  <tr class=\"boxed\">");
      out.println("    <th class=\"boxed\">Bill Code</th>");
      out.println("    <th class=\"boxed\">Bill Label</th>");
      out.println("    <th class=\"boxed\">Billable</th>");
      out.println("    <th class=\"boxed\">Visible</th>");
      out.println("    <th class=\"boxed\">Estimate Min</th>");
      out.println("    <th class=\"boxed\">Rate</th>");
      out.println("    <th class=\"boxed\">Round</th>");
      out.println("  </tr>");

      for (BillCode billCode : billCodeList) {
        out.println("  <tr class=\"boxed\">");
        out.println(
            "    <td class=\"boxed\"><a href=\"BillCodeServlet?billCode=" + billCode.getBillCode()
                + "\" class=\"button\">" + billCode.getBillCode() + "</a></td>");
        out.println(
            "    <td class=\"boxed\"><a href=\"BillCodeServlet?billCode=" + billCode.getBillCode()
                + "\" class=\"button\">" + billCode.getBillLabel() + "</a></td>");
        out.println("    <td class=\"boxed\">" + billCode.getBillable() + "</td>");
        out.println("    <td class=\"boxed\">" + billCode.getVisible() + "</td>");
        out.println("    <td class=\"boxed\">" + billCode.getEstimateMin() + "</td>");
        out.println("    <td class=\"boxed\">" + billCode.getBillRate() + "</td>");
        out.println("    <td class=\"boxed\">" + billCode.getBillRound() + "</td>");
        out.println("  </tr>");
      }
      out.println("</table> ");

      out.println("<h2>Create a New Bill Code</h2>");
      out.println(
          "<p>If you do not see your bill code in the list above you can <a href=\"BillCodeEditServlet\">create</a> one.</p>");
      printHtmlFoot(appReq);

    } finally {
      appReq.close();
    }
  }
/**
   * Processes requests for both HTTP <code>GET</code> and <code>POST</code>
   * methods.
   * 
   * @param request
   *          servlet request
   * @param response
   *          servlet response
   * @throws ServletException
   *           if a servlet-specific error occurs
   * @throws IOException
   *           if an I/O error occurs
   */
Processes requests for both HTTP GET and POST
methods.

@param request
servlet request
@param response
servlet response
@throws ServletException
if a servlet-specific error occurs
@throws IOException
if an I/O error occurs
Processes requests for both HTTP GET and POST methods . @param request servlet request @param response servlet response @throws ServletException if a servlet - specific error occurs @throws IOException if an I / O error occurs
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {
    AppReq appReq = new AppReq(request, response);
    try {
      WebUser webUser = appReq.getWebUser();
      if (appReq.isLoggedOut()) {
        forwardToHome(request, response);
        return;
      }
      Session dataSession = appReq.getDataSession();
      String action = appReq.getAction();
      PrintWriter out = appReq.getOut();
      SimpleDateFormat sdf = webUser.getDateFormat();
      Query query;
      appReq.setTitle("Track");
      printHtmlHead(appReq);
      query = dataSession.createQuery(
          "from BillCode where provider = :provider and visible = 'Y' order by billCode");
      query.setParameter("provider", webUser.getProvider());
      List<BillCode> billCodeList = query.list();
      out.println("<table class=\"boxed\">");
      out.println("  <tr>");
      out.println("    <th class=\"title\" colspan=\"7\">Bill Codes</th>");
      out.println("  </tr>");
      out.println("  <tr class=\"boxed\">");
      out.println("    <th class=\"boxed\">Bill Code</th>");
      out.println("    <th class=\"boxed\">Bill Label</th>");
      out.println("    <th class=\"boxed\">Billable</th>");
      out.println("    <th class=\"boxed\">Visible</th>");
      out.println("    <th class=\"boxed\">Estimate Min</th>");
      out.println("    <th class=\"boxed\">Rate</th>");
      out.println("    <th class=\"boxed\">Round</th>");
      out.println("  </tr>");
      for (BillCode billCode : billCodeList) {
        out.println("  <tr class=\"boxed\">");
        out.println(
            "    <td class=\"boxed\"><a href=\"BillCodeServlet?billCode=" + billCode.getBillCode()
                + "\" class=\"button\">" + billCode.getBillCode() + "</a></td>");
        out.println(
            "    <td class=\"boxed\"><a href=\"BillCodeServlet?billCode=" + billCode.getBillCode()
                + "\" class=\"button\">" + billCode.getBillLabel() + "</a></td>");
        out.println("    <td class=\"boxed\">" + billCode.getBillable() + "</td>");
        out.println("    <td class=\"boxed\">" + billCode.getVisible() + "</td>");
        out.println("    <td class=\"boxed\">" + billCode.getEstimateMin() + "</td>");
        out.println("    <td class=\"boxed\">" + billCode.getBillRate() + "</td>");
        out.println("    <td class=\"boxed\">" + billCode.getBillRound() + "</td>");
        out.println("  </tr>");
      }
      out.println("</table> ");
      out.println("<h2>Create a New Bill Code</h2>");
      out.println(
          "<p>If you do not see your bill code in the list above you can <a href=\"BillCodeEditServlet\">create</a> one.</p>");
      printHtmlFoot(appReq);
    } finally {
      appReq.close();
    }
  }
protected void processRequest ( HttpServletRequest request , HttpServletResponse response ) throws ServletException , IOException { AppReq appReq = new AppReq ( request , response ) ; try { WebUser webUser = appReq . getWebUser ( ) ; if ( appReq . isLoggedOut ( ) ) { forwardToHome ( request , response ) ; return ; } Session dataSession = appReq . getDataSession ( ) ; String action = appReq . getAction ( ) ; PrintWriter out = appReq . getOut ( ) ; SimpleDateFormat sdf = webUser . getDateFormat ( ) ; Query query ; appReq . setTitle ( "Track" ) ; printHtmlHead ( appReq ) ; query = dataSession . createQuery ( "from BillCode where provider = :provider and visible = 'Y' order by billCode" ) ; query . setParameter ( "provider" , webUser . getProvider ( ) ) ; List < BillCode > billCodeList = query . list ( ) ; out . println ( "<table class=\"boxed\">" ) ; out . println ( "  <tr>" ) ; out . println ( "    <th class=\"title\" colspan=\"7\">Bill Codes</th>" ) ; out . println ( "  </tr>" ) ; out . println ( "  <tr class=\"boxed\">" ) ; out . println ( "    <th class=\"boxed\">Bill Code</th>" ) ; out . println ( "    <th class=\"boxed\">Bill Label</th>" ) ; out . println ( "    <th class=\"boxed\">Billable</th>" ) ; out . println ( "    <th class=\"boxed\">Visible</th>" ) ; out . println ( "    <th class=\"boxed\">Estimate Min</th>" ) ; out . println ( "    <th class=\"boxed\">Rate</th>" ) ; out . println ( "    <th class=\"boxed\">Round</th>" ) ; out . println ( "  </tr>" ) ; for ( BillCode billCode : billCodeList ) { out . println ( "  <tr class=\"boxed\">" ) ; out . println ( "    <td class=\"boxed\"><a href=\"BillCodeServlet?billCode=" + billCode . getBillCode ( ) + "\" class=\"button\">" + billCode . getBillCode ( ) + "</a></td>" ) ; out . println ( "    <td class=\"boxed\"><a href=\"BillCodeServlet?billCode=" + billCode . getBillCode ( ) + "\" class=\"button\">" + billCode . getBillLabel ( ) + "</a></td>" ) ; out . println ( "    <td class=\"boxed\">" + billCode . getBillable ( ) + "</td>" ) ; out . println ( "    <td class=\"boxed\">" + billCode . getVisible ( ) + "</td>" ) ; out . println ( "    <td class=\"boxed\">" + billCode . getEstimateMin ( ) + "</td>" ) ; out . println ( "    <td class=\"boxed\">" + billCode . getBillRate ( ) + "</td>" ) ; out . println ( "    <td class=\"boxed\">" + billCode . getBillRound ( ) + "</td>" ) ; out . println ( "  </tr>" ) ; } out . println ( "</table> " ) ; out . println ( "<h2>Create a New Bill Code</h2>" ) ; out . println ( "<p>If you do not see your bill code in the list above you can <a href=\"BillCodeEditServlet\">create</a> one.</p>" ) ; printHtmlFoot ( appReq ) ; } finally { appReq . close ( ) ; } }
Processes requests for both HTTP <code>GET</code> and <code>POST</code>
 methods.
Processes requests for both HTTP <code > GET< / code > and <code > POST< / code > methods .