Package cli_fmw.report

Examples of cli_fmw.report.FormReportCreator


        }
}//GEN-LAST:event_btAddActionPerformed

private void btPrintActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btPrintActionPerformed
    try {
        FormReportCreator creater = ReporterFactory.createFormReporter(getClass());
        HashMap<String, Object> extraFields = jobLocal.getPrintFields();
        extraFields.put("clientFIO", client.toString());
        creater.createReport(null, null, extraFields.entrySet(), null);
        creater.finish();
    } catch (ClipsException ex) {
        MessageBox.showException(ex);
    }
}//GEN-LAST:event_btPrintActionPerformed
View Full Code Here


       
    }

    @Override
    public void print(CombinedReportCreator cCreator) throws ClipsException {
        FormReportCreator creater = cCreator.createFormReporter(getClass(), 1);
        creater.createReport(null, null, data.entrySet(), null);
        creater.finish();
    }
View Full Code Here

   
    public void itemPrint(PrescriptionItemData itemData) throws ClipsException {
        DirectoryCollaboratorItem collab = getSerrenLocal().getSerRenDirector();
        ClientLocal client = getSerrenLocal().getPolisData().getClient(getAuditListener());
       
        FormReportCreator creater = ReporterFactory.createFormReporter(getClass(), 1);
       
        HashMap<String, Object> data = new HashMap<String, Object>();
        data.put("recipeDate", Converter.dateToString(getDate()));
        data.put("recipeClient", client.toString());
        int age = DateTimeUtils.calcAge(client.getBorn(), TimeLocal.getCurrentTime().getTime());
        data.put("clientAge", age != Integer.MIN_VALUE ? Integer.toString(age) : "Не определен");
        data.put("clientAddress", client.getAddress().toStringShort());
        data.put("clientEMC", client.getEMC().getID());
        data.put("recipeCollab", collab.getTitle());
        data.put("recipeVidal", itemData.getVidal().toString());
        data.put("recipeTake", itemData.getTakeDrug().toString());
        creater.createReport(null, null, data.entrySet(), null);
        creater.finish();
    }
View Full Code Here

        return model;
    }
 
    @Override
    public void print(CombinedReportCreator cCreator) throws ClipsException {
        FormReportCreator creater = cCreator.createFormReporter(getClass(), 2);
        DirectoryCollaboratorItem collab = getSerrenLocal().getSerRenDirector();
       
        HashMap<String, Object> data = new HashMap<String, Object>();
        data.put("client", getSerrenLocal().getPolisData().getClient(getAuditListener()).toString());
        data.put("date", Converter.dateToString(getDate()));
        data.put("collab", collab.toString());
        creater.createReport(null, null, data.entrySet(), getItemsTableModel());
        creater.finish();
    }
View Full Code Here

        return ContraindicationBean.class.getSimpleName();
    }
   
    @Override
    public void print(CombinedReportCreator cCreator) throws ClipsException {
        FormReportCreator creater = cCreator.createFormReporter(getClass(), 1);
        TableReportOptions ops = new TableReportOptions();
        ops.topMargin = 0;
        ops.bottomMargin = 0;
        HashMap<String, Object> data = new LinkedHashMap<String, Object>();
        String title = "Данные непереносимости действующих веществ";
        data.put("client", "Пациент: " + getSerrenLocal().getPolisData().getClient(getAuditListener()).toString());
        data.put("date", "Дата выписки: " + Converter.dateToString(getDate()));
        data.put("contraindication", "Непереносимость действующего вещества: " + getMatter().getTitle());
        creater.createReport(title, ops, data.entrySet(), null);
        creater.finish();
    }
