@Listen("onClick = #btn_confirmar")
  public void alterarOperador() {
    Map<String, Object> arguments = (Map) rw_dadosOperador.getValue();
    Operador op = (Operador) arguments.get("funAlterar");
    lb_operador = (Listbox) arguments.get("lb_operador");
    String pass = tb_insira_password.getText();
    List<Operador> list =
        operadorDao.obtemPorUsername(tb_username.getText(), tb_password.getText());
    if (!list.isEmpty() && op.getId() != list.get(0).getId()) {
      Clients.showNotification(
          "Um operador ja foi cadrastado com esse username", "error", null, null, 2000);
    } else {
      if (!tb_password.getText().equals(pass)) {
        Clients.showNotification("o password deve ser igual", "error", null, null, 2000);

      } else {
        ListModelList<Operador> lista = (ListModelList) lb_operador.getModel();
        lista.remove(op);
        setValues(op);
        operadorDao.update(op);
        lista.add(0, op);
        operadorWin.detach();
        ;
        Clients.showNotification("Dados do operador " + op.getNome() + " foram alterados");
      }
    }
  }
 public boolean camposLLenos() {
   if (txtDL01F0005.getText().compareTo("") == 0
       || txtRTF0005.getText().compareTo("") == 0
       || txtKYF0005.getText().compareTo("") == 0
       || txtSYF0005.getText().compareTo("") == 0) {
     return false;
   } else return true;
 }
 public void setValuesLeitor(Leitor leitor) {
   leitor.setBi(tb_bi.getText());
   leitor.setEmail(tb_email.getText());
   leitor.setNome(tb_nome.getText());
   leitor.setNuit(Integer.valueOf(tb_nuit.getText()));
   leitor.setTelefone(Integer.valueOf(tb_telefone.getText()));
   leitor.setBairro(tb_bairro.getText());
 }
 public void setValues(Operador operador) {
   operador.setBi(tb_bi.getText());
   operador.setEmail(tb_email.getText());
   operador.setNome(tb_nome.getText());
   operador.setNuit(Integer.valueOf(tb_nuit.getText()));
   operador.setTelefone(Integer.valueOf(tb_telefone.getText()));
   operador.setUsername(tb_username.getText());
   operador.setPassword(tb_password.getText());
 }
 public boolean camposEditando() {
   if (txtCodigo.getText().compareTo("") != 0
       || txtNombre.getText().compareTo("") != 0
       || buscadorCategoria.obtenerCaja().compareTo("") != 0
       || buscadorCiudad.obtenerCaja().compareTo("") != 0
       || buscadorZona.obtenerCaja().compareTo("") != 0
       || buscadorVendedor.obtenerCaja().compareTo("") != 0
       || buscadorEstado.obtenerCaja().compareTo("") != 0) {
     return true;
   } else return false;
 }
  public void onClick$btnUpdateEmployee(ForwardEvent fe) {
    if (lstEmployee.getSelectedItem() != null) {

      Employee employee = (Employee) (lstEmployee.getSelectedItem().getValue());

      employee.setFirstName(txtFirstName.getText());
      employee.setLastName(txtLastName.getText());
      employee.setAge(Integer.parseInt(intAge.getText()));
    } else {
      UiUtils.showMessage(Messages.getString("EmployeeController.2"));
    }
  }
  // click events
  public void onClick$btnAddEmployee(ForwardEvent fe) {

    String firstName = txtFirstName.getText();
    String lastName = txtLastName.getText();
    int iAge = Integer.parseInt(intAge.getText());

    Employee employee = new Employee(firstName, lastName, iAge);

    if (!_model.add(employee)) {
      reportError(Messages.getString("EmployeeController.0"), employee);
    }
  }
  public String validarResultados_paraclinicos() {
    String mensaje = "";
    for (Component row_fila : rowsResultado.getChildren()) {
      Phistorias_paraclinicos phistorias_paraclinicos =
          (Phistorias_paraclinicos) ((Row) row_fila).getValue();
      Datebox datebox_fecha =
          (Datebox)
              gridResultados.getFellow(
                  "datebox_fecha_"
                      + tipo_examen
                      + "_"
                      + pcodigo_historia
                      + "_"
                      + phistorias_paraclinicos.getCodigo_examen());

      Textbox textbox_resultado =
          (Textbox)
              gridResultados.getFellow(
                  "textbox_resultado_"
                      + tipo_examen
                      + "_"
                      + pcodigo_historia
                      + "_"
                      + phistorias_paraclinicos.getCodigo_examen());

      if (!datebox_fecha.getText().isEmpty() && textbox_resultado.getText().isEmpty()) {
        mensaje =
            "Para registrar "
                + (tipo_examen.equals(TIPO_PARACLINICO)
                    ? "el resultado paraclinico"
                    : tipo_examen.equals(TIPO_VALORACION_OBSTETRICA)
                        ? "la valoracion obstetrica"
                        : "")
                + phistorias_paraclinicos.getPexamenes_paraclinicos().getNombre()
                + "' debe "
                + "ingresar la descripcion del resultado";
        break;
      } else if (datebox_fecha.getText().isEmpty() && !textbox_resultado.getText().isEmpty()) {
        mensaje =
            "Para registrar "
                + (tipo_examen.equals(TIPO_PARACLINICO)
                    ? "el resultado paraclinico"
                    : tipo_examen.equals(TIPO_VALORACION_OBSTETRICA)
                        ? "la valoracion obstetrica"
                        : "")
                + phistorias_paraclinicos.getPexamenes_paraclinicos().getNombre()
                + "' debe "
                + "ingresar la fecha del resultado";
        break;
      }
    }
    return mensaje;
  }
 @Listen("onChange = #txtKYF0005")
 public boolean claveKYExiste() {
   if (txtSYF0005.getText().compareTo("") == 0) {
     if (txtSYF0005.getText().compareTo("") == 0) {
       if (servicioF0005.buscar(
               txtSYF0005.getValue(), txtRTF0005.getValue(), txtKYF0005.getValue())
           != null) {
         msj.mensajeAlerta(Mensaje.claveUsada);
         txtKYF0005.setFocus(true);
         return true;
       }
     }
   }
   return false;
 }
 @Listen("onClick = button#cfgSave")
 public void cfgSaveClick(MouseEvent event) {
   if (logger.isDebugEnabled()) logger.debug(" cfgSave button event = " + event);
   try {
     Properties config = Util.getConfig(null);
     if (isValidPort(portsToScan.getText())) {
       config.setProperty(Constants.SERIAL_PORTS, portsToScan.getValue());
     } else {
       Messagebox.show(
           "Device ports to scan is invalid. In Linux (pi) '/dev/ttyUSB0,/dev/ttyUSB1,etc', in MS Windows 'COM1,COM2,COM3,etc'");
     }
     if (isValidBaudRate(portBaudRate.getValue())) {
       config.setProperty(Constants.SERIAL_PORT_BAUD, portBaudRate.getValue());
       Util.saveConfig();
     } else {
       Messagebox.show("Device baud rate (speed) must be one of 4800,9600,19200,38400,57600");
     }
     if (NumberUtils.isNumber(cfgWindOffset.getValue())) {
       config.setProperty(Constants.WIND_ZERO_OFFSET, cfgWindOffset.getValue());
       Util.saveConfig();
       // notify others
       producer.sendBody(Constants.WIND_ZERO_ADJUST_CMD + ":" + cfgWindOffset.getValue() + ",");
     } else {
       Messagebox.show("Wind offset must be numeric");
     }
     config.setProperty(Constants.PREFER_RMC, (String) useRmcGroup.getSelectedItem().getValue());
     config.setProperty(
         Constants.DNS_USE_CHOICE, (String) useHomeGroup.getSelectedItem().getValue());
     Util.saveConfig();
   } catch (Exception e) {
     logger.error(e.getMessage(), e);
   }
 }
