Java 类ims.clinical.vo.ClinicalDIAssociationVoCollection 实例源码

项目:AvoinApotti    文件:Logic.java   
private void displayProcAssociationsOnSummary()
{
    ClinicalDIAssociationVoCollection voCollDiAsociations = null;

    if (form.ctnSummary().grdProcedure().getValue() != null)
    {
        String headerTooltip = "";
        String association = "";

        if (form.ctnSummary().grdProcedure().getValue() instanceof PatientProcedureRefVo)
        {
            voCollDiAsociations = domain.listClinicalDiAssociationByPatientProcedure((PatientProcedureRefVo) form.ctnSummary().grdProcedure().getValue());
            if (form.ctnSummary().grdProcedure().getValue() instanceof PatientProcedureShortVo)
            {
                association = getProcedureText(((PatientProcedureShortVo) form.ctnSummary().grdProcedure().getValue()));
                headerTooltip = ((PatientProcedureShortVo) form.ctnSummary().grdProcedure().getValue()).getDiAssociationsTooltip();
            }
        }

        markGridAssociations(voCollDiAsociations, Boolean.FALSE, association, headerTooltip);
    }
}
项目:AvoinApotti    文件:Logic.java   
private boolean saveDIAssociations(ClinicalDIAssociationVoCollection voDIAssociation)
{
    if (voDIAssociation != null)
    {
        String[] errors = voDIAssociation.validate();
        if (errors != null)
        {
            engine.showErrors(errors);
            return false;
        }

        try
        {
            domain.saveClinicalDiAssociation(voDIAssociation);
        }
        catch (StaleObjectException e)
        {
            engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            return false;
        }
    }

    return true;
}
项目:AvoinApotti    文件:Logic.java   
private void setPrimaryDiagnosis(ClinicalDIAssociationVoCollection voDIAssociation)
{
    PatientDiagnosisVo voPatientDiagnosis = form.getLocalContext().getSelectedPatientDiagnosisVo();
    for (int i = 0; voPatientDiagnosis != null && voDIAssociation != null && i < voDIAssociation.size(); i++)
    {
        if (voDIAssociation.get(i).getPrimDiagnosis() == null || voDIAssociation.get(i).getPrimDiagnosis().getID_PatientDiagnosis() == null)
            voDIAssociation.get(i).setPrimDiagnosis(voPatientDiagnosis);
    }
}
项目:AvoinApotti    文件:Logic.java   
private boolean saveDIAssociations(ClinicalDIAssociationVoCollection voDIAssociation)
{
    if (voDIAssociation != null)
    {
        String[] errors = voDIAssociation.validate();
        if (errors != null)
        {
            engine.showErrors(errors);
            return false;
        }

        try
        {
            domain.saveClinicalDiAssociation(voDIAssociation);
        }
        catch (StaleObjectException e)
        {
            engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            return false;
        }
    }

    return true;
}
项目:AvoinApotti    文件:Logic.java   
private void displayProcAssociationsOnSummary()
{
    ClinicalDIAssociationVoCollection voCollDiAsociations = null;

    if (form.ctnSummary().grdProcedure().getValue() != null)
    {
        String headerTooltip = "";
        String association = "";

        if (form.ctnSummary().grdProcedure().getValue() instanceof PatientProcedureRefVo)
        {
            voCollDiAsociations = domain.listClinicalDiAssociationByPatientProcedure((PatientProcedureRefVo) form.ctnSummary().grdProcedure().getValue());
            if(form.ctnSummary().grdProcedure().getValue() instanceof PatientProcedureShortVo)
            {
                association = getProcedureText(((PatientProcedureShortVo)form.ctnSummary().grdProcedure().getValue()));
                headerTooltip = ((PatientProcedureShortVo)form.ctnSummary().grdProcedure().getValue()).getDiAssociationsTooltip();
            }
        }

        markGridAssociations(voCollDiAsociations, Boolean.FALSE, association, headerTooltip);
    }
}
项目:AvoinApotti    文件:Logic.java   
private boolean save() 
{
    ClinicalDIAssociationVoCollection data = populateData();
    data = removeUnsavedInactiveRecordsFromCache(data);
    String[] errors = data.validate();
    if(errors != null && errors.length > 0)
    {
        engine.showErrors(errors);
        return false;
    }

    try 
    {
        domain.saveClinicalDiAssociation(data);
    } 
    catch (StaleObjectException e) 
    {
        //WDEV-3112
        form.getGlobalContext().Core.setYesNoDialogMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        engine.open(form.getForms().Core.OkDialog, "Data Warning");
        return false;
    }

    return true;
}
项目:AvoinApotti    文件:Logic.java   
private void addOrUpdateAssociationRecord(ClinicalDIAssociationVoCollection newResult, ClinicalDIAssociationVoCollection result, ValueObject value, CDIAssociationDescription relationship)
{
    if(value != null)
    {
        boolean found = false;
        for(int y = 0; y < result.size(); y++)
        {
            ClinicalDIAssociationVo record = result.get(y);
            ValueObject assocRec = null;

            if(record.getAssocDiagnosisIsNotNull())
                assocRec = record.getAssocDiagnosis();
            else if(record.getAssocProcedureIsNotNull())
                assocRec = record.getAssocProcedure();
            else if(record.getAssocProblemIsNotNull())
                assocRec = record.getAssocProblem();

            if(assocRec != null && assocRec.equals(value))
            {
                //When relationship is removed we inactivate the record
                if(relationship == null)
                    record.setIsActive(new Boolean(false));
                else
                    record.setIsActive(new Boolean(true));
                record.setAssociationDescription(relationship);
                found = true;
                break;
            }
        }

        if(!found && relationship != null)
        {
            ClinicalDIAssociationVo newRecord = getNewAssociationRecord(value, relationship);
            newResult.add(newRecord);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private ClinicalDIAssociationVoCollection removeUnsavedInactiveRecordsFromCache(ClinicalDIAssociationVoCollection data)
{
    boolean removed = true;
    while(removed)
    {
        removed = false;
        for (int i = 0; data != null && i < data.size(); i++)
        {
            boolean activeRecord = data.get(i).getIsActive() == null || data.get(i).getIsActive().booleanValue() == false;
            boolean recordSaved  = data.get(i).getID_ClinicalcdiassociationsIsNotNull();
            if(activeRecord && recordSaved == false)
            {
                data.remove(i);
                removed = true;
                break;
            }   
        }
    }

    return data;
}
项目:AvoinApotti    文件:Logic.java   
private boolean saveDIAssociations(ClinicalDIAssociationVoCollection voDIAssociation)
{
    if(voDIAssociation != null)
    {
        String[] errors = voDIAssociation.validate();
        if(errors != null)
        {
            engine.showErrors(errors);
            return false;
        }

        try
        {
            domain.saveClinicalDiAssociation(voDIAssociation);
        }
        catch (StaleObjectException e)
        {
            engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            return false;
        }
    }

    return true;
}
项目:AvoinApotti    文件:ClinicalDiAssociationsImpl.java   
public ClinicalDIAssociationVoCollection saveClinicalDiAssociation(ClinicalDIAssociationVoCollection list) throws StaleObjectException 
{
    if(list == null)
        throw new RuntimeException("Cannot save null ClinicalDIAssociationVoCollection");
    if(!list.isValidated())
        throw new CodingRuntimeException("ClinicalDIAssociationVoCollection has not been validated.");

    DomainFactory factory = getDomainFactory();
    ClinicalDIAssociationVoCollection result = new ClinicalDIAssociationVoCollection();

    for(int x = 0; x < list.size(); x++)
    {
        if(list.get(x) != null)
        {
            factory.save(ClinicalDIAssociationVoAssembler.extractClinicalcdiassociations(factory, list.get(x)));
        }
    }       

    return result;
}
项目:openMAXIMS    文件:Logic.java   
private void displayProcAssociationsOnSummary()
{
    ClinicalDIAssociationVoCollection voCollDiAsociations = null;

    if (form.ctnSummary().grdProcedure().getValue() != null)
    {
        String headerTooltip = "";
        String association = "";

        if (form.ctnSummary().grdProcedure().getValue() instanceof PatientProcedureRefVo)
        {
            voCollDiAsociations = domain.listClinicalDiAssociationByPatientProcedure((PatientProcedureRefVo) form.ctnSummary().grdProcedure().getValue());
            if (form.ctnSummary().grdProcedure().getValue() instanceof PatientProcedureShortVo)
            {
                association = getProcedureText(((PatientProcedureShortVo) form.ctnSummary().grdProcedure().getValue()));
                headerTooltip = ((PatientProcedureShortVo) form.ctnSummary().grdProcedure().getValue()).getDiAssociationsTooltip();
            }
        }

        markGridAssociations(voCollDiAsociations, Boolean.FALSE, association, headerTooltip);
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean saveDIAssociations(ClinicalDIAssociationVoCollection voDIAssociation)
{
    if (voDIAssociation != null)
    {
        String[] errors = voDIAssociation.validate();
        if (errors != null)
        {
            engine.showErrors(errors);
            return false;
        }

        try
        {
            domain.saveClinicalDiAssociation(voDIAssociation);
        }
        catch (StaleObjectException e)
        {
            engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            return false;
        }
    }

    return true;
}
项目:openMAXIMS    文件:Logic.java   
private boolean saveDIAssociations(ClinicalDIAssociationVoCollection voDIAssociation)
{
    if (voDIAssociation != null)
    {
        String[] errors = voDIAssociation.validate();
        if (errors != null)
        {
            engine.showErrors(errors);
            return false;
        }

        try
        {
            domain.saveClinicalDiAssociation(voDIAssociation);
        }
        catch (StaleObjectException e)
        {
            engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            return false;
        }
    }

    return true;
}
项目:openMAXIMS    文件:Logic.java   
private void displayProcAssociationsOnSummary()
{
    ClinicalDIAssociationVoCollection voCollDiAsociations = null;

    if (form.ctnSummary().grdProcedure().getValue() != null)
    {
        String headerTooltip = "";
        String association = "";

        if (form.ctnSummary().grdProcedure().getValue() instanceof PatientProcedureRefVo)
        {
            voCollDiAsociations = domain.listClinicalDiAssociationByPatientProcedure((PatientProcedureRefVo) form.ctnSummary().grdProcedure().getValue());
            if(form.ctnSummary().grdProcedure().getValue() instanceof PatientProcedureShortVo)
            {
                association = getProcedureText(((PatientProcedureShortVo)form.ctnSummary().grdProcedure().getValue()));
                headerTooltip = ((PatientProcedureShortVo)form.ctnSummary().grdProcedure().getValue()).getDiAssociationsTooltip();
            }
        }

        markGridAssociations(voCollDiAsociations, Boolean.FALSE, association, headerTooltip);
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean save() 
{
    ClinicalDIAssociationVoCollection data = populateData();
    data = removeUnsavedInactiveRecordsFromCache(data);
    String[] errors = data.validate();
    if(errors != null && errors.length > 0)
    {
        engine.showErrors(errors);
        return false;
    }

    try 
    {
        domain.saveClinicalDiAssociation(data);
    } 
    catch (StaleObjectException e) 
    {
        //WDEV-3112
        form.getGlobalContext().Core.setYesNoDialogMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        engine.open(form.getForms().Core.OkDialog, "Data Warning");
        return false;
    }

    return true;
}
项目:openMAXIMS    文件:Logic.java   
private ClinicalDIAssociationVoCollection removeUnsavedInactiveRecordsFromCache(ClinicalDIAssociationVoCollection data)
{
    boolean removed = true;
    while(removed)
    {
        removed = false;
        for (int i = 0; data != null && i < data.size(); i++)
        {
            boolean activeRecord = data.get(i).getIsActive() == null || data.get(i).getIsActive().booleanValue() == false;
            boolean recordSaved  = data.get(i).getID_ClinicalcdiassociationsIsNotNull();
            if(activeRecord && recordSaved == false)
            {
                data.remove(i);
                removed = true;
                break;
            }   
        }
    }

    return data;
}
项目:openMAXIMS    文件:Logic.java   
private boolean saveDIAssociations(ClinicalDIAssociationVoCollection voDIAssociation)
{
    if(voDIAssociation != null)
    {
        String[] errors = voDIAssociation.validate();
        if(errors != null)
        {
            engine.showErrors(errors);
            return false;
        }

        try
        {
            domain.saveClinicalDiAssociation(voDIAssociation);
        }
        catch (StaleObjectException e)
        {
            engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            return false;
        }
    }

    return true;
}
项目:openMAXIMS    文件:ClinicalDiAssociationsImpl.java   
public ClinicalDIAssociationVoCollection saveClinicalDiAssociation(ClinicalDIAssociationVoCollection list) throws StaleObjectException 
{
    if(list == null)
        throw new RuntimeException("Cannot save null ClinicalDIAssociationVoCollection");
    if(!list.isValidated())
        throw new CodingRuntimeException("ClinicalDIAssociationVoCollection has not been validated.");

    DomainFactory factory = getDomainFactory();
    ClinicalDIAssociationVoCollection result = new ClinicalDIAssociationVoCollection();

    for(int x = 0; x < list.size(); x++)
    {
        if(list.get(x) != null)
        {
            factory.save(ClinicalDIAssociationVoAssembler.extractClinicalcdiassociations(factory, list.get(x)));
        }
    }       

    return result;
}
项目:openMAXIMS    文件:Logic.java   
private void displayProcAssociationsOnSummary()
{
    ClinicalDIAssociationVoCollection voCollDiAsociations = null;

    if (form.ctnSummary().grdProcedure().getValue() != null)
    {
        String headerTooltip = "";
        String association = "";

        if (form.ctnSummary().grdProcedure().getValue() instanceof PatientProcedureRefVo)
        {
            voCollDiAsociations = domain.listClinicalDiAssociationByPatientProcedure((PatientProcedureRefVo) form.ctnSummary().grdProcedure().getValue());
            if (form.ctnSummary().grdProcedure().getValue() instanceof PatientProcedureShortVo)
            {
                association = getProcedureText(((PatientProcedureShortVo) form.ctnSummary().grdProcedure().getValue()));
                headerTooltip = ((PatientProcedureShortVo) form.ctnSummary().grdProcedure().getValue()).getDiAssociationsTooltip();
            }
        }

        markGridAssociations(voCollDiAsociations, Boolean.FALSE, association, headerTooltip);
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean saveDIAssociations(ClinicalDIAssociationVoCollection voDIAssociation)
{
    if (voDIAssociation != null)
    {
        String[] errors = voDIAssociation.validate();
        if (errors != null)
        {
            engine.showErrors(errors);
            return false;
        }

        try
        {
            domain.saveClinicalDiAssociation(voDIAssociation);
        }
        catch (StaleObjectException e)
        {
            engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            return false;
        }
    }

    return true;
}
项目:openMAXIMS    文件:Logic.java   
private boolean saveDIAssociations(ClinicalDIAssociationVoCollection voDIAssociation)
{
    if (voDIAssociation != null)
    {
        String[] errors = voDIAssociation.validate();
        if (errors != null)
        {
            engine.showErrors(errors);
            return false;
        }

        try
        {
            domain.saveClinicalDiAssociation(voDIAssociation);
        }
        catch (StaleObjectException e)
        {
            engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            return false;
        }
    }

    return true;
}
项目:openMAXIMS    文件:Logic.java   
private void displayProcAssociationsOnSummary()
{
    ClinicalDIAssociationVoCollection voCollDiAsociations = null;

    if (form.ctnSummary().grdProcedure().getValue() != null)
    {
        String headerTooltip = "";
        String association = "";

        if (form.ctnSummary().grdProcedure().getValue() instanceof PatientProcedureRefVo)
        {
            voCollDiAsociations = domain.listClinicalDiAssociationByPatientProcedure((PatientProcedureRefVo) form.ctnSummary().grdProcedure().getValue());
            if(form.ctnSummary().grdProcedure().getValue() instanceof PatientProcedureShortVo)
            {
                association = getProcedureText(((PatientProcedureShortVo)form.ctnSummary().grdProcedure().getValue()));
                headerTooltip = ((PatientProcedureShortVo)form.ctnSummary().grdProcedure().getValue()).getDiAssociationsTooltip();
            }
        }

        markGridAssociations(voCollDiAsociations, Boolean.FALSE, association, headerTooltip);
    }
}
项目:openMAXIMS    文件:Logic.java   
private ClinicalDIAssociationVoCollection removeUnsavedInactiveRecordsFromCache(ClinicalDIAssociationVoCollection data)
{
    boolean removed = true;
    while(removed)
    {
        removed = false;
        for (int i = 0; data != null && i < data.size(); i++)
        {
            boolean activeRecord = data.get(i).getIsActive() == null || data.get(i).getIsActive().booleanValue() == false;
            boolean recordSaved  = data.get(i).getID_ClinicalcdiassociationsIsNotNull();
            if(activeRecord && recordSaved == false)
            {
                data.remove(i);
                removed = true;
                break;
            }   
        }
    }

    return data;
}
项目:openMAXIMS    文件:Logic.java   
private boolean saveDIAssociations(ClinicalDIAssociationVoCollection voDIAssociation)
{
    if(voDIAssociation != null)
    {
        String[] errors = voDIAssociation.validate();
        if(errors != null)
        {
            engine.showErrors(errors);
            return false;
        }

        try
        {
            domain.saveClinicalDiAssociation(voDIAssociation);
        }
        catch (StaleObjectException e)
        {
            engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            return false;
        }
    }

    return true;
}
项目:openmaxims-linux    文件:Logic.java   
private boolean saveDIAssociations(ClinicalDIAssociationVoCollection voDIAssociation)
{
    if(voDIAssociation != null)
    {
        String[] errors = voDIAssociation.validate();
        if(errors != null)
        {
            engine.showErrors(errors);
            return false;
        }

        try
        {
            domain.saveClinicalDiAssociation(voDIAssociation);
        }
        catch (StaleObjectException e)
        {
            engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            return false;
        }
    }

    return true;
}
项目:openMAXIMS    文件:ClinicalDiAssociationsImpl.java   
public ClinicalDIAssociationVoCollection saveClinicalDiAssociation(ClinicalDIAssociationVoCollection list) throws StaleObjectException 
{
    if(list == null)
        throw new RuntimeException("Cannot save null ClinicalDIAssociationVoCollection");
    if(!list.isValidated())
        throw new CodingRuntimeException("ClinicalDIAssociationVoCollection has not been validated.");

    DomainFactory factory = getDomainFactory();
    ClinicalDIAssociationVoCollection result = new ClinicalDIAssociationVoCollection();

    for(int x = 0; x < list.size(); x++)
    {
        if(list.get(x) != null)
        {
            factory.save(ClinicalDIAssociationVoAssembler.extractClinicalcdiassociations(factory, list.get(x)));
        }
    }       

    return result;
}
项目:openmaxims-linux    文件:Logic.java   
private void displayProcAssociationsOnSummary()
{
    ClinicalDIAssociationVoCollection voCollDiAsociations = null;

    if (form.ctnSummary().grdProcedure().getValue() != null)
    {
        String headerTooltip = "";
        String association = "";

        if (form.ctnSummary().grdProcedure().getValue() instanceof PatientProcedureRefVo)
        {
            voCollDiAsociations = domain.listClinicalDiAssociationByPatientProcedure((PatientProcedureRefVo) form.ctnSummary().grdProcedure().getValue());
            if (form.ctnSummary().grdProcedure().getValue() instanceof PatientProcedureShortVo)
            {
                association = getProcedureText(((PatientProcedureShortVo) form.ctnSummary().grdProcedure().getValue()));
                headerTooltip = ((PatientProcedureShortVo) form.ctnSummary().grdProcedure().getValue()).getDiAssociationsTooltip();
            }
        }

        markGridAssociations(voCollDiAsociations, Boolean.FALSE, association, headerTooltip);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private boolean saveDIAssociations(ClinicalDIAssociationVoCollection voDIAssociation)
{
    if (voDIAssociation != null)
    {
        String[] errors = voDIAssociation.validate();
        if (errors != null)
        {
            engine.showErrors(errors);
            return false;
        }

        try
        {
            domain.saveClinicalDiAssociation(voDIAssociation);
        }
        catch (StaleObjectException e)
        {
            engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            return false;
        }
    }

    return true;
}
项目:openmaxims-linux    文件:Logic.java   
private void displayProcAssociationsOnSummary()
{
    ClinicalDIAssociationVoCollection voCollDiAsociations = null;

    if (form.ctnSummary().grdProcedure().getValue() != null)
    {
        String headerTooltip = "";
        String association = "";

        if (form.ctnSummary().grdProcedure().getValue() instanceof PatientProcedureRefVo)
        {
            voCollDiAsociations = domain.listClinicalDiAssociationByPatientProcedure((PatientProcedureRefVo) form.ctnSummary().grdProcedure().getValue());
            if(form.ctnSummary().grdProcedure().getValue() instanceof PatientProcedureShortVo)
            {
                association = getProcedureText(((PatientProcedureShortVo)form.ctnSummary().grdProcedure().getValue()));
                headerTooltip = ((PatientProcedureShortVo)form.ctnSummary().grdProcedure().getValue()).getDiAssociationsTooltip();
            }
        }

        markGridAssociations(voCollDiAsociations, Boolean.FALSE, association, headerTooltip);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private boolean save() 
{
    ClinicalDIAssociationVoCollection data = populateData();
    data = removeUnsavedInactiveRecordsFromCache(data);
    String[] errors = data.validate();
    if(errors != null && errors.length > 0)
    {
        engine.showErrors(errors);
        return false;
    }

    try 
    {
        domain.saveClinicalDiAssociation(data);
    } 
    catch (StaleObjectException e) 
    {
        //WDEV-3112
        form.getGlobalContext().Core.setYesNoDialogMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        engine.open(form.getForms().Core.OkDialog, "Data Warning");
        return false;
    }

    return true;
}
项目:openmaxims-linux    文件:Logic.java   
private ClinicalDIAssociationVoCollection removeUnsavedInactiveRecordsFromCache(ClinicalDIAssociationVoCollection data)
{
    boolean removed = true;
    while(removed)
    {
        removed = false;
        for (int i = 0; data != null && i < data.size(); i++)
        {
            boolean activeRecord = data.get(i).getIsActive() == null || data.get(i).getIsActive().booleanValue() == false;
            boolean recordSaved  = data.get(i).getID_ClinicalcdiassociationsIsNotNull();
            if(activeRecord && recordSaved == false)
            {
                data.remove(i);
                removed = true;
                break;
            }   
        }
    }

    return data;
}
项目:AvoinApotti    文件:Logic.java   
private void displayDiagCompAssociationsOnSummary()
{

    ClinicalDIAssociationVoCollection voCollDiAsociations = null;

    ValueObject value = form.ctnSummary().grdDiagnosis().getValue();
    if (value != null)
    {
        String headerToolTip = "";
        String association = "";

        if (value instanceof PatientProblemRefVo)
        {
            voCollDiAsociations = domain.listClinicalDiAssociationByPatientProblem((PatientProblemRefVo) value);
            if (value instanceof PatientProblemVo)
            {
                association = ((PatientProblemVo) value).getPatientProblem();
                headerToolTip = ((PatientProblemVo) value).getDiAssociationTooltip();
            }
        }
        else if (value instanceof PatientDiagnosisRefVo)
        {
            voCollDiAsociations = domain.listClinicalDiAssociationByPatientDiagnosis((PatientDiagnosisRefVo) value);
            if (value instanceof PatientDiagnosisShortVo)
            {
                association = getDiagnosisText((PatientDiagnosisShortVo) value);
                headerToolTip = ((PatientDiagnosisShortVo) value).getTooltipForDiAssociation();
            }
        }

        markGridAssociations(voCollDiAsociations, Boolean.TRUE, association, headerToolTip);
    }

}
项目:AvoinApotti    文件:Logic.java   
private void saveCDIAssociations()
{
    ClinicalDIAssociationVoCollection voDIAssociation = form.getGlobalContext().Clinical.getClinicalDIAssociationVoCollection();
    if (voDIAssociation != null && voDIAssociation.size() > 0)
    {
        setPrimaryDiagnosis(voDIAssociation);
        saveDIAssociations(voDIAssociation);
    }
}
项目:AvoinApotti    文件:Logic.java   
private boolean isAtLeastOneComplication()
{
    ClinicalDIAssociationVoCollection voColl = form.getGlobalContext().Clinical.getClinicalDIAssociationVoCollection();
    for (int i = 0; voColl != null && i < voColl.size(); i++)
    {
        if (voColl.get(i).getAssociationDescription() != null && voColl.get(i).getAssociationDescription().equals(CDIAssociationDescription.ISACOMPLICATIONOF))
            return true;
    }

    return false;
}
项目:AvoinApotti    文件:Logic.java   
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
    if (save() == false)
        return;

    ClinicalDIAssociationVoCollection voDIAssociation = form.getGlobalContext().Clinical.getClinicalDIAssociationVoCollection();
    if (voDIAssociation != null && voDIAssociation.size() > 0)
    {
        setPrimaryProcedure(voDIAssociation);
        saveDIAssociations(voDIAssociation);
    }
    open();
    form.setMode(FormMode.VIEW);
}
项目:AvoinApotti    文件:Logic.java   
private void setPrimaryProcedure(ClinicalDIAssociationVoCollection voDIAssociation)
{
    PatientProcedureVo voPatientProcedure = form.getLocalContext().getPatientProcedureVo();
    for (int i = 0; voPatientProcedure != null && voDIAssociation != null && i < voDIAssociation.size(); i++)
    {
        if (voDIAssociation.get(i).getPrimProcedure() == null || voDIAssociation.get(i).getPrimProcedure().getID_PatientProcedure() == null)
            voDIAssociation.get(i).setPrimProcedure(voPatientProcedure);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void displayDiagCompAssociationsOnSummary()
{

    ClinicalDIAssociationVoCollection voCollDiAsociations = null;

    ValueObject value = form.ctnSummary().grdDiagnosis().getValue();
    if (value != null)
    {
        String headerToolTip = "";
        String association = "";

        if (value instanceof PatientProblemRefVo)
        {
            voCollDiAsociations = domain.listClinicalDiAssociationByPatientProblem((PatientProblemRefVo) value);
            if (value instanceof PatientProblemVo)
            {
                association = ((PatientProblemVo) value).getPatientProblem();
                headerToolTip = ((PatientProblemVo) value).getDiAssociationTooltip();
            }
        }
        else if (value instanceof PatientDiagnosisRefVo)
        {
            voCollDiAsociations = domain.listClinicalDiAssociationByPatientDiagnosis((PatientDiagnosisRefVo) value);
            if (value instanceof PatientDiagnosisShortVo)
            {
                association = getDiagnosisText((PatientDiagnosisShortVo) value);
                headerToolTip = ((PatientDiagnosisShortVo) value).getTooltipForDiAssociation();
            }
        }

        markGridAssociations(voCollDiAsociations, Boolean.TRUE, association, headerToolTip);
    }

}
项目:AvoinApotti    文件:Logic.java   
private ClinicalDIAssociationVoCollection getCachedClinicalDIAssociations()
{
    ClinicalDIAssociationVoCollection cachedRecords = form.getLocalContext().getRecords();

    //When the cache (initially the listed records) are empty and the dialog is not opened from  
    //Patient Summary then return the records from the context 
    boolean isCacheEmpty = cachedRecords == null || cachedRecords.size() == 0;
    if(!isDialogOpenedFromPatientSummary() && isCacheEmpty)
        return form.getGlobalContext().Clinical.getClinicalDIAssociationVoCollection();

    return cachedRecords;
}
项目:AvoinApotti    文件:Logic.java   
private void setChangedRecordIntoCache(IControlComparable control)
{
    if(form.getMode().equals(FormMode.EDIT))
    {
        ClinicalDIAssociationVoCollection voColl = populateData(control);
        if(voColl != null)
            form.getLocalContext().setRecords(voColl);
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
    if(save())
    {
        ClinicalDIAssociationVoCollection voDIAssociation = form.getGlobalContext().Clinical.getClinicalDIAssociationVoCollection();
        if(voDIAssociation != null && voDIAssociation.size() > 0)
        {
            setPrimaryProblem(voDIAssociation);
            saveDIAssociations(voDIAssociation);
        }
        open();
    }
}