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

项目:AvoinApotti    文件:Logic.java   
private void viewDiagnosisItem(Control sender)
{
    form.getGlobalContext().Clinical.setReturnToFormName(engine.getFormName());
    if (form.grdDiagnosis().getSelectedRow() != null && sender.equals(form.grdDiagnosis()))
    {
        ValueObject voVal = (ValueObject) form.grdDiagnosis().getValue();
        if (voVal != null)
        {
            if (voVal instanceof PatientDiagnosisShortVo)
            {
                form.getGlobalContext().Clinical.setSelectedPatientDiagnosisFromNursingAdmission((PatientDiagnosisShortVo)voVal);
                engine.open(form.getForms().Clinical.DiagnosisComplications_Dialog);
                form.getGlobalContext().Clinical.setReturnToFormMode(FormMode.VIEW);
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void unmarkDiagnosisGridAssociations()
{
    if (isAssociationOnSummaryDisplayed())
    {
        for (int i = 0; i < form.ctnSummary().grdDiagnosis().getRows().size(); i++)
        {
            grdDiagnosisRow row = form.ctnSummary().grdDiagnosis().getRows().get(i);
            if (row.getValue() instanceof PatientDiagnosisShortVo)
            {
                row.setTooltip(((PatientDiagnosisShortVo) row.getValue()).getTooltipForDiAssociation());
            }

            if (row.getValue() instanceof PatientProblemVo)
            {
                row.setTooltip(((PatientProblemVo) row.getValue()).getDiAssociationTooltip());
            }

            row.setBackColor(Color.Default);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void enableDiagnosisGridContextMenu()
{
    boolean isRecordSelected = form.ctnSummary().grdDiagnosis().getSelectedRowIndex() >= 0;
    // boolean =
    // form.getGlobalContext().Core.getCurrentCareContextIsNotNull();
    boolean isCareContextSel; // wdev-13296
    if (form.dyngrdList().getValue() instanceof EpisodeofCareVo) // wdev-13296
    {
        if (form.ctnSummary().grdDiagnosis().getValue() != null) // wdev-13296
            isCareContextSel = form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull() && (form.ctnSummary().grdDiagnosis().getValue() instanceof PatientDiagnosisShortVo); // wdev-13296
        else
            isCareContextSel = form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull();
    }
    else
        isCareContextSel = form.getGlobalContext().Core.getCurrentCareContextIsNotNull();

    form.getContextMenus().getPatSummaryDiagCompVIEWItem().setVisible(isCareContextSel && isRecordSelected);
    form.getContextMenus().getPatSummaryDiagCompVIEWLINKSDIALOGItem().setVisible(isRecordSelected);
    form.getContextMenus().getPatSummaryDiagCompDISPLAYLINKSSUMMARYItem().setVisible(isRecordSelected);
    form.getContextMenus().getPatSummaryDiagCompNEWDIAGNOSISItem().setVisible(isCareContextSel);
    form.getContextMenus().getPatSummaryDiagCompNEWPROBLEMItem().setVisible(form.getGlobalContext().Core.getCurrentCareContextIsNotNull()); // wdev-13296
}
项目:AvoinApotti    文件:Logic.java   
private void unmarkDiagnosisGridAssociations()
{
    if(isAssociationOnSummaryDisplayed())
    {
        for (int i = 0; i < form.ctnSummary().grdDiagnosis().getRows().size(); i++)
        {
            grdDiagnosisRow row = form.ctnSummary().grdDiagnosis().getRows().get(i);
            if(row.getValue() instanceof PatientDiagnosisShortVo)
            {
                row.setTooltip(((PatientDiagnosisShortVo)row.getValue()).getTooltipForDiAssociation()); 
            }

            if(row.getValue() instanceof PatientProblemVo)
            {
                row.setTooltip(((PatientProblemVo)row.getValue()).getDiAssociationTooltip());
            }

            row.setBackColor(Color.Default);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void enableDiagnosisGridContextMenu()
{
    boolean isRecordSelected = form.ctnSummary().grdDiagnosis().getSelectedRowIndex() >= 0;
    //boolean  = form.getGlobalContext().Core.getCurrentCareContextIsNotNull();
    boolean isCareContextSel;   //wdev-13296
    if(form.grdList().getValue() instanceof EpisodeofCareVo) //wdev-13296
    {
        if(form.ctnSummary().grdDiagnosis().getValue() != null) //wdev-13296
            isCareContextSel =  form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull() && (form.ctnSummary().grdDiagnosis().getValue() instanceof PatientDiagnosisShortVo);     //wdev-13296
        else
            isCareContextSel = form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull();
    }
    else
        isCareContextSel = form.getGlobalContext().Core.getCurrentCareContextIsNotNull();

    form.getContextMenus().getPatSummaryDiagCompVIEWItem().setVisible(isCareContextSel && isRecordSelected);
    form.getContextMenus().getPatSummaryDiagCompVIEWLINKSDIALOGItem().setVisible(isRecordSelected);
    form.getContextMenus().getPatSummaryDiagCompDISPLAYLINKSSUMMARYItem().setVisible(isRecordSelected);
    form.getContextMenus().getPatSummaryDiagCompNEWDIAGNOSISItem().setVisible(isCareContextSel);
    form.getContextMenus().getPatSummaryDiagCompNEWPROBLEMItem().setVisible(form.getGlobalContext().Core.getCurrentCareContextIsNotNull()); //wdev-13296
}
项目:AvoinApotti    文件:Logic.java   
private ClinicalDIAssociationVo setPrimary(ClinicalDIAssociationVo data)
{       
    if(data == null)
        return data;

    ValueObject primary = form.getGlobalContext().Clinical.PatientSummary.getPrimaryAssociation();              

    if(primary instanceof PatientDiagnosisShortVo)
    {
        data.setPrimDiagnosis((PatientDiagnosisRefVo)form.getGlobalContext().Clinical.PatientSummary.getPrimaryAssociation());          
    }
    else if(primary instanceof PatientProcedureShortVo)
    {
        data.setPrimProcedure((PatientProcedureRefVo)form.getGlobalContext().Clinical.PatientSummary.getPrimaryAssociation());
    }
    else if(primary instanceof PatientProblemVo)
    {
        data.setPrimProblem((PatientProblemVo)form.getGlobalContext().Clinical.PatientSummary.getPrimaryAssociation());
    }

    return data;
}
项目:AvoinApotti    文件:Logic.java   
private void loadDiagnosis() 
{
    PatientDiagnosisShortVoCollection list = domain.listDiagnosis(form.getGlobalContext().Core.getPatientShort());
    if(list != null)
    {
        for(int x = 0; x < list.size(); x++)
        {
            PatientDiagnosisShortVo patientDiagnosisShortVo = list.get(x);
            if(patientDiagnosisShortVo != null && patientDiagnosisShortVo.getDiagnosisDescriptionIsNotNull())
            {
                if(!patientDiagnosisShortVo.equals(form.getGlobalContext().Clinical.PatientSummary.getPrimaryAssociation()))
                {
                    addNewItem(patientDiagnosisShortVo);
                }
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void viewDiagnosisItem(Control sender)
{
    form.getGlobalContext().Clinical.setReturnToFormName(engine.getFormName());
    if (form.grdDiagnosis().getSelectedRow() != null && sender.equals(form.grdDiagnosis()))
    {
        ValueObject voVal = (ValueObject) form.grdDiagnosis().getValue();
        if (voVal != null)
        {
            if (voVal instanceof PatientDiagnosisShortVo)
            {
                form.getGlobalContext().Clinical.setSelectedPatientDiagnosisFromNursingAdmission((PatientDiagnosisShortVo)voVal);
                engine.open(form.getForms().Clinical.DiagnosisComplications_Dialog);
                form.getGlobalContext().Clinical.setReturnToFormMode(FormMode.VIEW);
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void unmarkDiagnosisGridAssociations()
{
    if (isAssociationOnSummaryDisplayed())
    {
        for (int i = 0; i < form.ctnSummary().grdDiagnosis().getRows().size(); i++)
        {
            grdDiagnosisRow row = form.ctnSummary().grdDiagnosis().getRows().get(i);
            if (row.getValue() instanceof PatientDiagnosisShortVo)
            {
                row.setTooltip(((PatientDiagnosisShortVo) row.getValue()).getTooltipForDiAssociation());
            }

            if (row.getValue() instanceof PatientProblemVo)
            {
                row.setTooltip(((PatientProblemVo) row.getValue()).getDiAssociationTooltip());
            }

            row.setBackColor(Color.Default);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void enableDiagnosisGridContextMenu()
{
    boolean isRecordSelected = form.ctnSummary().grdDiagnosis().getSelectedRowIndex() >= 0;
    // boolean =
    // form.getGlobalContext().Core.getCurrentCareContextIsNotNull();
    boolean isCareContextSel; // wdev-13296
    if (form.dyngrdList().getValue() instanceof EpisodeofCareVo) // wdev-13296
    {
        if (form.ctnSummary().grdDiagnosis().getValue() != null) // wdev-13296
            isCareContextSel = form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull() && (form.ctnSummary().grdDiagnosis().getValue() instanceof PatientDiagnosisShortVo); // wdev-13296
        else
            isCareContextSel = form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull();
    }
    else
        isCareContextSel = form.getGlobalContext().Core.getCurrentCareContextIsNotNull();

    form.getContextMenus().getPatSummaryDiagCompVIEWItem().setVisible(isCareContextSel && isRecordSelected);
    form.getContextMenus().getPatSummaryDiagCompVIEWLINKSDIALOGItem().setVisible(isRecordSelected);
    form.getContextMenus().getPatSummaryDiagCompDISPLAYLINKSSUMMARYItem().setVisible(isRecordSelected);
    form.getContextMenus().getPatSummaryDiagCompNEWDIAGNOSISItem().setVisible(isCareContextSel);
    form.getContextMenus().getPatSummaryDiagCompNEWPROBLEMItem().setVisible(form.getGlobalContext().Core.getCurrentCareContextIsNotNull()); // wdev-13296
}
项目:openMAXIMS    文件:Logic.java   
private void unmarkDiagnosisGridAssociations()
{
    if(isAssociationOnSummaryDisplayed())
    {
        for (int i = 0; i < form.ctnSummary().grdDiagnosis().getRows().size(); i++)
        {
            grdDiagnosisRow row = form.ctnSummary().grdDiagnosis().getRows().get(i);
            if(row.getValue() instanceof PatientDiagnosisShortVo)
            {
                row.setTooltip(((PatientDiagnosisShortVo)row.getValue()).getTooltipForDiAssociation()); 
            }

            if(row.getValue() instanceof PatientProblemVo)
            {
                row.setTooltip(((PatientProblemVo)row.getValue()).getDiAssociationTooltip());
            }

            row.setBackColor(Color.Default);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void enableDiagnosisGridContextMenu()
{
    boolean isRecordSelected = form.ctnSummary().grdDiagnosis().getSelectedRowIndex() >= 0;
    //boolean  = form.getGlobalContext().Core.getCurrentCareContextIsNotNull();
    boolean isCareContextSel;   //wdev-13296
    if(form.grdList().getValue() instanceof EpisodeofCareVo) //wdev-13296
    {
        if(form.ctnSummary().grdDiagnosis().getValue() != null) //wdev-13296
            isCareContextSel =  form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull() && (form.ctnSummary().grdDiagnosis().getValue() instanceof PatientDiagnosisShortVo);     //wdev-13296
        else
            isCareContextSel = form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull();
    }
    else
        isCareContextSel = form.getGlobalContext().Core.getCurrentCareContextIsNotNull();

    form.getContextMenus().getPatSummaryDiagCompVIEWItem().setVisible(isCareContextSel && isRecordSelected);
    form.getContextMenus().getPatSummaryDiagCompVIEWLINKSDIALOGItem().setVisible(isRecordSelected);
    form.getContextMenus().getPatSummaryDiagCompDISPLAYLINKSSUMMARYItem().setVisible(isRecordSelected);
    form.getContextMenus().getPatSummaryDiagCompNEWDIAGNOSISItem().setVisible(isCareContextSel);
    form.getContextMenus().getPatSummaryDiagCompNEWPROBLEMItem().setVisible(form.getGlobalContext().Core.getCurrentCareContextIsNotNull()); //wdev-13296
}
项目:openMAXIMS    文件:Logic.java   
private ClinicalDIAssociationVo setPrimary(ClinicalDIAssociationVo data)
{       
    if(data == null)
        return data;

    ValueObject primary = form.getGlobalContext().Clinical.PatientSummary.getPrimaryAssociation();              

    if(primary instanceof PatientDiagnosisShortVo)
    {
        data.setPrimDiagnosis((PatientDiagnosisRefVo)form.getGlobalContext().Clinical.PatientSummary.getPrimaryAssociation());          
    }
    else if(primary instanceof PatientProcedureShortVo)
    {
        data.setPrimProcedure((PatientProcedureRefVo)form.getGlobalContext().Clinical.PatientSummary.getPrimaryAssociation());
    }
    else if(primary instanceof PatientProblemVo)
    {
        data.setPrimProblem((PatientProblemVo)form.getGlobalContext().Clinical.PatientSummary.getPrimaryAssociation());
    }

    return data;
}
项目:openMAXIMS    文件:Logic.java   
private void loadDiagnosis() 
{
    PatientDiagnosisShortVoCollection list = domain.listDiagnosis(form.getGlobalContext().Core.getPatientShort());
    if(list != null)
    {
        for(int x = 0; x < list.size(); x++)
        {
            PatientDiagnosisShortVo patientDiagnosisShortVo = list.get(x);
            if(patientDiagnosisShortVo != null && patientDiagnosisShortVo.getDiagnosisDescriptionIsNotNull())
            {
                if(!patientDiagnosisShortVo.equals(form.getGlobalContext().Clinical.PatientSummary.getPrimaryAssociation()))
                {
                    addNewItem(patientDiagnosisShortVo);
                }
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void viewDiagnosisItem(Control sender)
{
    form.getGlobalContext().Clinical.setReturnToFormName(engine.getFormName());
    if (form.grdDiagnosis().getSelectedRow() != null && sender.equals(form.grdDiagnosis()))
    {
        ValueObject voVal = (ValueObject) form.grdDiagnosis().getValue();
        if (voVal != null)
        {
            if (voVal instanceof PatientDiagnosisShortVo)
            {
                form.getGlobalContext().Clinical.setSelectedPatientDiagnosisFromNursingAdmission((PatientDiagnosisShortVo)voVal);
                engine.open(form.getForms().Clinical.DiagnosisComplications_Dialog);
                form.getGlobalContext().Clinical.setReturnToFormMode(FormMode.VIEW);
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void unmarkDiagnosisGridAssociations()
{
    if (isAssociationOnSummaryDisplayed())
    {
        for (int i = 0; i < form.ctnSummary().grdDiagnosis().getRows().size(); i++)
        {
            grdDiagnosisRow row = form.ctnSummary().grdDiagnosis().getRows().get(i);
            if (row.getValue() instanceof PatientDiagnosisShortVo)
            {
                row.setTooltip(((PatientDiagnosisShortVo) row.getValue()).getTooltipForDiAssociation());
            }

            if (row.getValue() instanceof PatientProblemVo)
            {
                row.setTooltip(((PatientProblemVo) row.getValue()).getDiAssociationTooltip());
            }

            row.setBackColor(Color.Default);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void enableDiagnosisGridContextMenu()
{
    boolean isRecordSelected = form.ctnSummary().grdDiagnosis().getSelectedRowIndex() >= 0;
    // boolean =
    // form.getGlobalContext().Core.getCurrentCareContextIsNotNull();
    boolean isCareContextSel; // wdev-13296
    if (form.dyngrdList().getValue() instanceof EpisodeofCareVo) // wdev-13296
    {
        if (form.ctnSummary().grdDiagnosis().getValue() != null) // wdev-13296
            isCareContextSel = form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull() && (form.ctnSummary().grdDiagnosis().getValue() instanceof PatientDiagnosisShortVo); // wdev-13296
        else
            isCareContextSel = form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull();
    }
    else
        isCareContextSel = form.getGlobalContext().Core.getCurrentCareContextIsNotNull();

    form.getContextMenus().getPatSummaryDiagCompVIEWItem().setVisible(isCareContextSel && isRecordSelected);
    form.getContextMenus().getPatSummaryDiagCompVIEWLINKSDIALOGItem().setVisible(isRecordSelected);
    form.getContextMenus().getPatSummaryDiagCompDISPLAYLINKSSUMMARYItem().setVisible(isRecordSelected);
    form.getContextMenus().getPatSummaryDiagCompNEWDIAGNOSISItem().setVisible(isCareContextSel);
    form.getContextMenus().getPatSummaryDiagCompNEWPROBLEMItem().setVisible(form.getGlobalContext().Core.getCurrentCareContextIsNotNull()); // wdev-13296
}
项目:openMAXIMS    文件:Logic.java   
private void unmarkDiagnosisGridAssociations()
{
    if(isAssociationOnSummaryDisplayed())
    {
        for (int i = 0; i < form.ctnSummary().grdDiagnosis().getRows().size(); i++)
        {
            grdDiagnosisRow row = form.ctnSummary().grdDiagnosis().getRows().get(i);
            if(row.getValue() instanceof PatientDiagnosisShortVo)
            {
                row.setTooltip(((PatientDiagnosisShortVo)row.getValue()).getTooltipForDiAssociation()); 
            }

            if(row.getValue() instanceof PatientProblemVo)
            {
                row.setTooltip(((PatientProblemVo)row.getValue()).getDiAssociationTooltip());
            }

            row.setBackColor(Color.Default);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void enableDiagnosisGridContextMenu()
{
    boolean isRecordSelected = form.ctnSummary().grdDiagnosis().getSelectedRowIndex() >= 0;
    //boolean  = form.getGlobalContext().Core.getCurrentCareContextIsNotNull();
    boolean isCareContextSel;   //wdev-13296
    if(form.grdList().getValue() instanceof EpisodeofCareVo) //wdev-13296
    {
        if(form.ctnSummary().grdDiagnosis().getValue() != null) //wdev-13296
            isCareContextSel =  form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull() && (form.ctnSummary().grdDiagnosis().getValue() instanceof PatientDiagnosisShortVo);     //wdev-13296
        else
            isCareContextSel = form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull();
    }
    else
        isCareContextSel = form.getGlobalContext().Core.getCurrentCareContextIsNotNull();

    form.getContextMenus().getPatSummaryDiagCompVIEWItem().setVisible(isCareContextSel && isRecordSelected);
    form.getContextMenus().getPatSummaryDiagCompVIEWLINKSDIALOGItem().setVisible(isRecordSelected);
    form.getContextMenus().getPatSummaryDiagCompDISPLAYLINKSSUMMARYItem().setVisible(isRecordSelected);
    form.getContextMenus().getPatSummaryDiagCompNEWDIAGNOSISItem().setVisible(isCareContextSel);
    form.getContextMenus().getPatSummaryDiagCompNEWPROBLEMItem().setVisible(form.getGlobalContext().Core.getCurrentCareContextIsNotNull()); //wdev-13296
}
项目:openMAXIMS    文件:Logic.java   
private ClinicalDIAssociationVo setPrimary(ClinicalDIAssociationVo data)
{       
    if(data == null)
        return data;

    ValueObject primary = form.getGlobalContext().Clinical.PatientSummary.getPrimaryAssociation();              

    if(primary instanceof PatientDiagnosisShortVo)
    {
        data.setPrimDiagnosis((PatientDiagnosisRefVo)form.getGlobalContext().Clinical.PatientSummary.getPrimaryAssociation());          
    }
    else if(primary instanceof PatientProcedureShortVo)
    {
        data.setPrimProcedure((PatientProcedureRefVo)form.getGlobalContext().Clinical.PatientSummary.getPrimaryAssociation());
    }
    else if(primary instanceof PatientProblemVo)
    {
        data.setPrimProblem((PatientProblemVo)form.getGlobalContext().Clinical.PatientSummary.getPrimaryAssociation());
    }

    return data;
}
项目:openMAXIMS    文件:Logic.java   
private void loadDiagnosis() 
{
    PatientDiagnosisShortVoCollection list = domain.listDiagnosis(form.getGlobalContext().Core.getPatientShort());
    if(list != null)
    {
        for(int x = 0; x < list.size(); x++)
        {
            PatientDiagnosisShortVo patientDiagnosisShortVo = list.get(x);
            if(patientDiagnosisShortVo != null && patientDiagnosisShortVo.getDiagnosisDescriptionIsNotNull())
            {
                if(!patientDiagnosisShortVo.equals(form.getGlobalContext().Clinical.PatientSummary.getPrimaryAssociation()))
                {
                    addNewItem(patientDiagnosisShortVo);
                }
            }
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void viewDiagnosisItem(Control sender)
{
    form.getGlobalContext().Clinical.setReturnToFormName(engine.getFormName());
    if (form.grdDiagnosis().getSelectedRow() != null && sender.equals(form.grdDiagnosis()))
    {
        ValueObject voVal = (ValueObject) form.grdDiagnosis().getValue();
        if (voVal != null)
        {
            if (voVal instanceof PatientDiagnosisShortVo)
            {
                form.getGlobalContext().Clinical.setSelectedPatientDiagnosisFromNursingAdmission((PatientDiagnosisShortVo)voVal);
                engine.open(form.getForms().Clinical.DiagnosisComplications_Dialog);
                form.getGlobalContext().Clinical.setReturnToFormMode(FormMode.VIEW);
            }
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void unmarkDiagnosisGridAssociations()
{
    if (isAssociationOnSummaryDisplayed())
    {
        for (int i = 0; i < form.ctnSummary().grdDiagnosis().getRows().size(); i++)
        {
            grdDiagnosisRow row = form.ctnSummary().grdDiagnosis().getRows().get(i);
            if (row.getValue() instanceof PatientDiagnosisShortVo)
            {
                row.setTooltip(((PatientDiagnosisShortVo) row.getValue()).getTooltipForDiAssociation());
            }

            if (row.getValue() instanceof PatientProblemVo)
            {
                row.setTooltip(((PatientProblemVo) row.getValue()).getDiAssociationTooltip());
            }

            row.setBackColor(Color.Default);
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void enableDiagnosisGridContextMenu()
{
    boolean isRecordSelected = form.ctnSummary().grdDiagnosis().getSelectedRowIndex() >= 0;
    // boolean =
    // form.getGlobalContext().Core.getCurrentCareContextIsNotNull();
    boolean isCareContextSel; // wdev-13296
    if (form.dyngrdList().getValue() instanceof EpisodeofCareVo) // wdev-13296
    {
        if (form.ctnSummary().grdDiagnosis().getValue() != null) // wdev-13296
            isCareContextSel = form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull() && (form.ctnSummary().grdDiagnosis().getValue() instanceof PatientDiagnosisShortVo); // wdev-13296
        else
            isCareContextSel = form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull();
    }
    else
        isCareContextSel = form.getGlobalContext().Core.getCurrentCareContextIsNotNull();

    form.getContextMenus().getPatSummaryDiagCompVIEWItem().setVisible(isCareContextSel && isRecordSelected);
    form.getContextMenus().getPatSummaryDiagCompVIEWLINKSDIALOGItem().setVisible(isRecordSelected);
    form.getContextMenus().getPatSummaryDiagCompDISPLAYLINKSSUMMARYItem().setVisible(isRecordSelected);
    form.getContextMenus().getPatSummaryDiagCompNEWDIAGNOSISItem().setVisible(isCareContextSel);
    form.getContextMenus().getPatSummaryDiagCompNEWPROBLEMItem().setVisible(form.getGlobalContext().Core.getCurrentCareContextIsNotNull()); // wdev-13296
}
项目:openmaxims-linux    文件:Logic.java   
private void unmarkDiagnosisGridAssociations()
{
    if(isAssociationOnSummaryDisplayed())
    {
        for (int i = 0; i < form.ctnSummary().grdDiagnosis().getRows().size(); i++)
        {
            grdDiagnosisRow row = form.ctnSummary().grdDiagnosis().getRows().get(i);
            if(row.getValue() instanceof PatientDiagnosisShortVo)
            {
                row.setTooltip(((PatientDiagnosisShortVo)row.getValue()).getTooltipForDiAssociation()); 
            }

            if(row.getValue() instanceof PatientProblemVo)
            {
                row.setTooltip(((PatientProblemVo)row.getValue()).getDiAssociationTooltip());
            }

            row.setBackColor(Color.Default);
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void enableDiagnosisGridContextMenu()
{
    boolean isRecordSelected = form.ctnSummary().grdDiagnosis().getSelectedRowIndex() >= 0;
    //boolean  = form.getGlobalContext().Core.getCurrentCareContextIsNotNull();
    boolean isCareContextSel;   //wdev-13296
    if(form.grdList().getValue() instanceof EpisodeofCareVo) //wdev-13296
    {
        if(form.ctnSummary().grdDiagnosis().getValue() != null) //wdev-13296
            isCareContextSel =  form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull() && (form.ctnSummary().grdDiagnosis().getValue() instanceof PatientDiagnosisShortVo);     //wdev-13296
        else
            isCareContextSel = form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull();
    }
    else
        isCareContextSel = form.getGlobalContext().Core.getCurrentCareContextIsNotNull();

    form.getContextMenus().getPatSummaryDiagCompVIEWItem().setVisible(isCareContextSel && isRecordSelected);
    form.getContextMenus().getPatSummaryDiagCompVIEWLINKSDIALOGItem().setVisible(isRecordSelected);
    form.getContextMenus().getPatSummaryDiagCompDISPLAYLINKSSUMMARYItem().setVisible(isRecordSelected);
    form.getContextMenus().getPatSummaryDiagCompNEWDIAGNOSISItem().setVisible(isCareContextSel);
    form.getContextMenus().getPatSummaryDiagCompNEWPROBLEMItem().setVisible(form.getGlobalContext().Core.getCurrentCareContextIsNotNull()); //wdev-13296
}
项目:openmaxims-linux    文件:Logic.java   
private ClinicalDIAssociationVo setPrimary(ClinicalDIAssociationVo data)
{       
    if(data == null)
        return data;

    ValueObject primary = form.getGlobalContext().Clinical.PatientSummary.getPrimaryAssociation();              

    if(primary instanceof PatientDiagnosisShortVo)
    {
        data.setPrimDiagnosis((PatientDiagnosisRefVo)form.getGlobalContext().Clinical.PatientSummary.getPrimaryAssociation());          
    }
    else if(primary instanceof PatientProcedureShortVo)
    {
        data.setPrimProcedure((PatientProcedureRefVo)form.getGlobalContext().Clinical.PatientSummary.getPrimaryAssociation());
    }
    else if(primary instanceof PatientProblemVo)
    {
        data.setPrimProblem((PatientProblemVo)form.getGlobalContext().Clinical.PatientSummary.getPrimaryAssociation());
    }

    return data;
}
项目:openmaxims-linux    文件:Logic.java   
private void loadDiagnosis() 
{
    PatientDiagnosisShortVoCollection list = domain.listDiagnosis(form.getGlobalContext().Core.getPatientShort());
    if(list != null)
    {
        for(int x = 0; x < list.size(); x++)
        {
            PatientDiagnosisShortVo patientDiagnosisShortVo = list.get(x);
            if(patientDiagnosisShortVo != null && patientDiagnosisShortVo.getDiagnosisDescriptionIsNotNull())
            {
                if(!patientDiagnosisShortVo.equals(form.getGlobalContext().Clinical.PatientSummary.getPrimaryAssociation()))
                {
                    addNewItem(patientDiagnosisShortVo);
                }
            }
        }
    }
}
项目:AvoinApotti    文件:DiagnosisAndManagementComponentImpl.java   
public PatientDiagnosisShortVo getPatientDiagnosisShort(Integer diagnosisID)
{
    if (diagnosisID == null)
        throw new RuntimeException("Cannot get DiagnosisManagementVo for null DiagnosisManagementRefVo");

    PatientDiagnosis doPatientDiagnosis = (PatientDiagnosis) getDomainFactory().getDomainObject(PatientDiagnosis.class, diagnosisID);
    return PatientDiagnosisShortVoAssembler.create(doPatientDiagnosis);     
}
项目:AvoinApotti    文件:Logic.java   
private String getDiagnosisText(PatientDiagnosisShortVo VoPatientDiagnosisShort)
{
    if (VoPatientDiagnosisShort != null)
        return VoPatientDiagnosisShort.getDiagnosisDescription() + (VoPatientDiagnosisShort.getSiteTextIsNotNull() ? " (" + VoPatientDiagnosisShort.getSiteText() + ")" : "");

    return "";
}
项目: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 viewDiagCompItem()
{
    form.getGlobalContext().Clinical.setReturnToFormName(engine.getFormName());
    form.getGlobalContext().Clinical.setReturnToFormMode(FormMode.VIEW);

    if (form.ctnSummary().grdDiagnosis().getSelectedRow() != null)
    {
        ValueObject voVal = form.ctnSummary().grdDiagnosis().getValue();
        if (voVal != null)
        {
            if (voVal instanceof PatientDiagnosisShortVo)
            {
                // WDEV-1421
                form.getGlobalContext().Clinical.setSelectedPatientDiagnosisFromPatientSummary((PatientDiagnosisShortVo) voVal);
                // WDEV-2422
                engine.open(form.getForms().Clinical.DiagnosisComplications_Dialog);
            }
            // else if (voVal instanceof ClinicalProblemVo)
            // engine.open(form.getForms().Clinical.PatientProblems);
            else if (voVal instanceof PatientProblemVo)
            {
                // WDEV-1421
                form.getGlobalContext().Clinical.setSelectedPatientProblemFromPatientSummary((PatientProblemVo) voVal);
                // WDEV-2422
                engine.open(form.getForms().Clinical.PatientProblems_Dialog);
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private String getDiagnosisText(PatientDiagnosisShortVo VoPatientDiagnosisShort)
{
    if(VoPatientDiagnosisShort != null)
        return VoPatientDiagnosisShort.getDiagnosisDescription() + (VoPatientDiagnosisShort.getSiteTextIsNotNull()?" (" + VoPatientDiagnosisShort.getSiteText() + ")":"");

    return "";
}
项目: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 viewDiagCompItem()
{
    form.getGlobalContext().Clinical.setReturnToFormName(engine.getFormName());
    form.getGlobalContext().Clinical.setReturnToFormMode(FormMode.VIEW);

    if (form.ctnSummary().grdDiagnosis().getSelectedRow() != null)
    {
        ValueObject voVal = form.ctnSummary().grdDiagnosis().getValue();
        if (voVal != null)
        {
            if (voVal instanceof PatientDiagnosisShortVo)
            {
                //WDEV-1421
                form.getGlobalContext().Clinical.setSelectedPatientDiagnosisFromPatientSummary((PatientDiagnosisShortVo)voVal);
                //WDEV-2422
                engine.open(form.getForms().Clinical.DiagnosisComplications_Dialog);
            }
            //else if (voVal instanceof ClinicalProblemVo)
            //  engine.open(form.getForms().Clinical.PatientProblems);
            else if (voVal instanceof PatientProblemVo)
            {
                //WDEV-1421
                form.getGlobalContext().Clinical.setSelectedPatientProblemFromPatientSummary((PatientProblemVo)voVal);
                //WDEV-2422
                engine.open(form.getForms().Clinical.PatientProblems_Dialog);
            }
        }
    }       
}
项目:AvoinApotti    文件:Logic.java   
private DiagnosisSaveResult saveDiagnosisAsComplication()
{
    ValueObject primary = form.getGlobalContext().Clinical.PatientSummary.getPrimaryAssociation();
    if (primary instanceof PatientDiagnosisShortVo)
    {
        PatientDiagnosisShortVo voPatientDiagnosis = (PatientDiagnosisShortVo) primary;
        voPatientDiagnosis.setIsComplication(new Boolean(true));

        String[] errors = voPatientDiagnosis.validate();
        if (errors != null)
        {
            engine.showErrors(errors);
            return DiagnosisSaveResult.VALIDATION_ERROR;
        }

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

    return DiagnosisSaveResult.NO_ERROR;
}
项目:AvoinApotti    文件:Logic.java   
private void addNewItem(ValueObject voObject, boolean isComplication)
{
    GenForm.grdItemRow row = form.grdItem().getRows().newRow();
    String description  = "";
    Image lateralityImg = null;
    String tooltip      = new String();

    if (voObject instanceof PatientDiagnosisShortVo)
    {
        PatientDiagnosisShortVo patientDiagnosisShortVo = ((PatientDiagnosisShortVo) voObject);
        description = patientDiagnosisShortVo.getDiagnosisDescription();
        tooltip     = patientDiagnosisShortVo.getTooltipForDiAssociation();
        if (isComplication)
            lateralityImg = getComplicationLateralityImg(patientDiagnosisShortVo.getDiagLaterality());
        else
            lateralityImg = getDiagnosisLateralityImg(patientDiagnosisShortVo.getDiagLaterality());
    }

    if (voObject instanceof PatientProblemVo)
    {
        PatientProblemVo patientProblemVo = ((PatientProblemVo) voObject);
        description = patientProblemVo.getPatientProblem();
        lateralityImg = form.getImages().COE.BlueViolet;
        tooltip = patientProblemVo.getDiAssociationTooltip();
    }
    row.setColDataItem(description);
    row.setcolLaterality(lateralityImg);
    row.setTooltip(tooltip);
    row.setValue(voObject);
}
项目:AvoinApotti    文件:Logic.java   
private boolean isDiagnosis()
{
    ValueObject primary = form.getGlobalContext().Clinical.PatientSummary.getPrimaryAssociation();
    if (primary instanceof PatientDiagnosisShortVo)
    {
        PatientDiagnosisShortVo patientDiagShortVo = (PatientDiagnosisShortVo) primary;
        return patientDiagShortVo.getIsComplication() == null || patientDiagShortVo.getIsComplication().booleanValue() == false;
    }
    return false;
}
项目:AvoinApotti    文件:ClinicalDiAssociationsImpl.java   
public PatientDiagnosisShortVo saveDiagnosis(PatientDiagnosisShortVo patientDiagnosisShortVO) throws StaleObjectException
{
    if(patientDiagnosisShortVO == null)
        throw new RuntimeException("Cannot save null PatientDiagnosisShortVo");
    if(patientDiagnosisShortVO.isValidated() == false)
        throw new CodingRuntimeException("PatientDiagnosisShortVo has not been validated");

    DomainFactory factory = getDomainFactory();
    PatientDiagnosis doPatientDiagnosis = PatientDiagnosisShortVoAssembler.extractPatientDiagnosis(factory, patientDiagnosisShortVO);
    factory.save(doPatientDiagnosis);

    return PatientDiagnosisShortVoAssembler.create(doPatientDiagnosis);
}
项目:AvoinApotti    文件:DiagnosisComplicationsImpl.java   
public PatientDiagnosisShortVo getDiagnosisShortVo(PatientDiagnosisRefVo patientDiagnosisRefVo)
{
    if(patientDiagnosisRefVo == null)
        throw new DomainRuntimeException("Cannot get PatientDiagnosisShortVo for null PatientDiagnosisRefVo");

    DomainFactory factory = getDomainFactory();
    PatientDiagnosis doPatientDiagnosis = (PatientDiagnosis)factory.getDomainObject(PatientDiagnosis.class,patientDiagnosisRefVo.getID_PatientDiagnosis());
    return PatientDiagnosisShortVoAssembler.create(doPatientDiagnosis);
}