Example #11
0
  public void onClick$btnSave(Event e) {
    checkR();
    PersonaDTO persona = new PersonaDTO();
    persona.setFirst(txtChangeName.getText());
    persona.setPassword(txtChangePassword.getText());
    persona.setEmail(txtChangeEmail.getText());
    persona.setId(usuario.getId());

    try {
      Executions.getCurrent().setAttribute("lang", lenguaje);
      signupNgc.updatePersona(persona);
      logger.info("Se actualizó una persona");
      Executions.sendRedirect("");
    } catch (NumberFormatException e2) {
      e2.printStackTrace();
    } catch (ExceptionPet e1) {
      Messagebox.show(e1.getMensajeUsuario());
      e1.pintarErrorLog(e1.getMensajeTecnico());
    }
  }
  public List<Presultados_paraclinicos> obtenerResultados_paraclinicos() {
    // log.info("ejecutando metodo @obtenerResultados_paraclinicos() ===> "
    // + nro_documento);
    List<Presultados_paraclinicos> listado = new ArrayList<Presultados_paraclinicos>();
    for (Component row_fila : rowsResultado.getChildren()) {
      Phistorias_paraclinicos phistorias_paraclinicos =
          (Phistorias_paraclinicos) ((Row) row_fila).getValue();
      Datebox datebox_fecha =
          (Datebox)
              gridResultados.getFellow(
                  "datebox_fecha_"
                      + tipo_examen
                      + "_"
                      + pcodigo_historia
                      + "_"
                      + phistorias_paraclinicos.getCodigo_examen());

      Textbox textbox_resultado =
          (Textbox)
              gridResultados.getFellow(
                  "textbox_resultado_"
                      + tipo_examen
                      + "_"
                      + pcodigo_historia
                      + "_"
                      + phistorias_paraclinicos.getCodigo_examen());

      if (!datebox_fecha.getText().isEmpty() && !textbox_resultado.getText().isEmpty()) {
        Presultados_paraclinicos presultados_paraclinicos = new Presultados_paraclinicos();
        presultados_paraclinicos.setCodigo_empresa(zkWindow.codigo_empresa);
        presultados_paraclinicos.setCodigo_sucursal(zkWindow.codigo_sucursal);
        presultados_paraclinicos.setCodigo_examen(phistorias_paraclinicos.getCodigo_examen());
        presultados_paraclinicos.setFecha(datebox_fecha.getText());
        presultados_paraclinicos.setResultado(textbox_resultado.getValue());
        presultados_paraclinicos.setNro_documento(nro_documento);

        Object valor_na = textbox_resultado.getAttribute("VALOR_NORMAL_ANORMAL");
        Object valor_descripcion_na = textbox_resultado.getAttribute("VALOR_DESCRIPCION_NA");

        if (valor_na != null) {
          if (valor_na.toString().equals("A")) {
            valor_descripcion_na = "";
          }
        }

        presultados_paraclinicos.setNormal_anormal(valor_na != null ? valor_na.toString() : "N");
        presultados_paraclinicos.setDescripcion_na(
            valor_descripcion_na != null ? valor_descripcion_na.toString() : "");

        listado.add(presultados_paraclinicos);
      }
    }
    return listado;
  }
 /* Permite validar que todos los campos esten completos */
 public boolean validar() {
   if (txtGrupo.getText().compareTo("") == 0) {
     msj.mensajeError(Mensaje.camposVacios);
     return false;
   } else {
     if (!Validador.validarCorreo(txtGrupo.getValue())) {
       msj.mensajeError(Mensaje.correoInvalido);
       return false;
     } else return true;
   }
 }
 public boolean camposEditando() {
   if (txtDL01F0005.getText().compareTo("") != 0
       || txtSPHDF0005.getText().compareTo("") != 0
       || txtHRDCF0005.getText().compareTo("") != 0
       || txtRTF0005.getText().compareTo("") != 0
       || txtSYF0005.getText().compareTo("") != 0
       || txtKYF0005.getText().compareTo("") != 0
       || txtDL02F0005.getText().compareTo("") != 0) {
     return true;
   } else return false;
 }
 @Listen("onChange = #txtRTF0005; onOK = #txtRTF0005")
 public boolean claveRTExiste() {
   if (txtSYF0005.getText().compareTo("") != 0) {
     if (servicioF0004.buscar(txtSYF0005.getValue(), txtRTF0005.getValue()) == null) {
       msj.mensajeAlerta(Mensaje.claveRTNoEsta);
       txtRTF0005.setFocus(true);
       lblDescripcionF0004.setValue("");
       return true;
     } else
       lblDescripcionF0004.setValue(
           servicioF0004.buscar(txtSYF0005.getValue(), txtRTF0005.getValue()).getDtdl01());
   }
   return false;
 }
  // Metodo para colocar los datos del objeto que se consulta en la vista //
  public void mostrarDatos(Object obj) throws Exception {
    Maestro_manual maestro_manual = (Maestro_manual) obj;
    try {
      procedimientos_seleccionados.clear();
      mapa_datos_procedimientos.clear();
      lgxId_manual.setValue(maestro_manual.getId_manual());
      tbxManual.setValue(maestro_manual.getManual());
      Utilidades.seleccionarListitem(lbxTipo_manual, maestro_manual.getTipo_manual());
      Utilidades.seleccionarListitem(lbxTipo_moneda, maestro_manual.getTipo_moneda());

      listboxProcedimientos.getItems().clear();

      Map<String, Object> parametros = new HashMap<String, Object>();
      parametros.put("id_manual", maestro_manual.getId_manual());

      List<Manuales_procedimientos> listado_procedimientos =
          getServiceLocator().getServicio(Manuales_procedimientosService.class).listar(parametros);

      for (Manuales_procedimientos manuales_procedimientos : listado_procedimientos) {
        Long id_procedimiento = manuales_procedimientos.getId_procedimiento();
        Procedimientos procedimientos = new Procedimientos();
        procedimientos.setId_procedimiento(id_procedimiento);
        procedimientos = getServiceLocator().getProcedimientosService().consultar(procedimientos);
        Map<String, Object> pcd =
            OpenProcedimientosAction.getProcedimientoMap(
                codigo_empresa, codigo_sucursal, procedimientos);
        mapa_datos_procedimientos.put(id_procedimiento, pcd);
        pcd.put("codigo_manual", manuales_procedimientos.getCodigo_manual());
        pcd.put("valor", manuales_procedimientos.getValor());
        pcd.put("grupo_uvr", manuales_procedimientos.getGrupo_uvr());
        pcd.put(
            "nro_cuenta",
            manuales_procedimientos.getNro_cuenta_contable() != null
                ? manuales_procedimientos.getNro_cuenta_contable()
                : "");
        adicionarProcedimiento(pcd);
        procedimientos_seleccionados.add(id_procedimiento + "");
      }

      // Mostramos la vista //
      tbxAccion.setText("modificar");
      accionForm(true, tbxAccion.getText());
    } catch (Exception e) {
      MensajesUtil.mensajeError(e, "", this);
    }
  }