View Full Code Here

    @Override
    public void print(CombinedReportCreator cCreator) throws ClipsException {
        String value = getAllValue();       
        DirectoryCollaboratorItem serDirector = getSerrenLocal().getSerRenDirector();
       
        FormReportCreator creater = cCreator.createFormReporter(getClass(), 1);
       
        HashMap<String, Object> data = new HashMap<String, Object>();
        data.put("recDate", Converter.dateToString(getDate()));
        data.put("recClient", getSerrenLocal().getPolisData().getClient(getAuditListener()).toString());
        data.put("recValue", value);
        data.put("recCollab", " " + serDirector.getTitle());
       
        creater.createReport(null, null, data.entrySet(), null);
        creater.finish();
    }
View Full Code Here

        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

        fireContentStateEvent();
    }

    @Override
    public void print(CombinedReportCreator cCreator) throws ClipsException {
        FormReportCreator creater = cCreator.createFormReporter(getClass(), 2);
       
        ClientLocal client = getClient();

        HashMap<String, Object> data = new HashMap<String, Object>();
        data.put("client", client.toString());
        data.put("clientSex", client.getSex().toString());
        data.put("clientBD", Converter.dateToString(client.getBorn()));
        data.put("clientAddress", client.getAddress().toString());

        DirectoryEnterpriseItem ent = getEnterprise();

        data.put("clientJob", ent == null ? "" : ent.getTitle());
       
        data.put("diagnosis", getDiagnosisClose().getMkb().getTitle());
        data.put("diseaseCode", getDiagnosisClose().getMkb().getDiseaseCode());
        Date dateFrom = getDateOpen().getTime();
        Date dateTill = getDateToWork().getTime();
       
       
        long dur = DateTimeUtils.daysBetween(dateFrom, dateTill);
        data.put("duration", String.valueOf(dur));
        data.put("date", Converter.dateToString(TimeLocal.getCurrentTime().getTime()));
        data.put("collab", UserInfo.get().getCollaboratorLocal().toString());

        creater.createReport(null, null, data.entrySet(), null);
        creater.finish();
    }
View Full Code Here

    reportOptions.leftMargin = ClipsConfig.getInstance().getSicklistLeftMarign();
    reportOptions.fixRightMarign(SICK_LIST_SUBREPORT_PAGE_WIGHT);
    reportOptions.topMargin = ClipsConfig.getInstance().getSicklistTopMarign();
    reportOptions.bottomMargin = 0;
    combined.setUpReport(null, reportOptions, null);
        FormReportCreator      creator = combined.createFormReporter(getClass(), 3);

        GregorianCalendar dateFrom = getDateOpen();

        ClientLocal client = getClient();

        HashMap<String, Object> data = new HashMap<String, Object>();
        data.put("client", client.toString());
        data.put("client_is_male", client.getSex().isMale());
    if (client.getBorn() != null){
      data.put("client_age", DateTimeUtils.calcAge(client.getBorn(), dateFrom.getTime()));
    }
    else{
      data.put("client_age", null);
    }
    data.put("emc_code", client.getNumberEmc());
   
    if (getProlongationCount() > 0){
      Address      adr = getSerRen(0).getPolisData().getAddress();
      if (adr == null){
        adr = client.getAddress();
      }
      data.put("client_address", adr == null? null: adr.toStringShort());
    }
    if (getOpener() == null){
      data.put("collaborator", getAltOpener());
    }
    else{
      ClientLocal      clolClient = new ClientLocal(getOpener().getDetails().getClient(), null);
      data.put("collaborator", clolClient.getSurname().getTitle());
    }

        DirectoryEnterpriseItem ent = getEnterprise();

        data.put("clientJob", ent == null ? getOtherDirection() : ent.getTitle());

    data.put("prev_sick_list_id", getPreviousSicklist() == null? null: getPreviousSicklist().getSerial());
    data.put("day_month_open", dateFrom.get(GregorianCalendar.DAY_OF_MONTH) + " " + DateTimeUtils.monthToString(dateFrom.get(GregorianCalendar.MONTH)));
    String      yearOp = "" + dateFrom.get(GregorianCalendar.YEAR);
    data.put("year_open", yearOp.substring(yearOp.length() - 2));
    data.put("date_open", dateFrom.getTime());
        data.put("dis_type", getDisability().getID());
    data.put("date_close", getDateToWork() == null? null: getDateToWork().getTime());
    if (getProlongationCount() > 0){
      GregorianCalendar dateTill = getTill(0);
      data.put("date_till_1", dateTill == null? null: dateTill.getTime());
    }
    else{
      data.put("date_till_1", null);
    }
    if (getProlongationCount() > 1){
      GregorianCalendar dateTill = getTill(1);
      data.put("date_till_2", dateTill == null? null: dateTill.getTime());
    }
    else{
      data.put("date_till_2", null);
    }
    if (getProlongationCount() > 2){
      GregorianCalendar dateTill = getTill(2);
      data.put("date_till_3", dateTill == null? null: dateTill.getTime());
    }
    else{
      data.put("date_till_3", null);
    }
    if (getProlongationCount() > 3){
      GregorianCalendar dateTill = getTill(3);
      data.put("date_till_4", dateTill == null? null: dateTill.getTime());
    }
    else{
      data.put("date_till_4", null);
    }

        creator.createReport(null, null, data.entrySet(), null);
        creator.finish();
    combined.finish();
  }
