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

项目:AvoinApotti    文件:Logic.java   
@Override
protected void populateScreenFromData(GraphicAssessmentVo value) {
    super.populateScreenFromData(value);
    if (value == null)
        return;


    if (value.getAssociatedReportForPrintingIsNotNull())
    {
        TemplateBoLiteVo template = domain.getReportTemplate(value.getAssociatedReportForPrinting());

        if (template != null)
            form.txtReport().setValue(template.getName());
    }
    else
        form.txtReport().setValue(null); //WDEV-17583

    populateSpecialitiesScreenFromData(value.getAssessmentSpecialties());
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void populateScreenFromData(GraphicAssessmentVo value) {
    super.populateScreenFromData(value);
    if (value == null)
        return;


    if (value.getAssociatedReportForPrintingIsNotNull())
    {
        TemplateBoLiteVo template = domain.getReportTemplate(value.getAssociatedReportForPrinting());

        if (template != null)
            form.txtReport().setValue(template.getName());
    }
    else
        form.txtReport().setValue(null); //WDEV-17583

    populateSpecialitiesScreenFromData(value.getAssessmentSpecialties());
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void populateScreenFromData(GraphicAssessmentVo value) {
    super.populateScreenFromData(value);
    if (value == null)
        return;


    if (value.getAssociatedReportForPrintingIsNotNull())
    {
        TemplateBoLiteVo template = domain.getReportTemplate(value.getAssociatedReportForPrinting());

        if (template != null)
            form.txtReport().setValue(template.getName());
    }
    else
        form.txtReport().setValue(null); //WDEV-17583

    populateSpecialitiesScreenFromData(value.getAssessmentSpecialties());
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void populateScreenFromData(GraphicAssessmentVo value) {
    super.populateScreenFromData(value);
    if (value == null)
        return;


    if (value.getAssociatedReportForPrintingIsNotNull())
    {
        TemplateBoLiteVo template = domain.getReportTemplate(value.getAssociatedReportForPrinting());

        if (template != null)
            form.txtReport().setValue(template.getName());
    }
    else
        form.txtReport().setValue(null); //WDEV-17583

    populateSpecialitiesScreenFromData(value.getAssessmentSpecialties());
}
项目:AvoinApotti    文件:UserAssessmentNewImpl.java   
public TemplateBoLiteVo getReportTemplate(TemplateBoRefVo refTemplate)
{
    if(refTemplate == null)
        throw new CodingRuntimeException("Cannot get TemplateBoLiteVo for null TemplateBoRefVo");

    TemplateBo template = (TemplateBo) getDomainFactory().getDomainObject(TemplateBo.class, refTemplate.getID_TemplateBo());

    return TemplateBoLiteVoAssembler.create(template);
}
项目:AvoinApotti    文件:DynamicAssessmentsImpl.java   
public TemplateBoLiteVo getTemplate(TemplateBoRefVo template)
{
    if (template == null || !template.getID_TemplateBoIsNotNull())
        throw new DomainRuntimeException("Invalid template record");

    return TemplateBoLiteVoAssembler.create((TemplateBo) getDomainFactory().getDomainObject(TemplateBo.class, template.getID_TemplateBo()));
}
项目:AvoinApotti    文件:GraphicAssessmentNewImpl.java   
/**
 * WDEV-13704
 * Function used to retrieve a template based on 
 */
public TemplateBoLiteVo getReportTemplate(TemplateBoRefVo templateRef)
{
    if (templateRef == null || !templateRef.getID_TemplateBoIsNotNull())
        return null;

    return TemplateBoLiteVoAssembler.create((TemplateBo) getDomainFactory().getDomainObject(TemplateBo.class, templateRef.getID_TemplateBo()));
}
项目:AvoinApotti    文件:GraphicAssessmentNewImpl.java   
public TemplateBoLiteVo getReportTemplateByName(String templateName)
{   
    DomainFactory factory = getDomainFactory();
    String hql = "select template from TemplateBo as template where template.name =:tempName";
    List <?> list = factory.find(hql,new String[]{"tempName"}, new Object[]{templateName});

    if (list!=null && list.size()>0)
        return TemplateBoLiteVoAssembler.createTemplateBoLiteVoCollectionFromTemplateBo(list).get(0);

    return null;
}
项目:AvoinApotti    文件:PatientICPActionLinkedDetailsComponentImpl.java   
/**
 * Get required template report
 */
public TemplateBoLiteVo getTemplateReport(TemplateBoRefVo templateRef)
{
    if (templateRef == null || templateRef.getID_TemplateBo() == null)
        return null;

    return TemplateBoLiteVoAssembler.create((TemplateBo) getDomainFactory().getDomainObject(TemplateBo.class, templateRef.getID_TemplateBo()));
}
项目:AvoinApotti    文件:Logic.java   
private void populateTemplates(DynamicGridRow reportRow, TemplateBoLiteVoCollection templates)
{
    if (templates == null)
        return;

    for (TemplateBoLiteVo template : templates)
    {
        DynamicGridRow templateRow = reportRow.getRows().newRow();

        templateRow.setCollapsedImage(form.getImages().Admin.Edit);
        templateRow.setExpandedImage(form.getImages().Admin.Edit);

        if (template.getLastDeployment() != null && template.getLastUpdated() != null
                && template.getLastDeployment().isLessThan(template.getLastUpdated()))
        {
            templateRow.setTextColor(Color.Black);
        }
        else
        {
            templateRow.setTextColor(Color.Gray);
        }

        DynamicGridCell cellName = templateRow.getCells().newCell(form.dyngrdReports().getColumns().getByIdentifier(COL_NAME), DynamicCellType.STRING);
        cellName.setValue(template.getName());
        cellName.setTooltip(getTemplateTooltip(template.getTemplateXml()));
        cellName.setReadOnly(true);

        DynamicGridCell cellLastDeployed = templateRow.getCells().newCell(form.dyngrdReports().getColumns().getByIdentifier(COL_LAST_DEPLOY), DynamicCellType.DATETIME);
        cellLastDeployed.setValue(template.getLastDeployment());
        cellLastDeployed.setReadOnly(true);

        DynamicGridCell cellLastModified = templateRow.getCells().newCell(form.dyngrdReports().getColumns().getByIdentifier(COL_LAST_MODIFY), DynamicCellType.DATETIME);
        cellLastModified.setValue(template.getLastUpdated());
        cellLastModified.setReadOnly(true);

        templateRow.setValue(template);
    }
}
项目:AvoinApotti    文件:Logic.java   
private boolean hasTemplatesUpdatedSinceLastDeploy(SystemReportVo report)
{
    if (report == null || report.getTemplates() == null)
        return false;

    for (TemplateBoLiteVo template : report.getTemplates())
    {
        if (template.getLastUpdated() != null && template.getLastDeployment() != null && template.getLastDeployment().isLessThan(template.getLastUpdated()))
            return true;
    }

    return false;
}
项目:AvoinApotti    文件:PatientSpecialtyAssessmentsImpl.java   
public TemplateBoLiteVo getTemplate(TemplateBoRefVo template)
{
    if (template == null || !template.getID_TemplateBoIsNotNull())
        throw new DomainRuntimeException("Invalid template record");

    return TemplateBoLiteVoAssembler.create((TemplateBo) getDomainFactory().getDomainObject(TemplateBo.class, template.getID_TemplateBo()));
}
项目:openMAXIMS    文件:UserAssessmentNewImpl.java   
public TemplateBoLiteVo getReportTemplate(TemplateBoRefVo refTemplate)
{
    if(refTemplate == null)
        throw new CodingRuntimeException("Cannot get TemplateBoLiteVo for null TemplateBoRefVo");

    TemplateBo template = (TemplateBo) getDomainFactory().getDomainObject(TemplateBo.class, refTemplate.getID_TemplateBo());

    return TemplateBoLiteVoAssembler.create(template);
}
项目:openMAXIMS    文件:DynamicAssessmentsImpl.java   
public TemplateBoLiteVo getTemplate(TemplateBoRefVo template)
{
    if (template == null || !template.getID_TemplateBoIsNotNull())
        throw new DomainRuntimeException("Invalid template record");

    return TemplateBoLiteVoAssembler.create((TemplateBo) getDomainFactory().getDomainObject(TemplateBo.class, template.getID_TemplateBo()));
}
项目:openMAXIMS    文件:GraphicAssessmentNewImpl.java   
/**
 * WDEV-13704
 * Function used to retrieve a template based on 
 */
public TemplateBoLiteVo getReportTemplate(TemplateBoRefVo templateRef)
{
    if (templateRef == null || !templateRef.getID_TemplateBoIsNotNull())
        return null;

    return TemplateBoLiteVoAssembler.create((TemplateBo) getDomainFactory().getDomainObject(TemplateBo.class, templateRef.getID_TemplateBo()));
}
项目:openMAXIMS    文件:GraphicAssessmentNewImpl.java   
public TemplateBoLiteVo getReportTemplateByName(String templateName)
{   
    DomainFactory factory = getDomainFactory();
    String hql = "select template from TemplateBo as template where template.name =:tempName";
    List <?> list = factory.find(hql,new String[]{"tempName"}, new Object[]{templateName});

    if (list!=null && list.size()>0)
        return TemplateBoLiteVoAssembler.createTemplateBoLiteVoCollectionFromTemplateBo(list).get(0);

    return null;
}
项目:openMAXIMS    文件:PatientICPActionLinkedDetailsComponentImpl.java   
/**
 * Get required template report
 */
public TemplateBoLiteVo getTemplateReport(TemplateBoRefVo templateRef)
{
    if (templateRef == null || templateRef.getID_TemplateBo() == null)
        return null;

    return TemplateBoLiteVoAssembler.create((TemplateBo) getDomainFactory().getDomainObject(TemplateBo.class, templateRef.getID_TemplateBo()));
}
项目:openMAXIMS    文件:Logic.java   
private void populateTemplates(DynamicGridRow reportRow, TemplateBoLiteVoCollection templates)
{
    if (templates == null)
        return;

    for (TemplateBoLiteVo template : templates)
    {
        DynamicGridRow templateRow = reportRow.getRows().newRow();

        templateRow.setCollapsedImage(form.getImages().Admin.Edit);
        templateRow.setExpandedImage(form.getImages().Admin.Edit);

        if (template.getLastDeployment() != null && template.getLastUpdated() != null
                && template.getLastDeployment().isLessThan(template.getLastUpdated()))
        {
            templateRow.setTextColor(Color.Black);
        }
        else
        {
            templateRow.setTextColor(Color.Gray);
        }

        DynamicGridCell cellName = templateRow.getCells().newCell(form.dyngrdReports().getColumns().getByIdentifier(COL_NAME), DynamicCellType.STRING);
        cellName.setValue(template.getName());
        cellName.setTooltip(getTemplateTooltip(template.getTemplateXml()));
        cellName.setReadOnly(true);

        DynamicGridCell cellLastDeployed = templateRow.getCells().newCell(form.dyngrdReports().getColumns().getByIdentifier(COL_LAST_DEPLOY), DynamicCellType.DATETIME);
        cellLastDeployed.setValue(template.getLastDeployment());
        cellLastDeployed.setReadOnly(true);

        DynamicGridCell cellLastModified = templateRow.getCells().newCell(form.dyngrdReports().getColumns().getByIdentifier(COL_LAST_MODIFY), DynamicCellType.DATETIME);
        cellLastModified.setValue(template.getLastUpdated());
        cellLastModified.setReadOnly(true);

        templateRow.setValue(template);
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean hasTemplatesUpdatedSinceLastDeploy(SystemReportVo report)
{
    if (report == null || report.getTemplates() == null)
        return false;

    for (TemplateBoLiteVo template : report.getTemplates())
    {
        if (template.getLastUpdated() != null && template.getLastDeployment() != null && template.getLastDeployment().isLessThan(template.getLastUpdated()))
            return true;
    }

    return false;
}
项目:openMAXIMS    文件:PatientSpecialtyAssessmentsImpl.java   
public TemplateBoLiteVo getTemplate(TemplateBoRefVo template)
{
    if (template == null || !template.getID_TemplateBoIsNotNull())
        throw new DomainRuntimeException("Invalid template record");

    return TemplateBoLiteVoAssembler.create((TemplateBo) getDomainFactory().getDomainObject(TemplateBo.class, template.getID_TemplateBo()));
}
项目:openMAXIMS    文件:UserAssessmentNewImpl.java   
public TemplateBoLiteVo getReportTemplate(TemplateBoRefVo refTemplate)
{
    if(refTemplate == null)
        throw new CodingRuntimeException("Cannot get TemplateBoLiteVo for null TemplateBoRefVo");

    TemplateBo template = (TemplateBo) getDomainFactory().getDomainObject(TemplateBo.class, refTemplate.getID_TemplateBo());

    return TemplateBoLiteVoAssembler.create(template);
}
项目:openMAXIMS    文件:DynamicAssessmentsImpl.java   
public TemplateBoLiteVo getTemplate(TemplateBoRefVo template)
{
    if (template == null || !template.getID_TemplateBoIsNotNull())
        throw new DomainRuntimeException("Invalid template record");

    return TemplateBoLiteVoAssembler.create((TemplateBo) getDomainFactory().getDomainObject(TemplateBo.class, template.getID_TemplateBo()));
}
项目:openMAXIMS    文件:GraphicAssessmentNewImpl.java   
/**
 * WDEV-13704
 * Function used to retrieve a template based on 
 */
public TemplateBoLiteVo getReportTemplate(TemplateBoRefVo templateRef)
{
    if (templateRef == null || !templateRef.getID_TemplateBoIsNotNull())
        return null;

    return TemplateBoLiteVoAssembler.create((TemplateBo) getDomainFactory().getDomainObject(TemplateBo.class, templateRef.getID_TemplateBo()));
}
项目:openMAXIMS    文件:GraphicAssessmentNewImpl.java   
public TemplateBoLiteVo getReportTemplateByName(String templateName)
{   
    DomainFactory factory = getDomainFactory();
    String hql = "select template from TemplateBo as template where template.name =:tempName";
    List <?> list = factory.find(hql,new String[]{"tempName"}, new Object[]{templateName});

    if (list!=null && list.size()>0)
        return TemplateBoLiteVoAssembler.createTemplateBoLiteVoCollectionFromTemplateBo(list).get(0);

    return null;
}
项目:openMAXIMS    文件:PatientICPActionLinkedDetailsComponentImpl.java   
/**
 * Get required template report
 */
public TemplateBoLiteVo getTemplateReport(TemplateBoRefVo templateRef)
{
    if (templateRef == null || templateRef.getID_TemplateBo() == null)
        return null;

    return TemplateBoLiteVoAssembler.create((TemplateBo) getDomainFactory().getDomainObject(TemplateBo.class, templateRef.getID_TemplateBo()));
}
项目:openMAXIMS    文件:Logic.java   
private void populateTemplates(DynamicGridRow reportRow, TemplateBoLiteVoCollection templates)
{
    if (templates == null)
        return;

    for (TemplateBoLiteVo template : templates)
    {
        DynamicGridRow templateRow = reportRow.getRows().newRow();

        templateRow.setCollapsedImage(form.getImages().Admin.Edit);
        templateRow.setExpandedImage(form.getImages().Admin.Edit);

        if (template.getLastDeployment() != null && template.getLastUpdated() != null
                && template.getLastDeployment().isLessThan(template.getLastUpdated()))
        {
            templateRow.setTextColor(Color.Black);
        }
        else
        {
            templateRow.setTextColor(Color.Gray);
        }

        DynamicGridCell cellName = templateRow.getCells().newCell(form.dyngrdReports().getColumns().getByIdentifier(COL_NAME), DynamicCellType.STRING);
        cellName.setValue(template.getName());
        cellName.setTooltip(getTemplateTooltip(template.getTemplateXml()));
        cellName.setReadOnly(true);

        DynamicGridCell cellLastDeployed = templateRow.getCells().newCell(form.dyngrdReports().getColumns().getByIdentifier(COL_LAST_DEPLOY), DynamicCellType.DATETIME);
        cellLastDeployed.setValue(template.getLastDeployment());
        cellLastDeployed.setReadOnly(true);

        DynamicGridCell cellLastModified = templateRow.getCells().newCell(form.dyngrdReports().getColumns().getByIdentifier(COL_LAST_MODIFY), DynamicCellType.DATETIME);
        cellLastModified.setValue(template.getLastUpdated());
        cellLastModified.setReadOnly(true);

        templateRow.setValue(template);
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean hasTemplatesUpdatedSinceLastDeploy(SystemReportVo report)
{
    if (report == null || report.getTemplates() == null)
        return false;

    for (TemplateBoLiteVo template : report.getTemplates())
    {
        if (template.getLastUpdated() != null && template.getLastDeployment() != null && template.getLastDeployment().isLessThan(template.getLastUpdated()))
            return true;
    }

    return false;
}
项目:openMAXIMS    文件:PatientSpecialtyAssessmentsImpl.java   
public TemplateBoLiteVo getTemplate(TemplateBoRefVo template)
{
    if (template == null || !template.getID_TemplateBoIsNotNull())
        throw new DomainRuntimeException("Invalid template record");

    return TemplateBoLiteVoAssembler.create((TemplateBo) getDomainFactory().getDomainObject(TemplateBo.class, template.getID_TemplateBo()));
}
项目:openmaxims-linux    文件:UserAssessmentNewImpl.java   
public TemplateBoLiteVo getReportTemplate(TemplateBoRefVo refTemplate)
{
    if(refTemplate == null)
        throw new CodingRuntimeException("Cannot get TemplateBoLiteVo for null TemplateBoRefVo");

    TemplateBo template = (TemplateBo) getDomainFactory().getDomainObject(TemplateBo.class, refTemplate.getID_TemplateBo());

    return TemplateBoLiteVoAssembler.create(template);
}
项目:openmaxims-linux    文件:DynamicAssessmentsImpl.java   
public TemplateBoLiteVo getTemplate(TemplateBoRefVo template)
{
    if (template == null || !template.getID_TemplateBoIsNotNull())
        throw new DomainRuntimeException("Invalid template record");

    return TemplateBoLiteVoAssembler.create((TemplateBo) getDomainFactory().getDomainObject(TemplateBo.class, template.getID_TemplateBo()));
}
项目:openmaxims-linux    文件:GraphicAssessmentNewImpl.java   
/**
 * WDEV-13704
 * Function used to retrieve a template based on 
 */
public TemplateBoLiteVo getReportTemplate(TemplateBoRefVo templateRef)
{
    if (templateRef == null || !templateRef.getID_TemplateBoIsNotNull())
        return null;

    return TemplateBoLiteVoAssembler.create((TemplateBo) getDomainFactory().getDomainObject(TemplateBo.class, templateRef.getID_TemplateBo()));
}
项目:openmaxims-linux    文件:GraphicAssessmentNewImpl.java   
public TemplateBoLiteVo getReportTemplateByName(String templateName)
{   
    DomainFactory factory = getDomainFactory();
    String hql = "select template from TemplateBo as template where template.name =:tempName";
    List <?> list = factory.find(hql,new String[]{"tempName"}, new Object[]{templateName});

    if (list!=null && list.size()>0)
        return TemplateBoLiteVoAssembler.createTemplateBoLiteVoCollectionFromTemplateBo(list).get(0);

    return null;
}
项目:openmaxims-linux    文件:PatientICPActionLinkedDetailsComponentImpl.java   
/**
 * Get required template report
 */
public TemplateBoLiteVo getTemplateReport(TemplateBoRefVo templateRef)
{
    if (templateRef == null || templateRef.getID_TemplateBo() == null)
        return null;

    return TemplateBoLiteVoAssembler.create((TemplateBo) getDomainFactory().getDomainObject(TemplateBo.class, templateRef.getID_TemplateBo()));
}
项目:openmaxims-linux    文件:Logic.java   
private void populateTemplates(DynamicGridRow reportRow, TemplateBoLiteVoCollection templates)
{
    if (templates == null)
        return;

    for (TemplateBoLiteVo template : templates)
    {
        DynamicGridRow templateRow = reportRow.getRows().newRow();

        templateRow.setCollapsedImage(form.getImages().Admin.Edit);
        templateRow.setExpandedImage(form.getImages().Admin.Edit);

        if (template.getLastDeployment() != null && template.getLastUpdated() != null
                && template.getLastDeployment().isLessThan(template.getLastUpdated()))
        {
            templateRow.setTextColor(Color.Black);
        }
        else
        {
            templateRow.setTextColor(Color.Gray);
        }

        DynamicGridCell cellName = templateRow.getCells().newCell(form.dyngrdReports().getColumns().getByIdentifier(COL_NAME), DynamicCellType.STRING);
        cellName.setValue(template.getName());
        cellName.setTooltip(getTemplateTooltip(template.getTemplateXml()));
        cellName.setReadOnly(true);

        DynamicGridCell cellLastDeployed = templateRow.getCells().newCell(form.dyngrdReports().getColumns().getByIdentifier(COL_LAST_DEPLOY), DynamicCellType.DATETIME);
        cellLastDeployed.setValue(template.getLastDeployment());
        cellLastDeployed.setReadOnly(true);

        DynamicGridCell cellLastModified = templateRow.getCells().newCell(form.dyngrdReports().getColumns().getByIdentifier(COL_LAST_MODIFY), DynamicCellType.DATETIME);
        cellLastModified.setValue(template.getLastUpdated());
        cellLastModified.setReadOnly(true);

        templateRow.setValue(template);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private boolean hasTemplatesUpdatedSinceLastDeploy(SystemReportVo report)
{
    if (report == null || report.getTemplates() == null)
        return false;

    for (TemplateBoLiteVo template : report.getTemplates())
    {
        if (template.getLastUpdated() != null && template.getLastDeployment() != null && template.getLastDeployment().isLessThan(template.getLastUpdated()))
            return true;
    }

    return false;
}
项目:AvoinApotti    文件:Logic.java   
private void open()
{
    super.clearScreen();
    clearAssessmentRoleLocalContext();

    UserAssessmentShortVo assessmentShort = form.getGlobalContext().Core.getSelectedUserAssessment();

    if (assessmentShort != null && assessmentShort.getID_UserAssessmentIsNotNull())
    {
        // Copy assessment
        UserAssessmentVo assessment = domain.getAssessment(assessmentShort.getID_UserAssessment());
        if (form.getGlobalContext().Core.getUserAssessmentAction().charAt(0) == 'C')
        {
            // Set the form in Edit Mode
            form.getGlobalContext().Core.setUserAssessmentAction("E");

            assessment = getCopyOfAssessmentVo(assessment);
        }
        form.getLocalContext().setUserAssessment(assessment);
        // if a record is being edited then we disable the checkboxes
        form.chkFlatView().setEnabled(false);
        form.chkMultipleGroup().setEnabled(false);
        if (assessment.getGroupQuestionWidthIsNotNull())
            form.chkCustomWidth().setValue(true);
        populateScreenFromData(assessment);
        populateGridDetails(assessment);
        populateRolesDetails(assessment);
        populateSpecialtyGrid(assessment.getAssessmentSpecialties());
        populateServicesGrid(assessment.getServices()); //wdev-14028
        //showHideServiceTab(); //wdev-14028

        loadQuestionsIntoMap(assessment);

        form.getLocalContext().setLinkedTemplate( assessment.getAssociatedReport());

        if(assessment.getAssociatedReportIsNotNull())
        {
            TemplateBoLiteVo template = domain.getReportTemplate(assessment.getAssociatedReport());

            if(template != null)
                form.txtReport().setValue(template.getName());
        }
        else
            form.txtReport().setValue(null); //WDEV-17583
    }
    else
    {
        setDefaultName();

        if(isDpp())
        {
            form.chkMultipleGroup().setValue(false);
            form.chkFlatView().setValue(true);
        }
        else
        {
            form.chkMultipleGroup().setValue(true);
            form.chkFlatView().setValue(false);             
        }

        if (isAssessmentThirdLevelChild())
            form.txtDescription().setFocus();
        else
            form.txtName().setFocus();
        createDynamicGridColumns(form.lyrTabs().tabAssessments().dyngrdDetails());
    }

    form.getLocalContext().setLastViewMode(new Integer(getViewMode()));
    setFormMode(isFormInViewMode() ? FormMode.VIEW : FormMode.EDIT);
    refreshContextMenu();
    enableMultiRoleTabs();
    enableGroupTab();

    //Set Inactive status
    form.getLocalContext().setIsInactive(isStatusInactive());
}
项目:openMAXIMS    文件:Logic.java   
private void open()
{
    super.clearScreen();
    clearAssessmentRoleLocalContext();

    UserAssessmentShortVo assessmentShort = form.getGlobalContext().Core.getSelectedUserAssessment();

    if (assessmentShort != null && assessmentShort.getID_UserAssessmentIsNotNull())
    {
        // Copy assessment
        UserAssessmentVo assessment = domain.getAssessment(assessmentShort.getID_UserAssessment());
        if (form.getGlobalContext().Core.getUserAssessmentAction().charAt(0) == 'C')
        {
            // Set the form in Edit Mode
            form.getGlobalContext().Core.setUserAssessmentAction("E");

            assessment = getCopyOfAssessmentVo(assessment);
        }
        form.getLocalContext().setUserAssessment(assessment);
        // if a record is being edited then we disable the checkboxes
        form.chkFlatView().setEnabled(false);
        form.chkMultipleGroup().setEnabled(false);
        if (assessment.getGroupQuestionWidthIsNotNull())
            form.chkCustomWidth().setValue(true);
        populateScreenFromData(assessment);
        populateGridDetails(assessment);
        populateRolesDetails(assessment);
        populateSpecialtyGrid(assessment.getAssessmentSpecialties());
        populateServicesGrid(assessment.getServices()); //wdev-14028
        //showHideServiceTab(); //wdev-14028

        loadQuestionsIntoMap(assessment);

        form.getLocalContext().setLinkedTemplate( assessment.getAssociatedReport());

        if(assessment.getAssociatedReportIsNotNull())
        {
            TemplateBoLiteVo template = domain.getReportTemplate(assessment.getAssociatedReport());

            if(template != null)
                form.txtReport().setValue(template.getName());
        }
        else
            form.txtReport().setValue(null); //WDEV-17583
    }
    else
    {
        setDefaultName();

        if(isDpp())
        {
            form.chkMultipleGroup().setValue(false);
            form.chkFlatView().setValue(true);
        }
        else
        {
            form.chkMultipleGroup().setValue(true);
            form.chkFlatView().setValue(false);             
        }

        if (isAssessmentThirdLevelChild())
            form.txtDescription().setFocus();
        else
            form.txtName().setFocus();
        createDynamicGridColumns(form.lyrTabs().tabAssessments().dyngrdDetails());
    }

    form.getLocalContext().setLastViewMode(new Integer(getViewMode()));
    setFormMode(isFormInViewMode() ? FormMode.VIEW : FormMode.EDIT);
    refreshContextMenu();
    enableMultiRoleTabs();
    enableGroupTab();

    //Set Inactive status
    form.getLocalContext().setIsInactive(isStatusInactive());
}
项目:openMAXIMS    文件:Logic.java   
/**
 * 
 * @param patientAssessment
 * @param userAssessmentRef
 */
private void populateUserAssessmentInstanceControls(PatientAssessmentVo patientAssessment, UserAssessmentRefVo userAssessmentRef)
{
    // Check for an assessment
    if (patientAssessment == null)
    {
        // Get the configuration user assessment
        UserAssessmentVo userAssessment = domain.getAssessment(userAssessmentRef);

        // Create a blank patient Assessment to be displayed
        patientAssessment = new PatientAssessmentVo();

        patientAssessment.setAssessmentData(new PatientAssessmentDataVo());
        patientAssessment.getAssessmentData().setUserAssessment(userAssessment);
        patientAssessment.getAssessmentData().setGroupQuestionWidth(userAssessment.getGroupQuestionWidth());
    }
    else if (patientAssessment.getID_PatientAssessment() != null)
    {
        boolean hasAssociatedReport = patientAssessment.getAssessmentData().getUserAssessment().getAssociatedReport() != null;

        if (hasAssociatedReport)
        {
            TemplateBoLiteVo templateReport = domain.getTemplateReport(patientAssessment.getAssessmentData().getUserAssessment().getAssociatedReport());

            form.lyrMain().tabPageReport().ccReportBuilder().buildAssessmentReport(patientAssessment);
            form.lyrMain().tabPageReport().setCaption(templateReport != null ? templateReport.getName() : "");
        }
    }

    // Populate assessment instance controls
    form.lyrMain().tabPageAssessment().setCaption("Assessment");

    if (patientAssessment.getAssessmentDataIsNotNull() && patientAssessment.getAssessmentData().getUserAssessmentIsNotNull())
    {
        form.lyrMain().tabPageAssessment().setCaption(patientAssessment.getAssessmentData().getUserAssessment().getName());
    }

    // Set context tool tip
    form.lyrMain().tabPageAssessment().imbStructuralContextInfo().setTooltip(getContextInformation(patientAssessment.getCareContext(), patientAssessment.getClinicalContact()));

    // Display assessment
    form.lyrMain().tabPageAssessment().ccStrructuralAssessment().setPatientAssessment(patientAssessment);
    // Display authoring information
    form.lyrMain().tabPageAssessment().authStructuredAssessment().setValue(patientAssessment.getAuthoringInfo());

    // Code for completed
    boolean assessmentCompleted = patientAssessment.getStatusIsNotNull() && PatientAssessmentStatusReason.COMPLETED.equals(patientAssessment.getStatus());

    form.chkComplete().setValue(assessmentCompleted);

    if (assessmentCompleted)
    {
        // Set completed authoring information
        AuthoringInformationVo completedAuthoringInformation = new AuthoringInformationVo();
        completedAuthoringInformation.setAuthoringDateTime(patientAssessment.getCompletedDateTime());
        completedAuthoringInformation.setAuthoringHcp(patientAssessment.getCompletedHCP());

        form.lyrMain().tabPageAssessment().authStructuredAssessmentCompleted().setValue(completedAuthoringInformation);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateGraphicalAssessmentIstanceControls(PatientAssessmentVo patientGraphicalAssessment, GraphicAssessmentRefVo graphicAssessmentRef)
{
    // Check for an assessment
    if (patientGraphicalAssessment == null)
    {
        // Get the configuration graphical assessment
        GraphicAssessmentVo graphicAssessment = domain.getGraphicAssessment(graphicAssessmentRef);

        // Create a blank patient graphic assessment to be displayed
        patientGraphicalAssessment = new PatientAssessmentVo();

        patientGraphicalAssessment.setAssessmentData(new PatientAssessmentDataVo());
        patientGraphicalAssessment.getAssessmentData().setGraphic(graphicAssessment);
    }
    else if (patientGraphicalAssessment.getID_PatientAssessment() != null)
    {
        boolean hasAssociatedReport = patientGraphicalAssessment.getAssessmentData().getGraphic().getAssociatedReportForPrinting() != null;

        if (hasAssociatedReport)
        {
            TemplateBoLiteVo template = domain.getTemplateReport(patientGraphicalAssessment.getAssessmentData().getGraphic().getAssociatedReportForPrinting());

            form.lyrMain().tabPageReport().ccReportBuilder().buildAssessmentReport(patientGraphicalAssessment);
            form.lyrMain().tabPageReport().setCaption(template != null ? template.getName() : "");
        }
    }

    // Populate graphical assessment instance controls
    form.lyrMain().tabPageGraphicalAssessment().setCaption("Graphical Assessment");

    if (patientGraphicalAssessment.getAssessmentDataIsNotNull() && patientGraphicalAssessment.getAssessmentData().getGraphicIsNotNull())
    {
        form.lyrMain().tabPageGraphicalAssessment().setCaption(patientGraphicalAssessment.getAssessmentData().getGraphic().getName());
    }

    // Display assessment
    form.lyrMain().tabPageGraphicalAssessment().ccGraphicalAssessment().setPatientAssessment(patientGraphicalAssessment);
    // Display authoring information
    form.lyrMain().tabPageGraphicalAssessment().authGraphicalAssessment().setValue(patientGraphicalAssessment.getAuthoringInformation());

    // Code for completed graphical assessment
    boolean graphicalAssessmentCompleted = patientGraphicalAssessment.getStatusIsNotNull() && PatientAssessmentStatusReason.COMPLETED.equals(patientGraphicalAssessment.getStatus());

    form.chkComplete().setValue(graphicalAssessmentCompleted);

    if (graphicalAssessmentCompleted)
    {
        // Set completed authoring information
        AuthoringInformationVo completedAuthoringInformation = new AuthoringInformationVo();
        completedAuthoringInformation.setAuthoringHcp(patientGraphicalAssessment.getCompletedHCP());
        completedAuthoringInformation.setAuthoringDateTime(patientGraphicalAssessment.getCompletedDateTime());

        form.lyrMain().tabPageGraphicalAssessment().authGraphicalAssessmentCompleted().setValue(completedAuthoringInformation);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void open()
{
    super.clearScreen();
    clearAssessmentRoleLocalContext();

    UserAssessmentShortVo assessmentShort = form.getGlobalContext().Core.getSelectedUserAssessment();

    if (assessmentShort != null && assessmentShort.getID_UserAssessmentIsNotNull())
    {
        // Copy assessment
        UserAssessmentVo assessment = domain.getAssessment(assessmentShort.getID_UserAssessment());
        if (form.getGlobalContext().Core.getUserAssessmentAction().charAt(0) == 'C')
        {
            // Set the form in Edit Mode
            form.getGlobalContext().Core.setUserAssessmentAction("E");

            assessment = getCopyOfAssessmentVo(assessment);
        }
        form.getLocalContext().setUserAssessment(assessment);
        // if a record is being edited then we disable the checkboxes
        form.chkFlatView().setEnabled(false);
        form.chkMultipleGroup().setEnabled(false);
        if (assessment.getGroupQuestionWidthIsNotNull())
            form.chkCustomWidth().setValue(true);
        populateScreenFromData(assessment);
        populateGridDetails(assessment);
        populateRolesDetails(assessment);
        populateSpecialtyGrid(assessment.getAssessmentSpecialties());
        populateServicesGrid(assessment.getServices()); //wdev-14028
        //showHideServiceTab(); //wdev-14028

        loadQuestionsIntoMap(assessment);

        form.getLocalContext().setLinkedTemplate( assessment.getAssociatedReport());

        if(assessment.getAssociatedReportIsNotNull())
        {
            TemplateBoLiteVo template = domain.getReportTemplate(assessment.getAssociatedReport());

            if(template != null)
                form.txtReport().setValue(template.getName());
        }
        else
            form.txtReport().setValue(null); //WDEV-17583
    }
    else
    {
        setDefaultName();

        if(isDpp())
        {
            form.chkMultipleGroup().setValue(false);
            form.chkFlatView().setValue(true);
        }
        else
        {
            form.chkMultipleGroup().setValue(true);
            form.chkFlatView().setValue(false);             
        }

        if (isAssessmentThirdLevelChild())
            form.txtDescription().setFocus();
        else
            form.txtName().setFocus();
        createDynamicGridColumns(form.lyrTabs().tabAssessments().dyngrdDetails());
    }

    form.getLocalContext().setLastViewMode(new Integer(getViewMode()));
    setFormMode(isFormInViewMode() ? FormMode.VIEW : FormMode.EDIT);
    refreshContextMenu();
    enableMultiRoleTabs();
    enableGroupTab();

    //Set Inactive status
    form.getLocalContext().setIsInactive(isStatusInactive());
}