Exemplo n.º 1
0
  @Listen("onSeleccion = #divCatalogoInforme")
  public void seleccion() {
    Informe informe = catalogo.objetoSeleccionadoDelCatalogo();
    ltbAcciones.getItems().clear();
    List<PlanAccion> planes = servicioPlanAccion.buscarPorInformeyTipo(informe, "normal");
    if (!planes.isEmpty()) {
      ltbAcciones.setModel(new ListModelList<PlanAccion>(planes));
      ltbAcciones.setCheckmark(false);
      ltbAcciones.setMultiple(false);
      ltbAcciones.setCheckmark(true);
      ltbAcciones.setMultiple(true);
      ltbAcciones.renderAll();
      if (ltbAcciones.getItemCount() != 0) {
        for (int i = 0; i < ltbAcciones.getItemCount(); i++) {
          Listitem listItem = ltbAcciones.getItemAtIndex(i);
          PlanAccion plan = listItem.getValue();
          if (plan.getEstado().equals("Finalizado")) listItem.setSelected(true);
          else listItem.setSelected(false);
        }
      }
    }

    ltbAccionesInspector.getItems().clear();
    List<PlanAccion> planes2 = servicioPlanAccion.buscarPorInformeyTipo(informe, "inspector");
    if (!planes.isEmpty()) {
      ltbAccionesInspector.setModel(new ListModelList<PlanAccion>(planes2));
      ltbAccionesInspector.setCheckmark(false);
      ltbAccionesInspector.setMultiple(false);
      ltbAccionesInspector.setCheckmark(true);
      ltbAccionesInspector.setMultiple(true);
      ltbAccionesInspector.renderAll();
      if (ltbAccionesInspector.getItemCount() != 0) {
        for (int i = 0; i < ltbAccionesInspector.getItemCount(); i++) {
          Listitem listItem = ltbAccionesInspector.getItemAtIndex(i);
          PlanAccion plan = listItem.getValue();
          if (plan.getEstado().equals("Finalizado")) listItem.setSelected(true);
          else listItem.setSelected(false);
        }
      }
    }
    lblOrdenamientos.setValue(informe.getOrdenamientos());
    lblFuncionario.setValue(informe.getFuncionario());
    if (informe.getFechaVisita() != null)
      lblFechaVisita.setValue(formatoFecha.format(informe.getFechaVisita()));
    lblCodigo.setValue(informe.getCodigo());
    lblCedula.setValue(informe.getPacienteA().getCedula());
    lblFicha.setValue(informe.getPacienteA().getFicha());
    lblNombre.setValue(
        informe.getPacienteA().getPrimerNombre()
            + " "
            + informe.getPacienteA().getPrimerApellido());
    lblDescripcion.setValue(informe.getFgad());
    lblTipo.setValue(informe.getFga());
    dtbFecha.setValue(informe.getFa());
    codigoInforme = informe.getIdInforme();
    catalogo.setParent(null);
  }
Exemplo n.º 2
0
 @Override
 public void render(final Listitem item, final Object data) throws Exception {
   CodeTable renderedAuthority = (CodeTable) data;
   Users user = (Users) ((Listitem) getParentComponent(item, Listitem.class)).getValue();
   List<Authority> authorityCollection = user.getAuthorityCollection();
   boolean select = false;
   for (Authority authority : authorityCollection) {
     CodeTable usersAuthority = authority.getAuthority();
     if (renderedAuthority.getCode().equals(usersAuthority.getCode())) {
       select = true;
       break;
     }
   }
   Bandbox bandbox = (Bandbox) getParentComponent(item, Bandbox.class);
   if (select) {
     if (bandbox.getText().length() > 0) {
       bandbox.setText(bandbox.getText() + ", ");
     }
     bandbox.setText(bandbox.getText() + renderedAuthority.getCode());
   }
   user.setAuthorities(bandbox.getText());
   item.setValue(data);
   item.setSelected(select);
   item.setLabel(renderedAuthority.getCode());
 }
