Package clips.delegate.directory.complex

Examples of clips.delegate.directory.complex.DirectoryDrugListItem


                    det.sectionId = 0;
                    System.out.println("Предупреждение: Не найден раздел перечня " + dbf.getName() + " code=(" + det.code + ")");
                    out.println("Предупреждение: Не найден раздел перечня " + dbf.getName() + " code=(" + det.code + ")");
                }

                DirectoryDrugListItem item = new DirectoryDrugListItem(det);
                drugList.getItems().append(item);
            } catch (IOException ex) {
                closeDBF(dbf);
                throw new ClipsException("Ошибка при чтении данных из файла " + dbf.getName() + " (строка " + i + ")", ex);
            } catch (xBaseJException ex) {
View Full Code Here


    private void btDrugActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btDrugActionPerformed
        try {
            DlgDloDrugChooser dlg = new DlgDloDrugChooser(MainWindow.mainWindow, true);
            dlg.setVisible(true);
            if (dlg.getDlgResult() == ModalDialog.DLG_OK) {
                DirectoryDrugListItem drug = dlg.getSelectedDrug();
                prescription.setDrug(drug);
                tfDrug.setText(drug.toString());
            }
        } catch (ClipsException ex) {
            MessageBox.showException(ex);
        }
    }//GEN-LAST:event_btDrugActionPerformed
View Full Code Here

    }

    @Override
    public Object getValueAt(int r, int c) {
        try {
            DirectoryDrugListItem item = items.get(r);

            switch (c) {
                case COL_CODE: {
                    return item.getCode();
                }
                case COL_TITLE: {
                    return item.getTitle();
                }
                case COL_TRN: {
                    DirectoryDrugTradeNameItem trn = item.getTradeName();
                    if (trn != null) {
                        return trn.getTitle();
                    } else {
                        return "";
                    }
                }
                case COL_MNN: {
                    DirectoryDrugMNNItem mnn = item.getMnn();
                    if (mnn != null) {
                        return mnn.getTitle();
                    } else {
                        return "";
                    }
                }
                case COL_LF: {
                    DirectoryDrugDosageFormItem lf = item.getDosageForm();
                    if (lf != null) {
                        return lf.getTitle();
                    } else {
                        return "";
                    }
                }
                case COL_DOSAGE: {
                    return item.getDosage() != null ? item.getDosage() : "";
                }
                case COL_DOSAGE_UNIT: {
                    DirectoryDrugDosageUnitItem lf = item.getDosageUnit();
                    if (lf != null) {
                        return lf.getTitle();
                    } else {
                        return "";
                    }
                }
                case COL_DOSAGE_QUANTITY: {
                    return item.getDosageQuantity();
                }
                case COL_BEGIN: {
                    //дата начала
                    return item.getDateIn();
                }
                case COL_END: {
                    //дата окончания
                    return item.getDateOut();
                }
                default:
                    return null;
            }
        } catch (ClipsException ex) {
View Full Code Here

        data.put("reception_date", Converter.dateToString(date));

        data.put("collaborator_fio", getCollaborator().toString());
        data.put("collaborator_code", getCollaborator().getCode());

        DirectoryDrugListItem drug = getDrug();
        String str = drug.getMnn() != null ? drug.getMnn().getTitle() : null;
        if (str == null) {
            str = drug.getTradeName() != null ? drug.getTradeName().getTitle() : "";
        }
        data.put("rp", str);

        if (drug.getDosage() != null) {
            data.put("dosage", drug.getDosage());
        }

        str = "" + (drug.getDosageQuantity() != 0 ? drug.getDosageQuantity() : "");
        data.put("quantity", str);

        str = "" + (drug.getDosageUnit() != null ? drug.getDosageUnit().getTitle() : "");
        data.put("signa", str);

        FormReportCreator creater = cCreator.createFormReporter(getClass(), 1);
        creater.createReport(null, null, data.entrySet(), null);
        creater.finish();
View Full Code Here

TOP

Related Classes of clips.delegate.directory.complex.DirectoryDrugListItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.