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

项目:AvoinApotti    文件:Logic.java   
private void populateItemFromRow(PatientProblemVo item, grdProblemsRow childRow)
{
    if(item == null)
        return;

    item.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    item.setIsActive(Boolean.TRUE);
    item.setIsPresentingProblem(Boolean.TRUE);
    item.setOnset(childRow.getcolOnset());
    item.setPatientProblem(((ClinicalProblemShortVo)childRow.getValue()).getPCName());
    item.setProblem((ClinicalProblemShortVo) childRow.getValue());
    item.setProblemNote(childRow.getcolNotes());
    item.setSpecialty((Specialty) childRow.getParentRow().getValue());

    if(item.getAuthoringInformation() == null)
    {
        item.setAuthoringInformation(getAuthoringInfo());
    }
}
项目: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 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 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 populatePatientProblemControls(PatientProblemVo voPatientProblem)
{
    GenForm.grdProblemsRow row = findPatientProblemRow(voPatientProblem.getProblem());
    if (row != null)
    {
        row.setcolProblems(voPatientProblem.getProblem());

        if (voPatientProblem.getPrimaryForCareSpellsIsNotNull())
            row.setcolIsPrimary(isPrimaryProblem(voPatientProblem.getID_PatientProblem(), voPatientProblem.getPrimaryForCareSpells()));
        else
            row.setcolIsPrimary(false);
        row.setcolSelect(AbsentPresent.PRESENT);
        row.setcolOnset(voPatientProblem.getOnset());
        row.setcolNotes(voPatientProblem.getPatientProblem());
        row.setValue(voPatientProblem);

        setGridUIForPresent(row); //WDEV-6546
    }
}
项目:AvoinApotti    文件:Logic.java   
private void setReturnToFormDescription(PatientProblemVo currentInstance) 
{
    if ( (form.getGlobalContext().Clinical.getReturnToFormNameIsNotNull())
            && (form.getGlobalContext().Clinical.getReturnToFormName().equals(engine.getPreviousNonDialogFormName())) )
    {
        //Set the CDI Description for the return to form link
        String str = form.getGlobalContext().Clinical.getReturnToFormCDIDescriptionIsNotNull() ? form.getGlobalContext().Clinical.getReturnToFormCDIDescription() : "";
        StringBuffer sb = new StringBuffer();
        sb.append(str);
        if  (sb.length() > 0)
            sb.append(", ");

        sb.append(currentInstance.getPatientProblem());

        form.getGlobalContext().Clinical.setReturnToFormCDIDescription(sb.toString());
        form.getGlobalContext().Clinical.setReturnToFormMode(FormMode.EDIT);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void setCsPrimaryProcedure(PatientProblemVo voPatientProblem, boolean isChkPrimaryChecked)
{
    CSPrimaryProblemVo voCSPrimaryProcedure = getPrimaryProcedureRecord(voPatientProblem);
    //Update only when checked or record existing  
    if(voCSPrimaryProcedure != null || isChkPrimaryChecked)
    {
        if(voCSPrimaryProcedure == null)
        {
            voCSPrimaryProcedure = populatePrimaryProblemDataFromScreen(new CSPrimaryProblemVo(), voPatientProblem, isChkPrimaryChecked);
            if(voPatientProblem.getPrimaryForCareSpells() == null)
                voPatientProblem.setPrimaryForCareSpells(new CSPrimaryProblemVoCollection());
            voPatientProblem.getPrimaryForCareSpells().add(voCSPrimaryProcedure);
        }
        else
        {
            int index = voPatientProblem.getPrimaryForCareSpells().indexOf(voCSPrimaryProcedure);
            if(index >=0)
            {
                voCSPrimaryProcedure = populatePrimaryProblemDataFromScreen(voCSPrimaryProcedure, voPatientProblem, isChkPrimaryChecked);
                voPatientProblem.getPrimaryForCareSpells().set(index, voCSPrimaryProcedure);
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private CSPrimaryProblemVo getPrimaryProcedureRecord(PatientProblemVo voPatProcedure)
{
    if(voPatProcedure == null || voPatProcedure.getPrimaryForCareSpells() == null)
        return null;

    CSPrimaryProblemVoCollection voColl = voPatProcedure.getPrimaryForCareSpells();
    for (int i = 0; voColl != null && i <voColl.size(); i++)
    {
        boolean sameProcedure   = voColl.get(i).getPatientProblemIsNotNull() && voColl.get(i).getPatientProblem().equals(voPatProcedure);
        boolean sameCareContext = voColl.get(i).getCareContextIsNotNull() && voColl.get(i).getCareContext().equals(form.getGlobalContext().Core.getCurrentCareContext());

        if(sameProcedure && sameCareContext)
            return voColl.get(i);
    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void markProblemAsPrimary() throws PresentationLogicException
{
    PatientProblemListVo voPatienProblemList = form.grdProblemList().getValue();
    if(voPatienProblemList == null)
    {
        engine.showErrors(new String[]{"Please select a Diagnosis / Complication"});
        return;
    }

    PatientProblemVo voPatientProblem = domain.get(voPatienProblemList);

    setCsPrimaryProcedure(voPatientProblem, true);

    if(savePatientProcedure(voPatientProblem,null))
    {
        PatientProblemVo voPatProblem = form.getLocalContext().getSelectedInstance();
        grdProblemListRow row = form.grdProblemList().getRowByValue(voPatProblem);
        if(row != null)
        {
            setGridRowData(row, voPatProblem);
            selectProblem();
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateItemFromRow(PatientProblemVo item, grdProblemsRow childRow)
{
    if(item == null)
        return;

    item.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    item.setIsActive(Boolean.TRUE);
    item.setIsPresentingProblem(Boolean.TRUE);
    item.setOnset(childRow.getcolOnset());
    item.setPatientProblem(((ClinicalProblemShortVo)childRow.getValue()).getPCName());
    item.setProblem((ClinicalProblemShortVo) childRow.getValue());
    item.setProblemNote(childRow.getcolNotes());
    item.setSpecialty((Specialty) childRow.getParentRow().getValue());

    if(item.getAuthoringInformation() == null)
    {
        item.setAuthoringInformation(getAuthoringInfo());
    }
}
项目: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 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 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 populatePatientProblemControls(PatientProblemVo voPatientProblem)
{
    GenForm.grdProblemsRow row = findPatientProblemRow(voPatientProblem.getProblem());
    if (row != null)
    {
        row.setcolProblems(voPatientProblem.getProblem());

        if (voPatientProblem.getPrimaryForCareSpellsIsNotNull())
            row.setcolIsPrimary(isPrimaryProblem(voPatientProblem.getID_PatientProblem(), voPatientProblem.getPrimaryForCareSpells()));
        else
            row.setcolIsPrimary(false);
        row.setcolSelect(AbsentPresent.PRESENT);
        row.setcolOnset(voPatientProblem.getOnset());
        row.setcolNotes(voPatientProblem.getPatientProblem());
        row.setValue(voPatientProblem);

        setGridUIForPresent(row); //WDEV-6546
    }
}
项目:openMAXIMS    文件:Logic.java   
private void setReturnToFormDescription(PatientProblemVo currentInstance) 
{
    if ( (form.getGlobalContext().Clinical.getReturnToFormNameIsNotNull())
            && (form.getGlobalContext().Clinical.getReturnToFormName().equals(engine.getPreviousNonDialogFormName())) )
    {
        //Set the CDI Description for the return to form link
        String str = form.getGlobalContext().Clinical.getReturnToFormCDIDescriptionIsNotNull() ? form.getGlobalContext().Clinical.getReturnToFormCDIDescription() : "";
        StringBuffer sb = new StringBuffer();
        sb.append(str);
        if  (sb.length() > 0)
            sb.append(", ");

        sb.append(currentInstance.getPatientProblem());

        form.getGlobalContext().Clinical.setReturnToFormCDIDescription(sb.toString());
        form.getGlobalContext().Clinical.setReturnToFormMode(FormMode.EDIT);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void setCsPrimaryProcedure(PatientProblemVo voPatientProblem, boolean isChkPrimaryChecked)
{
    CSPrimaryProblemVo voCSPrimaryProcedure = getPrimaryProcedureRecord(voPatientProblem);
    //Update only when checked or record existing  
    if(voCSPrimaryProcedure != null || isChkPrimaryChecked)
    {
        if(voCSPrimaryProcedure == null)
        {
            voCSPrimaryProcedure = populatePrimaryProblemDataFromScreen(new CSPrimaryProblemVo(), voPatientProblem, isChkPrimaryChecked);
            if(voPatientProblem.getPrimaryForCareSpells() == null)
                voPatientProblem.setPrimaryForCareSpells(new CSPrimaryProblemVoCollection());
            voPatientProblem.getPrimaryForCareSpells().add(voCSPrimaryProcedure);
        }
        else
        {
            int index = voPatientProblem.getPrimaryForCareSpells().indexOf(voCSPrimaryProcedure);
            if(index >=0)
            {
                voCSPrimaryProcedure = populatePrimaryProblemDataFromScreen(voCSPrimaryProcedure, voPatientProblem, isChkPrimaryChecked);
                voPatientProblem.getPrimaryForCareSpells().set(index, voCSPrimaryProcedure);
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private CSPrimaryProblemVo getPrimaryProcedureRecord(PatientProblemVo voPatProcedure)
{
    if(voPatProcedure == null || voPatProcedure.getPrimaryForCareSpells() == null)
        return null;

    CSPrimaryProblemVoCollection voColl = voPatProcedure.getPrimaryForCareSpells();
    for (int i = 0; voColl != null && i <voColl.size(); i++)
    {
        boolean sameProcedure   = voColl.get(i).getPatientProblemIsNotNull() && voColl.get(i).getPatientProblem().equals(voPatProcedure);
        boolean sameCareContext = voColl.get(i).getCareContextIsNotNull() && voColl.get(i).getCareContext().equals(form.getGlobalContext().Core.getCurrentCareContext());

        if(sameProcedure && sameCareContext)
            return voColl.get(i);
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void markProblemAsPrimary() throws PresentationLogicException
{
    PatientProblemListVo voPatienProblemList = form.grdProblemList().getValue();
    if(voPatienProblemList == null)
    {
        engine.showErrors(new String[]{"Please select a Diagnosis / Complication"});
        return;
    }

    PatientProblemVo voPatientProblem = domain.get(voPatienProblemList);

    setCsPrimaryProcedure(voPatientProblem, true);

    if(savePatientProcedure(voPatientProblem,null))
    {
        PatientProblemVo voPatProblem = form.getLocalContext().getSelectedInstance();
        grdProblemListRow row = form.grdProblemList().getRowByValue(voPatProblem);
        if(row != null)
        {
            setGridRowData(row, voPatProblem);
            selectProblem();
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateItemFromRow(PatientProblemVo item, grdProblemsRow childRow)
{
    if(item == null)
        return;

    item.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    item.setIsActive(Boolean.TRUE);
    item.setIsPresentingProblem(Boolean.TRUE);
    item.setOnset(childRow.getcolOnset());
    item.setPatientProblem(((ClinicalProblemShortVo)childRow.getValue()).getPCName());
    item.setProblem((ClinicalProblemShortVo) childRow.getValue());
    item.setProblemNote(childRow.getcolNotes());
    item.setSpecialty((Specialty) childRow.getParentRow().getValue());

    if(item.getAuthoringInformation() == null)
    {
        item.setAuthoringInformation(getAuthoringInfo());
    }
}
项目: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 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 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 populatePatientProblemControls(PatientProblemVo voPatientProblem)
{
    GenForm.grdProblemsRow row = findPatientProblemRow(voPatientProblem.getProblem());
    if (row != null)
    {
        row.setcolProblems(voPatientProblem.getProblem());

        if (voPatientProblem.getPrimaryForCareSpellsIsNotNull())
            row.setcolIsPrimary(isPrimaryProblem(voPatientProblem.getID_PatientProblem(), voPatientProblem.getPrimaryForCareSpells()));
        else
            row.setcolIsPrimary(false);
        row.setcolSelect(AbsentPresent.PRESENT);
        row.setcolOnset(voPatientProblem.getOnset());
        row.setcolNotes(voPatientProblem.getPatientProblem());
        row.setValue(voPatientProblem);

        setGridUIForPresent(row); //WDEV-6546
    }
}
项目:openMAXIMS    文件:Logic.java   
private void setReturnToFormDescription(PatientProblemVo currentInstance) 
{
    if ( (form.getGlobalContext().Clinical.getReturnToFormNameIsNotNull())
            && (form.getGlobalContext().Clinical.getReturnToFormName().equals(engine.getPreviousNonDialogFormName())) )
    {
        //Set the CDI Description for the return to form link
        String str = form.getGlobalContext().Clinical.getReturnToFormCDIDescriptionIsNotNull() ? form.getGlobalContext().Clinical.getReturnToFormCDIDescription() : "";
        StringBuffer sb = new StringBuffer();
        sb.append(str);
        if  (sb.length() > 0)
            sb.append(", ");

        sb.append(currentInstance.getPatientProblem());

        form.getGlobalContext().Clinical.setReturnToFormCDIDescription(sb.toString());
        form.getGlobalContext().Clinical.setReturnToFormMode(FormMode.EDIT);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void setCsPrimaryProcedure(PatientProblemVo voPatientProblem, boolean isChkPrimaryChecked)
{
    CSPrimaryProblemVo voCSPrimaryProcedure = getPrimaryProcedureRecord(voPatientProblem);
    //Update only when checked or record existing  
    if(voCSPrimaryProcedure != null || isChkPrimaryChecked)
    {
        if(voCSPrimaryProcedure == null)
        {
            voCSPrimaryProcedure = populatePrimaryProblemDataFromScreen(new CSPrimaryProblemVo(), voPatientProblem, isChkPrimaryChecked);
            if(voPatientProblem.getPrimaryForCareSpells() == null)
                voPatientProblem.setPrimaryForCareSpells(new CSPrimaryProblemVoCollection());
            voPatientProblem.getPrimaryForCareSpells().add(voCSPrimaryProcedure);
        }
        else
        {
            int index = voPatientProblem.getPrimaryForCareSpells().indexOf(voCSPrimaryProcedure);
            if(index >=0)
            {
                voCSPrimaryProcedure = populatePrimaryProblemDataFromScreen(voCSPrimaryProcedure, voPatientProblem, isChkPrimaryChecked);
                voPatientProblem.getPrimaryForCareSpells().set(index, voCSPrimaryProcedure);
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private CSPrimaryProblemVo getPrimaryProcedureRecord(PatientProblemVo voPatProcedure)
{
    if(voPatProcedure == null || voPatProcedure.getPrimaryForCareSpells() == null)
        return null;

    CSPrimaryProblemVoCollection voColl = voPatProcedure.getPrimaryForCareSpells();
    for (int i = 0; voColl != null && i <voColl.size(); i++)
    {
        boolean sameProcedure   = voColl.get(i).getPatientProblemIsNotNull() && voColl.get(i).getPatientProblem().equals(voPatProcedure);
        boolean sameCareContext = voColl.get(i).getCareContextIsNotNull() && voColl.get(i).getCareContext().equals(form.getGlobalContext().Core.getCurrentCareContext());

        if(sameProcedure && sameCareContext)
            return voColl.get(i);
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void markProblemAsPrimary() throws PresentationLogicException
{
    PatientProblemListVo voPatienProblemList = form.grdProblemList().getValue();
    if(voPatienProblemList == null)
    {
        engine.showErrors(new String[]{"Please select a Diagnosis / Complication"});
        return;
    }

    PatientProblemVo voPatientProblem = domain.get(voPatienProblemList);

    setCsPrimaryProcedure(voPatientProblem, true);

    if(savePatientProcedure(voPatientProblem,null))
    {
        PatientProblemVo voPatProblem = form.getLocalContext().getSelectedInstance();
        grdProblemListRow row = form.grdProblemList().getRowByValue(voPatProblem);
        if(row != null)
        {
            setGridRowData(row, voPatProblem);
            selectProblem();
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void populateItemFromRow(PatientProblemVo item, grdProblemsRow childRow)
{
    if(item == null)
        return;

    item.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    item.setIsActive(Boolean.TRUE);
    item.setIsPresentingProblem(Boolean.TRUE);
    item.setOnset(childRow.getcolOnset());
    item.setPatientProblem(((ClinicalProblemShortVo)childRow.getValue()).getPCName());
    item.setProblem((ClinicalProblemShortVo) childRow.getValue());
    item.setProblemNote(childRow.getcolNotes());
    item.setSpecialty((Specialty) childRow.getParentRow().getValue());

    if(item.getAuthoringInformation() == null)
    {
        item.setAuthoringInformation(getAuthoringInfo());
    }
}
项目: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 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 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 populatePatientProblemControls(PatientProblemVo voPatientProblem)
{
    GenForm.grdProblemsRow row = findPatientProblemRow(voPatientProblem.getProblem());
    if (row != null)
    {
        row.setcolProblems(voPatientProblem.getProblem());

        if (voPatientProblem.getPrimaryForCareSpellsIsNotNull())
            row.setcolIsPrimary(isPrimaryProblem(voPatientProblem.getID_PatientProblem(), voPatientProblem.getPrimaryForCareSpells()));
        else
            row.setcolIsPrimary(false);
        row.setcolSelect(AbsentPresent.PRESENT);
        row.setcolOnset(voPatientProblem.getOnset());
        row.setcolNotes(voPatientProblem.getPatientProblem());
        row.setValue(voPatientProblem);

        setGridUIForPresent(row); //WDEV-6546
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void setReturnToFormDescription(PatientProblemVo currentInstance) 
{
    if ( (form.getGlobalContext().Clinical.getReturnToFormNameIsNotNull())
            && (form.getGlobalContext().Clinical.getReturnToFormName().equals(engine.getPreviousNonDialogFormName())) )
    {
        //Set the CDI Description for the return to form link
        String str = form.getGlobalContext().Clinical.getReturnToFormCDIDescriptionIsNotNull() ? form.getGlobalContext().Clinical.getReturnToFormCDIDescription() : "";
        StringBuffer sb = new StringBuffer();
        sb.append(str);
        if  (sb.length() > 0)
            sb.append(", ");

        sb.append(currentInstance.getPatientProblem());

        form.getGlobalContext().Clinical.setReturnToFormCDIDescription(sb.toString());
        form.getGlobalContext().Clinical.setReturnToFormMode(FormMode.EDIT);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void setCsPrimaryProcedure(PatientProblemVo voPatientProblem, boolean isChkPrimaryChecked)
{
    CSPrimaryProblemVo voCSPrimaryProcedure = getPrimaryProcedureRecord(voPatientProblem);
    //Update only when checked or record existing  
    if(voCSPrimaryProcedure != null || isChkPrimaryChecked)
    {
        if(voCSPrimaryProcedure == null)
        {
            voCSPrimaryProcedure = populatePrimaryProblemDataFromScreen(new CSPrimaryProblemVo(), voPatientProblem, isChkPrimaryChecked);
            if(voPatientProblem.getPrimaryForCareSpells() == null)
                voPatientProblem.setPrimaryForCareSpells(new CSPrimaryProblemVoCollection());
            voPatientProblem.getPrimaryForCareSpells().add(voCSPrimaryProcedure);
        }
        else
        {
            int index = voPatientProblem.getPrimaryForCareSpells().indexOf(voCSPrimaryProcedure);
            if(index >=0)
            {
                voCSPrimaryProcedure = populatePrimaryProblemDataFromScreen(voCSPrimaryProcedure, voPatientProblem, isChkPrimaryChecked);
                voPatientProblem.getPrimaryForCareSpells().set(index, voCSPrimaryProcedure);
            }
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private CSPrimaryProblemVo getPrimaryProcedureRecord(PatientProblemVo voPatProcedure)
{
    if(voPatProcedure == null || voPatProcedure.getPrimaryForCareSpells() == null)
        return null;

    CSPrimaryProblemVoCollection voColl = voPatProcedure.getPrimaryForCareSpells();
    for (int i = 0; voColl != null && i <voColl.size(); i++)
    {
        boolean sameProcedure   = voColl.get(i).getPatientProblemIsNotNull() && voColl.get(i).getPatientProblem().equals(voPatProcedure);
        boolean sameCareContext = voColl.get(i).getCareContextIsNotNull() && voColl.get(i).getCareContext().equals(form.getGlobalContext().Core.getCurrentCareContext());

        if(sameProcedure && sameCareContext)
            return voColl.get(i);
    }

    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private void markProblemAsPrimary() throws PresentationLogicException
{
    PatientProblemListVo voPatienProblemList = form.grdProblemList().getValue();
    if(voPatienProblemList == null)
    {
        engine.showErrors(new String[]{"Please select a Diagnosis / Complication"});
        return;
    }

    PatientProblemVo voPatientProblem = domain.get(voPatienProblemList);

    setCsPrimaryProcedure(voPatientProblem, true);

    if(savePatientProcedure(voPatientProblem,null))
    {
        PatientProblemVo voPatProblem = form.getLocalContext().getSelectedInstance();
        grdProblemListRow row = form.grdProblemList().getRowByValue(voPatProblem);
        if(row != null)
        {
            setGridRowData(row, voPatProblem);
            selectProblem();
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private PatientProblemVo getInstantiatedProblem(ProblemListVo problem, Specialty specialty, PatientProblemVoCollection list)
{
    if(list == null)
        return null;

    for (int i = 0; i < list.size(); i++)
    {
        if(list.get(i).getSpecialtyIsNotNull() && list.get(i).getSpecialty().equals(specialty) && list.get(i).getProblemIsNotNull() && list.get(i).getProblem().getID_ClinicalProblem().equals(problem.getPresentingProblem().getID_ClinicalProblem()))
            return list.get(i);
    }

    return null;
}
项目: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 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);
    }

}