コード例 #1
0
ファイル: Logic.java プロジェクト: HobbesFNM/openMAXIMS
  private void populateTree(ProceduresPerformedByHCPVoCollection hcpProcedures) {
    form.treProcedures().clear();
    clearPanel(); // WDEV-17694

    Vector<HcpLiteVo> hcps = new Vector<HcpLiteVo>();
    if (hcpProcedures != null)
      for (ProceduresPerformedByHCPVo item : hcpProcedures) {
        TreeNode hcp = null;
        TreeNode service = null;
        TreeNode procedure = null;
        if (item.getPerformingHCPIsNotNull()) {
          if (!hcps.contains(item.getPerformingHCP())) {
            if (item.getPerformingHCP().getName() != null)
              hcp =
                  form.treProcedures()
                      .getNodes()
                      .add(item.getPerformingHCP(), item.getPerformingHCP().getName().toString());
            hcp.setExpandedImage(form.getImages().Admin.MemberOfStaff);
            hcp.setSelectedImage(form.getImages().Admin.MemberOfStaff);
            hcp.setCollapsedImage(form.getImages().Admin.MemberOfStaff);
            hcp.setIdentifier(item);
            hcps.add(item.getPerformingHCP());
          } else {
            for (int k = 0; k < form.treProcedures().getNodes().size(); k++) {
              HcpLiteVo existingHcp = (HcpLiteVo) form.treProcedures().getNodes().get(k).getValue();
              if (existingHcp.equals(item.getPerformingHCP()))
                hcp = form.treProcedures().getNodes().get(k);
            }
          }
        }
        if (item.getServiceIsNotNull()) {
          service = hcp.getNodes().add(item, item.getService().getServiceName());
          service.setExpandedImage(form.getImages().Admin.Service);
          service.setSelectedImage(form.getImages().Admin.Service);
          service.setCollapsedImage(form.getImages().Admin.Service);
        }

        if (item.getProceduresIsNotNull()) {
          for (int k = 0; k < item.getProcedures().size(); k++) {
            procedure =
                service
                    .getNodes()
                    .add(
                        item.getProcedures().get(k),
                        item.getProcedures().get(k).getProcedureName());
            procedure.setExpandedImage(form.getImages().Core.BlueSquare);
            procedure.setSelectedImage(form.getImages().Core.BlueSquare);
            procedure.setCollapsedImage(form.getImages().Core.BlueSquare);
          }
        }
      }
    form.treProcedures().expandAll();
    form.getLocalContext().setSelectedNode(null);
  }
コード例 #2
0
ファイル: Logic.java プロジェクト: HobbesFNM/openMAXIMS
  private void populatePanel(ProceduresPerformedByHCPVo pphcp) {
    clearPanel();
    if (pphcp == null) return;

    if (pphcp.getPerformingHCPIsNotNull()) {
      form.qmbHCPpanel().newRow(pphcp.getPerformingHCP(), pphcp.getPerformingHCP().getIHcpName());
      form.qmbHCPpanel().setValue(pphcp.getPerformingHCP());
    }
    if (pphcp.getServiceIsNotNull()) {
      form.cmbServicesPanel().newRow(pphcp.getService(), pphcp.getService().getServiceName());
      form.cmbServicesPanel().setValue(pphcp.getService());
    }
    if (pphcp.getProceduresIsNotNull())
      for (int i = 0; i < pphcp.getProcedures().size(); i++) {
        DynamicGridRow row = form.dyngrdProcedures().getRows().newRow();
        DynamicGridColumn col = form.dyngrdProcedures().getColumns().get(0);
        DynamicGridCell cell = row.getCells().newCell(col, DynamicCellType.QUERYCOMBOBOX);
        cell.getItems().newItem(pphcp.getProcedures().get(i));
        cell.setValue(pphcp.getProcedures().get(i));
      }
  }
コード例 #3
0
ファイル: Logic.java プロジェクト: HobbesFNM/openMAXIMS
  private void populatePanel(TreeNode node) {
    ProceduresPerformedByHCPVo proc = null;
    HcpLiteVo hcp = null;
    if (node != null)
      if (node.getValue() instanceof ProceduresPerformedByHCPVo) {
        proc = (ProceduresPerformedByHCPVo) node.getValue();
        hcp = proc.getPerformingHCP();
      } else if (node.getValue() instanceof HcpLiteVo) {
        hcp = (HcpLiteVo) node.getValue();
        if (node.getNodes().size() > 0)
          proc = (ProceduresPerformedByHCPVo) node.getNodes().get(0).getValue();
      }
    if (hcp != null) {
      form.qmbHCPpanel().newRow(hcp, hcp.getIHcpName());
      form.qmbHCPpanel().setEnabled(false);
      form.qmbHCPpanel().setValue(hcp);
      form.cmbServicesPanel().setEnabled(true);
      populateServicePanelCombo(form.getLocalContext().getAvailableServiceList());

      form.getContextMenus().Clinical.getProcedureGridADDPROCEDUREItem().setVisible(true);
    }
    if (proc != null) {
      if (proc.getPerformingHCPIsNotNull()) {
        form.qmbHCPpanel().setValue(proc.getPerformingHCP());
        form.qmbHCPpanel().newRow(proc.getPerformingHCP(), proc.getPerformingHCP().getIHcpName());
      }
      if (proc.getServiceIsNotNull()) form.cmbServicesPanel().setValue(proc.getService());
      if (proc.getProceduresIsNotNull() && proc.getProcedures().size() > 0) {
        form.dyngrdProcedures().getRows().clear();
        for (int i = 0; i < proc.getProcedures().size(); i++) {
          DynamicGridRow row = form.dyngrdProcedures().getRows().newRow();
          DynamicGridColumn col = form.dyngrdProcedures().getColumns().get(0);
          DynamicGridCell cell = row.getCells().newCell(col, DynamicCellType.QUERYCOMBOBOX);
          cell.getItems().newItem(proc.getProcedures().get(i));
          cell.setValue(proc.getProcedures().get(i));

          row.setValue(proc.getProcedures().get(i)); // WDEV-10772
        }
      }
    }
    if (form.getLocalContext().getIsNewProcedureIsNotNull()
        && form.getLocalContext().getIsNewProcedure()) {
      if (hcp != null) {
        form.qmbHCPpanel().newRow(hcp, hcp.getIHcpName());
        form.qmbHCPpanel().setValue(hcp);
        form.qmbHCPpanel().setEnabled(false);
      }
      if (proc != null) {
        form.cmbServicesPanel().newRow(proc.getService(), proc.getService().getServiceName());
        form.cmbServicesPanel().setValue(proc.getService());
        form.cmbServicesPanel().setEnabled(false);
        form.qmbHCPpanel().newRow(hcp, proc.getPerformingHCP().getIHcpName());
        form.qmbHCPpanel().setValue(proc.getPerformingHCP());
        form.qmbHCPpanel().setEnabled(false);
      }
    }
    if (form.getMode().equals(FormMode.EDIT)) {
      for (int i = 0; i < form.dyngrdProcedures().getRows().size(); i++) {
        DynamicGridRow row = form.dyngrdProcedures().getRows().get(i);
        DynamicGridCell cell = null;
        for (int j = 0; j < row.getCellArray().length; j++)
          if (row.getCellArray()[j] != null) cell = row.getCellArray()[j];
        if (cell != null) cell.setAutoPostBack(true);
      }
    }
  }