@@ -0,0 +1,2209 @@
+package servelet;%0A%0Aimport java.io.IOException;%0Aimport java.io.PrintWriter;%0Aimport java.util.Date;%0A%0Aimport javax.servlet.ServletException;%0Aimport javax.servlet.http.HttpServlet;%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0A%0Aimport com.br.uepb.business.LoginBusiness;%0Aimport com.br.uepb.dao.MedicaoIcgDAO;%0Aimport com.br.uepb.dao.MedicaoOximetroDAO;%0Aimport com.br.uepb.model.MedicaoIcgDomain;%0Aimport com.br.uepb.model.MedicaoOximetroDomain;%0A%0Apublic class ReceberDadosIcg extends HttpServlet%7B%0A%09%0A%09public ReceberDadosIcg()%7B%0A%09%09super();%0A%09%7D%0A%09%0A%09protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException %7B%0A%09%09String login = %22%22;%0A%09%09String senha = %22%22;%0A%09%09String hora = %22%22;%0A%09%09String debCardiaco = %22%22;%0A%09%09String indCardiaco = %22%22;%0A%09%09String freqRespiratoria = %22%22;%0A%09%09String freqCardiaca = %22%22;%0A%09%09login = request.getParameter(%22login%22);%0A%09%09senha = request.getParameter(%22senha%22);%0A%09%09hora = request.getParameter(%22hora%22);%0A%09%09debCardiaco = request.getParameter(%22debCardiaco%22);%0A%09%09indCardiaco = request.getParameter(%22indCardiaco%22);%0A%09%09freqRespiratoria = request.getParameter(%22freqRespiratoria%22);%0A%09%09freqCardiaca = request.getParameter(%22freqCardiaca%22);%0A%09%09PrintWriter out = response.getWriter();%0A%09%09LoginBusiness loginBusiness = new LoginBusiness();%0A%09%09if(loginBusiness.loginValido(login, senha))%7B%0A%09%09%09MedicaoIcgDomain icgDomain = new MedicaoIcgDomain();%0A%09%09%09MedicaoIcgDAO icgDAO = new MedicaoIcgDAO();%0A%09%09%09icgDomain.setDataHora(new Date());%0A%09%09%09icgDomain.setPaciente(loginBusiness.getPaciente(login, senha));%0A%09%09%09icgDomain.setFrequenciaCardiaca(Double.parseDouble(freqCardiaca));%0A%09%09%09icgDomain.setFrequenciaCardiacaUnidade(%22bpm%22);%0A%09%09%09icgDomain.setFrequenciaRespiratoria(Double.parseDouble(freqRespiratoria));%0A%09%09%09icgDomain.setFrequenciaRespiratoriaUnidade(%22ipm%22);%0A%09%09%09icgDomain.setIndiceCardiaco(Double.parseDouble(indCardiaco));%0A%09%09%09icgDomain.setIndiceCardiacoUnidade(%22L/min.m%C2%B2%22);%0A%09%09%09icgDomain.setDebitoCardiaco(Double.parseDouble(debCardiaco));%0A%09%09%09icgDomain.setDebitoCardiacoUnidade(%22L/min%22);%0A%09%09%09icgDAO.salvaMedicaoIcg(icgDomain);%0A%09%09%09out.print(%22sucesso%22);//%C3%89 usu%C3%A1rio cadastrado%0A%09%09 %7Delse%7B%0A%09%09%09out.print(%22erro%22);//N%C3%A3o %C3%A9 usu%C3%A1rio cadastrado%0A%09%09 %7D%0A%09%7D%0A%09%0A%7D%0A

Create ReceberDadosIcg.java