Java 类ims.admin.vo.ReportTemplateVo 实例源码

项目:AvoinApotti    文件:Logic.java   
protected void loadCategoriesForTemplate(ReportTemplateVo voReportTemplate)
{
    // load Categories based on tempalte
    form.ctnHeader().grdCategories().getRows().clear();
    GenForm.ctnHeaderContainer.grdCategoriesRow catRow;
    TemplateCategoryVo voTemplateCategory = domain.listTemplateDischargeCategories(voReportTemplate);

    if (voTemplateCategory != null && voTemplateCategory.getDischargeCategoriesIsNotNull())
    {
        for (int i = 0; i < voTemplateCategory.getDischargeCategories().size(); i++)
        {
            if (voTemplateCategory.getDischargeCategories().get(i) != null)
            {
                catRow = form.ctnHeader().grdCategories().getRows().newRow();
                // store discharge category type id
                catRow.setTemplateCategoryId(new Integer(voTemplateCategory.getDischargeCategories().get(i).getId()));
                // discharge category
                catRow.setCategory(voTemplateCategory.getDischargeCategories().get(i));
            }

        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void templateSelectOK()
{
    // Get the selected template
    ReportTemplateVo voReportTemplate = new ReportTemplateVo();
    if (form.getGlobalContext().Correspondence.getReportTemplateIsNotNull())
        voReportTemplate = form.getGlobalContext().Correspondence.getReportTemplate();
    else
    {
        engine.showMessage("Template not selected, cannot continue with discharge letter creation.");
        form.setMode(FormMode.VIEW);
        updateControlStateForError();
        return;
    }

    if (form.getLocalContext().getcorrespondenceDetailsIsNotNull())
    {
        // attach the template used for this document.
        CorrespondenceDetailsVo voCorrespondenceDetails = form.getLocalContext().getcorrespondenceDetails();
        voCorrespondenceDetails.getCurrentDocument().setTemplate(voReportTemplate);
        form.getLocalContext().setcorrespondenceDetails(voCorrespondenceDetails);

        setContextVariables(voCorrespondenceDetails);
        populateScreenFromData(voCorrespondenceDetails);
        form.setMode(FormMode.EDIT);
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void loadCategoriesForTemplate(ReportTemplateVo voReportTemplate)
{
    // load Categories based on template
    form.lyrCorrespondenceDetail().tabCorrespondence().grdCategories().getRows().clear();
    GenForm.lyrCorrespondenceDetailLayer.tabCorrespondenceContainer.grdCategoriesRow catRow;
    TemplateCategoryVo voTemplateCategory = domain.listTemplateDischargeCategories(voReportTemplate);

    if (voTemplateCategory != null && voTemplateCategory.getDischargeCategoriesIsNotNull())
    {
        for (int i = 0; i < voTemplateCategory.getDischargeCategories().size(); i++)
        {
            if (voTemplateCategory.getDischargeCategories().get(i) != null)
            {
                catRow = form.lyrCorrespondenceDetail().tabCorrespondence().grdCategories().getRows().newRow();
                // store discharge category type id
                catRow.setTemplateCategoryId(new Integer(voTemplateCategory.getDischargeCategories().get(i).getId()));
                // discharge category
                catRow.setCategory(voTemplateCategory.getDischargeCategories().get(i));
            }

        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateRowTemplate(DynamicGridRow parentRow, ReportTemplateVo reportTemplate) 
{
    TemplateCategoryVo tempCat = domain.getTemplateCategory(reportTemplate);

    if(tempCat == null)
        return;

    parentRow.setValue(tempCat);
    parentRow.getRows().clear();
    for(int i=0; i<tempCat.getDischargeCategories().size(); i++)
    {
        DynamicGridRow row = parentRow.getRows().newRow();
        row.setValue(tempCat.getDischargeCategories().get(i));
        updateRowTemplateCategory(row,tempCat.getDischargeCategories().get(i));
    }
}
项目:AvoinApotti    文件:Logic.java   
private void editSpecialtyAssociations() 
{
    if (form.grdTemplate().getValue() != null )
    {
        displayAllSpecialties();

        ReportTemplateVo voTemplate = (ReportTemplateVo) form.grdTemplate().getValue();                                                                 
        form.getLocalContext().setSelectedTemplate(voTemplate);         
        TemplateAssociationsVo voTemplateAssociations = domain.getAssociationsForTemplate(voTemplate);                              
        if (voTemplateAssociations == null) return;

        if (voTemplateAssociations.getSpecialtiesIsNotNull())
            overlayExistingSpecialties(voTemplateAssociations.getSpecialties());            
    }       


}
项目:AvoinApotti    文件:Logic.java   
protected void onBtnBuildClick() throws ims.framework.exceptions.PresentationLogicException
{
    TreeNode node = form.treTemplate().getSelectedNode();

    if (node == null || node.getParent() == null)
    {
        engine.showMessage("Please select at template !");
        return;
    }

    form.getGlobalContext().Core.setCurrentFormName(engine.getPreviousNonDialogFormName());

    form.getGlobalContext().Core.setReportID(((ReportVo) node.getParent().getValue()).getID_ReportBo());
    form.getGlobalContext().Core.setTemplateID(((ReportTemplateVo) node.getValue()).getID_TemplateBo());

    if (form.getGlobalContext().Core.getAutoOpenViewReportIsNotNull() && form.getGlobalContext().Core.getAutoOpenViewReport().equals(Boolean.TRUE))
        engine.open(form.getForms().Core.ViewReport);

    engine.close(DialogResult.OK);
}
项目:AvoinApotti    文件:Logic.java   
private void previewReport()
{
    getSelectedReport();

    ReportTemplateVo voReportTemplate = form.getLocalContext().getReportTemplateVo();
    if (voReportTemplate != null)
    {
        if (form.getGlobalContext().Admin.getReportSeedParsed() == null)
        {
            try
            {
                parseSeedsFromXML(voReportTemplate.getReport().getReportXml());
            }
            catch (DocumentException e)
            {
                engine.showMessage("Error deserializing Seeds: " + e.toString());
            }
        }

        engine.open(form.getForms().Core.ReportRunnerDialog);
    }
}
项目:AvoinApotti    文件:WebServicesIntegrationImpl.java   
private ReportTemplateVo getTemplateByName(String templateName)
{
    StringBuffer hql = new StringBuffer();

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<String> values = new ArrayList<String>();

    hql.append("from TemplateBo as template where UPPER(template.name) like UPPER(:templateName)");
    markers.add("templateName");
    values.add(templateName);

    DomainFactory factory = getDomainFactory();
    List list = factory.find(hql.toString(), markers, values);
    ReportTemplateVoCollection result = ReportTemplateVoAssembler.createReportTemplateVoCollectionFromTemplateBo(list);

    return result != null ? result.get(0) : null;       
}
项目:openMAXIMS    文件:Logic.java   
private void templateSelectOK()
{
    // Get the selected template
    ReportTemplateVo voReportTemplate = new ReportTemplateVo();
    if (form.getGlobalContext().Correspondence.getReportTemplateIsNotNull())
        voReportTemplate = form.getGlobalContext().Correspondence.getReportTemplate();
    else
    {
        engine.showMessage("Template not selected, cannot continue with discharge letter creation.");
        form.setMode(FormMode.VIEW);
        updateControlStateForError();
        return;
    }

    if (form.getLocalContext().getcorrespondenceDetailsIsNotNull())
    {
        // attach the template used for this document.
        CorrespondenceDetailsVo voCorrespondenceDetails = form.getLocalContext().getcorrespondenceDetails();
        voCorrespondenceDetails.getCurrentDocument().setTemplate(voReportTemplate);
        form.getLocalContext().setcorrespondenceDetails(voCorrespondenceDetails);

        setContextVariables(voCorrespondenceDetails);
        populateScreenFromData(voCorrespondenceDetails);
        form.setMode(FormMode.EDIT);
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void loadCategoriesForTemplate(ReportTemplateVo voReportTemplate)
{
    // load Categories based on template
    form.lyrCorrespondenceDetail().tabCorrespondence().grdCategories().getRows().clear();
    GenForm.lyrCorrespondenceDetailLayer.tabCorrespondenceContainer.grdCategoriesRow catRow;
    TemplateCategoryVo voTemplateCategory = domain.listTemplateDischargeCategories(voReportTemplate);

    if (voTemplateCategory != null && voTemplateCategory.getDischargeCategoriesIsNotNull())
    {
        for (int i = 0; i < voTemplateCategory.getDischargeCategories().size(); i++)
        {
            if (voTemplateCategory.getDischargeCategories().get(i) != null)
            {
                catRow = form.lyrCorrespondenceDetail().tabCorrespondence().grdCategories().getRows().newRow();
                // store discharge category type id
                catRow.setTemplateCategoryId(new Integer(voTemplateCategory.getDischargeCategories().get(i).getId()));
                // discharge category
                catRow.setCategory(voTemplateCategory.getDischargeCategories().get(i));
            }

        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateRowTemplate(DynamicGridRow parentRow, ReportTemplateVo reportTemplate) 
{
    TemplateCategoryVo tempCat = domain.getTemplateCategory(reportTemplate);

    if(tempCat == null)
        return;

    parentRow.setValue(tempCat);
    parentRow.getRows().clear();
    for(int i=0; i<tempCat.getDischargeCategories().size(); i++)
    {
        DynamicGridRow row = parentRow.getRows().newRow();
        row.setValue(tempCat.getDischargeCategories().get(i));
        updateRowTemplateCategory(row,tempCat.getDischargeCategories().get(i));
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void previewReport()
{
    getSelectedReport();

    ReportTemplateVo voReportTemplate = form.getLocalContext().getReportTemplateVo();
    if (voReportTemplate != null)
    {
        if (form.getGlobalContext().Admin.getReportSeedParsed() == null)
        {
            try
            {
                parseSeedsFromXML(voReportTemplate.getReport().getReportXml());
            }
            catch (DocumentException e)
            {
                engine.showMessage("Error deserializing Seeds: " + e.toString());
            }
        }

        engine.open(form.getForms().Core.ReportRunnerDialog);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void previewReport()
{
    getSelectedReport();

    ReportTemplateVo voReportTemplate = form.getLocalContext().getReportTemplateVo();
    if (voReportTemplate != null)
    {
        if (form.getGlobalContext().Admin.getReportSeedParsed() == null)
        {
            try
            {
                parseSeedsFromXML(voReportTemplate.getReport().getReportXml());
            }
            catch (DocumentException e)
            {
                engine.showMessage("Error deserializing Seeds: " + e.toString());
            }
        }

        engine.open(form.getForms().Core.ReportRunnerDialog);
    }
}
项目:openmaxims-linux    文件:Logic.java   
protected void onBtnBuildClick() throws ims.framework.exceptions.PresentationLogicException
{
    TreeNode node = form.treTemplate().getSelectedNode();

    if (node == null || node.getParent() == null)
    {
        engine.showMessage("Please select at template !");
        return;
    }

    form.getGlobalContext().Core.setCurrentFormName(engine.getPreviousNonDialogFormName());

    form.getGlobalContext().Core.setReportID(((ReportVo) node.getParent().getValue()).getID_ReportBo());
    form.getGlobalContext().Core.setTemplateID(((ReportTemplateVo) node.getValue()).getID_TemplateBo());

    if (form.getGlobalContext().Core.getAutoOpenViewReportIsNotNull() && form.getGlobalContext().Core.getAutoOpenViewReport().equals(Boolean.TRUE))
        engine.open(form.getForms().Core.ViewReport);

    engine.close(DialogResult.OK);
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    String pdate1 = null;
    String pdate2 = null;
    if(ob1 instanceof ReportTemplateVo )
    {
        ReportTemplateVo ps1 = (ReportTemplateVo)ob1;
        pdate1 = ps1.getName().toUpperCase();
    }
    if(ob2 instanceof ReportTemplateVo)
    {
        ReportTemplateVo ps2 = (ReportTemplateVo)ob2;
        pdate2 = ps2.getName().toUpperCase();
    }
    if(pdate1 != null )
        return  pdate1.compareTo(pdate2)*direction;
    if(pdate2 != null)
        return (-1)*direction;

    return 0;
}
项目:openMAXIMS    文件:WebServicesIntegrationImpl.java   
private ReportTemplateVo getTemplateByName(String templateName)
{
    StringBuffer hql = new StringBuffer();

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<String> values = new ArrayList<String>();

    hql.append("from TemplateBo as template where UPPER(template.name) like UPPER(:templateName)");
    markers.add("templateName");
    values.add(templateName);

    DomainFactory factory = getDomainFactory();
    List list = factory.find(hql.toString(), markers, values);
    ReportTemplateVoCollection result = ReportTemplateVoAssembler.createReportTemplateVoCollectionFromTemplateBo(list);

    return result != null ? result.get(0) : null;       
}
项目:openMAXIMS    文件:Logic.java   
protected void loadCategoriesForTemplate(ReportTemplateVo voReportTemplate)
{
    // load Categories based on tempalte
    form.ctnHeader().grdCategories().getRows().clear();
    GenForm.ctnHeaderContainer.grdCategoriesRow catRow;
    TemplateCategoryVo voTemplateCategory = domain.listTemplateDischargeCategories(voReportTemplate);

    if (voTemplateCategory != null && voTemplateCategory.getDischargeCategoriesIsNotNull())
    {
        for (int i = 0; i < voTemplateCategory.getDischargeCategories().size(); i++)
        {
            if (voTemplateCategory.getDischargeCategories().get(i) != null)
            {
                catRow = form.ctnHeader().grdCategories().getRows().newRow();
                // store discharge category type id
                catRow.setTemplateCategoryId(new Integer(voTemplateCategory.getDischargeCategories().get(i).getId()));
                // discharge category
                catRow.setCategory(voTemplateCategory.getDischargeCategories().get(i));
            }

        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void templateSelectOK()
{
    // Get the selected template
    ReportTemplateVo voReportTemplate = new ReportTemplateVo();
    if (form.getGlobalContext().Correspondence.getReportTemplateIsNotNull())
        voReportTemplate = form.getGlobalContext().Correspondence.getReportTemplate();
    else
    {
        engine.showMessage("Template not selected, cannot continue with discharge letter creation.");
        form.setMode(FormMode.VIEW);
        updateControlStateForError();
        return;
    }

    if (form.getLocalContext().getcorrespondenceDetailsIsNotNull())
    {
        // attach the template used for this document.
        CorrespondenceDetailsVo voCorrespondenceDetails = form.getLocalContext().getcorrespondenceDetails();
        voCorrespondenceDetails.getCurrentDocument().setTemplate(voReportTemplate);
        form.getLocalContext().setcorrespondenceDetails(voCorrespondenceDetails);

        setContextVariables(voCorrespondenceDetails);
        populateScreenFromData(voCorrespondenceDetails);
        form.setMode(FormMode.EDIT);
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void loadCategoriesForTemplate(ReportTemplateVo voReportTemplate)
{
    // load Categories based on template
    form.lyrCorrespondenceDetail().tabCorrespondence().grdCategories().getRows().clear();
    GenForm.lyrCorrespondenceDetailLayer.tabCorrespondenceContainer.grdCategoriesRow catRow;
    TemplateCategoryVo voTemplateCategory = domain.listTemplateDischargeCategories(voReportTemplate);

    if (voTemplateCategory != null && voTemplateCategory.getDischargeCategoriesIsNotNull())
    {
        for (int i = 0; i < voTemplateCategory.getDischargeCategories().size(); i++)
        {
            if (voTemplateCategory.getDischargeCategories().get(i) != null)
            {
                catRow = form.lyrCorrespondenceDetail().tabCorrespondence().grdCategories().getRows().newRow();
                // store discharge category type id
                catRow.setTemplateCategoryId(new Integer(voTemplateCategory.getDischargeCategories().get(i).getId()));
                // discharge category
                catRow.setCategory(voTemplateCategory.getDischargeCategories().get(i));
            }

        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateRowTemplate(DynamicGridRow parentRow, ReportTemplateVo reportTemplate) 
{
    TemplateCategoryVo tempCat = domain.getTemplateCategory(reportTemplate);

    if(tempCat == null)
        return;

    parentRow.setValue(tempCat);
    parentRow.getRows().clear();
    for(int i=0; i<tempCat.getDischargeCategories().size(); i++)
    {
        DynamicGridRow row = parentRow.getRows().newRow();
        row.setValue(tempCat.getDischargeCategories().get(i));
        updateRowTemplateCategory(row,tempCat.getDischargeCategories().get(i));
    }
}
项目:openMAXIMS    文件:Logic.java   
private void editSpecialtyAssociations() 
{
    if (form.grdTemplate().getValue() != null )
    {
        displayAllSpecialties();

        ReportTemplateVo voTemplate = (ReportTemplateVo) form.grdTemplate().getValue();                                                                 
        form.getLocalContext().setSelectedTemplate(voTemplate);         
        TemplateAssociationsVo voTemplateAssociations = domain.getAssociationsForTemplate(voTemplate);                              
        if (voTemplateAssociations == null) return;

        if (voTemplateAssociations.getSpecialtiesIsNotNull())
            overlayExistingSpecialties(voTemplateAssociations.getSpecialties());            
    }       


}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnBuildClick() throws ims.framework.exceptions.PresentationLogicException
{
    TreeNode node = form.treTemplate().getSelectedNode();

    if (node == null || node.getParent() == null)
    {
        engine.showMessage("Please select at template !");
        return;
    }

    form.getGlobalContext().Core.setCurrentFormName(engine.getPreviousNonDialogFormName());

    form.getGlobalContext().Core.setReportID(((ReportVo) node.getParent().getValue()).getID_ReportBo());
    form.getGlobalContext().Core.setTemplateID(((ReportTemplateVo) node.getValue()).getID_TemplateBo());

    if (form.getGlobalContext().Core.getAutoOpenViewReportIsNotNull() && form.getGlobalContext().Core.getAutoOpenViewReport().equals(Boolean.TRUE))
        engine.open(form.getForms().Core.ViewReport);

    engine.close(DialogResult.OK);
}
项目:openMAXIMS    文件:Logic.java   
private void previewReport()
{
    getSelectedReport();

    ReportTemplateVo voReportTemplate = form.getLocalContext().getReportTemplateVo();
    if (voReportTemplate != null)
    {
        if (form.getGlobalContext().Admin.getReportSeedParsed() == null)
        {
            try
            {
                parseSeedsFromXML(voReportTemplate.getReport().getReportXml());
            }
            catch (DocumentException e)
            {
                engine.showMessage("Error deserializing Seeds: " + e.toString());
            }
        }

        engine.open(form.getForms().Core.ReportRunnerDialog);
    }
}
项目:openmaxims-linux    文件:Logic.java   
protected void loadCategoriesForTemplate(ReportTemplateVo voReportTemplate)
{
    // load Categories based on tempalte
    form.ctnHeader().grdCategories().getRows().clear();
    GenForm.ctnHeaderContainer.grdCategoriesRow catRow;
    TemplateCategoryVo voTemplateCategory = domain.listTemplateDischargeCategories(voReportTemplate);

    if (voTemplateCategory != null && voTemplateCategory.getDischargeCategoriesIsNotNull())
    {
        for (int i = 0; i < voTemplateCategory.getDischargeCategories().size(); i++)
        {
            if (voTemplateCategory.getDischargeCategories().get(i) != null)
            {
                catRow = form.ctnHeader().grdCategories().getRows().newRow();
                // store discharge category type id
                catRow.setTemplateCategoryId(new Integer(voTemplateCategory.getDischargeCategories().get(i).getId()));
                // discharge category
                catRow.setCategory(voTemplateCategory.getDischargeCategories().get(i));
            }

        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void templateSelectOK()
{
    // Get the selected template
    ReportTemplateVo voReportTemplate = new ReportTemplateVo();
    if (form.getGlobalContext().Correspondence.getReportTemplateIsNotNull())
        voReportTemplate = form.getGlobalContext().Correspondence.getReportTemplate();
    else
    {
        engine.showMessage("Template not selected, cannot continue with discharge letter creation.");
        form.setMode(FormMode.VIEW);
        updateControlStateForError();
        return;
    }

    if (form.getLocalContext().getcorrespondenceDetailsIsNotNull())
    {
        // attach the template used for this document.
        CorrespondenceDetailsVo voCorrespondenceDetails = form.getLocalContext().getcorrespondenceDetails();
        voCorrespondenceDetails.getCurrentDocument().setTemplate(voReportTemplate);
        form.getLocalContext().setcorrespondenceDetails(voCorrespondenceDetails);

        setContextVariables(voCorrespondenceDetails);
        populateScreenFromData(voCorrespondenceDetails);
        form.setMode(FormMode.EDIT);
    }
}
项目:openmaxims-linux    文件:Logic.java   
protected void loadCategoriesForTemplate(ReportTemplateVo voReportTemplate)
{
    // load Categories based on template
    form.lyrCorrespondenceDetail().tabCorrespondence().grdCategories().getRows().clear();
    GenForm.lyrCorrespondenceDetailLayer.tabCorrespondenceContainer.grdCategoriesRow catRow;
    TemplateCategoryVo voTemplateCategory = domain.listTemplateDischargeCategories(voReportTemplate);

    if (voTemplateCategory != null && voTemplateCategory.getDischargeCategoriesIsNotNull())
    {
        for (int i = 0; i < voTemplateCategory.getDischargeCategories().size(); i++)
        {
            if (voTemplateCategory.getDischargeCategories().get(i) != null)
            {
                catRow = form.lyrCorrespondenceDetail().tabCorrespondence().grdCategories().getRows().newRow();
                // store discharge category type id
                catRow.setTemplateCategoryId(new Integer(voTemplateCategory.getDischargeCategories().get(i).getId()));
                // discharge category
                catRow.setCategory(voTemplateCategory.getDischargeCategories().get(i));
            }

        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void templateSelectOK()
{
    // Get the selected template
    ReportTemplateVo voReportTemplate = new ReportTemplateVo();
    if (form.getGlobalContext().Correspondence.getReportTemplateIsNotNull())
        voReportTemplate = form.getGlobalContext().Correspondence.getReportTemplate();
    else
    {
        engine.showMessage("Template not selected, cannot continue with discharge letter creation.");
        form.setMode(FormMode.VIEW);
        updateControlStateForError();
        return;
    }

    if (form.getLocalContext().getcorrespondenceDetailsIsNotNull())
    {
        // attach the template used for this document.
        CorrespondenceDetailsVo voCorrespondenceDetails = form.getLocalContext().getcorrespondenceDetails();
        voCorrespondenceDetails.getCurrentDocument().setTemplate(voReportTemplate);
        form.getLocalContext().setcorrespondenceDetails(voCorrespondenceDetails);

        setContextVariables(voCorrespondenceDetails);
        populateScreenFromData(voCorrespondenceDetails);
        form.setMode(FormMode.EDIT);

    }
}
项目:AvoinApotti    文件:Logic.java   
/**
 * LIP: populateInstanceControl
 * 
 */ 
private void populateInstanceControl(ReportTemplateVo voTemplate) 
{
    clearInstanceControls();
    updateControlsState();

    TemplateCategoryVo voTemplCategory = domain.getTemplateCategories(voTemplate);
    form.getLocalContext().setSelTemplateCategoryVo(voTemplCategory);
    if (voTemplCategory != null && voTemplCategory.getDischargeCategoriesIsNotNull())
    {
        GenForm.grdHeadersRow nRow;
        for (int i=0; i<voTemplCategory.getDischargeCategories().size(); i++)
        {
            nRow = form.grdHeaders().getRowByValue(voTemplCategory.getDischargeCategories().get(i));
            if (nRow != null)
                nRow.setcolLinked(true);
            else
            {
                nRow = form.grdHeaders().getRows().newRow();
                nRow.setValue(voTemplCategory.getDischargeCategories().get(i));
                nRow.setcolHeader(voTemplCategory.getDischargeCategories().get(i).getText());
                nRow.setcolLinked(true);
            }
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
private void updateRowTemplate(DynamicGridRow row, ReportTemplateVo reportTemplate) 
{
    DynamicGridColumn column = null;
    DynamicGridCell cell = null;

    column = form.dyngrdHeaders().getColumns().getByIdentifier(COL_HEADING);
    cell = row.getCells().newCell(column, DynamicCellType.STRING);
    cell.setValue(reportTemplate.getName());
    cell.setReadOnly(true);

    populateRowTemplate(row, reportTemplate);
}
项目:AvoinApotti    文件:Logic.java   
public void addTemplateCategory(DynamicGridRow parentRow)
{
    if(parentRow.getValue() instanceof TemplateCategoryVo || parentRow.getValue() instanceof ReportTemplateVo)
    {
        DynamicGridRow childRow = parentRow.getRows().newRow(true);
        DynamicGridColumn column = null;
        DynamicGridCell cell = null;

        column = form.dyngrdHeaders().getColumns().getByIdentifier(COL_HEADING);
        cell = childRow.getCells().newCell(column, DynamicCellType.QUERYCOMBOBOX);
        cell.setTooltip("");
        cell.setAutoPostBack(true);
        parentRow.setExpanded(true);
    }
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onDyngrdHeadersCellTextSubmited(DynamicGridCell cell) 
{
    if(cell.getRow() != null && cell.getRow().getParent() != null && (cell.getRow().getParent().getValue() instanceof TemplateCategoryVo || cell.getRow().getParent().getValue() instanceof ReportTemplateVo))
    {
        if (cell.getTypedText() == null || cell.getTypedText().length() < 3)
        {
            engine.showMessage("Please enter at least 3 characters for search criteria");
            return;
        }
        populateQueryComboBox(cell, ims.correspondence.vo.lookups.LookupHelper.getHeader(domain.getLookupService()));
    }
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onDyngrdHeadersCellValueChanged(DynamicGridCell cell) 
{
    if(cell.getRow() != null && cell.getRow().getParent() != null && (cell.getRow().getParent().getValue() instanceof TemplateCategoryVo || cell.getRow().getParent().getValue() instanceof ReportTemplateVo))
    {
        cell.getRow().setValue(cell.getValue());
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
    if(form.grdTemplate().getSelectedRowIndex()>-1)
    {
        ReportTemplateVo voRepTemplate = new ReportTemplateVo();
        voRepTemplate = form.grdTemplate().getRows().get(form.grdTemplate().getSelectedRowIndex()).getValue(); 
        form.getGlobalContext().Correspondence.setReportTemplate(voRepTemplate);
        engine.close(DialogResult.OK);
    }

}
项目:AvoinApotti    文件:Logic.java   
private void editConsultantAssociations() 
{
    if (form.grdTemplate().getValue() != null )
    {
        displayAllConsultants();

        ReportTemplateVo voTemplate = (ReportTemplateVo) form.grdTemplate().getValue();                                                                 
        form.getLocalContext().setSelectedTemplate(voTemplate);         
        TemplateAssociationsVo voTemplateAssociations = domain.getAssociationsForTemplate(voTemplate);                              
        if (voTemplateAssociations == null) return;

        if (voTemplateAssociations.getConsultantsIsNotNull())
            overlayExistingConsultants(voTemplateAssociations.getConsultants() );           
    }       
}
项目:AvoinApotti    文件:Logic.java   
private void editClinicAssociations() 
{
    if (form.grdTemplate().getValue() != null )
    {
        displayAllClinics();

        ReportTemplateVo voTemplate = (ReportTemplateVo) form.grdTemplate().getValue();                                                                 
        form.getLocalContext().setSelectedTemplate(voTemplate);         
        TemplateAssociationsVo voTemplateAssociations = domain.getAssociationsForTemplate(voTemplate);                              
        if (voTemplateAssociations == null) return;

        if (voTemplateAssociations.getClinicsIsNotNull())
            overlayExistingClinics(voTemplateAssociations.getClinics() );           
    }
}
项目:AvoinApotti    文件:Logic.java   
private String createReport(TemplateForPatientDocumentVo repTemplate, PatientDocumentVo doc) 
{
    if(repTemplate == null)
        return null;

    String urlQueryServer = ConfigFlag.GEN.QUERY_SERVER_URL.getValue();
    String urlReportServer = ConfigFlag.GEN.REPORT_SERVER_URL.getValue();

    ReportTemplateVo template = domain.getTemplate(repTemplate);

    QueryBuilderClient client = new QueryBuilderClient(urlQueryServer, engine.getSessionId());
    ReportSeedParsedVoCollection seeds = getSeedsFromReport(template.getReport().getReportXml());

    addSeedsForTemplate(client, seeds, doc);

    if(!addValueForNonMandatorySeeds(client, seeds))//  WDEV-14299
        return null;

    String [] errors = checkForSeeds(seeds, client);

    if(errors != null && errors.length > 0)
    {
        engine.showErrors(errors);
        return null;
    }

    String fileName;
    try
    {
        fileName = client.buildReportAndUpload(getWorkAreaPath(), template.getReport().getReportXml(), template.getTemplateXml(), urlReportServer, QueryBuilderClient.RTF, "", 1, false); //WDEV-13366
    }
    catch (QueryBuilderClientException e1)
    {
        engine.showMessage("Error creating report: " + e1.getMessage());
        return null;
    }

    return fileName;
}
项目:AvoinApotti    文件:Logic.java   
private String createReport(PatientShort patient, CareContextMinVo carecontext,PatientDocumentVo doc, PatientDocumentErrorVoCollection errors)
{
    String urlQueryServer = ConfigFlag.GEN.QUERY_SERVER_URL.getValue();
    String urlReportServer = ConfigFlag.GEN.REPORT_SERVER_URL.getValue();

    ReportTemplateVo template = domain.getTemplate((TemplateForPatientDocumentVo) form.lyrLetterCreate().tabTemplate().dyngrdReports().getValue());

    QueryBuilderClient client = new QueryBuilderClient(urlQueryServer, engine.getSessionId());
    ReportSeedParsedVoCollection seeds = getSeedsFromReport(template.getReport().getReportXml());

    addSeedsForTemplate(client, seeds, patient, carecontext,doc);

    if(!addValueForNonMandatorySeeds(client, seeds))//  WDEV-14299
    {
        errors.add(createError(patient, carecontext, "Could not be created"));
        return null;
    }

    String [] errorsSeed = checkForSeeds(seeds, client);

    if(errorsSeed != null && errorsSeed.length > 0)
    {
        errors.add(createError(patient, carecontext, "Could not be created"));
        return null;
    }

    String fileName;
    try
    {
        fileName = client.buildReportAndUpload(getWorkAreaPath(), template.getReport().getReportXml(), template.getTemplateXml(), urlReportServer, QueryBuilderClient.RTF, "", 1, false);//WDEV-13366
    }
    catch (QueryBuilderClientException e1)
    {
        errors.add(createError(patient, carecontext, "Could not be created"));
        e1.printStackTrace();
        return null;
    }

    return fileName;
}
项目:AvoinApotti    文件:Logic.java   
private ReportBoRefVo getReportRef(ReportTemplateVo reportTemplateVo)
{
    if (reportTemplateVo == null)
        return null;

    return reportTemplateVo.getReport();
}
项目:AvoinApotti    文件:Logic.java   
protected void onBtnPrintClick() throws ims.framework.exceptions.PresentationLogicException
{
    if(form.ccPrinters().getSelectedPrinter() == null)
    {
        engine.showMessage("Please select a printer !");
        return;
    }

    if(!(form.grdReports().getValue() instanceof ReportTemplateVo))
    {
        engine.showMessage("Please select a template !");
        return;
    }

    if(form.getGlobalContext().Core.getPrepareForPrintingIsNotNull() && form.getGlobalContext().Core.getPrepareForPrinting().equals(Boolean.TRUE))
    {
        ReportTemplateVo template = (ReportTemplateVo)form.grdReports().getValue();

        form.getGlobalContext().Core.setPrinterSelect(form.ccPrinters().getSelectedPrinter().getIPrinterName());
        form.getGlobalContext().Core.setReport(template.getReport().getReportXml());
        form.getGlobalContext().Core.setTemplate(template.getTemplateXml());

        engine.close(DialogResult.OK);
        return;
    }

    if(buildReport(PRINT_REPORT))
    {
        engine.showMessage("The report was sent to the printer !");

        //WDEV-17772
        if (ConfigFlag.GEN.CREATE_NEW_PATIENTDOCUMENT_ON_PRINTREPORTDIALOG.getValue() && form.chkStoreCopy().getValue())
        {
            savePatientDocument();
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void open()
{
    ReportVoCollection coll = domain.listReports(new Integer(engine.getPreviousNonDialogFormName().getID()));

    for(int i = 0; i < coll.size(); i++)
    {
        ReportVo report = coll.get(i);

        if(canBeSeeded(report) && report.getTemplatesIsNotNull() && report.getTemplates().size() > 0)
        {
            grdReportsRow row = form.grdReports().getRows().newRow();

            row.setBackColor(Color.Beige);
            row.setcolName(report.getReportName());
            row.setcolDescription(report.getReportDescription());
            row.setValue(report);

            for (int j = 0; j < report.getTemplates().size(); j++)
            {
                ReportTemplateVo template = report.getTemplates().get(j);

                grdReportsRow templateRow = row.getRows().newRow();
                templateRow.setcolName(template.getName());
                templateRow.setcolDescription(template.getDescription());
                templateRow.setValue(template);
            }

            row.setExpanded(true);
        }
    }

    if(form.grdReports().getRows().size() == 1 && form.grdReports().getRows().get(0).getRows().size() == 1)
        form.grdReports().setValue(form.grdReports().getRows().get(0).getRows().get(0).getValue());
}