Example #17
0
 /// Search Data and add to array
 @Listen("onClick = #btnsave")
 public void btnsave_Clicked(Event event) {
   int a = 0, bc = 0, closs = 0;
   for (Store e : Store.findAllStores()) {
     Textbox txtid = (Textbox) find(getPage(), "#idproduct").get(0);
     if ((Integer.parseInt(txtid.getText())) == e.getIdproduct()) {
       checksamesell(e.getNameproduct());
       if (checksame == true) {
         int oldqty = qty.get(posarray);
         int modernqty = oldqty + Integer.parseInt(idqty.getValue());
         qty.remove(posarray);
         qty.add(posarray, modernqty);
         int medernprice = e.getPrice() * modernqty;
         price.remove(posarray);
         price.add(posarray, medernprice);
         checksame = false;
         break;
       } else {
         idpro.add(Integer.parseInt(idproduct.getValue()));
         nameproduct.add(e.getNameproduct());
         qty.add(Integer.parseInt(idqty.getValue()));
         unitprice.add(e.getPrice());
         bc = e.getPrice();
         a = Integer.parseInt(idqty.getValue());
         closs = a * bc;
         price.add(closs);
         namecus.add((String) Sessions.getCurrent().getAttribute("name"));
         pointcount++;
         break;
       }
     }
   }
   Textbox txtid = (Textbox) find(getPage(), "#idproduct").get(0);
   Textbox txtqty = (Textbox) find(getPage(), "#idqty").get(0);
   txtid.setValue(null);
   txtqty.setValue(null);
   showgrid();
 }
  // Metodo para validar campos del formulario //
  public boolean validarFichaEpidemiologia() {

    tbxIdentificacion.setStyle("text-transform:uppercase;background-color:white");
    lbxDpto_procedencia.setStyle("background-color:white;");
    lbxMunicipio_procedencia.setStyle("background-color:white;");

    boolean valida = true;

    if (tbxIdentificacion.getText().trim().equals("")) {
      tbxIdentificacion.setStyle("text-transform:uppercase;background-color:#F6BBBE");
      valida = false;
    }
    if (lbxDpto_procedencia.getSelectedItem().getValue().toString().equals("")) {
      lbxDpto_procedencia.setStyle("background-color:#F6BBBE");
      valida = false;
    }
    if (lbxMunicipio_procedencia.getSelectedItem() != null) {
      if (lbxMunicipio_procedencia.getSelectedItem().getValue().toString().equals("")) {
        lbxMunicipio_procedencia.setStyle("background-color:#F6BBBE");
        valida = false;
      }
    }

    if (lbxMunicipio_procedencia.getSelectedItem() == null) {
      lbxMunicipio_procedencia.setStyle("background-color:#F6BBBE");
      valida = false;
    }

    if (!valida) {
      MensajesUtil.mensajeAlerta(
          usuarios.getNombres() + " recuerde que...",
          "Los campos marcados con (*) son obligatorios");
    }

    return valida;
  }
  // Metodo para colocar los datos del objeto que se consulta en la vista //
  public void mostrarDatos(Object obj) throws Exception {
    Anexo3_entidad anexo3_entidad = (Anexo3_entidad) obj;
    try {
      tbxCodigo.setValue(anexo3_entidad.getCodigo());
      tbxNumero_solicitud.setValue(anexo3_entidad.getNumero_solicitud());
      dtbxFecha.setValue(anexo3_entidad.getFecha());
      // tbxCodigo_administradora.setValue(anexo3_entidad
      // .getCodigo_administradora());
      tbxNomPaciente.setValue(anexo3_entidad.getCodigo_paciente());
      Utilidades.seleccionarRadio(rdbCobertura, anexo3_entidad.getCobertura());
      Utilidades.seleccionarRadio(rdbOrigen_general, anexo3_entidad.getOrigen_general());
      Utilidades.seleccionarRadio(rdbOrigen_profesional, anexo3_entidad.getOrigen_profesional());
      Utilidades.seleccionarRadio(rdbOrigen_trabajo, anexo3_entidad.getOrigen_trabajo());
      Utilidades.seleccionarRadio(rdbOrigen_transito, anexo3_entidad.getOrigen_transito());
      Utilidades.seleccionarRadio(rdbOrigen_evento, anexo3_entidad.getOrigen_evento());
      Utilidades.seleccionarRadio(rdbTipo_servicio, anexo3_entidad.getTipo_servicio());
      Utilidades.seleccionarRadio(rdbPrioridad, anexo3_entidad.getPrioridad());
      Utilidades.seleccionarRadio(rdbUbicacion, anexo3_entidad.getUbicacion());
      tbxServicio.setValue(anexo3_entidad.getServicio());
      tbxCama.setValue(anexo3_entidad.getCama());
      tbxGuia_atencion.setValue(anexo3_entidad.getGuia_atencion());
      tbxJustificacion.setValue(anexo3_entidad.getJustificacion());
      tbxCie_p.setValue(anexo3_entidad.getCie_p());
      tbxCie_1.setValue(anexo3_entidad.getCie_1());
      tbxCie_2.setValue(anexo3_entidad.getCie_2());
      tbxCargo_reporta.setValue(anexo3_entidad.getCargo_reporta());
      tbxTel_reporta.setValue(anexo3_entidad.getTel_reporta());
      // dtbxDelete_date
      // .setValue(anexo3_entidad.getDelete_date() != null ?
      // anexo3_entidad
      // .getDelete_date() : new Date());
      // tbxDelete_user.setValue(anexo3_entidad.getDelete_user());
      tbxAutorizado.setValue(anexo3_entidad.getAutorizado());
      tbxCodigo_ips.setValue(anexo3_entidad.getCodigo_ips());
      tbxCons_ips.setValue(anexo3_entidad.getCons_ips());
      tbxLeido.setValue(anexo3_entidad.getLeido());
      tbxLeido_rechazado.setValue(anexo3_entidad.getLeido_rechazado());
      tbxNro_historia.setValue(anexo3_entidad.getNro_historia());
      tbxNeed_autorizacion.setValue(anexo3_entidad.getNeed_autorizacion());
      tbxCodigo_receta.setValue(anexo3_entidad.getCodigo_receta());

      tbxNombre_reporta.setValue(anexo3_entidad.getNombre_reporta());
      // tbxCel_reporta.setValue(anexo3_entidad.getCel_reporta());
      // tbxEntidad.setValue(anexo3_entidad.getEntidad());
      // tbxTipo_anexo.setValue(anexo3_entidad.getTipo_anexo());
      // tbxEstado.setValue(anexo3_entidad.getEstado());
      tbxNro_identificacion_reporta.setValue(anexo3_entidad.getNro_identificacion_reporta());

      tbxDirPres.setValue(anexo3_entidad.getDireccion_reporta());

      Map<String, Object> parametros = new HashMap<String, Object>();
      parametros.put("codigo_empresa", codigo_empresa);
      parametros.put("codigo_sucursal", codigo_sucursal);
      parametros.put("codigo_orden", anexo3_entidad.getCodigo());

      List<Detalle_anexo3> listado_detalles =
          getServiceLocator().getServicio(Detalle_anexo3Service.class).listar(parametros);

      for (Detalle_anexo3 detalle_anexo3 : listado_detalles) {
        Detalle_orden detalle_orden = new Detalle_orden();
        detalle_orden.setCodigo_empresa(codigo_empresa);
        detalle_orden.setCodigo_sucursal(codigo_sucursal);
        detalle_orden.setCodigo_cups(detalle_anexo3.getCodigo_cups());
        //				detalle_orden.setCodigo_orden(detalle_anexo3.getCodigo_orden());
        detalle_orden.setCodigo_procedimiento(detalle_anexo3.getCodigo_procedimiento());
        detalle_orden.setConsecutivo(detalle_anexo3.getConsecutivo());
        detalle_orden.setDescuento(detalle_anexo3.getDescuento());
        detalle_orden.setIncremento(detalle_anexo3.getIncremento());
        detalle_orden.setNombre_procedimiento(detalle_anexo3.getNombre_pcd());
        detalle_orden.setRealizado("");
        detalle_orden.setTipo_procedimiento(detalle_anexo3.getTipo_procedimiento());
        detalle_orden.setUnidades(detalle_anexo3.getUnidades());
        detalle_orden.setUnidades_realizadas(0);
        detalle_orden.setValor_procedimiento(detalle_anexo3.getValor_procedimiento());
        detalle_orden.setValor_real(detalle_anexo3.getValor_real());
        orden_servicioAction.adicionarOrden(detalle_orden, detalle_anexo3.getNombre_pcd());
      }
      // Mostramos la vista //
      tbxAccion.setText("modificar");
      accionForm(true, tbxAccion.getText());
    } catch (Exception e) {
      MensajesUtil.mensajeError(e, "", this);
    }
  }
