Java 类ims.core.vo.lookups.ClinicalContactStatus 实例源码

项目:AvoinApotti    文件:Logic.java   
protected boolean checkIfCareContextCanBeCancelled(CareContextVo careContext)
{
    if (careContext == null)
        return false;

    if (careContext.getCurrentStatus() != null && CareContextStatus.CANCELLED.equals(careContext.getCurrentStatus().getStatus()))
        return false;

    if (careContext.getClinicalContacts() != null)
    {
        for (ClinicalContactShortVo clinicalContact : careContext.getClinicalContacts())
        {
            if (clinicalContact.getCurrentStatus() == null || ClinicalContactStatus.OPEN.equals(clinicalContact.getCurrentStatus().getStatus()))
                return false;
        }
    }

    return true;
}
项目:AvoinApotti    文件:Logic.java   
protected boolean checkIfCareContextCanBeCancelled(CareContextVo careContext)
{
    if (careContext == null)
        return false;

    if (careContext.getCurrentStatus() != null && CareContextStatus.CANCELLED.equals(careContext.getCurrentStatus().getStatus()))
        return false;

    if (careContext.getClinicalContacts() != null)
    {
        for (ClinicalContactShortVo clinicalContact : careContext.getClinicalContacts())
        {
            if (clinicalContact.getCurrentStatus() == null || ClinicalContactStatus.OPEN.equals(clinicalContact.getCurrentStatus().getStatus()))
                return false;
        }
    }

    return true;
}
项目:AvoinApotti    文件:Patient_SummaryImpl.java   
public Boolean hasActiveClinicalContacts(CareContextRefVo careContext)
{
    if (careContext == null || careContext.getID_CareContext() == null)
        return false;

    StringBuilder query = new StringBuilder();

    query.append("SELECT COUNT(clin.id) ");
    query.append(" FROM ClinicalContact AS clin LEFT JOIN clin.careContext AS context LEFT JOIN clin.currentStatus AS curStatus LEFT JOIN curStatus.status AS status ");
    query.append(" WHERE context.id = :CARE_CONTEXT_ID AND status.id = :OPEN_STATUS");

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    paramNames.add("CARE_CONTEXT_ID");
    paramValues.add(careContext.getID_CareContext());
    paramNames.add("OPEN_STATUS");
    paramValues.add(ClinicalContactStatus.OPEN.getID());

    long count = getDomainFactory().countWithHQL(query.toString(), paramNames.toArray(new String[paramNames.size()]), paramValues.toArray(new Object[paramValues.size()]));

    if (count > 0)
        return true;

    return false;
}
项目:AvoinApotti    文件:PatientSummaryImpl.java   
public Boolean hasActiveClinicalContacts(CareContextRefVo careContext)
{
    if (careContext == null || careContext.getID_CareContext() == null)
        return false;

    StringBuilder query = new StringBuilder();

    query.append("SELECT COUNT(clin.id) ");
    query.append(" FROM ClinicalContact AS clin LEFT JOIN clin.careContext AS context LEFT JOIN clin.currentStatus AS curStatus LEFT JOIN curStatus.status AS status ");
    query.append(" WHERE context.id = :CARE_CONTEXT_ID AND status.id = :OPEN_STATUS");

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    paramNames.add("CARE_CONTEXT_ID");      paramValues.add(careContext.getID_CareContext());
    paramNames.add("OPEN_STATUS");          paramValues.add(ClinicalContactStatus.OPEN.getID());

    long count = getDomainFactory().countWithHQL(query.toString(), paramNames.toArray(new String[paramNames.size()]), paramValues.toArray(new Object[paramValues.size()]));

    if (count > 0)
        return true;

    return false;
}
项目:openMAXIMS    文件:Logic.java   
protected boolean checkIfCareContextCanBeCancelled(CareContextVo careContext)
{
    if (careContext == null)
        return false;

    if (careContext.getCurrentStatus() != null && CareContextStatus.CANCELLED.equals(careContext.getCurrentStatus().getStatus()))
        return false;

    if (careContext.getClinicalContacts() != null)
    {
        for (ClinicalContactShortVo clinicalContact : careContext.getClinicalContacts())
        {
            if (clinicalContact.getCurrentStatus() == null || ClinicalContactStatus.OPEN.equals(clinicalContact.getCurrentStatus().getStatus()))
                return false;
        }
    }

    return true;
}
项目:openMAXIMS    文件:Logic.java   
protected boolean checkIfCareContextCanBeCancelled(CareContextVo careContext)
{
    if (careContext == null)
        return false;

    if (careContext.getCurrentStatus() != null && CareContextStatus.CANCELLED.equals(careContext.getCurrentStatus().getStatus()))
        return false;

    if (careContext.getClinicalContacts() != null)
    {
        for (ClinicalContactShortVo clinicalContact : careContext.getClinicalContacts())
        {
            if (clinicalContact.getCurrentStatus() == null || ClinicalContactStatus.OPEN.equals(clinicalContact.getCurrentStatus().getStatus()))
                return false;
        }
    }

    return true;
}
项目:openMAXIMS    文件:Patient_SummaryImpl.java   
public Boolean hasActiveClinicalContacts(CareContextRefVo careContext)
{
    if (careContext == null || careContext.getID_CareContext() == null)
        return false;

    StringBuilder query = new StringBuilder();

    query.append("SELECT COUNT(clin.id) ");
    query.append(" FROM ClinicalContact AS clin LEFT JOIN clin.careContext AS context LEFT JOIN clin.currentStatus AS curStatus LEFT JOIN curStatus.status AS status ");
    query.append(" WHERE context.id = :CARE_CONTEXT_ID AND status.id = :OPEN_STATUS");

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    paramNames.add("CARE_CONTEXT_ID");
    paramValues.add(careContext.getID_CareContext());
    paramNames.add("OPEN_STATUS");
    paramValues.add(ClinicalContactStatus.OPEN.getID());

    long count = getDomainFactory().countWithHQL(query.toString(), paramNames.toArray(new String[paramNames.size()]), paramValues.toArray(new Object[paramValues.size()]));

    if (count > 0)
        return true;

    return false;
}
项目:openMAXIMS    文件:PatientSummaryImpl.java   
public Boolean hasActiveClinicalContacts(CareContextRefVo careContext)
{
    if (careContext == null || careContext.getID_CareContext() == null)
        return false;

    StringBuilder query = new StringBuilder();

    query.append("SELECT COUNT(clin.id) ");
    query.append(" FROM ClinicalContact AS clin LEFT JOIN clin.careContext AS context LEFT JOIN clin.currentStatus AS curStatus LEFT JOIN curStatus.status AS status ");
    query.append(" WHERE context.id = :CARE_CONTEXT_ID AND status.id = :OPEN_STATUS");

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    paramNames.add("CARE_CONTEXT_ID");      paramValues.add(careContext.getID_CareContext());
    paramNames.add("OPEN_STATUS");          paramValues.add(ClinicalContactStatus.OPEN.getID());

    long count = getDomainFactory().countWithHQL(query.toString(), paramNames.toArray(new String[paramNames.size()]), paramValues.toArray(new Object[paramValues.size()]));

    if (count > 0)
        return true;

    return false;
}
项目:openMAXIMS    文件:Logic.java   
protected boolean checkIfCareContextCanBeCancelled(CareContextVo careContext)
{
    if (careContext == null)
        return false;

    if (careContext.getCurrentStatus() != null && CareContextStatus.CANCELLED.equals(careContext.getCurrentStatus().getStatus()))
        return false;

    if (careContext.getClinicalContacts() != null)
    {
        for (ClinicalContactShortVo clinicalContact : careContext.getClinicalContacts())
        {
            if (clinicalContact.getCurrentStatus() == null || ClinicalContactStatus.OPEN.equals(clinicalContact.getCurrentStatus().getStatus()))
                return false;
        }
    }

    return true;
}
项目:openMAXIMS    文件:Logic.java   
protected boolean checkIfCareContextCanBeCancelled(CareContextVo careContext)
{
    if (careContext == null)
        return false;

    if (careContext.getCurrentStatus() != null && CareContextStatus.CANCELLED.equals(careContext.getCurrentStatus().getStatus()))
        return false;

    if (careContext.getClinicalContacts() != null)
    {
        for (ClinicalContactShortVo clinicalContact : careContext.getClinicalContacts())
        {
            if (clinicalContact.getCurrentStatus() == null || ClinicalContactStatus.OPEN.equals(clinicalContact.getCurrentStatus().getStatus()))
                return false;
        }
    }

    return true;
}
项目:openMAXIMS    文件:Patient_SummaryImpl.java   
public Boolean hasActiveClinicalContacts(CareContextRefVo careContext)
{
    if (careContext == null || careContext.getID_CareContext() == null)
        return false;

    StringBuilder query = new StringBuilder();

    query.append("SELECT COUNT(clin.id) ");
    query.append(" FROM ClinicalContact AS clin LEFT JOIN clin.careContext AS context LEFT JOIN clin.currentStatus AS curStatus LEFT JOIN curStatus.status AS status ");
    query.append(" WHERE context.id = :CARE_CONTEXT_ID AND status.id = :OPEN_STATUS");

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    paramNames.add("CARE_CONTEXT_ID");
    paramValues.add(careContext.getID_CareContext());
    paramNames.add("OPEN_STATUS");
    paramValues.add(ClinicalContactStatus.OPEN.getID());

    long count = getDomainFactory().countWithHQL(query.toString(), paramNames.toArray(new String[paramNames.size()]), paramValues.toArray(new Object[paramValues.size()]));

    if (count > 0)
        return true;

    return false;
}
项目:openMAXIMS    文件:PatientSummaryImpl.java   
public Boolean hasActiveClinicalContacts(CareContextRefVo careContext)
{
    if (careContext == null || careContext.getID_CareContext() == null)
        return false;

    StringBuilder query = new StringBuilder();

    query.append("SELECT COUNT(clin.id) ");
    query.append(" FROM ClinicalContact AS clin LEFT JOIN clin.careContext AS context LEFT JOIN clin.currentStatus AS curStatus LEFT JOIN curStatus.status AS status ");
    query.append(" WHERE context.id = :CARE_CONTEXT_ID AND status.id = :OPEN_STATUS");

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    paramNames.add("CARE_CONTEXT_ID");      paramValues.add(careContext.getID_CareContext());
    paramNames.add("OPEN_STATUS");          paramValues.add(ClinicalContactStatus.OPEN.getID());

    long count = getDomainFactory().countWithHQL(query.toString(), paramNames.toArray(new String[paramNames.size()]), paramValues.toArray(new Object[paramValues.size()]));

    if (count > 0)
        return true;

    return false;
}
项目:openmaxims-linux    文件:Logic.java   
protected boolean checkIfCareContextCanBeCancelled(CareContextVo careContext)
{
    if (careContext == null)
        return false;

    if (careContext.getCurrentStatus() != null && CareContextStatus.CANCELLED.equals(careContext.getCurrentStatus().getStatus()))
        return false;

    if (careContext.getClinicalContacts() != null)
    {
        for (ClinicalContactShortVo clinicalContact : careContext.getClinicalContacts())
        {
            if (clinicalContact.getCurrentStatus() == null || ClinicalContactStatus.OPEN.equals(clinicalContact.getCurrentStatus().getStatus()))
                return false;
        }
    }

    return true;
}
项目:openmaxims-linux    文件:Logic.java   
protected boolean checkIfCareContextCanBeCancelled(CareContextVo careContext)
{
    if (careContext == null)
        return false;

    if (careContext.getCurrentStatus() != null && CareContextStatus.CANCELLED.equals(careContext.getCurrentStatus().getStatus()))
        return false;

    if (careContext.getClinicalContacts() != null)
    {
        for (ClinicalContactShortVo clinicalContact : careContext.getClinicalContacts())
        {
            if (clinicalContact.getCurrentStatus() == null || ClinicalContactStatus.OPEN.equals(clinicalContact.getCurrentStatus().getStatus()))
                return false;
        }
    }

    return true;
}
项目:openmaxims-linux    文件:Patient_SummaryImpl.java   
public Boolean hasActiveClinicalContacts(CareContextRefVo careContext)
{
    if (careContext == null || careContext.getID_CareContext() == null)
        return false;

    StringBuilder query = new StringBuilder();

    query.append("SELECT COUNT(clin.id) ");
    query.append(" FROM ClinicalContact AS clin LEFT JOIN clin.careContext AS context LEFT JOIN clin.currentStatus AS curStatus LEFT JOIN curStatus.status AS status ");
    query.append(" WHERE context.id = :CARE_CONTEXT_ID AND status.id = :OPEN_STATUS");

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    paramNames.add("CARE_CONTEXT_ID");
    paramValues.add(careContext.getID_CareContext());
    paramNames.add("OPEN_STATUS");
    paramValues.add(ClinicalContactStatus.OPEN.getID());

    long count = getDomainFactory().countWithHQL(query.toString(), paramNames.toArray(new String[paramNames.size()]), paramValues.toArray(new Object[paramValues.size()]));

    if (count > 0)
        return true;

    return false;
}
项目:openmaxims-linux    文件:PatientSummaryImpl.java   
public Boolean hasActiveClinicalContacts(CareContextRefVo careContext)
{
    if (careContext == null || careContext.getID_CareContext() == null)
        return false;

    StringBuilder query = new StringBuilder();

    query.append("SELECT COUNT(clin.id) ");
    query.append(" FROM ClinicalContact AS clin LEFT JOIN clin.careContext AS context LEFT JOIN clin.currentStatus AS curStatus LEFT JOIN curStatus.status AS status ");
    query.append(" WHERE context.id = :CARE_CONTEXT_ID AND status.id = :OPEN_STATUS");

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    paramNames.add("CARE_CONTEXT_ID");      paramValues.add(careContext.getID_CareContext());
    paramNames.add("OPEN_STATUS");          paramValues.add(ClinicalContactStatus.OPEN.getID());

    long count = getDomainFactory().countWithHQL(query.toString(), paramNames.toArray(new String[paramNames.size()]), paramValues.toArray(new Object[paramValues.size()]));

    if (count > 0)
        return true;

    return false;
}
项目:AvoinApotti    文件:Logic.java   
protected boolean checkIfClinicalContactsAreNotOpened(ClinicalContactShortVo clinicalContact)
{
    if (clinicalContact == null)
        return false;
    if (clinicalContact.getCurrentStatus() == null || ClinicalContactStatus.OPEN.equals(clinicalContact.getCurrentStatus().getStatus()))// WDEV-14910
        return false;
    else
        return true;
}
项目:AvoinApotti    文件:Logic.java   
protected boolean checkIfClinicalContactsAreNotOpened(ClinicalContactShortVo clinicalContact)
{
    if(clinicalContact == null)
        return false;
    if( clinicalContact.getCurrentStatus() == null || ClinicalContactStatus.OPEN.equals(clinicalContact.getCurrentStatus().getStatus()))//  WDEV-14910
        return false;
    else
        return true;
}
项目:AvoinApotti    文件:Logic.java   
private void updateContextMenuState()
{
    form.getContextMenus().getClinicalContactsListViewCancelledContextsItem().setVisible(!ConfigFlag.UI.PATIENT_SUMMARY_SHOW_CANCELLED_CONTEXTS_BY_DEFAULT.getValue());  //wdev-13977 -> modified in WDEV-14909
    form.getContextMenus().getClinicalContactsListHideCancelledContextsItem().setVisible(ConfigFlag.UI.PATIENT_SUMMARY_SHOW_CANCELLED_CONTEXTS_BY_DEFAULT.getValue());  // WDEV-14909

    boolean isProblemGroupSelected = form.grdList().getSelectedRow() != null && form.grdList().getSelectedRow().getValue() instanceof CareSpellVo;
    boolean isProblemGroupCancelled = isProblemGroupSelected
                                        && ((CareSpellVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus() != null
                                        && ProblemGroupStatus.CANCELLED.equals(((CareSpellVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelProblemGroupItem().setVisible(isProblemGroupSelected && isProblemGroupCancelled);

    boolean isEpisodeOfCareSelected = form.grdList().getSelectedRow() != null && form.grdList().getSelectedRow().getValue() instanceof EpisodeofCareVo;
    boolean isEpisodeOfCareCancelled = isEpisodeOfCareSelected
                                        && ((EpisodeofCareVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus() != null
                                        && EpisodeOfCareStatus.CANCELLED.equals(((EpisodeofCareVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelEpisodeOfCareItem().setVisible(isEpisodeOfCareSelected && isEpisodeOfCareCancelled && !parentCancelled());

    boolean isCareContextSelected = form.grdList().getSelectedRow() != null && form.grdList().getSelectedRow().getValue() instanceof CareContextVo;
    boolean isCareContextCancelled = isCareContextSelected
                                        && ((CareContextVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus() != null
                                        && CareContextStatus.CANCELLED.equals(((CareContextVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelCareContextItem().setVisible(isCareContextSelected && isCareContextCancelled && !parentCancelled());

    boolean isClinicalContactSelected = form.grdList().getSelectedRow() != null && form.grdList().getSelectedRow().getValue() instanceof ClinicalContactShortVo;
    boolean isClinicalContactCancelled = isClinicalContactSelected
                                            && ((ClinicalContactShortVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus() != null
                                            && ClinicalContactStatus.CANCELLED.equals(((ClinicalContactShortVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelClinicalContactItem().setVisible(isClinicalContactSelected && isClinicalContactCancelled && !parentCancelled());
}
项目:openMAXIMS    文件:Logic.java   
protected boolean checkIfClinicalContactsAreNotOpened(ClinicalContactShortVo clinicalContact)
{
    if (clinicalContact == null)
        return false;
    if (clinicalContact.getCurrentStatus() == null || ClinicalContactStatus.OPEN.equals(clinicalContact.getCurrentStatus().getStatus()))// WDEV-14910
        return false;
    else
        return true;
}
项目:openMAXIMS    文件:Logic.java   
protected boolean checkIfClinicalContactsAreNotOpened(ClinicalContactShortVo clinicalContact)
{
    if(clinicalContact == null)
        return false;
    if( clinicalContact.getCurrentStatus() == null || ClinicalContactStatus.OPEN.equals(clinicalContact.getCurrentStatus().getStatus()))//  WDEV-14910
        return false;
    else
        return true;
}
项目:openMAXIMS    文件:Logic.java   
private void updateContextMenuState()
{
    form.getContextMenus().getClinicalContactsListViewCancelledContextsItem().setVisible(!ConfigFlag.UI.PATIENT_SUMMARY_SHOW_CANCELLED_CONTEXTS_BY_DEFAULT.getValue());  //wdev-13977 -> modified in WDEV-14909
    form.getContextMenus().getClinicalContactsListHideCancelledContextsItem().setVisible(ConfigFlag.UI.PATIENT_SUMMARY_SHOW_CANCELLED_CONTEXTS_BY_DEFAULT.getValue());  // WDEV-14909

    boolean isProblemGroupSelected = form.grdList().getSelectedRow() != null && form.grdList().getSelectedRow().getValue() instanceof CareSpellVo;
    boolean isProblemGroupCancelled = isProblemGroupSelected
                                        && ((CareSpellVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus() != null
                                        && ProblemGroupStatus.CANCELLED.equals(((CareSpellVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelProblemGroupItem().setVisible(isProblemGroupSelected && isProblemGroupCancelled);

    boolean isEpisodeOfCareSelected = form.grdList().getSelectedRow() != null && form.grdList().getSelectedRow().getValue() instanceof EpisodeofCareVo;
    boolean isEpisodeOfCareCancelled = isEpisodeOfCareSelected
                                        && ((EpisodeofCareVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus() != null
                                        && EpisodeOfCareStatus.CANCELLED.equals(((EpisodeofCareVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelEpisodeOfCareItem().setVisible(isEpisodeOfCareSelected && isEpisodeOfCareCancelled && !parentCancelled());

    boolean isCareContextSelected = form.grdList().getSelectedRow() != null && form.grdList().getSelectedRow().getValue() instanceof CareContextVo;
    boolean isCareContextCancelled = isCareContextSelected
                                        && ((CareContextVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus() != null
                                        && CareContextStatus.CANCELLED.equals(((CareContextVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelCareContextItem().setVisible(isCareContextSelected && isCareContextCancelled && !parentCancelled());

    boolean isClinicalContactSelected = form.grdList().getSelectedRow() != null && form.grdList().getSelectedRow().getValue() instanceof ClinicalContactShortVo;
    boolean isClinicalContactCancelled = isClinicalContactSelected
                                            && ((ClinicalContactShortVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus() != null
                                            && ClinicalContactStatus.CANCELLED.equals(((ClinicalContactShortVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelClinicalContactItem().setVisible(isClinicalContactSelected && isClinicalContactCancelled && !parentCancelled());
}
项目:openMAXIMS    文件:Logic.java   
protected boolean checkIfClinicalContactsAreNotOpened(ClinicalContactShortVo clinicalContact)
{
    if (clinicalContact == null)
        return false;
    if (clinicalContact.getCurrentStatus() == null || ClinicalContactStatus.OPEN.equals(clinicalContact.getCurrentStatus().getStatus()))// WDEV-14910
        return false;
    else
        return true;
}
项目:openMAXIMS    文件:Logic.java   
protected boolean checkIfClinicalContactsAreNotOpened(ClinicalContactShortVo clinicalContact)
{
    if(clinicalContact == null)
        return false;
    if( clinicalContact.getCurrentStatus() == null || ClinicalContactStatus.OPEN.equals(clinicalContact.getCurrentStatus().getStatus()))//  WDEV-14910
        return false;
    else
        return true;
}
项目:openMAXIMS    文件:Logic.java   
private void updateContextMenuState()
{
    form.getContextMenus().getClinicalContactsListViewCancelledContextsItem().setVisible(!ConfigFlag.UI.PATIENT_SUMMARY_SHOW_CANCELLED_CONTEXTS_BY_DEFAULT.getValue());  //wdev-13977 -> modified in WDEV-14909
    form.getContextMenus().getClinicalContactsListHideCancelledContextsItem().setVisible(ConfigFlag.UI.PATIENT_SUMMARY_SHOW_CANCELLED_CONTEXTS_BY_DEFAULT.getValue());  // WDEV-14909

    boolean isProblemGroupSelected = form.grdList().getSelectedRow() != null && form.grdList().getSelectedRow().getValue() instanceof CareSpellVo;
    boolean isProblemGroupCancelled = isProblemGroupSelected
                                        && ((CareSpellVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus() != null
                                        && ProblemGroupStatus.CANCELLED.equals(((CareSpellVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelProblemGroupItem().setVisible(isProblemGroupSelected && isProblemGroupCancelled);

    boolean isEpisodeOfCareSelected = form.grdList().getSelectedRow() != null && form.grdList().getSelectedRow().getValue() instanceof EpisodeofCareVo;
    boolean isEpisodeOfCareCancelled = isEpisodeOfCareSelected
                                        && ((EpisodeofCareVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus() != null
                                        && EpisodeOfCareStatus.CANCELLED.equals(((EpisodeofCareVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelEpisodeOfCareItem().setVisible(isEpisodeOfCareSelected && isEpisodeOfCareCancelled && !parentCancelled());

    boolean isCareContextSelected = form.grdList().getSelectedRow() != null && form.grdList().getSelectedRow().getValue() instanceof CareContextVo;
    boolean isCareContextCancelled = isCareContextSelected
                                        && ((CareContextVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus() != null
                                        && CareContextStatus.CANCELLED.equals(((CareContextVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelCareContextItem().setVisible(isCareContextSelected && isCareContextCancelled && !parentCancelled());

    boolean isClinicalContactSelected = form.grdList().getSelectedRow() != null && form.grdList().getSelectedRow().getValue() instanceof ClinicalContactShortVo;
    boolean isClinicalContactCancelled = isClinicalContactSelected
                                            && ((ClinicalContactShortVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus() != null
                                            && ClinicalContactStatus.CANCELLED.equals(((ClinicalContactShortVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelClinicalContactItem().setVisible(isClinicalContactSelected && isClinicalContactCancelled && !parentCancelled());
}
项目:openmaxims-linux    文件:Logic.java   
protected boolean checkIfClinicalContactsAreNotOpened(ClinicalContactShortVo clinicalContact)
{
    if (clinicalContact == null)
        return false;
    if (clinicalContact.getCurrentStatus() == null || ClinicalContactStatus.OPEN.equals(clinicalContact.getCurrentStatus().getStatus()))// WDEV-14910
        return false;
    else
        return true;
}
项目:openmaxims-linux    文件:Logic.java   
protected boolean checkIfClinicalContactsAreNotOpened(ClinicalContactShortVo clinicalContact)
{
    if(clinicalContact == null)
        return false;
    if( clinicalContact.getCurrentStatus() == null || ClinicalContactStatus.OPEN.equals(clinicalContact.getCurrentStatus().getStatus()))//  WDEV-14910
        return false;
    else
        return true;
}
项目:openmaxims-linux    文件:Logic.java   
private void updateContextMenuState()
{
    form.getContextMenus().getClinicalContactsListViewCancelledContextsItem().setVisible(!ConfigFlag.UI.PATIENT_SUMMARY_SHOW_CANCELLED_CONTEXTS_BY_DEFAULT.getValue());  //wdev-13977 -> modified in WDEV-14909
    form.getContextMenus().getClinicalContactsListHideCancelledContextsItem().setVisible(ConfigFlag.UI.PATIENT_SUMMARY_SHOW_CANCELLED_CONTEXTS_BY_DEFAULT.getValue());  // WDEV-14909

    boolean isProblemGroupSelected = form.grdList().getSelectedRow() != null && form.grdList().getSelectedRow().getValue() instanceof CareSpellVo;
    boolean isProblemGroupCancelled = isProblemGroupSelected
                                        && ((CareSpellVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus() != null
                                        && ProblemGroupStatus.CANCELLED.equals(((CareSpellVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelProblemGroupItem().setVisible(isProblemGroupSelected && isProblemGroupCancelled);

    boolean isEpisodeOfCareSelected = form.grdList().getSelectedRow() != null && form.grdList().getSelectedRow().getValue() instanceof EpisodeofCareVo;
    boolean isEpisodeOfCareCancelled = isEpisodeOfCareSelected
                                        && ((EpisodeofCareVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus() != null
                                        && EpisodeOfCareStatus.CANCELLED.equals(((EpisodeofCareVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelEpisodeOfCareItem().setVisible(isEpisodeOfCareSelected && isEpisodeOfCareCancelled && !parentCancelled());

    boolean isCareContextSelected = form.grdList().getSelectedRow() != null && form.grdList().getSelectedRow().getValue() instanceof CareContextVo;
    boolean isCareContextCancelled = isCareContextSelected
                                        && ((CareContextVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus() != null
                                        && CareContextStatus.CANCELLED.equals(((CareContextVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelCareContextItem().setVisible(isCareContextSelected && isCareContextCancelled && !parentCancelled());

    boolean isClinicalContactSelected = form.grdList().getSelectedRow() != null && form.grdList().getSelectedRow().getValue() instanceof ClinicalContactShortVo;
    boolean isClinicalContactCancelled = isClinicalContactSelected
                                            && ((ClinicalContactShortVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus() != null
                                            && ClinicalContactStatus.CANCELLED.equals(((ClinicalContactShortVo) form.grdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelClinicalContactItem().setVisible(isClinicalContactSelected && isClinicalContactCancelled && !parentCancelled());
}
项目:AvoinApotti    文件:Logic.java   
private void populateClinicalContacts(ClinicalContactShortVoCollection voCollclinicalContacts, DynamicGridRow careContextRow)
{
    if (voCollclinicalContacts != null && careContextRow != null)
    {
        voCollclinicalContacts.sort();
        DynamicGridRow clinicalContactRow = null;
        for (int i = 0; i < voCollclinicalContacts.size(); i++)
        {
            clinicalContactRow = careContextRow.getRows().newRow();

            DynamicGridCell cellStartEndDate = clinicalContactRow.getCells().newCell(getColumnById(COLUMN_STARTDATE_ENDDATE), DynamicCellType.STRING);
            cellStartEndDate.setValue(voCollclinicalContacts.get(i).createDisplayString());
            cellStartEndDate.setTooltip("Clinical Contact: " + voCollclinicalContacts.get(i).createDisplayString());
            cellStartEndDate.setReadOnly(true);

            DynamicGridCell cellSpecialty = clinicalContactRow.getCells().newCell(getColumnById(COLUMN_SPECIALTY), DynamicCellType.STRING);
            cellSpecialty.setValue(voCollclinicalContacts.get(i).getSpecialtyIsNotNull() ? INDENT + INDENT + INDENT + voCollclinicalContacts.get(i).getSpecialty().getText() : null);
            cellSpecialty.setTooltip("Clinical Contact: " + (voCollclinicalContacts.get(i).getSpecialtyIsNotNull() ? INDENT + INDENT + INDENT + voCollclinicalContacts.get(i).getSpecialty().getText() : ""));
            cellSpecialty.setReadOnly(true);

            DynamicGridCell cellContactType = clinicalContactRow.getCells().newCell(getColumnById(COLUMN_CONTACT_TYPE), DynamicCellType.STRING);
            cellSpecialty.setReadOnly(true);

            if (ConfigFlag.UI.DISPLAY_WORKLIST_CONTACT_TYPE_ON_PATIENT_SUMMARY.getValue() == true)
            {
                if (voCollclinicalContacts.get(i).getContactTypeIsNotNull())
                {
                    WorklistContactType lkupWorklistContactType = domain.getWorklistContactTypeByExternalCode(voCollclinicalContacts.get(i).getContactType());
                    if (lkupWorklistContactType != null)
                    {
                        cellContactType.setValue(lkupWorklistContactType.getText());
                        cellContactType.setTooltip("Clinical Contact: " + lkupWorklistContactType.getText());
                    }
                    else
                    {
                        cellContactType.setValue(voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : null);
                        cellContactType.setTooltip("Clinical Contact: " + (voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : ""));
                    }
                }
            }
            else
            {
                cellContactType.setValue(voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : null);
                cellContactType.setTooltip("Clinical Contact: " + (voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : ""));
            }

            cellContactType.setReadOnly(Boolean.TRUE);

            DynamicGridCell cellRMO = clinicalContactRow.getCells().newCell(getColumnById(COLUMN_RMO), DynamicCellType.STRING);
            cellRMO.setValue(voCollclinicalContacts.get(i).getSeenByIsNotNull() ? INDENT + INDENT + INDENT + voCollclinicalContacts.get(i).getSeenBy().toString() : null);
            cellRMO.setTooltip("Clinical Contact: " + (voCollclinicalContacts.get(i).getSeenByIsNotNull() ? INDENT + INDENT + INDENT + voCollclinicalContacts.get(i).getSeenBy().toString() : ""));
            cellRMO.setReadOnly(true);

            clinicalContactRow.setCollapsedImage(form.getImages().Admin.MemberOfStaff);
            clinicalContactRow.setExpandedImage(form.getImages().Admin.MemberOfStaff);
        //  clinicalContactRow.setColumnHistoryEmpty(true); // wdev-13896

            // WDEV-13764
            if (voCollclinicalContacts.get(i).getCurrentStatusIsNotNull() && voCollclinicalContacts.get(i).getCurrentStatus().getStatusIsNotNull() && voCollclinicalContacts.get(i).getCurrentStatus().getStatus().equals(ClinicalContactStatus.CANCELLED))
                clinicalContactRow.setBackColor(ConfigFlag.UI.DISPLAY_COLOUR_FOR_CANCELLED_CLINICAL_CONTACTS.getValue());

            clinicalContactRow.setValue(voCollclinicalContacts.get(i));
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void updateContextMenuState()
{
    form.getContextMenus().getClinicalContactsListViewCancelledContextsItem().setVisible(!ConfigFlag.UI.PATIENT_SUMMARY_SHOW_CANCELLED_CONTEXTS_BY_DEFAULT.getValue()); // wdev-13977 modified in WDEV-14909
    form.getContextMenus().getClinicalContactsListHideCancelledContextsItem().setVisible(ConfigFlag.UI.PATIENT_SUMMARY_SHOW_CANCELLED_CONTEXTS_BY_DEFAULT.getValue()); // WDEV-14909

    boolean isProblemGroupSelected = form.dyngrdList().getSelectedRow() != null && form.dyngrdList().getSelectedRow().getValue() instanceof CareSpellVo;
    boolean isProblemGroupCancelled = isProblemGroupSelected && ((CareSpellVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus() != null && ProblemGroupStatus.CANCELLED.equals(((CareSpellVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelProblemGroupItem().setVisible(isProblemGroupSelected && isProblemGroupCancelled);

    boolean isEpisodeOfCareSelected = form.dyngrdList().getSelectedRow() != null && form.dyngrdList().getSelectedRow().getValue() instanceof EpisodeofCareVo;
    boolean isEpisodeOfCareCancelled = isEpisodeOfCareSelected && ((EpisodeofCareVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus() != null && EpisodeOfCareStatus.CANCELLED.equals(((EpisodeofCareVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelEpisodeOfCareItem().setVisible(isEpisodeOfCareSelected && isEpisodeOfCareCancelled && !parentCancelled());

    boolean isCareContextSelected = form.dyngrdList().getSelectedRow() != null && form.dyngrdList().getSelectedRow().getValue() instanceof CareContextVo;
    boolean isCareContextCancelled = isCareContextSelected && ((CareContextVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus() != null && CareContextStatus.CANCELLED.equals(((CareContextVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelCareContextItem().setVisible(isCareContextSelected && isCareContextCancelled && !parentCancelled());

    boolean isClinicalContactSelected = form.dyngrdList().getSelectedRow() != null && form.dyngrdList().getSelectedRow().getValue() instanceof ClinicalContactShortVo;
    boolean isClinicalContactCancelled = isClinicalContactSelected && ((ClinicalContactShortVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus() != null && ClinicalContactStatus.CANCELLED.equals(((ClinicalContactShortVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelClinicalContactItem().setVisible(isClinicalContactSelected && isClinicalContactCancelled && !parentCancelled());
}
项目:AvoinApotti    文件:Logic.java   
private void populateClinicalContacts(ClinicalContactShortVoCollection voCollclinicalContacts, grdListRow careContextRow)
{
    if (voCollclinicalContacts != null && careContextRow != null)
    {
        voCollclinicalContacts.sort();
        grdListRow clinicalContactRow = null;
        for (int i = 0; i < voCollclinicalContacts.size(); i++)
        {
            clinicalContactRow = careContextRow.getRows().newRow();

            clinicalContactRow.setcolStartDateEndDate(voCollclinicalContacts.get(i).createDisplayString());
            clinicalContactRow.setTooltipForcolStartDateEndDate("Clinical Contact: " + voCollclinicalContacts.get(i).createDisplayString());
            clinicalContactRow.setcolSpeciality(voCollclinicalContacts.get(i).getSpecialtyIsNotNull() ? INDENT + INDENT + INDENT + voCollclinicalContacts.get(i).getSpecialty().getText() : null);
            clinicalContactRow.setTooltipForcolSpeciality("Clinical Contact: " + (voCollclinicalContacts.get(i).getSpecialtyIsNotNull() ? INDENT + INDENT + INDENT + voCollclinicalContacts.get(i).getSpecialty().getText() : ""));
            if (ConfigFlag.UI.DISPLAY_WORKLIST_CONTACT_TYPE_ON_PATIENT_SUMMARY.getValue() == true){
                if(voCollclinicalContacts.get(i).getContactTypeIsNotNull()){
                    WorklistContactType lkupWorklistContactType = domain.getWorklistContactTypeByExternalCode(voCollclinicalContacts.get(i).getContactType());
                    if(lkupWorklistContactType!=null)
                    {
                        clinicalContactRow.setcolContactType(lkupWorklistContactType.getText());
                        clinicalContactRow.setTooltipForcolContactType("Clinical Contact: " + lkupWorklistContactType.getText());
                    }
                    else
                    {
                        clinicalContactRow.setcolContactType(voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : null);
                        clinicalContactRow.setTooltipForcolContactType("Clinical Contact: " + (voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : ""));
                    }
                }
            }
            else
            {
                clinicalContactRow.setcolContactType(voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : null);
                clinicalContactRow.setTooltipForcolContactType("Clinical Contact: " + (voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : ""));
            }

            clinicalContactRow.setcolRMO(voCollclinicalContacts.get(i).getSeenByIsNotNull() ? INDENT + INDENT + INDENT +  voCollclinicalContacts.get(i).getSeenBy().toString() : null);
            clinicalContactRow.setTooltipForcolRMO("Clinical Contact: " + (voCollclinicalContacts.get(i).getSeenByIsNotNull() ? INDENT + INDENT + INDENT +  voCollclinicalContacts.get(i).getSeenBy().toString() : ""));
            clinicalContactRow.setCollapsedImage(form.getImages().Admin.MemberOfStaff);
            clinicalContactRow.setExpandedImage(form.getImages().Admin.MemberOfStaff);
            clinicalContactRow.setColumnHistoryEmpty(true);   //wdev-13896

            //WDEV-13764 
            if(voCollclinicalContacts.get(i).getCurrentStatusIsNotNull() && voCollclinicalContacts.get(i).getCurrentStatus().getStatusIsNotNull() 
                    && voCollclinicalContacts.get(i).getCurrentStatus().getStatus().equals(ClinicalContactStatus.CANCELLED))
                clinicalContactRow.setBackColor(ConfigFlag.UI.DISPLAY_COLOUR_FOR_CANCELLED_CLINICAL_CONTACTS.getValue());

            clinicalContactRow.setValue(voCollclinicalContacts.get(i));
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateClinicalContacts(ClinicalContactShortVoCollection voCollclinicalContacts, DynamicGridRow careContextRow)
{
    if (voCollclinicalContacts != null && careContextRow != null)
    {
        voCollclinicalContacts.sort();
        DynamicGridRow clinicalContactRow = null;
        for (int i = 0; i < voCollclinicalContacts.size(); i++)
        {
            clinicalContactRow = careContextRow.getRows().newRow();

            DynamicGridCell cellStartEndDate = clinicalContactRow.getCells().newCell(getColumnById(COLUMN_STARTDATE_ENDDATE), DynamicCellType.STRING);
            cellStartEndDate.setValue(voCollclinicalContacts.get(i).createDisplayString());
            cellStartEndDate.setTooltip("Clinical Contact: " + voCollclinicalContacts.get(i).createDisplayString());
            cellStartEndDate.setReadOnly(true);

            DynamicGridCell cellSpecialty = clinicalContactRow.getCells().newCell(getColumnById(COLUMN_SPECIALTY), DynamicCellType.STRING);
            cellSpecialty.setValue(voCollclinicalContacts.get(i).getSpecialtyIsNotNull() ? INDENT + INDENT + INDENT + voCollclinicalContacts.get(i).getSpecialty().getText() : null);
            cellSpecialty.setTooltip("Clinical Contact: " + (voCollclinicalContacts.get(i).getSpecialtyIsNotNull() ? INDENT + INDENT + INDENT + voCollclinicalContacts.get(i).getSpecialty().getText() : ""));
            cellSpecialty.setReadOnly(true);

            DynamicGridCell cellContactType = clinicalContactRow.getCells().newCell(getColumnById(COLUMN_CONTACT_TYPE), DynamicCellType.STRING);
            cellSpecialty.setReadOnly(true);

            if (ConfigFlag.UI.DISPLAY_WORKLIST_CONTACT_TYPE_ON_PATIENT_SUMMARY.getValue() == true)
            {
                if (voCollclinicalContacts.get(i).getContactTypeIsNotNull())
                {
                    WorklistContactType lkupWorklistContactType = domain.getWorklistContactTypeByExternalCode(voCollclinicalContacts.get(i).getContactType());
                    if (lkupWorklistContactType != null)
                    {
                        cellContactType.setValue(lkupWorklistContactType.getText());
                        cellContactType.setTooltip("Clinical Contact: " + lkupWorklistContactType.getText());
                    }
                    else
                    {
                        cellContactType.setValue(voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : null);
                        cellContactType.setTooltip("Clinical Contact: " + (voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : ""));
                    }
                }
            }
            else
            {
                cellContactType.setValue(voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : null);
                cellContactType.setTooltip("Clinical Contact: " + (voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : ""));
            }

            cellContactType.setReadOnly(Boolean.TRUE);

            DynamicGridCell cellRMO = clinicalContactRow.getCells().newCell(getColumnById(COLUMN_RMO), DynamicCellType.STRING);
            cellRMO.setValue(voCollclinicalContacts.get(i).getSeenByIsNotNull() ? INDENT + INDENT + INDENT + voCollclinicalContacts.get(i).getSeenBy().toString() : null);
            cellRMO.setTooltip("Clinical Contact: " + (voCollclinicalContacts.get(i).getSeenByIsNotNull() ? INDENT + INDENT + INDENT + voCollclinicalContacts.get(i).getSeenBy().toString() : ""));
            cellRMO.setReadOnly(true);

            clinicalContactRow.setCollapsedImage(form.getImages().Admin.MemberOfStaff);
            clinicalContactRow.setExpandedImage(form.getImages().Admin.MemberOfStaff);
        //  clinicalContactRow.setColumnHistoryEmpty(true); // wdev-13896

            // WDEV-13764
            if (voCollclinicalContacts.get(i).getCurrentStatusIsNotNull() && voCollclinicalContacts.get(i).getCurrentStatus().getStatusIsNotNull() && voCollclinicalContacts.get(i).getCurrentStatus().getStatus().equals(ClinicalContactStatus.CANCELLED))
                clinicalContactRow.setBackColor(ConfigFlag.UI.DISPLAY_COLOUR_FOR_CANCELLED_CLINICAL_CONTACTS.getValue());

            clinicalContactRow.setValue(voCollclinicalContacts.get(i));
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void updateContextMenuState()
{
    form.getContextMenus().getClinicalContactsListViewCancelledContextsItem().setVisible(!ConfigFlag.UI.PATIENT_SUMMARY_SHOW_CANCELLED_CONTEXTS_BY_DEFAULT.getValue()); // wdev-13977 modified in WDEV-14909
    form.getContextMenus().getClinicalContactsListHideCancelledContextsItem().setVisible(ConfigFlag.UI.PATIENT_SUMMARY_SHOW_CANCELLED_CONTEXTS_BY_DEFAULT.getValue()); // WDEV-14909

    boolean isProblemGroupSelected = form.dyngrdList().getSelectedRow() != null && form.dyngrdList().getSelectedRow().getValue() instanceof CareSpellVo;
    boolean isProblemGroupCancelled = isProblemGroupSelected && ((CareSpellVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus() != null && ProblemGroupStatus.CANCELLED.equals(((CareSpellVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelProblemGroupItem().setVisible(isProblemGroupSelected && isProblemGroupCancelled);

    boolean isEpisodeOfCareSelected = form.dyngrdList().getSelectedRow() != null && form.dyngrdList().getSelectedRow().getValue() instanceof EpisodeofCareVo;
    boolean isEpisodeOfCareCancelled = isEpisodeOfCareSelected && ((EpisodeofCareVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus() != null && EpisodeOfCareStatus.CANCELLED.equals(((EpisodeofCareVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelEpisodeOfCareItem().setVisible(isEpisodeOfCareSelected && isEpisodeOfCareCancelled && !parentCancelled());

    boolean isCareContextSelected = form.dyngrdList().getSelectedRow() != null && form.dyngrdList().getSelectedRow().getValue() instanceof CareContextVo;
    boolean isCareContextCancelled = isCareContextSelected && ((CareContextVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus() != null && CareContextStatus.CANCELLED.equals(((CareContextVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelCareContextItem().setVisible(isCareContextSelected && isCareContextCancelled && !parentCancelled());

    boolean isClinicalContactSelected = form.dyngrdList().getSelectedRow() != null && form.dyngrdList().getSelectedRow().getValue() instanceof ClinicalContactShortVo;
    boolean isClinicalContactCancelled = isClinicalContactSelected && ((ClinicalContactShortVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus() != null && ClinicalContactStatus.CANCELLED.equals(((ClinicalContactShortVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelClinicalContactItem().setVisible(isClinicalContactSelected && isClinicalContactCancelled && !parentCancelled());
}
项目:openMAXIMS    文件:Logic.java   
private void populateClinicalContacts(ClinicalContactShortVoCollection voCollclinicalContacts, grdListRow careContextRow)
{
    if (voCollclinicalContacts != null && careContextRow != null)
    {
        voCollclinicalContacts.sort();
        grdListRow clinicalContactRow = null;
        for (int i = 0; i < voCollclinicalContacts.size(); i++)
        {
            clinicalContactRow = careContextRow.getRows().newRow();

            clinicalContactRow.setcolStartDateEndDate(voCollclinicalContacts.get(i).createDisplayString());
            clinicalContactRow.setTooltipForcolStartDateEndDate("Clinical Contact: " + voCollclinicalContacts.get(i).createDisplayString());
            clinicalContactRow.setcolSpeciality(voCollclinicalContacts.get(i).getSpecialtyIsNotNull() ? INDENT + INDENT + INDENT + voCollclinicalContacts.get(i).getSpecialty().getText() : null);
            clinicalContactRow.setTooltipForcolSpeciality("Clinical Contact: " + (voCollclinicalContacts.get(i).getSpecialtyIsNotNull() ? INDENT + INDENT + INDENT + voCollclinicalContacts.get(i).getSpecialty().getText() : ""));
            if (ConfigFlag.UI.DISPLAY_WORKLIST_CONTACT_TYPE_ON_PATIENT_SUMMARY.getValue() == true){
                if(voCollclinicalContacts.get(i).getContactTypeIsNotNull()){
                    WorklistContactType lkupWorklistContactType = domain.getWorklistContactTypeByExternalCode(voCollclinicalContacts.get(i).getContactType());
                    if(lkupWorklistContactType!=null)
                    {
                        clinicalContactRow.setcolContactType(lkupWorklistContactType.getText());
                        clinicalContactRow.setTooltipForcolContactType("Clinical Contact: " + lkupWorklistContactType.getText());
                    }
                    else
                    {
                        clinicalContactRow.setcolContactType(voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : null);
                        clinicalContactRow.setTooltipForcolContactType("Clinical Contact: " + (voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : ""));
                    }
                }
            }
            else
            {
                clinicalContactRow.setcolContactType(voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : null);
                clinicalContactRow.setTooltipForcolContactType("Clinical Contact: " + (voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : ""));
            }

            clinicalContactRow.setcolRMO(voCollclinicalContacts.get(i).getSeenByIsNotNull() ? INDENT + INDENT + INDENT +  voCollclinicalContacts.get(i).getSeenBy().toString() : null);
            clinicalContactRow.setTooltipForcolRMO("Clinical Contact: " + (voCollclinicalContacts.get(i).getSeenByIsNotNull() ? INDENT + INDENT + INDENT +  voCollclinicalContacts.get(i).getSeenBy().toString() : ""));
            clinicalContactRow.setCollapsedImage(form.getImages().Admin.MemberOfStaff);
            clinicalContactRow.setExpandedImage(form.getImages().Admin.MemberOfStaff);
            clinicalContactRow.setColumnHistoryEmpty(true);   //wdev-13896

            //WDEV-13764 
            if(voCollclinicalContacts.get(i).getCurrentStatusIsNotNull() && voCollclinicalContacts.get(i).getCurrentStatus().getStatusIsNotNull() 
                    && voCollclinicalContacts.get(i).getCurrentStatus().getStatus().equals(ClinicalContactStatus.CANCELLED))
                clinicalContactRow.setBackColor(ConfigFlag.UI.DISPLAY_COLOUR_FOR_CANCELLED_CLINICAL_CONTACTS.getValue());

            clinicalContactRow.setValue(voCollclinicalContacts.get(i));
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateClinicalContacts(ClinicalContactShortVoCollection voCollclinicalContacts, DynamicGridRow careContextRow)
{
    if (voCollclinicalContacts != null && careContextRow != null)
    {
        voCollclinicalContacts.sort();
        DynamicGridRow clinicalContactRow = null;
        for (int i = 0; i < voCollclinicalContacts.size(); i++)
        {
            clinicalContactRow = careContextRow.getRows().newRow();

            DynamicGridCell cellStartEndDate = clinicalContactRow.getCells().newCell(getColumnById(COLUMN_STARTDATE_ENDDATE), DynamicCellType.STRING);
            cellStartEndDate.setValue(voCollclinicalContacts.get(i).createDisplayString());
            cellStartEndDate.setTooltip("Clinical Contact: " + voCollclinicalContacts.get(i).createDisplayString());
            cellStartEndDate.setReadOnly(true);

            DynamicGridCell cellSpecialty = clinicalContactRow.getCells().newCell(getColumnById(COLUMN_SPECIALTY), DynamicCellType.STRING);
            cellSpecialty.setValue(voCollclinicalContacts.get(i).getSpecialtyIsNotNull() ? INDENT + INDENT + INDENT + voCollclinicalContacts.get(i).getSpecialty().getText() : null);
            cellSpecialty.setTooltip("Clinical Contact: " + (voCollclinicalContacts.get(i).getSpecialtyIsNotNull() ? INDENT + INDENT + INDENT + voCollclinicalContacts.get(i).getSpecialty().getText() : ""));
            cellSpecialty.setReadOnly(true);

            DynamicGridCell cellContactType = clinicalContactRow.getCells().newCell(getColumnById(COLUMN_CONTACT_TYPE), DynamicCellType.STRING);
            cellSpecialty.setReadOnly(true);

            if (ConfigFlag.UI.DISPLAY_WORKLIST_CONTACT_TYPE_ON_PATIENT_SUMMARY.getValue() == true)
            {
                if (voCollclinicalContacts.get(i).getContactTypeIsNotNull())
                {
                    WorklistContactType lkupWorklistContactType = domain.getWorklistContactTypeByExternalCode(voCollclinicalContacts.get(i).getContactType());
                    if (lkupWorklistContactType != null)
                    {
                        cellContactType.setValue(lkupWorklistContactType.getText());
                        cellContactType.setTooltip("Clinical Contact: " + lkupWorklistContactType.getText());
                    }
                    else
                    {
                        cellContactType.setValue(voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : null);
                        cellContactType.setTooltip("Clinical Contact: " + (voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : ""));
                    }
                }
            }
            else
            {
                cellContactType.setValue(voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : null);
                cellContactType.setTooltip("Clinical Contact: " + (voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : ""));
            }

            cellContactType.setReadOnly(Boolean.TRUE);

            DynamicGridCell cellRMO = clinicalContactRow.getCells().newCell(getColumnById(COLUMN_RMO), DynamicCellType.STRING);
            cellRMO.setValue(voCollclinicalContacts.get(i).getSeenByIsNotNull() ? INDENT + INDENT + INDENT + voCollclinicalContacts.get(i).getSeenBy().toString() : null);
            cellRMO.setTooltip("Clinical Contact: " + (voCollclinicalContacts.get(i).getSeenByIsNotNull() ? INDENT + INDENT + INDENT + voCollclinicalContacts.get(i).getSeenBy().toString() : ""));
            cellRMO.setReadOnly(true);

            clinicalContactRow.setCollapsedImage(form.getImages().Admin.MemberOfStaff);
            clinicalContactRow.setExpandedImage(form.getImages().Admin.MemberOfStaff);
        //  clinicalContactRow.setColumnHistoryEmpty(true); // wdev-13896

            // WDEV-13764
            if (voCollclinicalContacts.get(i).getCurrentStatusIsNotNull() && voCollclinicalContacts.get(i).getCurrentStatus().getStatusIsNotNull() && voCollclinicalContacts.get(i).getCurrentStatus().getStatus().equals(ClinicalContactStatus.CANCELLED))
                clinicalContactRow.setBackColor(ConfigFlag.UI.DISPLAY_COLOUR_FOR_CANCELLED_CLINICAL_CONTACTS.getValue());

            clinicalContactRow.setValue(voCollclinicalContacts.get(i));
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void updateContextMenuState()
{
    form.getContextMenus().getClinicalContactsListViewCancelledContextsItem().setVisible(!ConfigFlag.UI.PATIENT_SUMMARY_SHOW_CANCELLED_CONTEXTS_BY_DEFAULT.getValue()); // wdev-13977 modified in WDEV-14909
    form.getContextMenus().getClinicalContactsListHideCancelledContextsItem().setVisible(ConfigFlag.UI.PATIENT_SUMMARY_SHOW_CANCELLED_CONTEXTS_BY_DEFAULT.getValue()); // WDEV-14909

    boolean isProblemGroupSelected = form.dyngrdList().getSelectedRow() != null && form.dyngrdList().getSelectedRow().getValue() instanceof CareSpellVo;
    boolean isProblemGroupCancelled = isProblemGroupSelected && ((CareSpellVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus() != null && ProblemGroupStatus.CANCELLED.equals(((CareSpellVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelProblemGroupItem().setVisible(isProblemGroupSelected && isProblemGroupCancelled);

    boolean isEpisodeOfCareSelected = form.dyngrdList().getSelectedRow() != null && form.dyngrdList().getSelectedRow().getValue() instanceof EpisodeofCareVo;
    boolean isEpisodeOfCareCancelled = isEpisodeOfCareSelected && ((EpisodeofCareVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus() != null && EpisodeOfCareStatus.CANCELLED.equals(((EpisodeofCareVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelEpisodeOfCareItem().setVisible(isEpisodeOfCareSelected && isEpisodeOfCareCancelled && !parentCancelled());

    boolean isCareContextSelected = form.dyngrdList().getSelectedRow() != null && form.dyngrdList().getSelectedRow().getValue() instanceof CareContextVo;
    boolean isCareContextCancelled = isCareContextSelected && ((CareContextVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus() != null && CareContextStatus.CANCELLED.equals(((CareContextVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelCareContextItem().setVisible(isCareContextSelected && isCareContextCancelled && !parentCancelled());

    boolean isClinicalContactSelected = form.dyngrdList().getSelectedRow() != null && form.dyngrdList().getSelectedRow().getValue() instanceof ClinicalContactShortVo;
    boolean isClinicalContactCancelled = isClinicalContactSelected && ((ClinicalContactShortVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus() != null && ClinicalContactStatus.CANCELLED.equals(((ClinicalContactShortVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelClinicalContactItem().setVisible(isClinicalContactSelected && isClinicalContactCancelled && !parentCancelled());
}
项目:openMAXIMS    文件:Logic.java   
private void populateClinicalContacts(ClinicalContactShortVoCollection voCollclinicalContacts, grdListRow careContextRow)
{
    if (voCollclinicalContacts != null && careContextRow != null)
    {
        voCollclinicalContacts.sort();
        grdListRow clinicalContactRow = null;
        for (int i = 0; i < voCollclinicalContacts.size(); i++)
        {
            clinicalContactRow = careContextRow.getRows().newRow();

            clinicalContactRow.setcolStartDateEndDate(voCollclinicalContacts.get(i).createDisplayString());
            clinicalContactRow.setTooltipForcolStartDateEndDate("Clinical Contact: " + voCollclinicalContacts.get(i).createDisplayString());
            clinicalContactRow.setcolSpeciality(voCollclinicalContacts.get(i).getSpecialtyIsNotNull() ? INDENT + INDENT + INDENT + voCollclinicalContacts.get(i).getSpecialty().getText() : null);
            clinicalContactRow.setTooltipForcolSpeciality("Clinical Contact: " + (voCollclinicalContacts.get(i).getSpecialtyIsNotNull() ? INDENT + INDENT + INDENT + voCollclinicalContacts.get(i).getSpecialty().getText() : ""));
            if (ConfigFlag.UI.DISPLAY_WORKLIST_CONTACT_TYPE_ON_PATIENT_SUMMARY.getValue() == true){
                if(voCollclinicalContacts.get(i).getContactTypeIsNotNull()){
                    WorklistContactType lkupWorklistContactType = domain.getWorklistContactTypeByExternalCode(voCollclinicalContacts.get(i).getContactType());
                    if(lkupWorklistContactType!=null)
                    {
                        clinicalContactRow.setcolContactType(lkupWorklistContactType.getText());
                        clinicalContactRow.setTooltipForcolContactType("Clinical Contact: " + lkupWorklistContactType.getText());
                    }
                    else
                    {
                        clinicalContactRow.setcolContactType(voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : null);
                        clinicalContactRow.setTooltipForcolContactType("Clinical Contact: " + (voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : ""));
                    }
                }
            }
            else
            {
                clinicalContactRow.setcolContactType(voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : null);
                clinicalContactRow.setTooltipForcolContactType("Clinical Contact: " + (voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : ""));
            }

            clinicalContactRow.setcolRMO(voCollclinicalContacts.get(i).getSeenByIsNotNull() ? INDENT + INDENT + INDENT +  voCollclinicalContacts.get(i).getSeenBy().toString() : null);
            clinicalContactRow.setTooltipForcolRMO("Clinical Contact: " + (voCollclinicalContacts.get(i).getSeenByIsNotNull() ? INDENT + INDENT + INDENT +  voCollclinicalContacts.get(i).getSeenBy().toString() : ""));
            clinicalContactRow.setCollapsedImage(form.getImages().Admin.MemberOfStaff);
            clinicalContactRow.setExpandedImage(form.getImages().Admin.MemberOfStaff);
            clinicalContactRow.setColumnHistoryEmpty(true);   //wdev-13896

            //WDEV-13764 
            if(voCollclinicalContacts.get(i).getCurrentStatusIsNotNull() && voCollclinicalContacts.get(i).getCurrentStatus().getStatusIsNotNull() 
                    && voCollclinicalContacts.get(i).getCurrentStatus().getStatus().equals(ClinicalContactStatus.CANCELLED))
                clinicalContactRow.setBackColor(ConfigFlag.UI.DISPLAY_COLOUR_FOR_CANCELLED_CLINICAL_CONTACTS.getValue());

            clinicalContactRow.setValue(voCollclinicalContacts.get(i));
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void populateClinicalContacts(ClinicalContactShortVoCollection voCollclinicalContacts, DynamicGridRow careContextRow)
{
    if (voCollclinicalContacts != null && careContextRow != null)
    {
        voCollclinicalContacts.sort();
        DynamicGridRow clinicalContactRow = null;
        for (int i = 0; i < voCollclinicalContacts.size(); i++)
        {
            clinicalContactRow = careContextRow.getRows().newRow();

            DynamicGridCell cellStartEndDate = clinicalContactRow.getCells().newCell(getColumnById(COLUMN_STARTDATE_ENDDATE), DynamicCellType.STRING);
            cellStartEndDate.setValue(voCollclinicalContacts.get(i).createDisplayString());
            cellStartEndDate.setTooltip("Clinical Contact: " + voCollclinicalContacts.get(i).createDisplayString());
            cellStartEndDate.setReadOnly(true);

            DynamicGridCell cellSpecialty = clinicalContactRow.getCells().newCell(getColumnById(COLUMN_SPECIALTY), DynamicCellType.STRING);
            cellSpecialty.setValue(voCollclinicalContacts.get(i).getSpecialtyIsNotNull() ? INDENT + INDENT + INDENT + voCollclinicalContacts.get(i).getSpecialty().getText() : null);
            cellSpecialty.setTooltip("Clinical Contact: " + (voCollclinicalContacts.get(i).getSpecialtyIsNotNull() ? INDENT + INDENT + INDENT + voCollclinicalContacts.get(i).getSpecialty().getText() : ""));
            cellSpecialty.setReadOnly(true);

            DynamicGridCell cellContactType = clinicalContactRow.getCells().newCell(getColumnById(COLUMN_CONTACT_TYPE), DynamicCellType.STRING);
            cellSpecialty.setReadOnly(true);

            if (ConfigFlag.UI.DISPLAY_WORKLIST_CONTACT_TYPE_ON_PATIENT_SUMMARY.getValue() == true)
            {
                if (voCollclinicalContacts.get(i).getContactTypeIsNotNull())
                {
                    WorklistContactType lkupWorklistContactType = domain.getWorklistContactTypeByExternalCode(voCollclinicalContacts.get(i).getContactType());
                    if (lkupWorklistContactType != null)
                    {
                        cellContactType.setValue(lkupWorklistContactType.getText());
                        cellContactType.setTooltip("Clinical Contact: " + lkupWorklistContactType.getText());
                    }
                    else
                    {
                        cellContactType.setValue(voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : null);
                        cellContactType.setTooltip("Clinical Contact: " + (voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : ""));
                    }
                }
            }
            else
            {
                cellContactType.setValue(voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : null);
                cellContactType.setTooltip("Clinical Contact: " + (voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : ""));
            }

            cellContactType.setReadOnly(Boolean.TRUE);

            DynamicGridCell cellRMO = clinicalContactRow.getCells().newCell(getColumnById(COLUMN_RMO), DynamicCellType.STRING);
            cellRMO.setValue(voCollclinicalContacts.get(i).getSeenByIsNotNull() ? INDENT + INDENT + INDENT + voCollclinicalContacts.get(i).getSeenBy().toString() : null);
            cellRMO.setTooltip("Clinical Contact: " + (voCollclinicalContacts.get(i).getSeenByIsNotNull() ? INDENT + INDENT + INDENT + voCollclinicalContacts.get(i).getSeenBy().toString() : ""));
            cellRMO.setReadOnly(true);

            clinicalContactRow.setCollapsedImage(form.getImages().Admin.MemberOfStaff);
            clinicalContactRow.setExpandedImage(form.getImages().Admin.MemberOfStaff);
        //  clinicalContactRow.setColumnHistoryEmpty(true); // wdev-13896

            // WDEV-13764
            if (voCollclinicalContacts.get(i).getCurrentStatusIsNotNull() && voCollclinicalContacts.get(i).getCurrentStatus().getStatusIsNotNull() && voCollclinicalContacts.get(i).getCurrentStatus().getStatus().equals(ClinicalContactStatus.CANCELLED))
                clinicalContactRow.setBackColor(ConfigFlag.UI.DISPLAY_COLOUR_FOR_CANCELLED_CLINICAL_CONTACTS.getValue());

            clinicalContactRow.setValue(voCollclinicalContacts.get(i));
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void updateContextMenuState()
{
    form.getContextMenus().getClinicalContactsListViewCancelledContextsItem().setVisible(!ConfigFlag.UI.PATIENT_SUMMARY_SHOW_CANCELLED_CONTEXTS_BY_DEFAULT.getValue()); // wdev-13977 modified in WDEV-14909
    form.getContextMenus().getClinicalContactsListHideCancelledContextsItem().setVisible(ConfigFlag.UI.PATIENT_SUMMARY_SHOW_CANCELLED_CONTEXTS_BY_DEFAULT.getValue()); // WDEV-14909

    boolean isProblemGroupSelected = form.dyngrdList().getSelectedRow() != null && form.dyngrdList().getSelectedRow().getValue() instanceof CareSpellVo;
    boolean isProblemGroupCancelled = isProblemGroupSelected && ((CareSpellVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus() != null && ProblemGroupStatus.CANCELLED.equals(((CareSpellVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelProblemGroupItem().setVisible(isProblemGroupSelected && isProblemGroupCancelled);

    boolean isEpisodeOfCareSelected = form.dyngrdList().getSelectedRow() != null && form.dyngrdList().getSelectedRow().getValue() instanceof EpisodeofCareVo;
    boolean isEpisodeOfCareCancelled = isEpisodeOfCareSelected && ((EpisodeofCareVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus() != null && EpisodeOfCareStatus.CANCELLED.equals(((EpisodeofCareVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelEpisodeOfCareItem().setVisible(isEpisodeOfCareSelected && isEpisodeOfCareCancelled && !parentCancelled());

    boolean isCareContextSelected = form.dyngrdList().getSelectedRow() != null && form.dyngrdList().getSelectedRow().getValue() instanceof CareContextVo;
    boolean isCareContextCancelled = isCareContextSelected && ((CareContextVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus() != null && CareContextStatus.CANCELLED.equals(((CareContextVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelCareContextItem().setVisible(isCareContextSelected && isCareContextCancelled && !parentCancelled());

    boolean isClinicalContactSelected = form.dyngrdList().getSelectedRow() != null && form.dyngrdList().getSelectedRow().getValue() instanceof ClinicalContactShortVo;
    boolean isClinicalContactCancelled = isClinicalContactSelected && ((ClinicalContactShortVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus() != null && ClinicalContactStatus.CANCELLED.equals(((ClinicalContactShortVo) form.dyngrdList().getSelectedRow().getValue()).getCurrentStatus().getStatus());

    form.getContextMenus().getClinicalContactsListUndoCancelClinicalContactItem().setVisible(isClinicalContactSelected && isClinicalContactCancelled && !parentCancelled());
}
项目:openmaxims-linux    文件:Logic.java   
private void populateClinicalContacts(ClinicalContactShortVoCollection voCollclinicalContacts, grdListRow careContextRow)
{
    if (voCollclinicalContacts != null && careContextRow != null)
    {
        voCollclinicalContacts.sort();
        grdListRow clinicalContactRow = null;
        for (int i = 0; i < voCollclinicalContacts.size(); i++)
        {
            clinicalContactRow = careContextRow.getRows().newRow();

            clinicalContactRow.setcolStartDateEndDate(voCollclinicalContacts.get(i).createDisplayString());
            clinicalContactRow.setTooltipForcolStartDateEndDate("Clinical Contact: " + voCollclinicalContacts.get(i).createDisplayString());
            clinicalContactRow.setcolSpeciality(voCollclinicalContacts.get(i).getSpecialtyIsNotNull() ? INDENT + INDENT + INDENT + voCollclinicalContacts.get(i).getSpecialty().getText() : null);
            clinicalContactRow.setTooltipForcolSpeciality("Clinical Contact: " + (voCollclinicalContacts.get(i).getSpecialtyIsNotNull() ? INDENT + INDENT + INDENT + voCollclinicalContacts.get(i).getSpecialty().getText() : ""));
            if (ConfigFlag.UI.DISPLAY_WORKLIST_CONTACT_TYPE_ON_PATIENT_SUMMARY.getValue() == true){
                if(voCollclinicalContacts.get(i).getContactTypeIsNotNull()){
                    WorklistContactType lkupWorklistContactType = domain.getWorklistContactTypeByExternalCode(voCollclinicalContacts.get(i).getContactType());
                    if(lkupWorklistContactType!=null)
                    {
                        clinicalContactRow.setcolContactType(lkupWorklistContactType.getText());
                        clinicalContactRow.setTooltipForcolContactType("Clinical Contact: " + lkupWorklistContactType.getText());
                    }
                    else
                    {
                        clinicalContactRow.setcolContactType(voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : null);
                        clinicalContactRow.setTooltipForcolContactType("Clinical Contact: " + (voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : ""));
                    }
                }
            }
            else
            {
                clinicalContactRow.setcolContactType(voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : null);
                clinicalContactRow.setTooltipForcolContactType("Clinical Contact: " + (voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : ""));
            }

            clinicalContactRow.setcolRMO(voCollclinicalContacts.get(i).getSeenByIsNotNull() ? INDENT + INDENT + INDENT +  voCollclinicalContacts.get(i).getSeenBy().toString() : null);
            clinicalContactRow.setTooltipForcolRMO("Clinical Contact: " + (voCollclinicalContacts.get(i).getSeenByIsNotNull() ? INDENT + INDENT + INDENT +  voCollclinicalContacts.get(i).getSeenBy().toString() : ""));
            clinicalContactRow.setCollapsedImage(form.getImages().Admin.MemberOfStaff);
            clinicalContactRow.setExpandedImage(form.getImages().Admin.MemberOfStaff);
            clinicalContactRow.setColumnHistoryEmpty(true);   //wdev-13896

            //WDEV-13764 
            if(voCollclinicalContacts.get(i).getCurrentStatusIsNotNull() && voCollclinicalContacts.get(i).getCurrentStatus().getStatusIsNotNull() 
                    && voCollclinicalContacts.get(i).getCurrentStatus().getStatus().equals(ClinicalContactStatus.CANCELLED))
                clinicalContactRow.setBackColor(ConfigFlag.UI.DISPLAY_COLOUR_FOR_CANCELLED_CLINICAL_CONTACTS.getValue());

            clinicalContactRow.setValue(voCollclinicalContacts.get(i));
        }
    }
}