Package lib.util

Examples of lib.util.IteratorDsk


     
      if (! request.isAuthorized()) {
        throw new InvalidSessionException("Invalid Session! <br><a href=\"" + Constants.SYSTEM_LOGIN + "\">Try again</a>");
      }
          // Facade calls must come before using out
      IteratorDsk repTP = facade.getSymptomList();
     
      out.println("Queries - Symptom information");
      out.println("<body><h1>Queries:<br>Querie about symptoms</h1>");
      out.println("<p>Choose a symptom: </p>");
      out.println("<form method=\"POST\" action=\"http://"+ Constants.SERVLET_SERVER_PATH+ "HWServlet\">");
      out.println("<input type=\"hidden\" name=\"operation\" value=\"UpdateSymptomSearch\">" );

      out.println("<div align=\"center\"><center><p><select name=\"symptomCode\" size=\"1\">");
     

      if (repTP == null || !repTP.hasNext()) {
        out.println("</select></p></center></div>");
        out.println("<p><font color=\"red\"><b> There isn't any symptoms.</b></font></p>");
      } else {
        Symptom symptom;
        do {
          symptom = (Symptom) repTP.next();
          out.println("<option value=\"" + symptom.getId() + "\"> "
              + symptom.getDescription() + " </OPTION>");
        } while (repTP.hasNext());
        repTP.close();

        out.println("</select></p></center></div>");
        out.println("  <div align=\"center\"><center><p><input type=\"submit\" value=\"Search\" name=\"B1\"></p></center></div></form>");
      }
      out.println(HTMLCode.closeAdministrator());
View Full Code Here


      if (! request.isAuthorized()) {
        throw new InvalidSessionException("Invalid Session! <br><a href=\"" + Constants.SYSTEM_LOGIN + "\">Try again</a>");
      }
          // Facade calls must come before using out
      IteratorDsk repTP = facade.getSpecialityList();
     
      out.println("Queries - Medical Speciality information");
      out.println("<body><h1>Queries:<br>Querie about medical specialities</h1>");
      out.println("<p>Choose a speciality: </p>");
      out.println("<form method=\"POST\" action=\"http://"+ Constants.SERVLET_SERVER_PATH+ "HWServlet\">");
      out.println("<input type=\"hidden\" name=\"operation\" value=\"UpdateMedicalSpecialitySearch\">" );

      out.println("<div align=\"center\"><center><p><select name=\"specialityCode\" size=\"1\">");
     

      if (repTP == null || !repTP.hasNext()) {
        out.println("</select></p></center></div>");
        out.println("<p><font color=\"red\"><b> There isn't any medical speciality.</b></font></p>");
      } else {
        MedicalSpeciality speciality;
        do {
          speciality = (MedicalSpeciality) repTP.next();
          out.println("<option value=\"" + speciality.getId() + "\"> "
              + speciality.getDescricao() + " </OPTION>");
        } while (repTP.hasNext());
        repTP.close();

        out.println("</select></p></center></div>");
        out.println("  <div align=\"center\"><center><p><input type=\"submit\" value=\"Search\" name=\"B1\"></p></center></div></form>");
      }
      out.println(HTMLCode.closeAdministrator());
View Full Code Here

              if (! request.isAuthorized()) {
                  throw new InvalidSessionException("Invalid Session! <br><a href=\""+Constants.SYSTEM_LOGIN+"\">Try again</a>");
              }

            // Facade calls must come before using out
              IteratorDsk repTP = facade.getHealthUnitList();
             
            out.println("Queries - Complaint information");
            out.println("<body><h1>Queries:<br>Querie about complaint</h1>");
            out.println("<p>Choose a complaint: </p>");
            out.println("<form method=\"POST\" action=\""+Constants.SYSTEM_ACTION+"?operation=UpdateHealthUnitSearch\">");

              out.println("<div align=\"center\"><center><p><select name=\"numUS\" size=\"1\">");
            

              if (repTP==null||!repTP.hasNext()) {
                  out.println("</select></p></center></div>");
                  out.println("<p><font color=\"red\"><b> There isn't any health units.</b></font></p>");
              } else {
                  HealthUnit tp;
                  do {
                      tp = (HealthUnit) repTP.next();
                      out.println("<option value=\""      +
                                  tp.getId() + "\"> " +
                                  tp.getDescription()           +
                                  " </OPTION>");
                  } while (repTP.hasNext());
                  repTP.close();
                 
                  out.println("</select></p></center></div>");
                  out.println("  <div align=\"center\"><center><p><input type=\"submit\" value=\"Search\" name=\"B1\"></p></center></div></form>");
              }
              out.println(HTMLCode.closeAdministrator());
