コード例 #1
0
 static {
   ResourceBundle resourceBundle = null;
   try {
     resourceBundle = ResourceBundle.getBundle("common.drfirst");
   } catch (MissingResourceException e) {
   }
   try {
     m_AppPath = resourceBundle.getString("signature_form_app_path");
   } catch (Exception e) {
     System.out.println("Error when getting the resource bundle " + e);
   }
   try {
     m_DrFirstLogoPath = SystemProperties.getPropertyValue("signature_form_drfirst_logo");
     m_DrFirstPhone = SystemProperties.getPropertyValue("signature_form_drfirst_phone");
   } catch (Exception e) {
   }
   try {
     m_Fax = SystemProperties.getPropertyValue("signature_form_fax");
   } catch (Exception e) {
   }
   try {
     UserValidationBean uBean = new UserValidationBean();
     SERVER_PREFIX = uBean.getServerPrefix();
     uBean = null;
   } catch (Exception e) {
   }
 }
コード例 #2
0
  public void processGet(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {
    PrintWriter out = response.getWriter();
    StringBuffer output = new StringBuffer("");

    String prefix = null;
    String lastName = null;
    String firstName = null;
    String middleInitial = null;
    String suffix = null;
    String practiceName = null;
    boolean suppressHeaderOnFrame = true;
    String value = "";
    String practiceId = null;
    String practiceNameDisplay = null;
    // updated by Channpreet to fix Bug#6269 starts
    String username = "";
    String password = "";
    // updated by Channpreet to fix Bug#6269 ends
    Enumeration attributes = request.getParameterNames();
    while (attributes.hasMoreElements()) {
      String param_name = (String) attributes.nextElement();
      String param_value = StringFunctions.objectToString(request.getParameter(param_name));
      System.out.println(param_name + " : " + param_value);
    }

    String time_out_url = (String) request.getSession(true).getValue("LOGIN_FROM");
    if (time_out_url == null) time_out_url = "/login.jsp";

    prefix = request.getParameter("prefix");
    lastName = request.getParameter("lastName");
    middleInitial = request.getParameter("middleInitial");
    firstName = request.getParameter("firstName");
    suffix = request.getParameter("suffix");
    practiceName = request.getParameter("practiceNameDisplay"); // Amit -
    // Fixed for
    // bug 5819
    practiceId = request.getParameter("practice_id");
    practiceNameDisplay = request.getParameter("practiceNameDisplay");
    // updated by Channpreet to fix Bug#6269 starts
    username = request.getParameter("username");
    password = request.getParameter("password");
    // updated by Channpreet to fix Bug#6269 ends
    try {
      value = SystemProperties.getPropertyValue("suppress_header_image_on_frame");
    } catch (Exception e) {
      e.printStackTrace();
    }
    if (value.equals("n")) suppressHeaderOnFrame = false;
    else suppressHeaderOnFrame = true;

    output.append(
        "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"DTD/xhtml1-transitional.dtd\">\n");
    output.append("<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n");
    output.append("<head>\n");
    output.append("<link href=\"/styles/general.css\" type=\"text/css\" rel=\"stylesheet\" />\n");
    output.append(
        "<link href=\"/styles/register.css\" type=\"text/css\" rel=\"stylesheet\" />\n\n");
    output.append("<style type=\"text/css\">\n");
    output.append("<!--\n\n");
    output.append("td, th\n");
    output.append("  {font-size: smaller}\n\n");
    output.append("-->\n");
    output.append("</style>\n\n");
    output.append("<script src=\"/javascript/datetimepicker.js\"></script>              \n\n");
    output.append("<script src=\"/javascript/npi.js\"></script>         \n\n");
    output.append("<script src=\"/javascript/urs_register.js\"></script>\n\n");
    output.append("<script language=\"javascript\" type=\"text/javascript\">\n\n");
    output.append("<!--\n\n");

    output.append("function returnToURS() {\n");
    output.append("     document.register.action = '/members/registerNewUsers.jsp';\n"); // Amit
    // -
    // Fixed
    // Bug
    // 5751
    output.append("     document.register.target = \"_self\";\n"); // Amit -
    // Fixed
    // Bug
    // 5738
    output.append("        document.register.submit();\n ");

    output.append("}\n");
    output.append("\n\n");
    output.append("\n\n");
    output.append(" function setMenuTitle() { \n");
    output.append("   if (parent.document.images[\"menuTop\"] != null) \n");
    output.append(
        "    parent.document.images[\"menuTop\"].src = \"/images/menuTopRegistrationSummary.jpg\";\n");
    output.append("  } \n");

    output.append("  function showTitle() { \n");
    output.append("    if (top.frames.length == 0) {\n");
    output.append("      return true;\n");
    output.append("    } \n");
    output.append("    return false;\n");
    output.append("  } \n");

    output.append("function timeout_trigger() {\n");
    output.append("  document.register.submitbutton.value='Submit'; \n");
    output.append("  document.register.submitbutton.disabled = false;   \n");
    output.append("}\n");

    output.append("function check(cb) {\n");
    output.append(" var val; \n");
    output.append(" if (cb.checked)\n");
    output.append("    val = true; \n");
    output.append("  else \n");
    output.append("    val = false; \n");
    output.append("     len = document.register.elements.length;\n");
    output.append("     var i=0;\n");
    output.append("     for( i=0 ; i < document.register.groups.length ; i++) {\n");
    output.append("             document.register.groups.options[i].selected = val;\n");
    output.append("     }\n");
    output.append("}\n\n");

    output.append("\r\n");
    output.append("</script>\n");
    output.append("\r\n");
    output.append("\r\n");

    output.append("<title>Staff Registration Confirmation</title>\n");
    output.append("</head>\n");
    output.append("<body   onLoad=\"setMenuTitle()\">\n");

    output.append(
        "          <form method=\"post\" name=\"register\" action=\"\" align=\"center\" >\n");

    output.append("<script language=\"javascript\" type=\"text/javascript\">\n");
    output.append(
        "  document.write(\"<table bgcolor=\\\"#FFFFFF\\\" width=\\\"100%\\\" border=\\\"0\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\">\\n\");\n");
    output.append("  document.write(\"  <tr>\\n\");\n");
    if (suppressHeaderOnFrame) {
      output.append("  if (showTitle())\n");
      output.append("  { \n");
    }
    output.append(
        "    document.write(\"    <td width=\\\"100%\\\"><img src=\\\"/images/staff-confirm-title.gif\\\" alt=\\\"Provider Confirmation\\\" /></td>\\n\");\n");
    output.append(
        "  document.write(\"    <td align=\\\"right\\\" valign=\\\"top\\\"><a href=\\\"javascript:returnToURS();\\\">\\n\");\n");
    output.append(
        "  document.write(\"        <img src=\\\"/images/backtoregnewuser.gif\\\" border=\\\"0\\\" alt=\\\"Back to Staff Registration\\\" /></a></td>\\n\");\n");

    if (suppressHeaderOnFrame) {
      output.append("  } \n");
    }
    output.append("  document.write(\"  </tr>\\n\");\n");
    output.append("  document.write(\"</table>\\n\");\n");
    output.append("</script>\n");

    output.append("<script language=\"javascript\" type=\"text/javascript\">\n\n");
    output.append("<!--\n\n");

    output.append("function gotoPages(fn, param) {\n");
    output.append("        if(fn==1){    \n");
    output.append(
        "                        document.register.action = '/servlet/urs.SimpleProviderRegistrationForm'+param;\n");
    output.append("                        document.register.target = \"_self\";\n"); // Amit
    // -
    // Fixed
    // Bug
    // 5738
    output.append("                        document.register.submit();\n");
    output.append("        }else if(fn ==2){\n");
    output.append(
        "                        document.register.action = '/servlet/urs.SimpleStaffRegistrationForm'+param;\n");
    output.append("                        document.register.target = \"_self\";\n"); // Amit
    // -
    // Fixed
    // Bug
    // 5738
    output.append("                        document.register.submit();\n");
    output.append("        }else if(fn ==3){\n");
    output.append(
        "                        document.register.action = '/servlet/urs.ViewSummary'+param;\n");
    output.append("                        document.register.target = \"_blank\";\n"); // Amit
    // -
    // Fixed
    // Bug
    // 5738
    output.append("                        document.register.submit();\n");
    output.append("        }\n");

    output.append("}\n");

    output.append("</script>\n");
    output.append("\r\n");

    StringBuffer name = new StringBuffer();

    prefix = (prefix != null ? name.append(prefix.trim()).append(" ").toString() : "");
    firstName = (firstName != null ? name.append(firstName.trim()).append(" ").toString() : " ");
    middleInitial =
        (middleInitial != null ? name.append(middleInitial.trim()).append(" ").toString() : " ");
    lastName = (lastName != null ? name.append(lastName.trim()).append(" ").toString() : " ");
    suffix = (suffix != null ? name.append(suffix.trim()).append(" ").toString() : " ");

    output.append("<p>");
    output.append("<b>" + name.toString());
    output.append(" has been registered as a staff member at ");
    output.append(StringFunctions.forHTML(practiceNameDisplay) + "." + "</b>");
    output.append("</p>");

    output.append(
        " <p>NOTE:&nbsp;&nbsp;&nbsp; If a staff member is selected as \'Provider Agent\' the access will not be granted until a signed Provider Agent Agreement is faxed to "
            + m_phoneProviderReg
            + ".</p>");

    StringBuffer actionData = new StringBuffer("?Session=Y&practice_id=");
    actionData.append(practiceId);
    actionData.append("&name=");
    actionData.append(StringFunctions.forHTML(practiceName));
    actionData.append("&practiceNameDisplay=");
    actionData.append(StringFunctions.forHTML(practiceNameDisplay));

    output.append("<form name = \"register\">");
    output.append(" <table cellpadding=0 cellspacing=0>");
    output.append(" <tr valign=top>");
    output.append(" <td align=center nowrap>");
    output.append(" I want to:&nbsp;&nbsp;&nbsp;");
    output.append(
        " <input name=btnRNP type=button value=\"Register New Staff Member\" onclick=\"gotoPages(2,'"
            + (actionData.toString()).replace("&#039;", "%27").toString()
            + "');\">");
    output.append(
        " <input name=btnRNS type=button value=\"Register New Provider\" onclick=\"gotoPages(1,'"
            + (actionData.toString()).replace("&#039;", "%27").toString()
            + "');\">");
    output.append(
        " <input type = \"button\" value=\"View Registration Summary and Print Forms\" name=\"btnVRS\" onclick=\"gotoPages(3,'"
            + (actionData.toString()).replace("&#039;", "%27").toString()
            + "');\">\n");
    output.append(" </td>  </tr></table>");

    output.append(
        "  <input type=\"hidden\" name=\"practiceNameDisplay\" value=\""
            + StringFunctions.forHTML(practiceNameDisplay)
            + "\">");
    output.append("  <input type=\"hidden\" name=\"practice_id\" value=\"" + practiceId + "\">");
    output.append(
        "  <input type=\"hidden\" name=\"practicename\" value=\""
            + StringFunctions.forHTML(practiceNameDisplay)
            + "\">");
    output.append(
        "  <input type=\"hidden\" name=\"name\" value=\""
            + StringFunctions.forHTML(practiceNameDisplay)
            + "\">");
    output.append("  <input type=\"hidden\" name=\"groupId\" value=\"" + practiceId + "\">");
    output.append("<input type=\"hidden\" name=\"time_out_url\" value=\"" + time_out_url + "\" />");
    // updated by Channpreet to fix Bug#6269 starts
    output.append("  <input type=\"hidden\" name=\"username\" value=\"" + username + "\">");
    output.append("<input type=\"hidden\" name=\"password_m\" value=\"" + password + "\" />");
    // updated by Channpreet to fix Bug#6269 ends
    output.append("</form></body>");
    output.append("</html>");
    System.out.println("AAAmit789");

    response.setContentType("text/html");
    out.print(output.toString());
    out.flush();
    out.close();
  }