Java 类ims.core.vo.TemplateForPatientDocumentVo 实例源码

项目:AvoinApotti    文件:Logic.java   
private void addAllAvailable()
{
    tabByCategoryContainer tab = form.lyrMain().tabByCategory();

    for (int i = 0; i < tab.dyngrdAvailableRep().getRows().size(); i++)
    {
        DynamicGridRowCollection templates = tab.dyngrdAvailableRep().getRows().get(i).getRows();
        if (templates != null)
        {
            for (int j = 0; j < templates.size(); j++)
            {
                DocumentCategoryConfigShortVo docCat = new DocumentCategoryConfigShortVo();
                docCat.setTemplate((TemplateForPatientDocumentVo) templates.get(j).getValue());
                docCat.setCategory(tab.grdDocCat().getValue());
                addRowToMappGrid(docCat);
            }

        }
    }

    tab.dyngrdAvailableRep().getRows().clear();
    updateControlsState();
}
项目:AvoinApotti    文件:Logic.java   
private DynamicGridRow createReportRow(TemplateForPatientDocumentVo template) 
{
    if(template == null || template.getReport() == null)
        throw new CodingRuntimeException("Cannot add a row with null template or null report.");

    DynamicGridRow reportRow = form.dyngrdReports().getRows().newRow();

    reportRow.setValue(template.getReport());
    reportRow.setSelectable(false);
    reportRow.setCollapsedImage(form.getImages().Core.ReportDesigner);
    reportRow.setExpandedImage(form.getImages().Core.ReportDesigner);

    DynamicGridCell cellName = createCell(reportRow, getColumn(COLUMN_NAME));

    if(cellName != null)
        cellName.setValue(template.getReport().getReportName());

    if(template.getReport().getImsIdIsNotNull() && template.getReport().getImsId().intValue() > 0)
    {
        reportRow.setTextColor(Color.Blue);
    }

    return reportRow;
}
项目:AvoinApotti    文件:Logic.java   
private String[] validateCreateDocuments() 
{
    List<String> uiErrors = new ArrayList<String>();

    Object repTemplate = form.lyrLetterCreate().tabTemplate().dyngrdReports().getValue();

    if(repTemplate == null || !(repTemplate instanceof TemplateForPatientDocumentVo))
    {
        return new String[] {"Please select a template!"};
    }

    if(form.lyrLetterCreate().tabTemplate().ccAuth().getValue() == null)
    {
        uiErrors.add("Authoring HCP is mandatory.");
    }

    if(form.lyrLetterCreate().tabTemplate().ccTypist().getValue() == null)
    {
        uiErrors.add("Typist Name is mandatory.");
    }

    String[] uiResults = new String[uiErrors.size()];
    uiErrors.toArray(uiResults);

    return uiResults;
}
项目:AvoinApotti    文件:Logic.java   
private void populateReports(TemplateForPatientDocumentVoCollection templateForPatientDocumentVoCollection) 
{
    form.lyrLetterCreate().tabTemplate().dyngrdReports().getRows().clear();

    if (templateForPatientDocumentVoCollection == null || templateForPatientDocumentVoCollection.size() ==0)
    {
        engine.showMessage("No matching templates found.", "No templates", MessageButtons.OK, MessageIcon.INFORMATION);
        return;
    }

    for (int i = 0; i < templateForPatientDocumentVoCollection.size(); i++)
    {
        TemplateForPatientDocumentVo voReportList = templateForPatientDocumentVoCollection.get(i);
        addReport(voReportList);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void addTemplates(TemplateForPatientDocumentVo template, DynamicGridRow reportRow)
{
    if(template == null || template.getReport() == null)
        throw new CodingRuntimeException("Cannot add a row with null template or null report.");

    if(reportRow == null)
        return;

    DynamicGridRow templateRow = reportRow.getRows().newRow();
    templateRow.setValue(template);
    templateRow.setCollapsedImage(form.getImages().Core.TemplateReport);
    templateRow.setExpandedImage(form.getImages().Core.TemplateReport);

    DynamicGridCell cellTemplateName = createCell(templateRow, getColumn(COLUMN_NAME));
    if(cellTemplateName != null)
        cellTemplateName.setValue(template.getName());

    if(template.getReport().getImsIdIsNotNull() && template.getReport().getImsId().intValue() > 0)
    {
        templateRow.setTextColor(Color.Blue);
    }
}
项目:AvoinApotti    文件:Logic.java   
private DynamicGridRow createReportRow(TemplateForPatientDocumentVo template) 
{
    if(template == null || template.getReport() == null)
        throw new CodingRuntimeException("Cannot add a row with null template or null report.");

    DynamicGridRow reportRow = form.lyrLetterCreate().tabTemplate().dyngrdReports().getRows().newRow();

    reportRow.setValue(template.getReport());
    reportRow.setSelectable(false);
    reportRow.setCollapsedImage(form.getImages().Core.ReportDesigner);
    reportRow.setExpandedImage(form.getImages().Core.ReportDesigner);
    reportRow.setExpanded(true);//WDEV-13991

    DynamicGridCell cellName = createCell(reportRow, getColumn(COLUMN_NAME));

    if(cellName != null)
        cellName.setValue(template.getReport().getReportName());

    if(template.getReport().getImsIdIsNotNull() && template.getReport().getImsId().intValue() > 0)
    {
        reportRow.setTextColor(Color.Blue);
    }

    return reportRow;
}
项目:openMAXIMS    文件:Logic.java   
private void addAllAvailable()
{
    tabByCategoryContainer tab = form.lyrMain().tabByCategory();

    for (int i = 0; i < tab.dyngrdAvailableRep().getRows().size(); i++)
    {
        DynamicGridRowCollection templates = tab.dyngrdAvailableRep().getRows().get(i).getRows();
        if (templates != null)
        {
            for (int j = 0; j < templates.size(); j++)
            {
                DocumentCategoryConfigShortVo docCat = new DocumentCategoryConfigShortVo();
                docCat.setTemplate((TemplateForPatientDocumentVo) templates.get(j).getValue());
                docCat.setCategory(tab.grdDocCat().getValue());
                addRowToMappGrid(docCat);
            }

        }
    }

    tab.dyngrdAvailableRep().getRows().clear();
    updateControlsState();
}
项目:openMAXIMS    文件:Logic.java   
private DynamicGridRow createReportRow(TemplateForPatientDocumentVo template) 
{
    if(template == null || template.getReport() == null)
        throw new CodingRuntimeException("Cannot add a row with null template or null report.");

    DynamicGridRow reportRow = form.dyngrdReports().getRows().newRow();

    reportRow.setValue(template.getReport());
    reportRow.setSelectable(false);
    reportRow.setCollapsedImage(form.getImages().Core.ReportDesigner);
    reportRow.setExpandedImage(form.getImages().Core.ReportDesigner);

    DynamicGridCell cellName = createCell(reportRow, getColumn(COLUMN_NAME));

    if(cellName != null)
        cellName.setValue(template.getReport().getReportName());

    if(template.getReport().getImsIdIsNotNull() && template.getReport().getImsId().intValue() > 0)
    {
        reportRow.setTextColor(Color.Blue);
    }

    return reportRow;
}
项目:openMAXIMS    文件:Logic.java   
private void populateReports(TemplateForPatientDocumentVoCollection templateForPatientDocumentVoCollection) 
{
    form.lyrLetterCreate().tabTemplate().dyngrdReports().getRows().clear();

    if (templateForPatientDocumentVoCollection == null || templateForPatientDocumentVoCollection.size() ==0)
    {
        engine.showMessage("No matching templates found.", "No templates", MessageButtons.OK, MessageIcon.INFORMATION);
        return;
    }

    for (int i = 0; i < templateForPatientDocumentVoCollection.size(); i++)
    {
        TemplateForPatientDocumentVo voReportList = templateForPatientDocumentVoCollection.get(i);
        addReport(voReportList);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void addTemplates(TemplateForPatientDocumentVo template, DynamicGridRow reportRow)
{
    if(template == null || template.getReport() == null)
        throw new CodingRuntimeException("Cannot add a row with null template or null report.");

    if(reportRow == null)
        return;

    DynamicGridRow templateRow = reportRow.getRows().newRow();
    templateRow.setValue(template);
    templateRow.setCollapsedImage(form.getImages().Core.TemplateReport);
    templateRow.setExpandedImage(form.getImages().Core.TemplateReport);

    DynamicGridCell cellTemplateName = createCell(templateRow, getColumn(COLUMN_NAME));
    if(cellTemplateName != null)
        cellTemplateName.setValue(template.getName());

    if(template.getReport().getImsIdIsNotNull() && template.getReport().getImsId().intValue() > 0)
    {
        templateRow.setTextColor(Color.Blue);
    }
}
项目:openMAXIMS    文件:Logic.java   
private DynamicGridRow createReportRow(TemplateForPatientDocumentVo template) 
{
    if(template == null || template.getReport() == null)
        throw new CodingRuntimeException("Cannot add a row with null template or null report.");

    DynamicGridRow reportRow = form.lyrLetterCreate().tabTemplate().dyngrdReports().getRows().newRow();

    reportRow.setValue(template.getReport());
    reportRow.setSelectable(false);
    reportRow.setCollapsedImage(form.getImages().Core.ReportDesigner);
    reportRow.setExpandedImage(form.getImages().Core.ReportDesigner);
    reportRow.setExpanded(true);//WDEV-13991

    DynamicGridCell cellName = createCell(reportRow, getColumn(COLUMN_NAME));

    if(cellName != null)
        cellName.setValue(template.getReport().getReportName());

    if(template.getReport().getImsIdIsNotNull() && template.getReport().getImsId().intValue() > 0)
    {
        reportRow.setTextColor(Color.Blue);
    }

    return reportRow;
}
项目:openMAXIMS    文件:Logic.java   
private void addAllAvailable()
{
    tabByCategoryContainer tab = form.lyrMain().tabByCategory();

    for (int i = 0; i < tab.dyngrdAvailableRep().getRows().size(); i++)
    {
        DynamicGridRowCollection templates = tab.dyngrdAvailableRep().getRows().get(i).getRows();
        if (templates != null)
        {
            for (int j = 0; j < templates.size(); j++)
            {
                DocumentCategoryConfigShortVo docCat = new DocumentCategoryConfigShortVo();
                docCat.setTemplate((TemplateForPatientDocumentVo) templates.get(j).getValue());
                docCat.setCategory(tab.grdDocCat().getValue());
                addRowToMappGrid(docCat);
            }

        }
    }

    tab.dyngrdAvailableRep().getRows().clear();
    updateControlsState();
}
项目:openMAXIMS    文件:Logic.java   
private DynamicGridRow createReportRow(TemplateForPatientDocumentVo template) 
{
    if(template == null || template.getReport() == null)
        throw new CodingRuntimeException("Cannot add a row with null template or null report.");

    DynamicGridRow reportRow = form.dyngrdReports().getRows().newRow();

    reportRow.setValue(template.getReport());
    reportRow.setSelectable(false);
    reportRow.setCollapsedImage(form.getImages().Core.ReportDesigner);
    reportRow.setExpandedImage(form.getImages().Core.ReportDesigner);

    DynamicGridCell cellName = createCell(reportRow, getColumn(COLUMN_NAME));

    if(cellName != null)
        cellName.setValue(template.getReport().getReportName());

    if(template.getReport().getImsIdIsNotNull() && template.getReport().getImsId().intValue() > 0)
    {
        reportRow.setTextColor(Color.Blue);
    }

    return reportRow;
}
项目:openMAXIMS    文件:Logic.java   
private String[] validateCreateDocuments() 
{
    List<String> uiErrors = new ArrayList<String>();

    Object repTemplate = form.lyrLetterCreate().tabTemplate().dyngrdReports().getValue();

    if(repTemplate == null || !(repTemplate instanceof TemplateForPatientDocumentVo))
    {
        return new String[] {"Please select a template!"};
    }

    if(form.lyrLetterCreate().tabTemplate().ccAuth().getValue() == null)
    {
        uiErrors.add("Authoring HCP is mandatory.");
    }

    if(form.lyrLetterCreate().tabTemplate().ccTypist().getValue() == null)
    {
        uiErrors.add("Typist Name is mandatory.");
    }

    String[] uiResults = new String[uiErrors.size()];
    uiErrors.toArray(uiResults);

    return uiResults;
}
项目:openMAXIMS    文件:Logic.java   
private void populateReports(TemplateForPatientDocumentVoCollection templateForPatientDocumentVoCollection) 
{
    form.lyrLetterCreate().tabTemplate().dyngrdReports().getRows().clear();

    if (templateForPatientDocumentVoCollection == null || templateForPatientDocumentVoCollection.size() ==0)
    {
        engine.showMessage("No matching templates found.", "No templates", MessageButtons.OK, MessageIcon.INFORMATION);
        return;
    }

    for (int i = 0; i < templateForPatientDocumentVoCollection.size(); i++)
    {
        TemplateForPatientDocumentVo voReportList = templateForPatientDocumentVoCollection.get(i);
        addReport(voReportList);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void addTemplates(TemplateForPatientDocumentVo template, DynamicGridRow reportRow)
{
    if(template == null || template.getReport() == null)
        throw new CodingRuntimeException("Cannot add a row with null template or null report.");

    if(reportRow == null)
        return;

    DynamicGridRow templateRow = reportRow.getRows().newRow();
    templateRow.setValue(template);
    templateRow.setCollapsedImage(form.getImages().Core.TemplateReport);
    templateRow.setExpandedImage(form.getImages().Core.TemplateReport);

    DynamicGridCell cellTemplateName = createCell(templateRow, getColumn(COLUMN_NAME));
    if(cellTemplateName != null)
        cellTemplateName.setValue(template.getName());

    if(template.getReport().getImsIdIsNotNull() && template.getReport().getImsId().intValue() > 0)
    {
        templateRow.setTextColor(Color.Blue);
    }
}
项目:openMAXIMS    文件:Logic.java   
private DynamicGridRow createReportRow(TemplateForPatientDocumentVo template) 
{
    if(template == null || template.getReport() == null)
        throw new CodingRuntimeException("Cannot add a row with null template or null report.");

    DynamicGridRow reportRow = form.lyrLetterCreate().tabTemplate().dyngrdReports().getRows().newRow();

    reportRow.setValue(template.getReport());
    reportRow.setSelectable(false);
    reportRow.setCollapsedImage(form.getImages().Core.ReportDesigner);
    reportRow.setExpandedImage(form.getImages().Core.ReportDesigner);
    reportRow.setExpanded(true);//WDEV-13991

    DynamicGridCell cellName = createCell(reportRow, getColumn(COLUMN_NAME));

    if(cellName != null)
        cellName.setValue(template.getReport().getReportName());

    if(template.getReport().getImsIdIsNotNull() && template.getReport().getImsId().intValue() > 0)
    {
        reportRow.setTextColor(Color.Blue);
    }

    return reportRow;
}
项目:openmaxims-linux    文件:Logic.java   
private void addAllAvailable()
{
    tabByCategoryContainer tab = form.lyrMain().tabByCategory();

    for (int i = 0; i < tab.dyngrdAvailableRep().getRows().size(); i++)
    {
        DynamicGridRowCollection templates = tab.dyngrdAvailableRep().getRows().get(i).getRows();
        if (templates != null)
        {
            for (int j = 0; j < templates.size(); j++)
            {
                DocumentCategoryConfigShortVo docCat = new DocumentCategoryConfigShortVo();
                docCat.setTemplate((TemplateForPatientDocumentVo) templates.get(j).getValue());
                docCat.setCategory(tab.grdDocCat().getValue());
                addRowToMappGrid(docCat);
            }

        }
    }

    tab.dyngrdAvailableRep().getRows().clear();
    updateControlsState();
}
项目:openmaxims-linux    文件:Logic.java   
private DynamicGridRow createReportRow(TemplateForPatientDocumentVo template) 
{
    if(template == null || template.getReport() == null)
        throw new CodingRuntimeException("Cannot add a row with null template or null report.");

    DynamicGridRow reportRow = form.dyngrdReports().getRows().newRow();

    reportRow.setValue(template.getReport());
    reportRow.setSelectable(false);
    reportRow.setCollapsedImage(form.getImages().Core.ReportDesigner);
    reportRow.setExpandedImage(form.getImages().Core.ReportDesigner);

    DynamicGridCell cellName = createCell(reportRow, getColumn(COLUMN_NAME));

    if(cellName != null)
        cellName.setValue(template.getReport().getReportName());

    if(template.getReport().getImsIdIsNotNull() && template.getReport().getImsId().intValue() > 0)
    {
        reportRow.setTextColor(Color.Blue);
    }

    return reportRow;
}
项目:openmaxims-linux    文件:Logic.java   
private String[] validateCreateDocuments() 
{
    List<String> uiErrors = new ArrayList<String>();

    Object repTemplate = form.lyrLetterCreate().tabTemplate().dyngrdReports().getValue();

    if(repTemplate == null || !(repTemplate instanceof TemplateForPatientDocumentVo))
    {
        return new String[] {"Please select a template!"};
    }

    if(form.lyrLetterCreate().tabTemplate().ccAuth().getValue() == null)
    {
        uiErrors.add("Authoring HCP is mandatory.");
    }

    if(form.lyrLetterCreate().tabTemplate().ccTypist().getValue() == null)
    {
        uiErrors.add("Typist Name is mandatory.");
    }

    String[] uiResults = new String[uiErrors.size()];
    uiErrors.toArray(uiResults);

    return uiResults;
}
项目:openmaxims-linux    文件:Logic.java   
private void populateReports(TemplateForPatientDocumentVoCollection templateForPatientDocumentVoCollection) 
{
    form.lyrLetterCreate().tabTemplate().dyngrdReports().getRows().clear();

    if (templateForPatientDocumentVoCollection == null || templateForPatientDocumentVoCollection.size() ==0)
    {
        engine.showMessage("No matching templates found.", "No templates", MessageButtons.OK, MessageIcon.INFORMATION);
        return;
    }

    for (int i = 0; i < templateForPatientDocumentVoCollection.size(); i++)
    {
        TemplateForPatientDocumentVo voReportList = templateForPatientDocumentVoCollection.get(i);
        addReport(voReportList);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void addTemplates(TemplateForPatientDocumentVo template, DynamicGridRow reportRow)
{
    if(template == null || template.getReport() == null)
        throw new CodingRuntimeException("Cannot add a row with null template or null report.");

    if(reportRow == null)
        return;

    DynamicGridRow templateRow = reportRow.getRows().newRow();
    templateRow.setValue(template);
    templateRow.setCollapsedImage(form.getImages().Core.TemplateReport);
    templateRow.setExpandedImage(form.getImages().Core.TemplateReport);

    DynamicGridCell cellTemplateName = createCell(templateRow, getColumn(COLUMN_NAME));
    if(cellTemplateName != null)
        cellTemplateName.setValue(template.getName());

    if(template.getReport().getImsIdIsNotNull() && template.getReport().getImsId().intValue() > 0)
    {
        templateRow.setTextColor(Color.Blue);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private DynamicGridRow createReportRow(TemplateForPatientDocumentVo template) 
{
    if(template == null || template.getReport() == null)
        throw new CodingRuntimeException("Cannot add a row with null template or null report.");

    DynamicGridRow reportRow = form.lyrLetterCreate().tabTemplate().dyngrdReports().getRows().newRow();

    reportRow.setValue(template.getReport());
    reportRow.setSelectable(false);
    reportRow.setCollapsedImage(form.getImages().Core.ReportDesigner);
    reportRow.setExpandedImage(form.getImages().Core.ReportDesigner);
    reportRow.setExpanded(true);//WDEV-13991

    DynamicGridCell cellName = createCell(reportRow, getColumn(COLUMN_NAME));

    if(cellName != null)
        cellName.setValue(template.getReport().getReportName());

    if(template.getReport().getImsIdIsNotNull() && template.getReport().getImsId().intValue() > 0)
    {
        reportRow.setTextColor(Color.Blue);
    }

    return reportRow;
}
项目:AvoinApotti    文件:Logic.java   
private void addTemplate(TemplateForPatientDocumentVo template, DynamicGridRow reportRow, DynamicGrid dynamicGrid, boolean showCheck)
{
    if (template == null || reportRow == null)
        return;

    DynamicGridRow templateRow = reportRow.getRows().newRow();
    templateRow.setValue(template);
    templateRow.setCollapsedImage(form.getImages().Core.TemplateReport);
    templateRow.setExpandedImage(form.getImages().Core.TemplateReport);
    templateRow.setSelectable(!showCheck);
    DynamicGridCell cell;
    if (showCheck)
    {
        cell = templateRow.getCells().newCell(getColumn(dynamicGrid, COLUMN_SELECT), DynamicCellType.BOOL);
        cell.setReadOnly(false);
        cell.setAutoPostBack(true);
    }

    cell = templateRow.getCells().newCell(getColumn(dynamicGrid, COLUMN_NAME), DynamicCellType.LABEL);
    cell.setValue(template.getName());

    if (template.getReport().getImsIdIsNotNull() && template.getReport().getImsId().intValue() > 0)
    {
        templateRow.setTextColor(Color.Blue);
    }

}
项目:AvoinApotti    文件:Logic.java   
public void updateControlsState()
{
    form.lyrMain().tabByTemplate().ccSpecialty().setMode(form.getMode());
    boolean isViewMode = form.getMode().equals(FormMode.VIEW);
    if (isViewMode)
    {
        form.lyrMain().tabByTemplate().btnEditT().setVisible(true);
        form.lyrMain().tabByTemplate().btnEditT().setEnabled(form.lyrMain().tabByTemplate().dyngrdReports().getValue() instanceof TemplateForPatientDocumentVo);
        form.lyrMain().tabByCategory().btnEditDC().setVisible(true);
        form.lyrMain().tabByCategory().btnEditDC().setEnabled(form.lyrMain().tabByCategory().grdDocCat().getValue() != null);
    }
    else
    {
        form.lyrMain().tabByCategory().imbRemoveAll().setVisible(true);
        form.lyrMain().tabByCategory().imbRemoveAll().setEnabled(form.lyrMain().tabByCategory().dyngrdMapps().getRows().size() > 0);

        form.lyrMain().tabByCategory().imbRemove().setVisible(true);
        form.lyrMain().tabByCategory().imbRemove().setEnabled(areRowsSelectedInMappsGrid());

        form.lyrMain().tabByCategory().imbAdd().setVisible(true);
        form.lyrMain().tabByCategory().imbAdd().setEnabled(areRowsSelectedInAvailableGrid());

        form.lyrMain().tabByCategory().imbAddAll().setVisible(true);
        form.lyrMain().tabByCategory().imbAddAll().setEnabled(form.lyrMain().tabByCategory().dyngrdAvailableRep().getRows().size() > 0);

    }
    form.lyrMain().tabByCategory().setHeaderEnabled(isViewMode);
    form.lyrMain().tabByTemplate().setHeaderEnabled(isViewMode);

    updateContextMenuState();
}
项目:AvoinApotti    文件:Logic.java   
private void rowSelectionChanged(DynamicGridRow row)
{
    form.getLocalContext().setCurrentRecordTem(null);
    form.getLocalContext().setCurrentRecord(null);
    if (row.getValue() instanceof TemplateForPatientDocumentVo)
    {
        form.getLocalContext().setCurrentRecordTem((TemplateForPatientDocumentVo) row.getValue());
        form.getLocalContext().setCurrentRecord(domain.getDocCatConfig((TemplateBoRefVo) row.getValue()));
    }

    populateScreenFromData(form.getLocalContext().getCurrentRecord());
}
项目:AvoinApotti    文件:Logic.java   
private void addSelectedAvailable()
{
    tabByCategoryContainer tab = form.lyrMain().tabByCategory();
    DynamicGridColumn colSel = getColumn(tab.dyngrdAvailableRep(), COLUMN_SELECT);

    for (int i = 0; i < tab.dyngrdAvailableRep().getRows().size(); i++)
    {
        DynamicGridRowCollection templates = tab.dyngrdAvailableRep().getRows().get(i).getRows();
        if (templates != null)
        {
            for (int j = 0; j < templates.size(); j++)
            {

                if (Boolean.TRUE.equals(templates.get(j).getCells().get(colSel).getValue()))
                {
                    DocumentCategoryConfigShortVo docCat = new DocumentCategoryConfigShortVo();
                    docCat.setTemplate((TemplateForPatientDocumentVo) templates.get(j).getValue());
                    docCat.setCategory(tab.grdDocCat().getValue());
                    addRowToMappGrid(docCat);
                }
            }

        }
    }
    searchDC(false);
    updateControlsState();
}
项目: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 DynamicGridRow checkIfReportIsAlreadyAdded(TemplateForPatientDocumentVo template) 
{
    if(template == null)
        return null;

    for(int i=0; i<form.dyngrdReports().getRows().size(); i++)
    {
        if(form.dyngrdReports().getRows().get(i).getValue().equals(template.getReport()))
            return form.dyngrdReports().getRows().get(i);
    }

    return null;
}
项目: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 PatientDocumentErrorVo createError(PatientShort patient, CareContextMinVo careContext, String errorValue) 
{
    PatientDocumentErrorVo error = new PatientDocumentErrorVo();

    error.setPatient(patient.getName());
    error.setIdentifiers(patient.getIdentifiers());
    error.setDocumentName(((TemplateForPatientDocumentVo) form.lyrLetterCreate().tabTemplate().dyngrdReports().getValue()).getName());
    error.setDocumentDate((careContext != null && careContext.getStartDateTime() != null ) ? careContext.getStartDateTime().getDate() : new Date());

    error.setError(errorValue);

    return error;
}
项目:AvoinApotti    文件:Logic.java   
private void addReport(TemplateForPatientDocumentVo voReportList) 
{
    if(voReportList == null)
        return;

    DynamicGridRow reportRow = checkIfReportIsAlreadyAdded(voReportList);

    if(reportRow == null)
        reportRow = createReportRow(voReportList);

    addTemplates(voReportList, reportRow);
}
项目:AvoinApotti    文件:Logic.java   
private DynamicGridRow checkIfReportIsAlreadyAdded(TemplateForPatientDocumentVo template) 
{
    if(template == null)
        return null;

    for(int i=0; i<form.lyrLetterCreate().tabTemplate().dyngrdReports().getRows().size(); i++)
    {
        if(form.lyrLetterCreate().tabTemplate().dyngrdReports().getRows().get(i).getValue().equals(template.getReport()))
            return form.lyrLetterCreate().tabTemplate().dyngrdReports().getRows().get(i);
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void addTemplate(TemplateForPatientDocumentVo template, DynamicGridRow reportRow, DynamicGrid dynamicGrid, boolean showCheck)
{
    if (template == null || reportRow == null)
        return;

    DynamicGridRow templateRow = reportRow.getRows().newRow();
    templateRow.setValue(template);
    templateRow.setCollapsedImage(form.getImages().Core.TemplateReport);
    templateRow.setExpandedImage(form.getImages().Core.TemplateReport);
    templateRow.setSelectable(!showCheck);
    DynamicGridCell cell;
    if (showCheck)
    {
        cell = templateRow.getCells().newCell(getColumn(dynamicGrid, COLUMN_SELECT), DynamicCellType.BOOL);
        cell.setReadOnly(false);
        cell.setAutoPostBack(true);
    }

    cell = templateRow.getCells().newCell(getColumn(dynamicGrid, COLUMN_NAME), DynamicCellType.LABEL);
    cell.setValue(template.getName());

    if (template.getReport().getImsIdIsNotNull() && template.getReport().getImsId().intValue() > 0)
    {
        templateRow.setTextColor(Color.Blue);
    }

}
项目:openMAXIMS    文件:Logic.java   
public void updateControlsState()
{
    form.lyrMain().tabByTemplate().ccSpecialty().setMode(form.getMode());
    boolean isViewMode = form.getMode().equals(FormMode.VIEW);
    if (isViewMode)
    {
        form.lyrMain().tabByTemplate().btnEditT().setVisible(true);
        form.lyrMain().tabByTemplate().btnEditT().setEnabled(form.lyrMain().tabByTemplate().dyngrdReports().getValue() instanceof TemplateForPatientDocumentVo);
        form.lyrMain().tabByCategory().btnEditDC().setVisible(true);
        form.lyrMain().tabByCategory().btnEditDC().setEnabled(form.lyrMain().tabByCategory().grdDocCat().getValue() != null);
    }
    else
    {
        form.lyrMain().tabByCategory().imbRemoveAll().setVisible(true);
        form.lyrMain().tabByCategory().imbRemoveAll().setEnabled(form.lyrMain().tabByCategory().dyngrdMapps().getRows().size() > 0);

        form.lyrMain().tabByCategory().imbRemove().setVisible(true);
        form.lyrMain().tabByCategory().imbRemove().setEnabled(areRowsSelectedInMappsGrid());

        form.lyrMain().tabByCategory().imbAdd().setVisible(true);
        form.lyrMain().tabByCategory().imbAdd().setEnabled(areRowsSelectedInAvailableGrid());

        form.lyrMain().tabByCategory().imbAddAll().setVisible(true);
        form.lyrMain().tabByCategory().imbAddAll().setEnabled(form.lyrMain().tabByCategory().dyngrdAvailableRep().getRows().size() > 0);

    }
    form.lyrMain().tabByCategory().setHeaderEnabled(isViewMode);
    form.lyrMain().tabByTemplate().setHeaderEnabled(isViewMode);

    updateContextMenuState();
}
项目:openMAXIMS    文件:Logic.java   
private void rowSelectionChanged(DynamicGridRow row)
{
    form.getLocalContext().setCurrentRecordTem(null);
    form.getLocalContext().setCurrentRecord(null);
    if (row.getValue() instanceof TemplateForPatientDocumentVo)
    {
        form.getLocalContext().setCurrentRecordTem((TemplateForPatientDocumentVo) row.getValue());
        form.getLocalContext().setCurrentRecord(domain.getDocCatConfig((TemplateBoRefVo) row.getValue()));
    }

    populateScreenFromData(form.getLocalContext().getCurrentRecord());
}
项目:openMAXIMS    文件:Logic.java   
private void addSelectedAvailable()
{
    tabByCategoryContainer tab = form.lyrMain().tabByCategory();
    DynamicGridColumn colSel = getColumn(tab.dyngrdAvailableRep(), COLUMN_SELECT);

    for (int i = 0; i < tab.dyngrdAvailableRep().getRows().size(); i++)
    {
        DynamicGridRowCollection templates = tab.dyngrdAvailableRep().getRows().get(i).getRows();
        if (templates != null)
        {
            for (int j = 0; j < templates.size(); j++)
            {

                if (Boolean.TRUE.equals(templates.get(j).getCells().get(colSel).getValue()))
                {
                    DocumentCategoryConfigShortVo docCat = new DocumentCategoryConfigShortVo();
                    docCat.setTemplate((TemplateForPatientDocumentVo) templates.get(j).getValue());
                    docCat.setCategory(tab.grdDocCat().getValue());
                    addRowToMappGrid(docCat);
                }
            }

        }
    }
    searchDC(false);
    updateControlsState();
}
项目:openMAXIMS    文件: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;
}
项目:openMAXIMS    文件:Logic.java   
private DynamicGridRow checkIfReportIsAlreadyAdded(TemplateForPatientDocumentVo template) 
{
    if(template == null)
        return null;

    for(int i=0; i<form.dyngrdReports().getRows().size(); i++)
    {
        if(form.dyngrdReports().getRows().get(i).getValue().equals(template.getReport()))
            return form.dyngrdReports().getRows().get(i);
    }

    return null;
}
项目:openMAXIMS    文件: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;
}