View Full Code Here

      try {
          if (! request.isAuthorized()) {
                  throw new InvalidSessionException();
              }
            // Facade calls must come before using out
            IteratorDsk repTP = facade.getComplaintList();
           
            out.println(HTMLCode.open("Queries - Complaint information"));
              out.println("<body><h1>Queries:<br>Querie about complaint</h1>");
              out.println("<p>Choose a complaint: </p>");
              out.println("<form method=\"POST\" action=\""+Constants.SYSTEM_ACTION+"?operation=UpdateComplaintSearch\">");
                

              if (repTP==null||!repTP.hasNext()) {               
                  out.println("<p><center><font color=\"red\"><b> There isn't any complaints.</b></font></center></p>");
              } else {
                out.println("<div align=\"center\"><center><p><select name=\"numQueixa\" size=\"1\">");             
                  Complaint tp;
                  do {
                      tp = (Complaint) repTP.next();
                      out.println("<option value=\""      +
                                  tp.getCodigo() + "\"> " +
                                  tp.getDescricao()      +
                                  " </OPTION>");                   
                  } while (repTP.hasNext());
                  repTP.close();
                 
                  out.println("</select></p></center></div>");
                  out.println("  <div align=\"center\"><center><p><input type=\"submit\" value=\"Search\" name=\"B1\"></p></center></div></form>");
              }
              out.println(HTMLCode.closeAdministrator());           
View Full Code Here

    PrintWriter out = response.getWriter();

    try {

      // The facade call must be the first thing, to be able to recover without spoiling the out
      IteratorDsk repEsp = facade.getSpecialityList();
     
      out.println(HTMLCode.open("Queries - Health Units"));
      out
        .println("<body><h1>Queries:<br>Search Health units by Medical specialty</h1>");
      out.println("<p>Choose a specialty: </p>");
      out.println("<form method=\"POST\"action=\""+Constants.SYSTEM_ACTION+"?operation=SearchHealthUnitsBySpecialty\">");

      out
          .println("<div align=\"center\"><center><p><select name=\"codEspecialidade\" size=\"1\">");


      if (!repEsp.hasNext()) {
        out.println("</select></p></center></div>");
        out.println("<P>There isn't registered specialties.</P>");
      } else {
        MedicalSpeciality esp;

        do {
          esp = (MedicalSpeciality) repEsp.next();
         
          //#if relacional
          out.println("<option value=\"" + esp.getId() + "\"> "
              + esp.getDescricao() + " </OPTION>");
          //#endif
         
          //#if norelacional
//@          out.println("<option value=\"" + esp.getCode() + "\"> "//thiago alterou aqui
//@              + esp.getDescricao() + " </OPTION>");
          //#endif
        } while (repEsp.hasNext());

        repEsp.close();
        out.println("</select></p></center></div>");
        out
            .println(" <div align=\"center\"><center><p><input type=\"submit\" value=\"Consultar\" name=\"B1\"></p></center></div></form>");
      }
      out.println(HTMLCode.closeQueries());
View Full Code Here

  public void execute() throws Exception {
    PrintWriter out = response.getWriter();

    try {
      // The facade call must be the first thing, to be able to recover without spoiling the out
      IteratorDsk repUS = facade.getPartialHealthUnitList();
     
      out.println(HTMLCode.open("Queries - Specialties"));
      out
          .println("<body><h1>Queries:<br>Search Specialties of a Health unit</h1>");
      out.println("<p>Choose a health unit: </p>");
      out.println("<form method=\"POST\"action=\""+Constants.SYSTEM_ACTION+"?operation=SearchSpecialtiesByHealthUnit\">");
     
      out
          .println("<div align=\"center\"><center><p><select name=\"codUnidadeSaude\" size=\"1\">");

      if (!repUS.hasNext()) {
        out.println("</select></p></center></div>");
        out.println("<P> There isn't registered health units.</P>");
      } else {
        HealthUnit us;
        do {
          us = (HealthUnit) repUS.next();
         
          //#if relacional
          out.println("<option value=\"" + us.getId() + "\"> "
              + us.getDescription() + " </OPTION>");
          //#endif
         
          //#if norelacional
//@          out.println("<option value=\"" + us.getCode() + "\"> " //Thiago alterou aqui
//@              + us.getDescription() + " </OPTION>");
          //#endif
        } while (repUS.hasNext());

        repUS.close();
        out.println("</select></p></center></div>");
        out
            .println("<div align=\"center\"><center><p><input type=\"submit\" value=\"Consultar\" name=\"B1\"></p></center></div></form>");
      }
      out.println(HTMLCode.closeQueries());
View Full Code Here

    PrintWriter out = response.getWriter();

        Long codigoUS = Long.parseLong(request.getInput("codUnidadeSaude"));
        try {

            IteratorDsk repEsp = facade.searchSpecialitiesByHealthUnit(codigoUS);
           
            out.println(HTMLCode.open("Queries - Especialties"));
            out.println("<body><h1>Querie result</h1>");
           
            out.println("<P><h3>Health unit: " + codigoUS+ " </h3></P>");
            out.println("<h3>Especialties :</h3>");

            while (repEsp.hasNext()) {
                MedicalSpeciality esp = (MedicalSpeciality) repEsp.next();
                out.println("<dd><dd>" + esp.getDescricao());
           
            }
            out.println(HTMLCode.closeQueries());           
View Full Code Here

    PrintWriter out = response.getWriter();

        Long codigoEsp =  Long.parseLong(request.getInput("codEspecialidade"));
        System.out.println("Codigo espe: "+codigoEsp);
        try {
          IteratorDsk repUS = facade.searchHealthUnitsBySpeciality(codigoEsp);

          out.println(HTMLCode.open("Queries - Health Unit"));
            out.println("<body><h1>Querie result<br>Health units</h1>");
           
            out.println("<P><h3>Medical specialty: " + codigoEsp + "</h3></P>");
            out.println("<h3>Health units:</h3>");

            while (repUS.hasNext()) {
                HealthUnit us = (HealthUnit) repUS.next();
                out.println("<dd><dd>" + us.getDescription());            
            }
            out.println(HTMLCode.closeQueries());

        }catch (ObjectNotFoundException e) {
View Full Code Here

  public void execute() throws Exception {
    PrintWriter out = response.getWriter();

    try {
      // The facade call must be the first thing, to be able to recover without spoiling the out
      IteratorDsk repTP = facade.getDiseaseTypeList();

      out.println(HTMLCode.open("Queries - Disease information"));
      out.println("<body><h1>Queries:<br>Querie about diseases</h1>");
      out.println("<p>Choose a disease: </p>");
      out
      .println("<form method=\"POST\" action=\""+Constants.SYSTEM_ACTION+"?operation=SearchDiseaseData\">");

      out
      .println("<div align=\"center\"><center><p><select name=\"codTipoDoenca\" size=\"1\">");

      if (repTP == null || !repTP.hasNext()) {
        out.println("</select></p></center></div>");
        out
        .println("<p><font color=\"red\"><b> There isn't diseases registered.</b></font></p>");
      } else {
        DiseaseType tp;
        do {
          tp = (DiseaseType) repTP.next();
         
          //#if relacional
          out.println("<option value=\"" + tp.getId() + "\"> "
              + tp.getName() + " </OPTION>");
          //#endif
         
          //#if norelacional
//@          out.println("<option value=\"" + tp.getCode() + "\"> " //thiago alterou aqui
//@              + tp.getName() + " </OPTION>");
          //#endif
        } while (repTP.hasNext());
        repTP.close();

        out.println("</select></p></center></div>");
        out
        .println("<div align=\"center\"><center><p><input type=\"submit\" value=\"Consultar\" name=\"B1\"></p></center></div></form>");
      }
View Full Code Here

    }
  }

  public IteratorDsk searchSpecialitiesByHealthUnit(Long code) throws ObjectNotFoundException,
      RepositoryException, TransactionException {
    IteratorDsk lista = null;
    try {
      getPm().beginTransaction();
      lista = healthUnitRecord.searchSpecialityByHealthUnit(code);
      getPm().commitTransaction();
    } catch (RepositoryException e) {
View Full Code Here

TOP

Related Classes of lib.util.IteratorDsk

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.