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

项目:AvoinApotti    文件:Logic.java   
private void setTooltip(PatientDiagnosisEDischargeVo voPatDiag)
{
    if (voPatDiag != null && voPatDiag.getStatusHistoryIsNotNull() && voPatDiag.getStatusHistory().size() > 0)
    {
        PatientDiagnosisStatusVoCollection collVo = voPatDiag.getStatusHistory();

        String tooltip = "";
        String setFont = "<FONT FACE='Times New Roman' SIZE='2'>";
        String endFont = "</FONT>";
        String table = "<TABLE CELLPADDING='1' CELLSPACING='1' BORDER='3' ><TR><TD BGCOLOR=\'#BBBBFF\' ALIGN='LEFT'>";
        String endStatus = endFont + "<B></TD></TR><TR>";
        String dateTime = "<TD colspan=1 width=60% align=\'LEFT\'> " + setFont;
        String hcp = endFont + "</TD><TD colspan=1 width=60% align=\'LEFT\'>" + setFont;
        String end = endFont + "</TD></TR><TR></TABLE>";

        for (int i = 0; i < collVo.size(); i++)
        {
            tooltip += table + setFont + "<B>" + (i + 1) + ". " + collVo.get(i).getStatus() + endStatus + endFont + dateTime + collVo.get(i).getAuthoringDateTime() + hcp + collVo.get(i).getAuthoringHCP() + end;
        }

    }
}
项目:AvoinApotti    文件:Logic.java   
private CSPrimaryDiagnosisVo getPrimaryDiagnosisRecord(PatientDiagnosisEDischargeVo voPatDiagnosis)
{
    if (voPatDiagnosis == null || voPatDiagnosis.getPrimaryForCareSpells() == null)
        return null;

    CSPrimaryDiagnosisVoCollection voColl = voPatDiagnosis.getPrimaryForCareSpells();
    for (int i = 0; voColl != null && i < voColl.size(); i++)
    {
        boolean sameDiagnosis = voColl.get(i).getDiagnosisIsNotNull() && voColl.get(i).getDiagnosis().equals(voPatDiagnosis);
        boolean sameCareContext = voColl.get(i).getCareContextIsNotNull() && voColl.get(i).getCareContext().equals(form.getGlobalContext().Core.getCurrentCareContext());

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

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void setCsPrimaryDiagnosis(PatientDiagnosisEDischargeVo voPatDiagnosis, boolean isChkPrimaryChecked)
{
    CSPrimaryDiagnosisVo voCSPrimaryDiagnosis = getPrimaryDiagnosisRecord(voPatDiagnosis);
    if (voCSPrimaryDiagnosis != null || isChkPrimaryChecked)
    {
        if (voCSPrimaryDiagnosis == null)
        {
            voCSPrimaryDiagnosis = populatePrimaryDiagnosisDataFromScreen(new CSPrimaryDiagnosisVo(), voPatDiagnosis, isChkPrimaryChecked);
            if (voPatDiagnosis.getPrimaryForCareSpells() == null)
                voPatDiagnosis.setPrimaryForCareSpells(new CSPrimaryDiagnosisVoCollection());
            voPatDiagnosis.getPrimaryForCareSpells().add(voCSPrimaryDiagnosis);
        }
        else
        {
            int index = voPatDiagnosis.getPrimaryForCareSpells().indexOf(voCSPrimaryDiagnosis);
            if (index >= 0)
            {
                voCSPrimaryDiagnosis = populatePrimaryDiagnosisDataFromScreen(voCSPrimaryDiagnosis, voPatDiagnosis, isChkPrimaryChecked);
                voPatDiagnosis.getPrimaryForCareSpells().set(index, voCSPrimaryDiagnosis);
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void grdDiagnosisSelectionChanged()
{
    form.getLocalContext().setSelectedPatientDiagnosisVo(null);

    if (form.grdDiagnosisComplications().getValue() != null)
    {
        PatientDiagnosisEDischargeVo voPatDiag = domain.getDiagnosisVo(form.grdDiagnosisComplications().getValue());

        if (voPatDiag != null && voPatDiag.getStatusHistoryIsNotNull())
            // WDEV-2535
            setTooltip(voPatDiag);
        else
            setTooltip(null);

        populateInstanceControls(voPatDiag);
        boolean isPrimaryDiagnosis = isPrimaryDiagnosisActive(voPatDiag);
        form.ctnDetails().chkPrimaryDiagnosis().setValue(isPrimaryDiagnosis);
        form.getContextMenus().getPastMedicalHistoryViewItem().setVisible(!isPrimaryDiagnosis);
        form.getLocalContext().setSelectedPatientDiagnosisVo(voPatDiag);

        updateControlsState();
        updateContextMenus();
    }
}
项目:AvoinApotti    文件:Logic.java   
private void grdComorbiditySelectionChanged()
{
    form.getLocalContext().setSelectedPatientDiagnosisVo(null);

    if (form.ctnCurrentDiagnoses().grdComorbidity().getValue() != null)
    {
        PatientDiagnosisEDischargeVo voPatDiag = domain.getDiagnosisVo(form.ctnCurrentDiagnoses().grdComorbidity().getValue());

        if (voPatDiag != null && voPatDiag.getStatusHistoryIsNotNull())
            setTooltip(voPatDiag);
        else
            setTooltip(null);

        populateComorbidityInstanceControls(voPatDiag);

        boolean isPrimaryDiagnosis = isPrimaryDiagnosisActive(voPatDiag);
        form.ctnCoMorbidityControls().chkPrimCoMorbidity().setValue(isPrimaryDiagnosis);

        form.getLocalContext().setSelectedPatientDiagnosisVo(voPatDiag);

        updateControlsState();
        updateContextMenus();
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateComorbidityInstanceControls(PatientDiagnosisEDischargeVo voPatDiag)
{
    clearComorbidityInstanceControls();

    form.ctnCoMorbidityControls().ccComorbClinicalTerm().setValue(voPatDiag);

    form.ctnCoMorbidityControls().cmbComorbLaterality().setValue(voPatDiag.getDiagLateralityIsNotNull() ? voPatDiag.getDiagLaterality() : null);
    form.ctnCoMorbidityControls().txtComorbSite().setValue(voPatDiag.getSiteTextIsNotNull() ? voPatDiag.getSiteText() : "");
    form.ctnCoMorbidityControls().pdtComorbDateDiagnosed().setValue(voPatDiag.getDiagnosedDateIsNotNull() ? voPatDiag.getDiagnosedDate() : null);
    form.ctnCoMorbidityControls().dteComorbOnset().setValue(voPatDiag.getDateOnsetIsNotNull() ? voPatDiag.getDateOnset() : null);
    form.ctnCoMorbidityControls().ccComorbAuthoring().setValue(voPatDiag.getAuthoringInfo());

    form.ctnCoMorbidityControls().chkPrimCoMorbidity().setValue(false);
    if (voPatDiag.getPrimaryForCareSpellsIsNotNull())
    {
        for (int i = 0; i < voPatDiag.getPrimaryForCareSpells().size(); i++)
        {
            if ((voPatDiag.getPrimaryForCareSpells().get(i).getCareContextIsNotNull()) && (voPatDiag.getPrimaryForCareSpells().get(i).getCareContext().getEpisodeOfCareIsNotNull()) && (form.getGlobalContext().Core.getCurrentCareContextIsNotNull()) && (form.getGlobalContext().Core.getCurrentCareContext().getEpisodeOfCareIsNotNull()) && (voPatDiag.getPrimaryForCareSpells().get(i).getCareContext().getEpisodeOfCare().getID_EpisodeOfCare().equals(form.getGlobalContext().Core.getCurrentCareContext().getEpisodeOfCare().getID_EpisodeOfCare())))
                form.ctnCoMorbidityControls().chkPrimCoMorbidity().setValue(true);
        }
    }

    form.getLocalContext().setSelectedPatientDiagnosisVo(voPatDiag);

    updateContextMenus();
}
项目:AvoinApotti    文件:Logic.java   
private void grdComplicationSelectionChanged()
{
    form.getLocalContext().setSelectedPatientDiagnosisVo(null);

    if (form.ctnCurrentDiagnoses().grdComplications().getValue() != null)
    {
        PatientDiagnosisEDischargeVo voPatDiag = domain.getDiagnosisVo(form.ctnCurrentDiagnoses().grdComplications().getValue());

        if (voPatDiag != null && voPatDiag.getStatusHistoryIsNotNull())
            setTooltip(voPatDiag);
        else
            setTooltip(null);

        populateComplicationInstanceControls(voPatDiag);
        form.getLocalContext().setSelectedPatientDiagnosisVo(voPatDiag);

        updateControlsState();
        updateContextMenus();
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateComplicationInstanceControls(PatientDiagnosisEDischargeVo voPatDiag)
{
    clearComplicationInstanceControls();

    form.ctnComplicationsControls().ccCompClinicalTerm().setValue(voPatDiag);

    form.ctnComplicationsControls().cmbCompLaterality().setValue(voPatDiag.getDiagLateralityIsNotNull() ? voPatDiag.getDiagLaterality() : null);
    form.ctnComplicationsControls().txtCompSIte().setValue(voPatDiag.getSiteTextIsNotNull() ? voPatDiag.getSiteText() : "");
    form.ctnComplicationsControls().pdtCompDDiagnosed().setValue(voPatDiag.getDiagnosedDateIsNotNull() ? voPatDiag.getDiagnosedDate() : null);
    form.ctnComplicationsControls().dteCompOnset().setValue(voPatDiag.getDateOnsetIsNotNull() ? voPatDiag.getDateOnset() : null);

    form.ctnComplicationsControls().ccCompAuthoring().setValue(voPatDiag.getAuthoringInfo());

    form.getLocalContext().setSelectedPatientDiagnosisVo(voPatDiag);

    updateContextMenus();
}
项目:AvoinApotti    文件:Logic.java   
private void setTooltip(PatientDiagnosisEDischargeVo voPatDiag)
{
    if (voPatDiag != null && voPatDiag.getStatusHistoryIsNotNull() && voPatDiag.getStatusHistory().size() > 0)
    {
        PatientDiagnosisStatusVoCollection collVo = voPatDiag.getStatusHistory();

        String tooltip = "";
        String setFont = "<FONT FACE='Times New Roman' SIZE='2'>";
        String endFont = "</FONT>";
        String table = "<TABLE CELLPADDING='1' CELLSPACING='1' BORDER='3' ><TR><TD BGCOLOR=\'#BBBBFF\' ALIGN='LEFT'>";
        String endStatus = endFont + "<B></TD></TR><TR>";
        String dateTime = "<TD colspan=1 width=60% align=\'LEFT\'> " + setFont;
        String hcp = endFont + "</TD><TD colspan=1 width=60% align=\'LEFT\'>" + setFont;
        String end = endFont + "</TD></TR><TR></TABLE>";

        for (int i = 0; i < collVo.size(); i++)
        {
            tooltip += table + setFont + "<B>" + (i + 1) + ". " + collVo.get(i).getStatus() + endStatus + endFont + dateTime + collVo.get(i).getAuthoringDateTime() + hcp + collVo.get(i).getAuthoringHCP() + end;
        }

    }
}
项目:AvoinApotti    文件:Logic.java   
private PatientDiagnosisEDischargeVo populateCoMorbiditySpecificItems(PatientDiagnosisEDischargeVo voPatDiagnosis)
{
    voPatDiagnosis.setDiagLaterality(form.ctnCoMorbidityControls().cmbComorbLaterality().getValue());
    voPatDiagnosis.setSiteText(form.ctnCoMorbidityControls().txtComorbSite().getValue());

    voPatDiagnosis.setDiagnosedDate(form.ctnCoMorbidityControls().pdtComorbDateDiagnosed().getValue() != null ? form.ctnCoMorbidityControls().pdtComorbDateDiagnosed().getValue() : null);
    voPatDiagnosis.setDateOnset(form.ctnCoMorbidityControls().dteComorbOnset().getValue());

    voPatDiagnosis.setIsComorbidity(true);
    voPatDiagnosis.setIsComplication(false);

    // Primary Diagnosis
    setCsPrimaryDiagnosis(voPatDiagnosis, form.ctnCoMorbidityControls().chkPrimCoMorbidity().getValue(), false);

    voPatDiagnosis.setAuthoringInfo(form.ctnCoMorbidityControls().ccComorbAuthoring().getValue());

    return voPatDiagnosis;
}
项目:AvoinApotti    文件:Logic.java   
private PatientDiagnosisEDischargeVo populateDiagnosisSpecificItems(PatientDiagnosisEDischargeVo voPatDiagnosis)
{
    voPatDiagnosis.setDiagLaterality(form.ctnDiagnosisControls().cmbDiagLaterality().getValue());
    voPatDiagnosis.setSiteText(form.ctnDiagnosisControls().txtDiagSite().getValue());

    voPatDiagnosis.setDiagnosedDate(form.ctnDiagnosisControls().pdtDiagnosed().getValue() != null ? form.ctnDiagnosisControls().pdtDiagnosed().getValue() : null);
    voPatDiagnosis.setDateOnset(form.ctnDiagnosisControls().dteDiagOnset().getValue());

    voPatDiagnosis.setIsPrevRelevantDiagnosis(new Boolean(form.ctnDiagnosisControls().chkDiagPRD().getValue()));
    voPatDiagnosis.setIsComorbidity(false);
    voPatDiagnosis.setIsComplication(false);

    voPatDiagnosis.setAuthoringInfo(form.ctnDiagnosisControls().ccDiagAuthoring().getValue());

    // Primary Diagnosis
    setCsPrimaryDiagnosis(voPatDiagnosis, form.ctnDiagnosisControls().chkDiagPrimaryDiagnosis().getValue(), true);

    return voPatDiagnosis;
}
项目:AvoinApotti    文件:Logic.java   
private CSPrimaryDiagnosisVo getPrimaryDiagnosisRecord(PatientDiagnosisEDischargeVo voPatDiagnosis)
{
    if (voPatDiagnosis == null || voPatDiagnosis.getPrimaryForCareSpells() == null)
        return null;

    CSPrimaryDiagnosisVoCollection voColl = voPatDiagnosis.getPrimaryForCareSpells();
    for (int i = 0; voColl != null && i < voColl.size(); i++)
    {
        boolean sameDiagnosis = voColl.get(i).getDiagnosisIsNotNull() && voColl.get(i).getDiagnosis().equals(voPatDiagnosis);
        boolean sameCareContext = voColl.get(i).getCareContextIsNotNull() && voColl.get(i).getCareContext().equals(form.getGlobalContext().Core.getCurrentCareContext());

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

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void setCsPrimaryDiagnosis(PatientDiagnosisEDischargeVo voPatDiagnosis, boolean isChkPrimaryChecked, boolean bDiagnosisContainer)
{
    CSPrimaryDiagnosisVo voCSPrimaryDiagnosis = getPrimaryDiagnosisRecord(voPatDiagnosis);
    if (voCSPrimaryDiagnosis != null || isChkPrimaryChecked)
    {
        if (voCSPrimaryDiagnosis == null)
        {
            voCSPrimaryDiagnosis = populatePrimaryDiagnosisDataFromScreen(new CSPrimaryDiagnosisVo(), voPatDiagnosis, isChkPrimaryChecked, bDiagnosisContainer);
            if (voPatDiagnosis.getPrimaryForCareSpells() == null)
                voPatDiagnosis.setPrimaryForCareSpells(new CSPrimaryDiagnosisVoCollection());
            voPatDiagnosis.getPrimaryForCareSpells().add(voCSPrimaryDiagnosis);
        }
        else
        {
            int index = voPatDiagnosis.getPrimaryForCareSpells().indexOf(voCSPrimaryDiagnosis);
            if (index >= 0)
            {
                voCSPrimaryDiagnosis = populatePrimaryDiagnosisDataFromScreen(voCSPrimaryDiagnosis, voPatDiagnosis, isChkPrimaryChecked, bDiagnosisContainer);
                voPatDiagnosis.getPrimaryForCareSpells().set(index, voCSPrimaryDiagnosis);
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void grdDiagnosisSelectionChanged()
{
    form.getLocalContext().setSelectedPatientDiagnosisVo(null);

    if (form.ctnCurrentDiagnoses().grdDiagnoses().getValue() != null)
    {
        PatientDiagnosisEDischargeVo voPatDiag = domain.getDiagnosisVo(form.ctnCurrentDiagnoses().grdDiagnoses().getValue());

        if (voPatDiag != null && voPatDiag.getStatusHistoryIsNotNull())
            setTooltip(voPatDiag);
        else
            setTooltip(null);

        populateDiagnosisInstanceControls(voPatDiag);
        boolean isPrimaryDiagnosis = isPrimaryDiagnosisActive(voPatDiag);
        form.ctnDiagnosisControls().chkDiagPrimaryDiagnosis().setValue(isPrimaryDiagnosis);
        form.getLocalContext().setSelectedPatientDiagnosisVo(voPatDiag);

        updateControlsState();
        updateContextMenus();
    }
}
项目:AvoinApotti    文件:EDischargeDiagnosisEtcComponentImpl.java   
/**
* saveDiagnosisVo
*/
public PatientDiagnosisEDischargeVo saveDiagnosisVo(PatientDiagnosisEDischargeVo voDiagnosis, SummaryRefVo summaryVo) throws DomainInterfaceException, StaleObjectException, UniqueKeyViolationException
{
    // Ensure the value object has been validated
    if (!voDiagnosis.isValidated())
        throw new DomainRuntimeException("Diagnosis has not been validated");

    DomainFactory factory = getDomainFactory();
    PatientDiagnosis doPatDiag = PatientDiagnosisEDischargeVoAssembler.extractPatientDiagnosis(factory, voDiagnosis);

    factory.save(doPatDiag);

    if (summaryVo != null
        && voDiagnosis.getIsComplicationIsNotNull()
        && voDiagnosis.getIsComorbidityIsNotNull()
        && ! voDiagnosis.getIsComplication()
        && ! voDiagnosis.getIsComorbidity())
    {
        IEDischargeHelper impl = (IEDischargeHelper) getDomainImpl(EDischargeHelper.class); 
        impl.updateSummaryIfRequired(voDiagnosis, summaryVo, factory);
    }

    return PatientDiagnosisEDischargeVoAssembler.create(doPatDiag);//Create here to avoid possible StaleObj in PMH save
}
项目:openMAXIMS    文件:Logic.java   
private void setTooltip(PatientDiagnosisEDischargeVo voPatDiag)
{
    if (voPatDiag != null && voPatDiag.getStatusHistoryIsNotNull() && voPatDiag.getStatusHistory().size() > 0)
    {
        PatientDiagnosisStatusVoCollection collVo = voPatDiag.getStatusHistory();

        String tooltip = "";
        String setFont = "<FONT FACE='Times New Roman' SIZE='2'>";
        String endFont = "</FONT>";
        String table = "<TABLE CELLPADDING='1' CELLSPACING='1' BORDER='3' ><TR><TD BGCOLOR=\'#BBBBFF\' ALIGN='LEFT'>";
        String endStatus = endFont + "<B></TD></TR><TR>";
        String dateTime = "<TD colspan=1 width=60% align=\'LEFT\'> " + setFont;
        String hcp = endFont + "</TD><TD colspan=1 width=60% align=\'LEFT\'>" + setFont;
        String end = endFont + "</TD></TR><TR></TABLE>";

        for (int i = 0; i < collVo.size(); i++)
        {
            tooltip += table + setFont + "<B>" + (i + 1) + ". " + collVo.get(i).getStatus() + endStatus + endFont + dateTime + collVo.get(i).getAuthoringDateTime() + hcp + collVo.get(i).getAuthoringHCP() + end;
        }

    }
}
项目:openMAXIMS    文件:Logic.java   
private CSPrimaryDiagnosisVo getPrimaryDiagnosisRecord(PatientDiagnosisEDischargeVo voPatDiagnosis)
{
    if (voPatDiagnosis == null || voPatDiagnosis.getPrimaryForCareSpells() == null)
        return null;

    CSPrimaryDiagnosisVoCollection voColl = voPatDiagnosis.getPrimaryForCareSpells();
    for (int i = 0; voColl != null && i < voColl.size(); i++)
    {
        boolean sameDiagnosis = voColl.get(i).getDiagnosisIsNotNull() && voColl.get(i).getDiagnosis().equals(voPatDiagnosis);
        boolean sameCareContext = voColl.get(i).getCareContextIsNotNull() && voColl.get(i).getCareContext().equals(form.getGlobalContext().Core.getCurrentCareContext());

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

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void setCsPrimaryDiagnosis(PatientDiagnosisEDischargeVo voPatDiagnosis, boolean isChkPrimaryChecked)
{
    CSPrimaryDiagnosisVo voCSPrimaryDiagnosis = getPrimaryDiagnosisRecord(voPatDiagnosis);
    if (voCSPrimaryDiagnosis != null || isChkPrimaryChecked)
    {
        if (voCSPrimaryDiagnosis == null)
        {
            voCSPrimaryDiagnosis = populatePrimaryDiagnosisDataFromScreen(new CSPrimaryDiagnosisVo(), voPatDiagnosis, isChkPrimaryChecked);
            if (voPatDiagnosis.getPrimaryForCareSpells() == null)
                voPatDiagnosis.setPrimaryForCareSpells(new CSPrimaryDiagnosisVoCollection());
            voPatDiagnosis.getPrimaryForCareSpells().add(voCSPrimaryDiagnosis);
        }
        else
        {
            int index = voPatDiagnosis.getPrimaryForCareSpells().indexOf(voCSPrimaryDiagnosis);
            if (index >= 0)
            {
                voCSPrimaryDiagnosis = populatePrimaryDiagnosisDataFromScreen(voCSPrimaryDiagnosis, voPatDiagnosis, isChkPrimaryChecked);
                voPatDiagnosis.getPrimaryForCareSpells().set(index, voCSPrimaryDiagnosis);
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void grdDiagnosisSelectionChanged()
{
    form.getLocalContext().setSelectedPatientDiagnosisVo(null);

    if (form.grdDiagnosisComplications().getValue() != null)
    {
        PatientDiagnosisEDischargeVo voPatDiag = domain.getDiagnosisVo(form.grdDiagnosisComplications().getValue());

        if (voPatDiag != null && voPatDiag.getStatusHistoryIsNotNull())
            // WDEV-2535
            setTooltip(voPatDiag);
        else
            setTooltip(null);

        populateInstanceControls(voPatDiag);
        boolean isPrimaryDiagnosis = isPrimaryDiagnosisActive(voPatDiag);
        form.ctnDetails().chkPrimaryDiagnosis().setValue(isPrimaryDiagnosis);
        form.getContextMenus().getPastMedicalHistoryViewItem().setVisible(!isPrimaryDiagnosis);
        form.getLocalContext().setSelectedPatientDiagnosisVo(voPatDiag);

        updateControlsState();
        updateContextMenus();
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateComplicationInstanceControls(PatientDiagnosisEDischargeVo voPatDiag)
{
    clearComplicationInstanceControls();

    form.ctnComplicationsControls().ccCompClinicalTerm().setValue(voPatDiag);

    form.ctnComplicationsControls().cmbCompLaterality().setValue(voPatDiag.getDiagLateralityIsNotNull() ? voPatDiag.getDiagLaterality() : null);    //wdev-18841
    form.ctnComplicationsControls().chkDiagnosedOnAdmissionComp().setValue(voPatDiag.getDiagnosedOnAdmissionIsNotNull() ? voPatDiag.getDiagnosedOnAdmission() : false); //WDEV-19860
    StringBuffer tooltip = new StringBuffer(); 

    //tooltip.append(voPatDiag.getDiagLateralityIsNotNull() ? "<b>Laterality: </b>" + voPatDiag.getDiagLaterality().getText() + "<br>" : "");
    tooltip.append(voPatDiag.getSiteTextIsNotNull() ? "<b>Site: </b>" + voPatDiag.getSiteText() + "<br>" : "");
    tooltip.append(voPatDiag.getDiagnosedDateIsNotNull() ? "<b>Date Diagnosed: </b>" + voPatDiag.getDiagnosedDate().toString() + "<br>" : "");
    tooltip.append(voPatDiag.getDateOnsetIsNotNull() ? "<b>Onset Date: </b>" + voPatDiag.getDateOnset().toString() + "<br>" : "");

    form.ctnComplicationsControls().imbInfoComplication().setTooltip(tooltip.toString());

    form.ctnComplicationsControls().ccCompAuthoring().setValue(voPatDiag.getAuthoringInfo());

    form.getLocalContext().setSelectedPatientDiagnosisVo(voPatDiag);

    updateContextMenus();
}
项目:openMAXIMS    文件:Logic.java   
private void setTooltip(PatientDiagnosisEDischargeVo voPatDiag)
{
    if (voPatDiag != null && voPatDiag.getStatusHistoryIsNotNull() && voPatDiag.getStatusHistory().size() > 0)
    {
        PatientDiagnosisStatusVoCollection collVo = voPatDiag.getStatusHistory();

        String tooltip = "";
        String setFont = "<FONT FACE='Times New Roman' SIZE='2'>";
        String endFont = "</FONT>";
        String table = "<TABLE CELLPADDING='1' CELLSPACING='1' BORDER='3' ><TR><TD BGCOLOR=\'#BBBBFF\' ALIGN='LEFT'>";
        String endStatus = endFont + "<B></TD></TR><TR>";
        String dateTime = "<TD colspan=1 width=60% align=\'LEFT\'> " + setFont;
        String hcp = endFont + "</TD><TD colspan=1 width=60% align=\'LEFT\'>" + setFont;
        String end = endFont + "</TD></TR><TR></TABLE>";

        for (int i = 0; i < collVo.size(); i++)
        {
            tooltip += table + setFont + "<B>" + (i + 1) + ". " + collVo.get(i).getStatus() + endStatus + endFont + dateTime + collVo.get(i).getAuthoringDateTime() + hcp + collVo.get(i).getAuthoringHCP() + end;
        }

    }
}
项目:openMAXIMS    文件:Logic.java   
private void setTooltip(PatientDiagnosisEDischargeVo voPatDiag)
{
    if (voPatDiag != null && voPatDiag.getStatusHistoryIsNotNull() && voPatDiag.getStatusHistory().size() > 0)
    {
        PatientDiagnosisStatusVoCollection collVo = voPatDiag.getStatusHistory();

        String tooltip = "";
        String setFont = "<FONT FACE='Times New Roman' SIZE='2'>";
        String endFont = "</FONT>";
        String table = "<TABLE CELLPADDING='1' CELLSPACING='1' BORDER='3' ><TR><TD BGCOLOR=\'#BBBBFF\' ALIGN='LEFT'>";
        String endStatus = endFont + "<B></TD></TR><TR>";
        String dateTime = "<TD colspan=1 width=60% align=\'LEFT\'> " + setFont;
        String hcp = endFont + "</TD><TD colspan=1 width=60% align=\'LEFT\'>" + setFont;
        String end = endFont + "</TD></TR><TR></TABLE>";

        for (int i = 0; i < collVo.size(); i++)
        {
            tooltip += table + setFont + "<B>" + (i + 1) + ". " + collVo.get(i).getStatus() + endStatus + endFont + dateTime + collVo.get(i).getAuthoringDateTime() + hcp + collVo.get(i).getAuthoringHCP() + end;
        }

    }
}
项目:openMAXIMS    文件:Logic.java   
private CSPrimaryDiagnosisVo getPrimaryDiagnosisRecord(PatientDiagnosisEDischargeVo voPatDiagnosis)
{
    if (voPatDiagnosis == null || voPatDiagnosis.getPrimaryForCareSpells() == null)
        return null;

    CSPrimaryDiagnosisVoCollection voColl = voPatDiagnosis.getPrimaryForCareSpells();
    for (int i = 0; voColl != null && i < voColl.size(); i++)
    {
        boolean sameDiagnosis = voColl.get(i).getDiagnosisIsNotNull() && voColl.get(i).getDiagnosis().equals(voPatDiagnosis);
        boolean sameCareContext = voColl.get(i).getCareContextIsNotNull() && voColl.get(i).getCareContext().equals(form.getGlobalContext().Core.getCurrentCareContext());

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

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void setCsPrimaryDiagnosis(PatientDiagnosisEDischargeVo voPatDiagnosis, boolean isChkPrimaryChecked)
{
    CSPrimaryDiagnosisVo voCSPrimaryDiagnosis = getPrimaryDiagnosisRecord(voPatDiagnosis);
    if (voCSPrimaryDiagnosis != null || isChkPrimaryChecked)
    {
        if (voCSPrimaryDiagnosis == null)
        {
            voCSPrimaryDiagnosis = populatePrimaryDiagnosisDataFromScreen(new CSPrimaryDiagnosisVo(), voPatDiagnosis, isChkPrimaryChecked);
            if (voPatDiagnosis.getPrimaryForCareSpells() == null)
                voPatDiagnosis.setPrimaryForCareSpells(new CSPrimaryDiagnosisVoCollection());
            voPatDiagnosis.getPrimaryForCareSpells().add(voCSPrimaryDiagnosis);
        }
        else
        {
            int index = voPatDiagnosis.getPrimaryForCareSpells().indexOf(voCSPrimaryDiagnosis);
            if (index >= 0)
            {
                voCSPrimaryDiagnosis = populatePrimaryDiagnosisDataFromScreen(voCSPrimaryDiagnosis, voPatDiagnosis, isChkPrimaryChecked);
                voPatDiagnosis.getPrimaryForCareSpells().set(index, voCSPrimaryDiagnosis);
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void grdDiagnosisSelectionChanged()
{
    form.getLocalContext().setSelectedPatientDiagnosisVo(null);

    if (form.grdDiagnosisComplications().getValue() != null)
    {
        PatientDiagnosisEDischargeVo voPatDiag = domain.getDiagnosisVo(form.grdDiagnosisComplications().getValue());

        if (voPatDiag != null && voPatDiag.getStatusHistoryIsNotNull())
            // WDEV-2535
            setTooltip(voPatDiag);
        else
            setTooltip(null);

        populateInstanceControls(voPatDiag);
        boolean isPrimaryDiagnosis = isPrimaryDiagnosisActive(voPatDiag);
        form.ctnDetails().chkPrimaryDiagnosis().setValue(isPrimaryDiagnosis);
        form.getContextMenus().getPastMedicalHistoryViewItem().setVisible(!isPrimaryDiagnosis);
        form.getLocalContext().setSelectedPatientDiagnosisVo(voPatDiag);

        updateControlsState();
        updateContextMenus();
    }
}
项目:openMAXIMS    文件:Logic.java   
private void grdComorbiditySelectionChanged()
{
    form.getLocalContext().setSelectedPatientDiagnosisVo(null);

    if (form.ctnCurrentDiagnoses().grdComorbidity().getValue() != null)
    {
        PatientDiagnosisEDischargeVo voPatDiag = domain.getDiagnosisVo(form.ctnCurrentDiagnoses().grdComorbidity().getValue());

        if (voPatDiag != null && voPatDiag.getStatusHistoryIsNotNull())
            setTooltip(voPatDiag);
        else
            setTooltip(null);

        populateComorbidityInstanceControls(voPatDiag);

        boolean isPrimaryDiagnosis = isPrimaryDiagnosisActive(voPatDiag);
        form.ctnCoMorbidityControls().chkPrimCoMorbidity().setValue(isPrimaryDiagnosis);

        form.getLocalContext().setSelectedPatientDiagnosisVo(voPatDiag);

        updateControlsState();
        updateContextMenus();
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateComorbidityInstanceControls(PatientDiagnosisEDischargeVo voPatDiag)
{
    clearComorbidityInstanceControls();

    form.ctnCoMorbidityControls().ccComorbClinicalTerm().setValue(voPatDiag);

    form.ctnCoMorbidityControls().cmbComorbLaterality().setValue(voPatDiag.getDiagLateralityIsNotNull() ? voPatDiag.getDiagLaterality() : null);
    form.ctnCoMorbidityControls().txtComorbSite().setValue(voPatDiag.getSiteTextIsNotNull() ? voPatDiag.getSiteText() : "");
    form.ctnCoMorbidityControls().pdtComorbDateDiagnosed().setValue(voPatDiag.getDiagnosedDateIsNotNull() ? voPatDiag.getDiagnosedDate() : null);
    form.ctnCoMorbidityControls().dteComorbOnset().setValue(voPatDiag.getDateOnsetIsNotNull() ? voPatDiag.getDateOnset() : null);
    form.ctnCoMorbidityControls().ccComorbAuthoring().setValue(voPatDiag.getAuthoringInfo());

    form.ctnCoMorbidityControls().chkPrimCoMorbidity().setValue(false);
    if (voPatDiag.getPrimaryForCareSpellsIsNotNull())
    {
        for (int i = 0; i < voPatDiag.getPrimaryForCareSpells().size(); i++)
        {
            if ((voPatDiag.getPrimaryForCareSpells().get(i).getCareContextIsNotNull()) && (voPatDiag.getPrimaryForCareSpells().get(i).getCareContext().getEpisodeOfCareIsNotNull()) && (form.getGlobalContext().Core.getCurrentCareContextIsNotNull()) && (form.getGlobalContext().Core.getCurrentCareContext().getEpisodeOfCareIsNotNull()) && (voPatDiag.getPrimaryForCareSpells().get(i).getCareContext().getEpisodeOfCare().getID_EpisodeOfCare().equals(form.getGlobalContext().Core.getCurrentCareContext().getEpisodeOfCare().getID_EpisodeOfCare())))
                form.ctnCoMorbidityControls().chkPrimCoMorbidity().setValue(true);
        }
    }

    form.getLocalContext().setSelectedPatientDiagnosisVo(voPatDiag);

    updateContextMenus();
}
项目:openMAXIMS    文件:Logic.java   
private void grdComplicationSelectionChanged()
{
    form.getLocalContext().setSelectedPatientDiagnosisVo(null);

    if (form.ctnCurrentDiagnoses().grdComplications().getValue() != null)
    {
        PatientDiagnosisEDischargeVo voPatDiag = domain.getDiagnosisVo(form.ctnCurrentDiagnoses().grdComplications().getValue());

        if (voPatDiag != null && voPatDiag.getStatusHistoryIsNotNull())
            setTooltip(voPatDiag);
        else
            setTooltip(null);

        populateComplicationInstanceControls(voPatDiag);
        form.getLocalContext().setSelectedPatientDiagnosisVo(voPatDiag);

        updateControlsState();
        updateContextMenus();
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateComplicationInstanceControls(PatientDiagnosisEDischargeVo voPatDiag)
{
    clearComplicationInstanceControls();

    form.ctnComplicationsControls().ccCompClinicalTerm().setValue(voPatDiag);

    form.ctnComplicationsControls().cmbCompLaterality().setValue(voPatDiag.getDiagLateralityIsNotNull() ? voPatDiag.getDiagLaterality() : null);
    form.ctnComplicationsControls().txtCompSIte().setValue(voPatDiag.getSiteTextIsNotNull() ? voPatDiag.getSiteText() : "");
    form.ctnComplicationsControls().pdtCompDDiagnosed().setValue(voPatDiag.getDiagnosedDateIsNotNull() ? voPatDiag.getDiagnosedDate() : null);
    form.ctnComplicationsControls().dteCompOnset().setValue(voPatDiag.getDateOnsetIsNotNull() ? voPatDiag.getDateOnset() : null);

    form.ctnComplicationsControls().ccCompAuthoring().setValue(voPatDiag.getAuthoringInfo());

    form.getLocalContext().setSelectedPatientDiagnosisVo(voPatDiag);

    updateContextMenus();
}
项目:openMAXIMS    文件:Logic.java   
private void setTooltip(PatientDiagnosisEDischargeVo voPatDiag)
{
    if (voPatDiag != null && voPatDiag.getStatusHistoryIsNotNull() && voPatDiag.getStatusHistory().size() > 0)
    {
        PatientDiagnosisStatusVoCollection collVo = voPatDiag.getStatusHistory();

        String tooltip = "";
        String setFont = "<FONT FACE='Times New Roman' SIZE='2'>";
        String endFont = "</FONT>";
        String table = "<TABLE CELLPADDING='1' CELLSPACING='1' BORDER='3' ><TR><TD BGCOLOR=\'#BBBBFF\' ALIGN='LEFT'>";
        String endStatus = endFont + "<B></TD></TR><TR>";
        String dateTime = "<TD colspan=1 width=60% align=\'LEFT\'> " + setFont;
        String hcp = endFont + "</TD><TD colspan=1 width=60% align=\'LEFT\'>" + setFont;
        String end = endFont + "</TD></TR><TR></TABLE>";

        for (int i = 0; i < collVo.size(); i++)
        {
            tooltip += table + setFont + "<B>" + (i + 1) + ". " + collVo.get(i).getStatus() + endStatus + endFont + dateTime + collVo.get(i).getAuthoringDateTime() + hcp + collVo.get(i).getAuthoringHCP() + end;
        }

    }
}
项目:openMAXIMS    文件:Logic.java   
private PatientDiagnosisEDischargeVo populateCoMorbiditySpecificItems(PatientDiagnosisEDischargeVo voPatDiagnosis)
{
    voPatDiagnosis.setDiagLaterality(form.ctnCoMorbidityControls().cmbComorbLaterality().getValue());
    voPatDiagnosis.setSiteText(form.ctnCoMorbidityControls().txtComorbSite().getValue());

    voPatDiagnosis.setDiagnosedDate(form.ctnCoMorbidityControls().pdtComorbDateDiagnosed().getValue() != null ? form.ctnCoMorbidityControls().pdtComorbDateDiagnosed().getValue() : null);
    voPatDiagnosis.setDateOnset(form.ctnCoMorbidityControls().dteComorbOnset().getValue());

    voPatDiagnosis.setIsComorbidity(true);
    voPatDiagnosis.setIsComplication(false);

    // Primary Diagnosis
    setCsPrimaryDiagnosis(voPatDiagnosis, form.ctnCoMorbidityControls().chkPrimCoMorbidity().getValue(), false);

    voPatDiagnosis.setAuthoringInfo(form.ctnCoMorbidityControls().ccComorbAuthoring().getValue());

    return voPatDiagnosis;
}
项目:openMAXIMS    文件:Logic.java   
private PatientDiagnosisEDischargeVo populateDiagnosisSpecificItems(PatientDiagnosisEDischargeVo voPatDiagnosis)
{
    voPatDiagnosis.setDiagLaterality(form.ctnDiagnosisControls().cmbDiagLaterality().getValue());
    voPatDiagnosis.setSiteText(form.ctnDiagnosisControls().txtDiagSite().getValue());

    voPatDiagnosis.setDiagnosedDate(form.ctnDiagnosisControls().pdtDiagnosed().getValue() != null ? form.ctnDiagnosisControls().pdtDiagnosed().getValue() : null);
    voPatDiagnosis.setDateOnset(form.ctnDiagnosisControls().dteDiagOnset().getValue());

    voPatDiagnosis.setIsPrevRelevantDiagnosis(new Boolean(form.ctnDiagnosisControls().chkDiagPRD().getValue()));
    voPatDiagnosis.setIsComorbidity(false);
    voPatDiagnosis.setIsComplication(false);

    voPatDiagnosis.setAuthoringInfo(form.ctnDiagnosisControls().ccDiagAuthoring().getValue());

    // Primary Diagnosis
    setCsPrimaryDiagnosis(voPatDiagnosis, form.ctnDiagnosisControls().chkDiagPrimaryDiagnosis().getValue(), true);

    return voPatDiagnosis;
}
项目:openMAXIMS    文件:Logic.java   
private CSPrimaryDiagnosisVo getPrimaryDiagnosisRecord(PatientDiagnosisEDischargeVo voPatDiagnosis)
{
    if (voPatDiagnosis == null || voPatDiagnosis.getPrimaryForCareSpells() == null)
        return null;

    CSPrimaryDiagnosisVoCollection voColl = voPatDiagnosis.getPrimaryForCareSpells();
    for (int i = 0; voColl != null && i < voColl.size(); i++)
    {
        boolean sameDiagnosis = voColl.get(i).getDiagnosisIsNotNull() && voColl.get(i).getDiagnosis().equals(voPatDiagnosis);
        boolean sameCareContext = voColl.get(i).getCareContextIsNotNull() && voColl.get(i).getCareContext().equals(form.getGlobalContext().Core.getCurrentCareContext());

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

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void setCsPrimaryDiagnosis(PatientDiagnosisEDischargeVo voPatDiagnosis, boolean isChkPrimaryChecked, boolean bDiagnosisContainer)
{
    CSPrimaryDiagnosisVo voCSPrimaryDiagnosis = getPrimaryDiagnosisRecord(voPatDiagnosis);
    if (voCSPrimaryDiagnosis != null || isChkPrimaryChecked)
    {
        if (voCSPrimaryDiagnosis == null)
        {
            voCSPrimaryDiagnosis = populatePrimaryDiagnosisDataFromScreen(new CSPrimaryDiagnosisVo(), voPatDiagnosis, isChkPrimaryChecked, bDiagnosisContainer);
            if (voPatDiagnosis.getPrimaryForCareSpells() == null)
                voPatDiagnosis.setPrimaryForCareSpells(new CSPrimaryDiagnosisVoCollection());
            voPatDiagnosis.getPrimaryForCareSpells().add(voCSPrimaryDiagnosis);
        }
        else
        {
            int index = voPatDiagnosis.getPrimaryForCareSpells().indexOf(voCSPrimaryDiagnosis);
            if (index >= 0)
            {
                voCSPrimaryDiagnosis = populatePrimaryDiagnosisDataFromScreen(voCSPrimaryDiagnosis, voPatDiagnosis, isChkPrimaryChecked, bDiagnosisContainer);
                voPatDiagnosis.getPrimaryForCareSpells().set(index, voCSPrimaryDiagnosis);
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void grdDiagnosisSelectionChanged()
{
    form.getLocalContext().setSelectedPatientDiagnosisVo(null);

    if (form.ctnCurrentDiagnoses().grdDiagnoses().getValue() != null)
    {
        PatientDiagnosisEDischargeVo voPatDiag = domain.getDiagnosisVo(form.ctnCurrentDiagnoses().grdDiagnoses().getValue());

        if (voPatDiag != null && voPatDiag.getStatusHistoryIsNotNull())
            setTooltip(voPatDiag);
        else
            setTooltip(null);

        populateDiagnosisInstanceControls(voPatDiag);
        boolean isPrimaryDiagnosis = isPrimaryDiagnosisActive(voPatDiag);
        form.ctnDiagnosisControls().chkDiagPrimaryDiagnosis().setValue(isPrimaryDiagnosis);
        form.getLocalContext().setSelectedPatientDiagnosisVo(voPatDiag);

        updateControlsState();
        updateContextMenus();
    }
}
项目:openMAXIMS    文件:EDischargeDiagnosisEtcComponentImpl.java   
/**
* saveDiagnosisVo
*/
public PatientDiagnosisEDischargeVo saveDiagnosisVo(PatientDiagnosisEDischargeVo voDiagnosis, SummaryRefVo summaryVo) throws DomainInterfaceException, StaleObjectException, UniqueKeyViolationException
{
    // Ensure the value object has been validated
    if (!voDiagnosis.isValidated())
        throw new DomainRuntimeException("Diagnosis has not been validated");

    DomainFactory factory = getDomainFactory();
    PatientDiagnosis doPatDiag = PatientDiagnosisEDischargeVoAssembler.extractPatientDiagnosis(factory, voDiagnosis);

    factory.save(doPatDiag);

    if (summaryVo != null
        && voDiagnosis.getIsComplicationIsNotNull()
        && voDiagnosis.getIsComorbidityIsNotNull()
        && ! voDiagnosis.getIsComplication()
        && ! voDiagnosis.getIsComorbidity())
    {
        IEDischargeHelper impl = (IEDischargeHelper) getDomainImpl(EDischargeHelper.class); 
        impl.updateSummaryIfRequired(voDiagnosis, summaryVo, factory);
    }

    return PatientDiagnosisEDischargeVoAssembler.create(doPatDiag);//Create here to avoid possible StaleObj in PMH save
}
项目:openmaxims-linux    文件:Logic.java   
private void setTooltip(PatientDiagnosisEDischargeVo voPatDiag)
{
    if (voPatDiag != null && voPatDiag.getStatusHistoryIsNotNull() && voPatDiag.getStatusHistory().size() > 0)
    {
        PatientDiagnosisStatusVoCollection collVo = voPatDiag.getStatusHistory();

        String tooltip = "";
        String setFont = "<FONT FACE='Times New Roman' SIZE='2'>";
        String endFont = "</FONT>";
        String table = "<TABLE CELLPADDING='1' CELLSPACING='1' BORDER='3' ><TR><TD BGCOLOR=\'#BBBBFF\' ALIGN='LEFT'>";
        String endStatus = endFont + "<B></TD></TR><TR>";
        String dateTime = "<TD colspan=1 width=60% align=\'LEFT\'> " + setFont;
        String hcp = endFont + "</TD><TD colspan=1 width=60% align=\'LEFT\'>" + setFont;
        String end = endFont + "</TD></TR><TR></TABLE>";

        for (int i = 0; i < collVo.size(); i++)
        {
            tooltip += table + setFont + "<B>" + (i + 1) + ". " + collVo.get(i).getStatus() + endStatus + endFont + dateTime + collVo.get(i).getAuthoringDateTime() + hcp + collVo.get(i).getAuthoringHCP() + end;
        }

    }
}
项目:openmaxims-linux    文件:Logic.java   
private CSPrimaryDiagnosisVo getPrimaryDiagnosisRecord(PatientDiagnosisEDischargeVo voPatDiagnosis)
{
    if (voPatDiagnosis == null || voPatDiagnosis.getPrimaryForCareSpells() == null)
        return null;

    CSPrimaryDiagnosisVoCollection voColl = voPatDiagnosis.getPrimaryForCareSpells();
    for (int i = 0; voColl != null && i < voColl.size(); i++)
    {
        boolean sameDiagnosis = voColl.get(i).getDiagnosisIsNotNull() && voColl.get(i).getDiagnosis().equals(voPatDiagnosis);
        boolean sameCareContext = voColl.get(i).getCareContextIsNotNull() && voColl.get(i).getCareContext().equals(form.getGlobalContext().Core.getCurrentCareContext());

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

    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private void setCsPrimaryDiagnosis(PatientDiagnosisEDischargeVo voPatDiagnosis, boolean isChkPrimaryChecked)
{
    CSPrimaryDiagnosisVo voCSPrimaryDiagnosis = getPrimaryDiagnosisRecord(voPatDiagnosis);
    if (voCSPrimaryDiagnosis != null || isChkPrimaryChecked)
    {
        if (voCSPrimaryDiagnosis == null)
        {
            voCSPrimaryDiagnosis = populatePrimaryDiagnosisDataFromScreen(new CSPrimaryDiagnosisVo(), voPatDiagnosis, isChkPrimaryChecked);
            if (voPatDiagnosis.getPrimaryForCareSpells() == null)
                voPatDiagnosis.setPrimaryForCareSpells(new CSPrimaryDiagnosisVoCollection());
            voPatDiagnosis.getPrimaryForCareSpells().add(voCSPrimaryDiagnosis);
        }
        else
        {
            int index = voPatDiagnosis.getPrimaryForCareSpells().indexOf(voCSPrimaryDiagnosis);
            if (index >= 0)
            {
                voCSPrimaryDiagnosis = populatePrimaryDiagnosisDataFromScreen(voCSPrimaryDiagnosis, voPatDiagnosis, isChkPrimaryChecked);
                voPatDiagnosis.getPrimaryForCareSpells().set(index, voCSPrimaryDiagnosis);
            }
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void grdDiagnosisSelectionChanged()
{
    form.getLocalContext().setSelectedPatientDiagnosisVo(null);

    if (form.grdDiagnosisComplications().getValue() != null)
    {
        PatientDiagnosisEDischargeVo voPatDiag = domain.getDiagnosisVo(form.grdDiagnosisComplications().getValue());

        if (voPatDiag != null && voPatDiag.getStatusHistoryIsNotNull())
            // WDEV-2535
            setTooltip(voPatDiag);
        else
            setTooltip(null);

        populateInstanceControls(voPatDiag);
        boolean isPrimaryDiagnosis = isPrimaryDiagnosisActive(voPatDiag);
        form.ctnDetails().chkPrimaryDiagnosis().setValue(isPrimaryDiagnosis);
        form.getContextMenus().getPastMedicalHistoryViewItem().setVisible(!isPrimaryDiagnosis);
        form.getLocalContext().setSelectedPatientDiagnosisVo(voPatDiag);

        updateControlsState();
        updateContextMenus();
    }
}