Beispiel #1
0
  private void populateGreedFromList(PatientElectiveListForEndoscWorklistVoCollection record) {
    form.dyngrdResults().getRows().clear();
    if (record == null || record.size() == 0) {
      engine.showMessage("No Records found.");
      return;
    }
    for (int i = 0; i < record.size(); i++) {
      PatientElectiveListForEndoscWorklistVo patele = record.get(i);
      if (patele != null) {
        DynamicGridRow newRow = form.dyngrdResults().getRows().newRow();
        DynamicGridCell cellPatient =
            newRow.getCells().newCell(getColumnById(COLUMN_PATIENT_NAME), DynamicCellType.STRING);
        cellPatient.setReadOnly(true);
        cellPatient.setValue(
            patele.getPatient() != null && patele.getPatient() != null
                ? patele.getPatient().getName().toStringSurnameFirst()
                : null);
        cellPatient.setTooltip(
            patele.getPatient() != null && patele.getPatient().getName() != null
                ? patele.getPatient().getName().toStringSurnameFirst()
                : "");

        DynamicGridCell cellPatID =
            newRow.getCells().newCell(getColumnById(COLUMN_IDENTIFIER), DynamicCellType.STRING);
        cellPatID.setReadOnly(true);
        cellPatID.setValue(
            patele.getPatient() != null && patele.getPatient().getDisplayId() != null
                ? patele.getPatient().getDisplayId().getIdValue()
                : null);
        cellPatID.setTooltip(
            patele.getPatient() != null && patele.getPatient().getDisplayId() != null
                ? patele.getPatient().getDisplayId().getIdValue()
                : "");

        DynamicGridCell cellUrgency =
            newRow.getCells().newCell(getColumnById(COLUMN_URGENCY), DynamicCellType.STRING);
        cellUrgency.setReadOnly(true);
        cellUrgency.setValue(patele.getPriority() != null ? patele.getPriority().toString() : null);
        cellUrgency.setTooltip(patele.getPriority() != null ? patele.getPriority().toString() : "");

        DynamicGridCell cellDateOnList =
            newRow.getCells().newCell(getColumnById(COLUMN_DATE_ON_LIST), DynamicCellType.STRING);
        cellDateOnList.setReadOnly(true);
        cellDateOnList.setValue(
            patele.getDateOnList() != null ? patele.getDateOnList().toString() : null);
        cellDateOnList.setTooltip(
            patele.getDateOnList() != null ? patele.getDateOnList().toString() : "");

        DynamicGridCell cellRTTBreach =
            newRow.getCells().newCell(getColumnById(COLUMN_RTT_BREACH), DynamicCellType.STRING);
        cellRTTBreach.setReadOnly(true);
        cellRTTBreach.setValue(
            patele.getReferral() != null
                    && patele.getReferral().getReferralDetails() != null
                    && patele.getReferral().getReferralDetails().getEnd18WW() != null
                ? patele.getReferral().getReferralDetails().getEnd18WW().toString()
                : null);
        cellRTTBreach.setTooltip(
            patele.getReferral() != null
                    && patele.getReferral().getReferralDetails() != null
                    && patele.getReferral().getReferralDetails().getEnd18WW() != null
                ? patele.getReferral().getReferralDetails().getEnd18WW().toString()
                : "");

        DynamicGridCell cellProcedure =
            newRow.getCells().newCell(getColumnById(COLUMN_PROCEDURE), DynamicCellType.STRING);
        cellProcedure.setReadOnly(true);
        cellProcedure.setValue(
            patele.getPrimaryProcedure() != null
                    && patele.getPrimaryProcedure().getProcedureName() != null
                ? patele.getPrimaryProcedure().getProcedureName()
                : null);
        cellProcedure.setTooltip(
            patele.getPrimaryProcedure() != null
                    && patele.getPrimaryProcedure().getProcedureName() != null
                ? patele.getPrimaryProcedure().getProcedureName()
                : "");

        DynamicGridCell cellComments =
            newRow.getCells().newCell(getColumnById(COLUMN_COMMENTS), DynamicCellType.STRING);
        cellComments.setReadOnly(true);
        cellComments.setValue(patele.getComments());
        cellComments.setTooltip(patele.getComments());

        newRow.setValue(patele);
      }
    }
  }
  private boolean addDoseRow(
      DynamicGridRow row, MedicationDose voDose, boolean bHideDiscontinued, Color objColor) {
    if (voDose == null || row == null)
      throw new CodingRuntimeException("Dose or Row not sent - Coding Error");

    if ((bHideDiscontinued)
        && (voDose.getIsStoppedIsNotNull())
        && (voDose.getIsStopped().booleanValue())) return false;

    DynamicGridRow childRow = row.getRows().newRow();
    DynamicGridCell cell1 =
        childRow.getCells().newCell(getColByIdentifier(COL_DOSE_DOSE), DynamicCellType.LABEL);
    cell1.setValue(voDose.getDoseIsNotNull() ? voDose.getDose() : "");
    cell1.setIdentifier(voDose.getDose());
    cell1.setTooltip(voDose.getDiscontinuedTooltip());

    DynamicGridCell cell2 =
        childRow.getCells().newCell(getColByIdentifier(COL_DOSE_ROUTE), DynamicCellType.LABEL);
    cell2.setValue(voDose.getAdminRouteIsNotNull() ? voDose.getAdminRoute().toString() : "");
    cell2.setIdentifier(voDose.getAdminRoute());
    cell2.setTooltip(voDose.getDiscontinuedTooltip());

    DynamicGridCell cell3 =
        childRow.getCells().newCell(getColByIdentifier(COL_DOSE_TIMES), DynamicCellType.LABEL);
    cell3.setValue(
        voDose.getAdminTimesIsNotNull() ? createTimesString(voDose.getAdminTimes()) : "");
    cell3.setTooltip(
        voDose.getAdminTimesIsNotNull() ? createTimesString(voDose.getAdminTimes()) : "");
    cell3.setIdentifier(voDose.getAdminTimes());
    cell3.setTooltip(voDose.getDiscontinuedTooltip());

    DynamicGridCell cell4 =
        childRow
            .getCells()
            .newCell(getColByIdentifier(COL_DOSE_COMMENCED_BY), DynamicCellType.LABEL);
    cell4.setValue(voDose.getDoseStartHcpIsNotNull() ? voDose.getDoseStartHcp().toString() : "");
    cell4.setIdentifier(voDose.getDose());
    cell4.setTooltip(voDose.getDiscontinuedTooltip());

    DynamicGridCell cell5 =
        childRow
            .getCells()
            .newCell(getColByIdentifier(COL_DOSE_COMMENCED_DATE), DynamicCellType.LABEL);
    cell5.setValue(voDose.getDoseStartDateIsNotNull() ? voDose.getDoseStartDate().toString() : "");
    cell5.setIdentifier(voDose.getDose());
    cell5.setTooltip(voDose.getDiscontinuedTooltip());

    // WDEV-20591
    DynamicGridCell cell6 =
        childRow.getCells().newCell(getColByIdentifier(COL_DOSE_COMMENT), DynamicCellType.LABEL);
    cell6.setValue(voDose.getCommentIsNotNull() ? voDose.getComment().toString() : "");
    cell6.setIdentifier(voDose.getComment());
    cell6.setTooltip(voDose.getDiscontinuedTooltip());

    childRow.setValue(voDose);

    childRow.setExpanded(true);
    childRow.setSelectable(false);
    childRow.setBackColor(objColor);
    childRow.setExpandedImage(this.tabletdoseImage);
    childRow.setCollapsedImage(this.tabletdoseImage);

    if ((voDose.getIsStoppedIsNotNull()) && (voDose.getIsStopped().booleanValue()))
      childRow.setBold(false);
    else childRow.setBold(true);

    return true;
  }