View Full Code Here

        }
    }

    @Override
    public void print(CombinedReportCreator cCreator) throws ClipsException {
        FormReportCreator creater = cCreator.createFormReporter(getClass(), 1);
        ClientLocal cl = getClient();
        HashMap<String, Object> data = cl.getPrintFields();

        Address address = cl.getAddress();
        if (address != null) {
            data.put("pacient_address", address.toStringShort());
        }
        data.put("collab_fio", getCollaboratorUp().getTitle());
        data.put("collab_appointment", getCollabUpDrv());
        data.put("followup_date", Converter.dateToString(getDateUp()));
        data.put("followdown_date", Converter.dateToString(getDateDown()));
        if (isDown()) {
            data.put("followdown_reason", getReasonDown().getTitle());
        }

        SelectorEditable<FollowupEventData> fevents = getFollowupEventList();
        int size = fevents.size();
        Date events[] = new Date[size];
        Date eventsReal[] = new Date[size];
        for (int i = 0; i < size; i++) {
            events[i] = fevents.get(i).getDate();
            if (fevents.get(i).getDisease() != null) {
                eventsReal[i] = fevents.get(i).getDisease().getCreated();
            }
            else {
                eventsReal[i] = null;
            }
        }
        data.put("event_dates", events);
        data.put("event_dates_real", eventsReal);

        DiagnosisLocal diag = getDiagnosis();
        DirectoryMKB10Item mkbItem = diag.getMkb();
        data.put("disease_title", mkbItem.getTitle());
        data.put("disease_code", mkbItem.getDiseaseCode());

        String accomp = "";
        for (int i = 0; i < diag.getAccompDiagnosis().size(); i++) {
            accomp += diag.getAccompDiagnosis().get(i).getMkb().getDiseaseCode() + "  ";
        }
        data.put("disease_associated", accomp);

        String extraData = "";
        for (DiagnosisLocal diagIn : getDiagnosisIn()) {
            extraData += "(" + Converter.dateToString(diagIn.getDate()) + ") ";
            extraData += diagIn.getMkb().getDiseaseCode();
            if (diagIn.getComplication() != null && diagIn.getComplication().getID() != 0) {
                extraData += "; осложнение: " + diagIn.getComplication().getDiseaseCode();
            }
            ArrayList<DiagnosisLocal> accDiags = (ArrayList<DiagnosisLocal>) diagIn.getAccompDiagnosis();
            if (accDiags != null && !accDiags.isEmpty()) {
                extraData += "; сопутствующие: ";
                for (DiagnosisLocal accDiag : accDiags) {
                    extraData += accDiag.getMkb().getDiseaseCode() + " ";
                }
            }
            extraData += "\n";
        }
        data.put("extra_data", extraData);

        creater.createReport(data, null);
        creater.finish();
    }
View Full Code Here

TOP

Related Classes of cli_fmw.report.FormReportCreator

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.