Exemplo n.º 3
0
  /*
   * 刷新topNList
   */
  private void refreshiControl() {
    ChartUtil.clearListbox(topNList);
    TopNListitemModel model = new TopNListitemModel(topNReport);
    //		ChartUtil.makelistData(topNList, model, model);

    try {
      for (TopNBean m : model.getTopNData()) {
        Image image = null;
        if (m.getDeny().equals("允许")) {
          image = new Image("/main/images/button/ico/enable_bt.gif");
        } else {
          image = new Image("/main/images/button/ico/disable_bt.gif");
        }
        Listitem item =
            ChartUtil.addRow(
                topNList,
                m,
                m.getTitle(),
                m.getDescript(),
                m.getPeriod(),
                new Image("/main/images/filetype/" + m.getFiletype() + ".gif"),
                image,
                m.getEditImage());
        item.setId(m.getSection());
        item.addForward("onClick", topNReport, "onSelecttopNList");
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    String section =
        (String) Executions.getCurrent().getDesktop().getSession().getAttribute("topNReportlit_id");

    if (null == section) return;

    Listitem selectedItem = null;
    for (Object obj : topNList.getItems()) {
      if (obj instanceof Listitem) {
        Listitem tmpItem = (Listitem) obj;
        if (tmpItem.getId().equals(section)) {
          selectedItem = tmpItem;
        }
      }
    }

    if (null != selectedItem) {
      selectedItem.setSelected(true);
      Events.sendEvent(new Event(Events.ON_SELECT, topNList));
      topNList.setActivePage(selectedItem);
    }
  }
Exemplo n.º 4
0
  public void setMultiple(Listgroup group, boolean value) {
    for (Iterator<Listitem> it = group.getItems().iterator(); it.hasNext(); ) {
      Listitem item = it.next();
      if (((Listcell) item.getFirstChild()).getFirstChild() != null) {
        item.setSelected(value);
        ((Checkbox) ((Listcell) item.getFirstChild()).getFirstChild()).setChecked(value);
        habilitarButtons(!value);
      }
    }

    if (idZBtnDuplicar != null) {
      if (((Checkbox) group.getFirstChild().getFirstChild()).isChecked())
        idZBtnDuplicar.setDisabled(true);
    }
  }
Exemplo n.º 5
0
    @Override
    public void render(Listitem item, Object data) throws Exception {
      if (data == null) return;
      Jxkh_BusinessIndicator type = (Jxkh_BusinessIndicator) data;
      item.setValue(type);
      Listcell c0 = new Listcell();
      if (type.getKbName() == null) {
        c0.setLabel("--请选择--");
      } else {
        c0.setLabel(type.getKbName());
      }
      item.appendChild(c0);

      if (item.getIndex() == 0) item.setSelected(true);
    }
Exemplo n.º 6
0
    @Override
    public void onEvent(Event event) throws Exception {

      // deselect selectedBean
      // TODO don't work in expected way
      // evtl. mittels Reflection den zu uebergebenen selectedItem bean
      // mit setXXXXX(null) setzen.
      final Listitem li = getListbox().getSelectedItem();
      if (li != null) {
        li.setSelected(false);
      }

      final PagingEvent pe = (PagingEvent) event;
      final int pageNo = pe.getActivePage();
      final int start = pageNo * getPageSize();

      // refresh the list
      refreshModel(start);
    }
Exemplo n.º 7
0
  public ProfileComponent() {
    super();
    final PlayerProfileData player = getPlayerFacade().getCurrentPlayer();

    final Grid profileGrid = new Grid();
    profileGrid.setSclass("profileGrid");

    final Rows profileRows = new Rows();
    profileGrid.appendChild(profileRows);

    final Row idRow = new Row();
    idRow.setSclass("profileRow");
    idRow.appendChild(new Label(Labels.getLabel("profile.id")));
    idRow.appendChild(new Label(player.getId()));
    profileRows.appendChild(idRow);

    final Row nameRow = new Row();
    nameRow.setSclass("profileRow");
    nameRow.appendChild(new Label(Labels.getLabel("profile.name")));
    final Textbox nameBox = new Textbox(player.getName());
    nameBox.setConstraint(
        new SimpleConstraint(SimpleConstraint.NO_EMPTY, Labels.getLabel("register.error.noname")));
    nameRow.appendChild(nameBox);
    profileRows.appendChild(nameRow);

    final Row mailRow = new Row();
    mailRow.setSclass("profileRow");
    mailRow.appendChild(new Label(Labels.getLabel("profile.email")));
    final Textbox mailBox = new Textbox(player.getEMail());
    mailBox.setConstraint("/.+@.+\\.[a-z]+/: " + Labels.getLabel("register.error.noemail"));
    mailRow.appendChild(mailBox);
    profileRows.appendChild(mailRow);

    final Row pwdRow = new Row();
    pwdRow.setSclass("profileRow");
    pwdRow.appendChild(new Label(Labels.getLabel("profile.password")));
    final Textbox pwdBox = new Textbox(player.getPassword());
    // pwdBox.setConstraint(new SimpleConstraint(SimpleConstraint.NO_EMPTY,
    // Labels.getLabel("register.error.nopassword")));
    pwdBox.setType("password");
    pwdRow.appendChild(pwdBox);
    profileRows.appendChild(pwdRow);

    final Row pwd2Row = new Row();
    pwd2Row.setSclass("profileRow");
    pwd2Row.appendChild(new Label(Labels.getLabel("profile.passwordagain")));
    final Textbox pwd2Box = new Textbox(player.getPassword());
    pwd2Box.setConstraint(
        new Constraint() {
          @Override
          public void validate(final Component comp, final Object value)
              throws WrongValueException {
            if (!(pwdBox.getValue().equals(value))) {
              throw new WrongValueException(
                  comp, Labels.getLabel("register.error.unequalpassword"));
            }
          }
        });
    pwd2Box.setType("password");
    pwd2Row.appendChild(pwd2Box);
    profileRows.appendChild(pwd2Row);

    final Row countryRow = new Row();
    countryRow.setSclass("profileRow");
    countryRow.appendChild(new Label(Labels.getLabel("profile.country")));
    final Combobox countryBox = new Combobox();
    countryBox.setConstraint(
        new SimpleConstraint(
            SimpleConstraint.NO_EMPTY, Labels.getLabel("register.error.nocountry")));
    countryBox.setAutodrop(true);
    countryBox.setReadonly(true);
    fillCombo(countryBox, player.getLocale());
    countryRow.appendChild(countryBox);
    profileRows.appendChild(countryRow);

    final Row avCompetitionsRow = new Row();
    avCompetitionsRow.setSclass("competitionsRow");
    avCompetitionsRow.appendChild(new Label(Labels.getLabel("profile.availableCompetitions")));
    final Listbox listbox = new Listbox();
    listbox.setSclass("competitionsListbox");
    avCompetitionsRow.appendChild(listbox);
    listbox.setCheckmark(true);
    listbox.setMultiple(true);

    final List<CompetitionData> comps = getPlayerFacade().getAllCompetitions();
    for (final CompetitionData cmpData : comps) {
      final Listitem listItem = new Listitem(cmpData.getName());
      listItem.setValue(cmpData);
      listItem.setSelected(cmpData.isActive());
      listItem.setDisabled(
          !cmpData.isDeactivatable() || (cmpData.isCurrentCompetition() && comps.size() != 1));
      listbox.appendChild(listItem);
    }

    profileRows.appendChild(avCompetitionsRow);

    final Row buttonRow = new Row();
    buttonRow.setSclass("profileRow");
    final Button button = new Button(Labels.getLabel("profile.submit"));
    button.addEventListener(
        Events.ON_CLICK,
        new EventListener() {
          @Override
          public void onEvent(final Event event) {
            player.setEMail(mailBox.getValue());
            player.setName(nameBox.getValue());

            if (StringUtils.isNotBlank(pwdBox.getValue())
                && pwdBox.getValue().equals(pwd2Box.getValue())) {
              player.setPassword(pwdBox.getValue());
            }
            player.setLocale((Locale) countryBox.getSelectedItem().getValue());

            final List<CompetitionData> cmps = new ArrayList<CompetitionData>();
            for (final Object listItem : listbox.getSelectedItems()) {
              if (listItem instanceof Listitem) {
                final Object value = ((Listitem) listItem).getValue();
                if (value instanceof CompetitionData) {
                  cmps.add((CompetitionData) value);
                }
              }
            }

            getPlayerFacade().setActiveCompetitions(cmps);

            getPlayerFacade().updatePlayer(player);

            try {
              Messagebox.show(Labels.getLabel("profile.update.success"));
              // TODO proper update mechanism
              Executions.sendRedirect("/");
            } catch (final InterruptedException e) {
              LOG.warn("Error while showing messagebox: ", e);
            }
          }
        });
    buttonRow.appendChild(button);
    profileRows.appendChild(buttonRow);

    this.appendChild(profileGrid);

    final Div detailsDiv = new Div();
    detailsDiv.setSclass("rankingUserDetails");

    final Img img = new Img();
    final Div imgCnt = new Div();
    imgCnt.appendChild(img);
    imgCnt.setSclass("rankingUserDetailsImg");
    img.setDynamicProperty("src", player.getPictureUrl());
    detailsDiv.appendChild(imgCnt);

    final Button uploadButton = new Button(Labels.getLabel("profile.upload"));
    uploadButton.setSclass("btngreen profileUserDetailsUpload");
    detailsDiv.appendChild(uploadButton);

    uploadButton.addEventListener(
        Events.ON_CLICK,
        new EventListener() {

          @Override
          public void onEvent(final Event event) throws InterruptedException {
            final Object media = Fileupload.get();
            if (media instanceof Image) {
              final Image image = (Image) media;
              player.setPictureUrl(
                  getPlayerFacade().uploadProfilePicture(image.getByteData(), image.getName()));
              img.setDynamicProperty("src", player.getPictureUrl());
            } else if (media != null) {
              Messagebox.show("Not an image: " + media, "Error", Messagebox.OK, Messagebox.ERROR);
            }
          }
        });
    this.appendChild(detailsDiv);
  }
  public CreateProcessController(
      final MainController mainC, final HashMap<String, String> formats_ext)
      throws SuspendNotAllowedException, InterruptedException, ExceptionAllUsers, ExceptionDomains {
    this.mainC = mainC;

    this.createProcessW =
        (Window) Executions.createComponents("macros/editprocessdata.zul", null, null);
    this.createProcessW.setTitle("Create new process ");
    Rows rows =
        (Rows) this.createProcessW.getFirstChild().getFirstChild().getFirstChild().getNextSibling();
    Row processNameR = (Row) rows.getFirstChild();
    this.processNameT = (Textbox) processNameR.getFirstChild().getNextSibling();
    Row versionNameR = (Row) processNameR.getNextSibling();
    this.versionNumberT = (Textbox) versionNameR.getFirstChild().getNextSibling();
    Row domainR = (Row) versionNameR.getNextSibling();
    Row ownerR = (Row) domainR.getNextSibling();

    Row nativeTypesR = (Row) ownerR.getNextSibling();
    this.nativeTypesLB = (Listbox) nativeTypesR.getFirstChild().getNextSibling();

    Row rankingR = (Row) nativeTypesR.getNextSibling();
    Radiogroup rankingRG = (Radiogroup) rankingR.getFirstChild().getNextSibling();

    Row publicR = (Row) rankingR.getNextSibling();
    this.makePublicCb = (Checkbox) publicR.getFirstChild().getNextSibling();

    Row buttonsR = (Row) publicR.getNextSibling().getNextSibling();
    Div buttonsD = (Div) buttonsR.getFirstChild();
    Button okB = (Button) buttonsD.getFirstChild();
    Button cancelB = (Button) okB.getNextSibling();
    Button resetB = (Button) cancelB.getNextSibling();
    List<String> domains = this.mainC.getDomains();
    this.domainCB = new SelectDynamicListController(domains);
    this.domainCB.setReference(domains);
    this.domainCB.setAutodrop(true);
    this.domainCB.setWidth("85%");
    this.domainCB.setHeight("100%");
    this.domainCB.setAttribute("hflex", "1");
    domainR.appendChild(domainCB);
    List<String> usernames = this.mainC.getUsers();
    SelectDynamicListController ownerCB = new SelectDynamicListController(usernames);
    ownerCB.setReference(usernames);
    ownerCB.setAutodrop(true);
    ownerCB.setWidth("85%");
    ownerCB.setHeight("100%");
    ownerCB.setAttribute("hflex", "1");
    ownerR.appendChild(ownerCB);

    // set row visibility at creation time
    nativeTypesR.setVisible(true);
    versionNameR.setVisible(false);
    rankingR.setVisible(false);

    // default values
    ownerCB.setValue(UserSessionManager.getCurrentUser().getUsername());

    Set<String> extensions = formats_ext.keySet();
    List<String> sorted = CollectionUtil.asSortedList(extensions);

    Iterator<String> it = sorted.iterator();
    Listitem cbi;
    while (it.hasNext()) {
      cbi = new Listitem();
      this.nativeTypesLB.appendChild(cbi);
      cbi.setLabel(formats_ext.get(it.next()));

      if ("BPMN 2.0".compareTo(cbi.getLabel()) == 0) {
        cbi.setSelected(true);
      }
    }
    // empty fields
    reset();

    okB.addEventListener(
        "onClick",
        new EventListener<Event>() {
          @Override
          public void onEvent(final Event event) throws Exception {
            createProcess();
          }
        });
    this.createProcessW.addEventListener(
        "onOK",
        new EventListener<Event>() {
          @Override
          public void onEvent(final Event event) throws Exception {
            createProcess();
          }
        });
    cancelB.addEventListener(
        "onClick",
        new EventListener<Event>() {
          @Override
          public void onEvent(final Event event) throws Exception {
            cancel();
          }
        });
    resetB.addEventListener(
        "onClick",
        new EventListener<Event>() {
          @Override
          public void onEvent(final Event event) throws Exception {
            reset();
          }
        });
    this.createProcessW.doModal();
  }
  public ProcessMergeController(
      MainController mainC,
      Map<ProcessSummaryType, List<VersionSummaryType>> selectedProcessVersions)
      throws SuspendNotAllowedException, InterruptedException, ExceptionAllUsers, ExceptionDomains {
    this.mainC = mainC;

    this.processMergeW =
        (Window) Executions.createComponents("macros/processmerge.zul", null, null);
    this.processMergeW.setTitle("Merge processes.");

    Row processNameR = (Row) this.processMergeW.getFellow("mergednamep");
    this.processNameT = (Textbox) processNameR.getFirstChild().getNextSibling();

    Row versionNameR = (Row) this.processMergeW.getFellow("mergednamev");
    this.versionNameT = (Textbox) versionNameR.getFirstChild().getNextSibling();
    this.versionNameT.setValue(Constants.INITIAL_VERSION);

    Row mergeDomainR = (Row) this.processMergeW.getFellow("mergeddomainR");
    List<String> domains = this.mainC.getDomains();
    this.domainCB = new SelectDynamicListController(domains);
    this.domainCB.setReference(domains);
    this.domainCB.setAutodrop(true);
    this.domainCB.setWidth("85%");
    this.domainCB.setHeight("100%");
    this.domainCB.setAttribute("hflex", "1");
    mergeDomainR.appendChild(domainCB);

    Row removeEntR = (Row) this.processMergeW.getFellow("removeEnt");
    Row makePubicR = (Row) this.processMergeW.getFellow("makePublic");
    Row algoChoiceR = (Row) this.processMergeW.getFellow("mergeAlgoChoice");

    this.OKbutton = (Button) this.processMergeW.getFellow("mergeOKButton");
    Button cancelButton = (Button) this.processMergeW.getFellow("mergeCancelButton");

    this.selectedProcessVersions = selectedProcessVersions;
    this.removeEnt = (Checkbox) removeEntR.getFirstChild().getNextSibling();
    this.makePublic = (Checkbox) makePubicR.getFirstChild().getNextSibling();
    this.mergethreshold = (Row) this.processMergeW.getFellow("mergethreshold");
    this.labelthreshold = (Row) this.processMergeW.getFellow("labelthreshold");
    this.contextthreshold = (Row) this.processMergeW.getFellow("contextthreshold");
    this.skipeweight = (Row) this.processMergeW.getFellow("skipeweight");
    this.skipnweight = (Row) this.processMergeW.getFellow("skipnweight");
    this.subnweight = (Row) this.processMergeW.getFellow("subnweight");

    this.algosLB = (Listbox) algoChoiceR.getFirstChild().getNextSibling();
    Listitem listItem = new Listitem();
    listItem.setLabel("Greedy");
    this.algosLB.appendChild(listItem);
    listItem.setSelected(true);
    listItem = new Listitem();
    listItem.setLabel("Hungarian");
    this.algosLB.appendChild(listItem);

    updateActions();

    this.processNameT.addEventListener(
        "onChange",
        new EventListener<Event>() {
          public void onEvent(Event event) throws Exception {
            updateActions();
          }
        });
    this.versionNameT.addEventListener(
        "onChange",
        new EventListener<Event>() {
          public void onEvent(Event event) throws Exception {
            updateActions();
          }
        });
    this.algosLB.addEventListener(
        "onSelect",
        new EventListener<Event>() {
          public void onEvent(Event event) throws Exception {
            updateActions();
          }
        });
    this.OKbutton.addEventListener(
        "onClick",
        new EventListener<Event>() {
          public void onEvent(Event event) throws Exception {
            mergeProcesses();
          }
        });
    this.OKbutton.addEventListener(
        "onOK",
        new EventListener<Event>() {
          public void onEvent(Event event) throws Exception {
            mergeProcesses();
          }
        });
    cancelButton.addEventListener(
        "onClick",
        new EventListener<Event>() {
          public void onEvent(Event event) throws Exception {
            cancel();
          }
        });

    this.processMergeW.doModal();
  }
 public void seleccionarTodos() {
   List<Listitem> listado_items = listboxProcedimientos.getItems();
   for (Listitem listitem : listado_items) {
     listitem.setSelected(checkboxSeleccionar_todos.isChecked());
   }
 }
  // 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);
    }
  }