Beispiel #3
0
  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);
      }
    }
  }
  private void addMedicationRow(
      PatientMedicationVo voMed, boolean bHideDiscontinued, Color objColor) {
    if (voMed == null)
      throw new CodingRuntimeException("Coding Error voSnapShot is null addMedicationRow()");

    if ((bHideDiscontinued)
        && (voMed.getIsDiscontinuedIsNotNull())
        && (voMed.getIsDiscontinued().booleanValue())) return;

    boolean bAllDosesAreDiscontinued = true;
    MedicationDose voDose = null;

    // Loop thru to see if collection has any non-discontinued Doses - i.e. current ones.
    for (int k = 0; k < voMed.getPrescribedDoses().size(); k++) {
      voDose = voMed.getPrescribedDoses().get(k);
      if ((voDose.getIsStopped() == null)
          || (voDose.getIsStoppedIsNotNull() && (voDose.getIsStopped().booleanValue() == false)))
        bAllDosesAreDiscontinued = false;
    }

    // If we are not hiding Discontinued Meds and doses the ignore the bAllDosesAreDiscontinued
    // boolean.
    if (!bHideDiscontinued) bAllDosesAreDiscontinued = false;

    if (!bAllDosesAreDiscontinued) {
      DynamicGridRow row = this.grid.getRows().newRow();
      DynamicGridCell cell1 =
          row.getCells().newCell(getColByIdentifier(COL_MED_DESC_OR_DOSE), DynamicCellType.LABEL);
      cell1.setValue(voMed.getOtherMedicationText());
      cell1.setIdentifier(voMed.getOtherMedicationText());
      // WDEV-1204 - add tooltip
      cell1.setTooltip(voMed.getDiscontinuedTooltip());

      DynamicGridCell cell2 =
          row.getCells().newCell(getColByIdentifier(COL_MED_FREQ_OR_TIMES), DynamicCellType.LABEL);
      cell2.setValue(voMed.getFrequencyIsNotNull() ? voMed.getFrequency().toString() : "");
      cell2.setIdentifier(voMed.getFrequency());
      cell2.setTooltip(voMed.getDiscontinuedTooltip());

      if (hasDischargeInfo()) {
        DynamicGridCell cellDo =
            row.getCells().newCell(getColByIdentifier(COL_MED_DO), DynamicCellType.IMAGE);
        cellDo.setValue(
            voMed.getIsInTTOIsNotNull() && voMed.getIsInTTO().booleanValue() ? doImage : null);

        DynamicGridCell cellDays =
            row.getCells().newCell(getColByIdentifier(COL_MED_DAYS), DynamicCellType.INT);
        cellDays.setValue(voMed.getNoDaysSupply());
      }

      DynamicGridCell cell3 =
          row.getCells().newCell(getColByIdentifier(COL_MED_COMMENCED_BY), DynamicCellType.LABEL);
      cell3.setValue(voMed.getHcpCommencedIsNotNull() ? voMed.getHcpCommenced().toString() : "");
      cell3.setIdentifier(voMed.getFrequency());
      cell3.setTooltip(voMed.getDiscontinuedTooltip());

      DynamicGridCell cell4 =
          row.getCells().newCell(getColByIdentifier(COL_MED_COMMENCED_DATE), DynamicCellType.LABEL);
      cell4.setValue(voMed.getCommencedDateIsNotNull() ? voMed.getCommencedDate().toString() : "");
      cell4.setIdentifier(voMed.getFrequency());
      cell4.setTooltip(voMed.getDiscontinuedTooltip());

      DynamicGridCell cellAudit =
          row.getCells().newCell(getColByIdentifier(COL_AUDIT), DynamicCellType.IMAGE);
      if (voMed.getSysInfoIsNotNull() && voMed.getSysInfo().getLastupdateUser() != null) {
        cellAudit.setValue(this.imgAudit);
        cellAudit.setTooltip("This record had been updated.");
      }

      if (this.checkColumn) {
        DynamicGridCell cellChecked =
            row.getCells().newCell(getColByIdentifier(COL_COPY), DynamicCellType.BOOL);
        cellChecked.setValue(Boolean.TRUE);
        cellChecked.setIdentifier(null);
      }

      // WDEV-20591
      DynamicGridCell cell5 =
          row.getCells().newCell(getColByIdentifier(COL_MED_COMMENT), DynamicCellType.LABEL);
      cell5.setValue(voMed.getCommentIsNotNull() ? voMed.getComment() : "");
      cell5.setIdentifier(voMed.getFrequency());
      cell5.setTooltip(voMed.getDiscontinuedTooltip());

      row.setValue(voMed);

      for (int i = 0; i < voMed.getPrescribedDoses().size(); i++)
        addDoseRow(row, voMed.getPrescribedDoses().get(i), bHideDiscontinued, objColor);

      row.setExpanded(true);
      row.setSelectable(true);
      row.setBackColor(objColor);
      row.setExpandedImage(this.blisterpackImage);

      if ((voMed.getIsDiscontinuedIsNotNull()) && (voMed.getIsDiscontinued().booleanValue()))
        row.setBold(false);
      else row.setBold(true);
    }
  }