Example #20
0
 protected boolean validar() {
   if (txtDescripcion.getText().compareTo("") == 0 || txtNombre.getText().compareTo("") == 0) {
     msj.mensajeError(Mensaje.camposVacios);
     return false;
   } else return true;
 }
  // Metodo para colocar los datos del objeto que se consulta en la vista //
  public void mostrarDatos(Ficha_epidemiologia_n22 obj) throws Exception {
    Ficha_epidemiologia_n22 ficha_epidemiologia_n22 = (Ficha_epidemiologia_n22) obj;
    try {
      tbxCodigo_ficha.setValue(ficha_epidemiologia_n22.getCodigo_ficha());
      tbxCodigo_diagnostico.setValue(ficha_epidemiologia_n22.getCodigo_diagnostico());
      dtbxFecha_inicial.setValue(ficha_epidemiologia_n22.getFecha_inicial());
      tbxIdentificacion.setValue(ficha_epidemiologia_n22.getIdentificacion());
      obtenerAdmision(admision);

      FormularioUtil.deshabilitarComponentes(groupboxEditar, true, new String[] {});

      Utilidades.seleccionarRadio(
          rdbHaemophilus_infliuencae_b, ficha_epidemiologia_n22.getHaemophilus_infliuencae_b());
      tbxDosis.setValue(ficha_epidemiologia_n22.getDosis());
      dtbxFecha_ultima_dosis.setValue(ficha_epidemiologia_n22.getFecha_ultima_dosis());
      Utilidades.seleccionarRadio(
          rdbPresento_carne_vacuna, ficha_epidemiologia_n22.getPresento_carne_vacuna());
      Utilidades.seleccionarRadio(
          rdbStreptococcus_pneumoniae, ficha_epidemiologia_n22.getStreptococcus_pneumoniae());
      tbxDosis2.setValue(ficha_epidemiologia_n22.getDosis2());
      dtbxFecha_ultima_dosis2.setValue(ficha_epidemiologia_n22.getFecha_ultima_dosis2());
      Utilidades.seleccionarRadio(
          rdbPresento_carne_vacuna2, ficha_epidemiologia_n22.getPresento_carne_vacuna2());
      Utilidades.seleccionarRadio(
          rdbInfluenza_estacional, ficha_epidemiologia_n22.getInfluenza_estacional());
      tbxDosis3.setValue(ficha_epidemiologia_n22.getDosis3());
      dtbxFecha_ultima_dosis3.setValue(ficha_epidemiologia_n22.getFecha_ultima_dosis3());
      Utilidades.seleccionarRadio(
          rdbPresento_carne_vacuna3, ficha_epidemiologia_n22.getPresento_carne_vacuna3());
      Utilidades.seleccionarRadio(
          rdbFuente_de_notificacion, ficha_epidemiologia_n22.getFuente_de_notificacion());
      Utilidades.seleccionarRadio(
          rdbViajo_durante_14dias, ficha_epidemiologia_n22.getViajo_durante_14dias());
      for (int i = 0; i < lbxDpto_procedencia.getItemCount(); i++) {
        Listitem listitem = lbxDpto_procedencia.getItemAtIndex(i);
        if (listitem.getValue().toString().equals(ficha_epidemiologia_n22.getDpto_procedencia())) {
          listitem.setSelected(true);
          i = lbxDpto_procedencia.getItemCount();
        }
      }
      for (int i = 0; i < lbxMunicipio_procedencia.getItemCount(); i++) {
        Listitem listitem = lbxMunicipio_procedencia.getItemAtIndex(i);
        if (listitem
            .getValue()
            .toString()
            .equals(ficha_epidemiologia_n22.getMunicipio_procedencia())) {
          listitem.setSelected(true);
          i = lbxMunicipio_procedencia.getItemCount();
        }
      }
      tbxProcedencia_internacional.setValue(ficha_epidemiologia_n22.getProcedencia_internacional());
      Utilidades.seleccionarRadio(
          rdbContacto_con_aves, ficha_epidemiologia_n22.getContacto_con_aves());
      Utilidades.seleccionarRadio(
          rdbContacto_estrecho, ficha_epidemiologia_n22.getContacto_estrecho());
      chbAsma.setChecked(ficha_epidemiologia_n22.getAsma());
      chbEpoc.setChecked(ficha_epidemiologia_n22.getEpoc());
      chbDiabetes.setChecked(ficha_epidemiologia_n22.getDiabetes());
      chbVih_otras_inmu.setChecked(ficha_epidemiologia_n22.getVih_otras_inmu());
      chbEnfermedad_cardiaca.setChecked(ficha_epidemiologia_n22.getEnfermedad_cardiaca());
      chbCancer.setChecked(ficha_epidemiologia_n22.getCancer());
      chbMalnutricion.setChecked(ficha_epidemiologia_n22.getMalnutricion());
      chbEmbarazo.setChecked(ficha_epidemiologia_n22.getEmbarazo());
      tbxSemana_de_gestacion.setValue(ficha_epidemiologia_n22.getSemana_de_gestacion());
      chbObesidad.setChecked(ficha_epidemiologia_n22.getObesidad());
      chbInsuficiencia_renal.setChecked(ficha_epidemiologia_n22.getInsuficiencia_renal());
      chbToma_medicamentos.setChecked(ficha_epidemiologia_n22.getToma_medicamentos());
      chbFumador.setChecked(ficha_epidemiologia_n22.getFumador());
      chbOtros.setChecked(ficha_epidemiologia_n22.getOtros());
      tbxCual.setValue(ficha_epidemiologia_n22.getCual());
      Utilidades.seleccionarRadio(rdbTos, ficha_epidemiologia_n22.getTos());
      Utilidades.seleccionarRadio(rdbPostracion, ficha_epidemiologia_n22.getPostracion());
      Utilidades.seleccionarRadio(rdbFiebre, ficha_epidemiologia_n22.getFiebre());
      Utilidades.seleccionarRadio(rdbTiraje_toraxico, ficha_epidemiologia_n22.getTiraje_toraxico());
      Utilidades.seleccionarRadio(rdbDolor_garganta, ficha_epidemiologia_n22.getDolor_garganta());
      Utilidades.seleccionarRadio(rdbDolor_muscular, ficha_epidemiologia_n22.getDolor_muscular());
      Utilidades.seleccionarRadio(rdbRinorrea, ficha_epidemiologia_n22.getRinorrea());
      Utilidades.seleccionarRadio(
          rdbNo_tolera_via_oral, ficha_epidemiologia_n22.getNo_tolera_via_oral());
      Utilidades.seleccionarRadio(rdbConjuntivitis, ficha_epidemiologia_n22.getConjuntivitis());
      Utilidades.seleccionarRadio(rdbDiarrea, ficha_epidemiologia_n22.getDiarrea());
      Utilidades.seleccionarRadio(rdbCefalea, ficha_epidemiologia_n22.getCefalea());
      Utilidades.seleccionarRadio(rdbDolor_abdominal, ficha_epidemiologia_n22.getDolor_abdominal());
      Utilidades.seleccionarRadio(
          rdbDifucultad_respirat, ficha_epidemiologia_n22.getDifucultad_respirat());
      Utilidades.seleccionarRadio(rdbOtro, ficha_epidemiologia_n22.getOtro());
      tbxCual_otro.setValue(ficha_epidemiologia_n22.getCual_otro());
      Utilidades.seleccionarRadio(
          rdbSe_tomo_radiografia, ficha_epidemiologia_n22.getSe_tomo_radiografia());
      dtbxFecha_de_toma.setValue(ficha_epidemiologia_n22.getFecha_de_toma());
      Utilidades.seleccionarRadio(
          rdbHallazgo_radiografia, ficha_epidemiologia_n22.getHallazgo_radiografia());
      Utilidades.seleccionarRadio(rdbUso_antibiotico, ficha_epidemiologia_n22.getUso_antibiotico());
      dtbxFecha_inicio_antibioticos.setValue(
          ficha_epidemiologia_n22.getFecha_inicio_antibioticos());
      Utilidades.seleccionarRadio(rdbUso_antiviral, ficha_epidemiologia_n22.getUso_antiviral());
      dtbxFecha_inicio_antiviral.setValue(ficha_epidemiologia_n22.getFecha_inicio_antiviral());
      Utilidades.seleccionarRadio(
          rdbHubo_complicaciones, ficha_epidemiologia_n22.getHubo_complicaciones());
      Utilidades.seleccionarRadio(
          rdbCuales_complicaciones, ficha_epidemiologia_n22.getCuales_complicaciones());
      tbxCuales3.setValue(ficha_epidemiologia_n22.getCuales3());
      Utilidades.seleccionarRadio(
          rdbServicio_hopitalizo, ficha_epidemiologia_n22.getServicio_hopitalizo());
      for (int i = 0; i < lbxDiganostico_inicial.getItemCount(); i++) {
        Listitem listitem = lbxDiganostico_inicial.getItemAtIndex(i);
        if (listitem
            .getValue()
            .toString()
            .equals(ficha_epidemiologia_n22.getDiganostico_inicial())) {
          listitem.setSelected(true);
          i = lbxDiganostico_inicial.getItemCount();
        }
      }
      for (int i = 0; i < lbxDiagnostico_al_egreso.getItemCount(); i++) {
        Listitem listitem = lbxDiagnostico_al_egreso.getItemAtIndex(i);
        if (listitem
            .getValue()
            .toString()
            .equals(ficha_epidemiologia_n22.getDiagnostico_al_egreso())) {
          listitem.setSelected(true);
          i = lbxDiagnostico_al_egreso.getItemCount();
        }
      }
      dtbxFecha_de_toma1.setValue(ficha_epidemiologia_n22.getFecha_de_toma1());
      dtbxFecha_de_recepcion.setValue(ficha_epidemiologia_n22.getFecha_de_recepcion());
      chbMuestra.setChecked(ficha_epidemiologia_n22.getMuestra());
      chbPrueba.setChecked(ficha_epidemiologia_n22.getPrueba());
      tbxAgente.setValue(ficha_epidemiologia_n22.getAgente());
      tbxResultado.setValue(ficha_epidemiologia_n22.getResultado());
      dtbxFecha_de_recepcion1.setValue(ficha_epidemiologia_n22.getFecha_de_recepcion1());
      tbxValor_registrado.setValue(ficha_epidemiologia_n22.getValor_registrado());
      dtbxFecha_de_toma2.setValue(ficha_epidemiologia_n22.getFecha_de_toma2());
      dtbxFecha_de_recepcion2.setValue(ficha_epidemiologia_n22.getFecha_de_recepcion2());
      chbMuestra2.setChecked(ficha_epidemiologia_n22.getMuestra2());
      chbPrueba2.setChecked(ficha_epidemiologia_n22.getPrueba2());
      tbxAgente2.setValue(ficha_epidemiologia_n22.getAgente2());
      tbxResultado2.setValue(ficha_epidemiologia_n22.getResultado2());
      dtbxFecha_de_recepcion22.setValue(ficha_epidemiologia_n22.getFecha_de_recepcion22());
      tbxValor_registrado2.setValue(ficha_epidemiologia_n22.getValor_registrado2());
      tbxDiligenciado_por.setValue(ficha_epidemiologia_n22.getDiligenciado_por());
      tbxTelefono_de_contacto.setValue(ficha_epidemiologia_n22.getTelefono_de_contacto());

      // Mostramos la vista //
      tbxAccion.setText("modificar");
      accionForm(true, tbxAccion.getText());
    } catch (Exception e) {
      MensajesUtil.mensajeError(e, "", this);
    }
  }
Example #22
0
 private boolean validarItems() {
   if (txtConcepto.getText().compareTo("") == 0
       || txtReferencia.getText().compareTo("") == 0
       || spnImporte.getValue() == 0) return false;
   else return true;
 }
Example #23
0
 public boolean camposEditando() {
   if (txtDescripcion.getText().compareTo("") != 0) {
     return true;
   } else return false;
 }
Example #24
0
 public boolean camposLLenos() {
   if (txtDescripcion.getText().compareTo("") == 0) {
     return false;
   } else return true;
 }