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

项目:AvoinApotti    文件:Logic.java   
private void populatePreviousDiagnosisGrid(PatientDiagnosisEDischargeListVoCollection voPreviousColl) 
{
    form.grdPrevoiusDiagnosesCoMorbidites().getRows().clear();
    if (voPreviousColl != null)
    {
        for (int i = 0; i < voPreviousColl.size(); i++)
        {
            boolean bAddrow = false;
            for (int j = 0 ; j < form.grdDiagnosisComplications().getRows().size() ; j++)
            {
                if (form.grdDiagnosisComplications().getRows().get(j).getValue().equals(voPreviousColl.get(i)))
                    bAddrow = true;
            }
            if ( !bAddrow)
            {
                grdPrevoiusDiagnosesCoMorbiditesRow row = form.grdPrevoiusDiagnosesCoMorbidites().getRows().newRow();
                PatientDiagnosisEDischargeListVo patientDiagnosisListVo = voPreviousColl.get(i);

                setPreviousPatientDiagnosisRowData(row, patientDiagnosisListVo);
            }
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
private void setPreviousPatientDiagnosisRowData(grdPrevoiusDiagnosesCoMorbiditesRow row, PatientDiagnosisEDischargeListVo patientDiagnosisListVo)
{
    row.setColDCDesc(patientDiagnosisListVo.getDiagnosisDescriptionIsNotNull() ? patientDiagnosisListVo.getDiagnosisDescription() : "");
    row.setColDCDate(patientDiagnosisListVo.getDiagnosedDateIsNotNull() ? patientDiagnosisListVo.getDiagnosedDate() : null);

    row.setColDCCoMorbid(patientDiagnosisListVo.getIsComorbidityIsNotNull() ? (patientDiagnosisListVo.getIsComorbidity().booleanValue() ? form.getImages().Core.Pin : null) : null);
    row.setTooltipForColDCCoMorbid(patientDiagnosisListVo.getIsComorbidityIsNotNull() ? (patientDiagnosisListVo.getIsComorbidity().booleanValue() ? "Co-morbidity" : "") : "");

    boolean bComorb = findIfMarkedAsComorbInThisEDischarge(patientDiagnosisListVo.getCoMorbidityForEpisodeOfCares());
    row.setColComorbInCurrent(bComorb ? form.getImages().Core.Tick : null);
    row.setTooltipForColComorbInCurrent(bComorb ? "A tick means it is a Co-morbidity for this eDischarge" : "");

    row.setColInclude(findIfIncludeSetForThisCareContext(patientDiagnosisListVo.getIncludeDiagnosisInDiscReports()) ? Boolean.TRUE : Boolean.FALSE);

    row.setValue(patientDiagnosisListVo);
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onFormModeChanged() 
{
    if (form.getMode().equals(FormMode.EDIT))
    {
        PatientDiagnosisEDischargeListVo voPatientDiagnosis = form.getLocalContext().getSelectedPatientDiagnosisVo();
        boolean newRecord = voPatientDiagnosis == null || voPatientDiagnosis.getID_PatientDiagnosis() == null;
        form.ctnDetails().setccAuthoringEnabled(newRecord);

        if (form.getLocalContext().getCurrentDiagIncluded().booleanValue()
            || form.getLocalContext().getPreviousDiagIncluded().booleanValue())
            form.ctnDetails().setccAuthoringEnabled(false);
    }

    updateControlsState();
}
项目:AvoinApotti    文件:Logic.java   
private void populateComorbidityGrid(PatientDiagnosisEDischargeListVoCollection voPatComorbColl)
{
    form.getLocalContext().setbExistingPrimaryComMorbidity(Boolean.FALSE);

    if (voPatComorbColl != null)
    {
        for (int i = 0; i < voPatComorbColl.size(); i++)
        {
            grdComorbidityRow row = form.ctnCurrentDiagnoses().grdComorbidity().getRows().newRow();
            PatientDiagnosisEDischargeListVo patientComorbidListVo = voPatComorbColl.get(i);

            setPatientComorbRowData(row, patientComorbidListVo);
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
private void setPatientDiagnosisRowData(grdDiagnosesRow row, PatientDiagnosisEDischargeListVo patientDiagnosisListVo)
{
    row.setColDiagnosis(patientDiagnosisListVo.getDiagnosisDescriptionIsNotNull() ? patientDiagnosisListVo.getDiagnosisDescription() : "");
    row.setColDateDiagnosed(patientDiagnosisListVo.getDiagnosedDateIsNotNull() ? patientDiagnosisListVo.getDiagnosedDate() : null);
    row.setColAuthoringHCPDateTime(patientDiagnosisListVo.getAuthoringInfoIsNotNull() ? patientDiagnosisListVo.getAuthoringInfo().toString() : null);

    if (patientDiagnosisListVo.getSysInfoIsNotNull() && patientDiagnosisListVo.getSysInfo().getLastupdateUser() != null)
        row.setColAudit(form.getImages().Core.EditDisabled);

    boolean isPrimaryDiagnosis = isPrimaryDiagnosisActive(patientDiagnosisListVo);
    row.setColPrimary(isPrimaryDiagnosis ? Boolean.TRUE : Boolean.FALSE);

    if (isPrimaryDiagnosis)
        form.getLocalContext().setbExistingPrimaryDiagnosis(Boolean.TRUE);

    row.setColInclude(findIfIncludeSetForThisCareContext(patientDiagnosisListVo.getIncludeDiagnosisInDiscReports()) ? Boolean.TRUE : Boolean.FALSE);

    row.setValue(patientDiagnosisListVo);
}
项目:AvoinApotti    文件:Logic.java   
private void setPatientComorbRowData(grdComorbidityRow row, PatientDiagnosisEDischargeListVo patientComorbidityListVo)
{
    row.setColDiagnosis(patientComorbidityListVo.getDiagnosisDescriptionIsNotNull() ? patientComorbidityListVo.getDiagnosisDescription() : "");
    row.setColDateDiagnosed(patientComorbidityListVo.getDiagnosedDateIsNotNull() ? patientComorbidityListVo.getDiagnosedDate() : null);
    row.setColAuthoringHCPDateTime(patientComorbidityListVo.getAuthoringInfoIsNotNull() ? patientComorbidityListVo.getAuthoringInfo().toString() : null);

    if (patientComorbidityListVo.getSysInfoIsNotNull() && patientComorbidityListVo.getSysInfo().getLastupdateUser() != null)
        row.setColAudit(form.getImages().Core.EditDisabled);

    boolean isPrimaryDiagnosis = isPrimaryDiagnosisActive(patientComorbidityListVo);
    row.setColPrimary(isPrimaryDiagnosis ? Boolean.TRUE : Boolean.FALSE);

    if (isPrimaryDiagnosis)
        form.getLocalContext().setbExistingPrimaryComMorbidity(Boolean.TRUE);

    row.setColInclude(findIfIncludeSetForThisCareContext(patientComorbidityListVo.getIncludeDiagnosisInDiscReports()) ? Boolean.TRUE : Boolean.FALSE);

    row.setValue(patientComorbidityListVo);
}
项目:AvoinApotti    文件:EDischargeDiagnosisEtcComponentImpl.java   
public void rieDiagnosis(PatientDiagnosisEDischargeListVo diag, FormName formName, Integer patientId, Integer contactId, Integer careContextId, String rieMessage, SummaryRefVo summary) throws StaleObjectException
{

    if (summary!=null && summary.getID_SummaryIsNotNull())
    {
        //Check to see if letter status is generated 
        String sql = "select count(summ.id) from Summary as summ left join summ.dischargeLetterStatus as lookup where (summ.id=:summId and lookup.id = :idGenerated)";

        long count = getDomainFactory().countWithHQL(sql, new String[]{"summId","idGenerated"}, new Object[]{summary.getID_Summary(),DischargeLetterStatus.GENERATED.getID()});
        if (count >0)
            throw new StaleObjectException(null);
    }

    markAsRie(diag, formName, patientId, contactId, careContextId, rieMessage);


}
项目:openMAXIMS    文件:Logic.java   
private void populatePreviousDiagnosisGrid(PatientDiagnosisEDischargeListVoCollection voPreviousColl) 
{
    form.grdPrevoiusDiagnosesCoMorbidites().getRows().clear();
    if (voPreviousColl != null)
    {
        for (int i = 0; i < voPreviousColl.size(); i++)
        {
            boolean bAddrow = false;
            for (int j = 0 ; j < form.grdDiagnosisComplications().getRows().size() ; j++)
            {
                if (form.grdDiagnosisComplications().getRows().get(j).getValue().equals(voPreviousColl.get(i)))
                    bAddrow = true;
            }
            if ( !bAddrow)
            {
                grdPrevoiusDiagnosesCoMorbiditesRow row = form.grdPrevoiusDiagnosesCoMorbidites().getRows().newRow();
                PatientDiagnosisEDischargeListVo patientDiagnosisListVo = voPreviousColl.get(i);

                setPreviousPatientDiagnosisRowData(row, patientDiagnosisListVo);
            }
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
private void setPreviousPatientDiagnosisRowData(grdPrevoiusDiagnosesCoMorbiditesRow row, PatientDiagnosisEDischargeListVo patientDiagnosisListVo)
{
    row.setColDCDesc(patientDiagnosisListVo.getDiagnosisDescriptionIsNotNull() ? patientDiagnosisListVo.getDiagnosisDescription() : "");
    row.setColDCDate(patientDiagnosisListVo.getDiagnosedDateIsNotNull() ? patientDiagnosisListVo.getDiagnosedDate() : null);

    row.setColDCCoMorbid(patientDiagnosisListVo.getIsComorbidityIsNotNull() ? (patientDiagnosisListVo.getIsComorbidity().booleanValue() ? form.getImages().Core.Pin : null) : null);
    row.setTooltipForColDCCoMorbid(patientDiagnosisListVo.getIsComorbidityIsNotNull() ? (patientDiagnosisListVo.getIsComorbidity().booleanValue() ? "Co-morbidity" : "") : "");

    boolean bComorb = findIfMarkedAsComorbInThisEDischarge(patientDiagnosisListVo.getCoMorbidityForEpisodeOfCares());
    row.setColComorbInCurrent(bComorb ? form.getImages().Core.Tick : null);
    row.setTooltipForColComorbInCurrent(bComorb ? "A tick means it is a Co-morbidity for this eDischarge" : "");

    row.setColInclude(findIfIncludeSetForThisCareContext(patientDiagnosisListVo.getIncludeDiagnosisInDiscReports()) ? Boolean.TRUE : Boolean.FALSE);

    row.setValue(patientDiagnosisListVo);
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onFormModeChanged() 
{
    if (form.getMode().equals(FormMode.EDIT))
    {
        PatientDiagnosisEDischargeListVo voPatientDiagnosis = form.getLocalContext().getSelectedPatientDiagnosisVo();
        boolean newRecord = voPatientDiagnosis == null || voPatientDiagnosis.getID_PatientDiagnosis() == null;
        form.ctnDetails().setccAuthoringEnabled(newRecord);

        if (form.getLocalContext().getCurrentDiagIncluded().booleanValue()
            || form.getLocalContext().getPreviousDiagIncluded().booleanValue())
            form.ctnDetails().setccAuthoringEnabled(false);
    }

    updateControlsState();
}
项目:openMAXIMS    文件:Logic.java   
private void setPatientDiagnosisRowData(grdDiagnosesRow row, PatientDiagnosisEDischargeListVo patientDiagnosisListVo)
{
    row.setColDiagnosis(patientDiagnosisListVo.getDiagnosisDescriptionIsNotNull() ? patientDiagnosisListVo.getDiagnosisDescription() : "");
    row.setColAuthoringHCPDateTime(patientDiagnosisListVo.getAuthoringInfoIsNotNull() ? patientDiagnosisListVo.getAuthoringInfo().toString() : null);

    if (patientDiagnosisListVo.getSysInfoIsNotNull() && patientDiagnosisListVo.getSysInfo().getLastupdateUser() != null)
        row.setColAudit(form.getImages().Core.EditDisabled);

    boolean isPrimaryDiagnosis = isPrimaryDiagnosisActive(patientDiagnosisListVo);
    row.setColPrimary(isPrimaryDiagnosis ? Boolean.TRUE : Boolean.FALSE);

    if (isPrimaryDiagnosis)
        form.getLocalContext().setbExistingPrimaryDiagnosis(Boolean.TRUE);

    row.setColInclude(findIfIncludeSetForThisCareContext(patientDiagnosisListVo.getIncludeDiagnosisInDiscReports()) ? Boolean.TRUE : Boolean.FALSE);

    row.setValue(patientDiagnosisListVo);
}
项目:openMAXIMS    文件:Logic.java   
private void setPatientComorbRowData(grdComorbidityRow row, PatientDiagnosisEDischargeListVo patientComorbidityListVo)
    {
        row.setColDiagnosis(patientComorbidityListVo.getDiagnosisDescriptionIsNotNull() ? patientComorbidityListVo.getDiagnosisDescription() : "");
        row.setColAuthoringHCPDateTime(patientComorbidityListVo.getAuthoringInfoIsNotNull() ? patientComorbidityListVo.getAuthoringInfo().toString() : null);

        if (patientComorbidityListVo.getSysInfoIsNotNull() && patientComorbidityListVo.getSysInfo().getLastupdateUser() != null)
            row.setColAudit(form.getImages().Core.EditDisabled);

//      WDEV-20098
//      boolean isPrimaryDiagnosis = isPrimaryDiagnosisActive(patientComorbidityListVo);
//      row.setColPrimary(isPrimaryDiagnosis ? Boolean.TRUE : Boolean.FALSE);
//
//      if (isPrimaryDiagnosis)
//          form.getLocalContext().setbExistingPrimaryComMorbidity(Boolean.TRUE);
//------------------------------

        row.setColRelevantForEpisode(findIfRelevanteSetForThisCareContext(patientComorbidityListVo.getCoMorbidityForEpisodeOfCares()) ? Boolean.TRUE : Boolean.FALSE);//WDEV-20098
        row.setColInclude(findIfIncludeSetForThisCareContext(patientComorbidityListVo.getIncludeDiagnosisInDiscReports()) ? Boolean.TRUE : Boolean.FALSE);

        row.setValue(patientComorbidityListVo);
    }
项目:openMAXIMS    文件:Logic.java   
private PatientDiagnosisEDischargeListVo populateCoMorbiditySpecificItems(PatientDiagnosisEDischargeListVo voPatDiagnosis)
    {
        voPatDiagnosis.setDiagLaterality(form.ctnCoMorbidityControls().cmbComorbLaterality().getValue() != null ? form.ctnCoMorbidityControls().cmbComorbLaterality().getValue():null); //wdev-18841
        voPatDiagnosis.setIsComorbidity(true);
        voPatDiagnosis.setIsComplication(false);

        // Primary Diagnosis

//      WDEV-20098      
//      setCsPrimaryDiagnosis(voPatDiagnosis, form.ctnCoMorbidityControls().chkPrimCoMorbidity().getValue(), false);
        //setCoMorbidityForEpisodeOfCares(voPatDiagnosis, form.ctnCoMorbidityControls().chkRelevantForEpisodeCoMorbidity().getValue(), false);
//---------------

        voPatDiagnosis.setAuthoringInfo(form.ctnCoMorbidityControls().ccComorbAuthoring().getValue());
        voPatDiagnosis.setDiagnosedOnAdmission(form.ctnCoMorbidityControls().chkDiagnosedOnAdmissionComorb().getValue()); //WDEV-19860

        return voPatDiagnosis;
    }
项目:openMAXIMS    文件:Logic.java   
private CSPrimaryDiagnosisVo getPrimaryDiagnosisRecord(PatientDiagnosisEDischargeListVo 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(PatientDiagnosisEDischargeListVo 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    文件:EDischargeDiagnosisEtcComponentImpl.java   
/**
* saveDiagnosisVo
*/
public PatientDiagnosisEDischargeListVo saveDiagnosisVo(PatientDiagnosisEDischargeListVo patientDiagnosisEDischargeListVo, SummaryRefVo summaryVo) throws DomainInterfaceException, StaleObjectException, UniqueKeyViolationException
{
    // Ensure the value object has been validated
    if (!patientDiagnosisEDischargeListVo.isValidated())
        throw new DomainRuntimeException("Diagnosis has not been validated");

    DomainFactory factory = getDomainFactory();
    @SuppressWarnings("rawtypes")
    HashMap map = new HashMap();
    PatientDiagnosis doPatDiag = PatientDiagnosisEDischargeListVoAssembler.extractPatientDiagnosis(factory, patientDiagnosisEDischargeListVo, map);

    factory.save(doPatDiag);

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

    return PatientDiagnosisEDischargeListVoAssembler.create(doPatDiag);//Create here to avoid possible StaleObj in PMH save
}
项目:openMAXIMS    文件:EDischargeDiagnosisEtcComponentImpl.java   
private boolean isAtLeastOneComorbRelevant(PatientDiagnosisEDischargeListVoCollection collComorbidities, CareContextRefVo careContextRef)
{
    if (collComorbidities == null)
        return false;

    for (PatientDiagnosisEDischargeListVo comorbidity : collComorbidities)
    {
        if (comorbidity.getCoMorbidityForEpisodeOfCares() != null)
        {
            for (EpisodeOfCareCoMorbidityVo episodeComorbidity : comorbidity.getCoMorbidityForEpisodeOfCares())
            {
                if (episodeComorbidity.getIsActive() && episodeComorbidity.getCareContext().getID_CareContext().equals(careContextRef.getID_CareContext())) //WDEV-20265
                    return true;
            }
        }
    }
    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void populatePreviousDiagnosisGrid(PatientDiagnosisEDischargeListVoCollection voPreviousColl) 
{
    form.grdPrevoiusDiagnosesCoMorbidites().getRows().clear();
    if (voPreviousColl != null)
    {
        for (int i = 0; i < voPreviousColl.size(); i++)
        {
            boolean bAddrow = false;
            for (int j = 0 ; j < form.grdDiagnosisComplications().getRows().size() ; j++)
            {
                if (form.grdDiagnosisComplications().getRows().get(j).getValue().equals(voPreviousColl.get(i)))
                    bAddrow = true;
            }
            if ( !bAddrow)
            {
                grdPrevoiusDiagnosesCoMorbiditesRow row = form.grdPrevoiusDiagnosesCoMorbidites().getRows().newRow();
                PatientDiagnosisEDischargeListVo patientDiagnosisListVo = voPreviousColl.get(i);

                setPreviousPatientDiagnosisRowData(row, patientDiagnosisListVo);
            }
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
private void setPreviousPatientDiagnosisRowData(grdPrevoiusDiagnosesCoMorbiditesRow row, PatientDiagnosisEDischargeListVo patientDiagnosisListVo)
{
    row.setColDCDesc(patientDiagnosisListVo.getDiagnosisDescriptionIsNotNull() ? patientDiagnosisListVo.getDiagnosisDescription() : "");
    row.setColDCDate(patientDiagnosisListVo.getDiagnosedDateIsNotNull() ? patientDiagnosisListVo.getDiagnosedDate() : null);

    row.setColDCCoMorbid(patientDiagnosisListVo.getIsComorbidityIsNotNull() ? (patientDiagnosisListVo.getIsComorbidity().booleanValue() ? form.getImages().Core.Pin : null) : null);
    row.setTooltipForColDCCoMorbid(patientDiagnosisListVo.getIsComorbidityIsNotNull() ? (patientDiagnosisListVo.getIsComorbidity().booleanValue() ? "Co-morbidity" : "") : "");

    boolean bComorb = findIfMarkedAsComorbInThisEDischarge(patientDiagnosisListVo.getCoMorbidityForEpisodeOfCares());
    row.setColComorbInCurrent(bComorb ? form.getImages().Core.Tick : null);
    row.setTooltipForColComorbInCurrent(bComorb ? "A tick means it is a Co-morbidity for this eDischarge" : "");

    row.setColInclude(findIfIncludeSetForThisCareContext(patientDiagnosisListVo.getIncludeDiagnosisInDiscReports()) ? Boolean.TRUE : Boolean.FALSE);

    row.setValue(patientDiagnosisListVo);
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onFormModeChanged() 
{
    if (form.getMode().equals(FormMode.EDIT))
    {
        PatientDiagnosisEDischargeListVo voPatientDiagnosis = form.getLocalContext().getSelectedPatientDiagnosisVo();
        boolean newRecord = voPatientDiagnosis == null || voPatientDiagnosis.getID_PatientDiagnosis() == null;
        form.ctnDetails().setccAuthoringEnabled(newRecord);

        if (form.getLocalContext().getCurrentDiagIncluded().booleanValue()
            || form.getLocalContext().getPreviousDiagIncluded().booleanValue())
            form.ctnDetails().setccAuthoringEnabled(false);
    }

    updateControlsState();
}
项目:openMAXIMS    文件:Logic.java   
private void populateComorbidityGrid(PatientDiagnosisEDischargeListVoCollection voPatComorbColl)
{
    form.getLocalContext().setbExistingPrimaryComMorbidity(Boolean.FALSE);

    if (voPatComorbColl != null)
    {
        for (int i = 0; i < voPatComorbColl.size(); i++)
        {
            grdComorbidityRow row = form.ctnCurrentDiagnoses().grdComorbidity().getRows().newRow();
            PatientDiagnosisEDischargeListVo patientComorbidListVo = voPatComorbColl.get(i);

            setPatientComorbRowData(row, patientComorbidListVo);
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
private void setPatientDiagnosisRowData(grdDiagnosesRow row, PatientDiagnosisEDischargeListVo patientDiagnosisListVo)
{
    row.setColDiagnosis(patientDiagnosisListVo.getDiagnosisDescriptionIsNotNull() ? patientDiagnosisListVo.getDiagnosisDescription() : "");
    row.setColDateDiagnosed(patientDiagnosisListVo.getDiagnosedDateIsNotNull() ? patientDiagnosisListVo.getDiagnosedDate() : null);
    row.setColAuthoringHCPDateTime(patientDiagnosisListVo.getAuthoringInfoIsNotNull() ? patientDiagnosisListVo.getAuthoringInfo().toString() : null);

    if (patientDiagnosisListVo.getSysInfoIsNotNull() && patientDiagnosisListVo.getSysInfo().getLastupdateUser() != null)
        row.setColAudit(form.getImages().Core.EditDisabled);

    boolean isPrimaryDiagnosis = isPrimaryDiagnosisActive(patientDiagnosisListVo);
    row.setColPrimary(isPrimaryDiagnosis ? Boolean.TRUE : Boolean.FALSE);

    if (isPrimaryDiagnosis)
        form.getLocalContext().setbExistingPrimaryDiagnosis(Boolean.TRUE);

    row.setColInclude(findIfIncludeSetForThisCareContext(patientDiagnosisListVo.getIncludeDiagnosisInDiscReports()) ? Boolean.TRUE : Boolean.FALSE);

    row.setValue(patientDiagnosisListVo);
}
项目:openMAXIMS    文件:Logic.java   
private void setPatientComorbRowData(grdComorbidityRow row, PatientDiagnosisEDischargeListVo patientComorbidityListVo)
{
    row.setColDiagnosis(patientComorbidityListVo.getDiagnosisDescriptionIsNotNull() ? patientComorbidityListVo.getDiagnosisDescription() : "");
    row.setColDateDiagnosed(patientComorbidityListVo.getDiagnosedDateIsNotNull() ? patientComorbidityListVo.getDiagnosedDate() : null);
    row.setColAuthoringHCPDateTime(patientComorbidityListVo.getAuthoringInfoIsNotNull() ? patientComorbidityListVo.getAuthoringInfo().toString() : null);

    if (patientComorbidityListVo.getSysInfoIsNotNull() && patientComorbidityListVo.getSysInfo().getLastupdateUser() != null)
        row.setColAudit(form.getImages().Core.EditDisabled);

    boolean isPrimaryDiagnosis = isPrimaryDiagnosisActive(patientComorbidityListVo);
    row.setColPrimary(isPrimaryDiagnosis ? Boolean.TRUE : Boolean.FALSE);

    if (isPrimaryDiagnosis)
        form.getLocalContext().setbExistingPrimaryComMorbidity(Boolean.TRUE);

    row.setColInclude(findIfIncludeSetForThisCareContext(patientComorbidityListVo.getIncludeDiagnosisInDiscReports()) ? Boolean.TRUE : Boolean.FALSE);

    row.setValue(patientComorbidityListVo);
}
项目:openMAXIMS    文件:EDischargeDiagnosisEtcComponentImpl.java   
public void rieDiagnosis(PatientDiagnosisEDischargeListVo diag, FormName formName, Integer patientId, Integer contactId, Integer careContextId, String rieMessage, SummaryRefVo summary) throws StaleObjectException
{

    if (summary!=null && summary.getID_SummaryIsNotNull())
    {
        //Check to see if letter status is generated 
        String sql = "select count(summ.id) from Summary as summ left join summ.dischargeLetterStatus as lookup where (summ.id=:summId and lookup.id = :idGenerated)";

        long count = getDomainFactory().countWithHQL(sql, new String[]{"summId","idGenerated"}, new Object[]{summary.getID_Summary(),DischargeLetterStatus.GENERATED.getID()});
        if (count >0)
            throw new StaleObjectException(null);
    }

    markAsRie(diag, formName, patientId, contactId, careContextId, rieMessage);


}
项目:openmaxims-linux    文件:Logic.java   
private void populatePreviousDiagnosisGrid(PatientDiagnosisEDischargeListVoCollection voPreviousColl) 
{
    form.grdPrevoiusDiagnosesCoMorbidites().getRows().clear();
    if (voPreviousColl != null)
    {
        for (int i = 0; i < voPreviousColl.size(); i++)
        {
            boolean bAddrow = false;
            for (int j = 0 ; j < form.grdDiagnosisComplications().getRows().size() ; j++)
            {
                if (form.grdDiagnosisComplications().getRows().get(j).getValue().equals(voPreviousColl.get(i)))
                    bAddrow = true;
            }
            if ( !bAddrow)
            {
                grdPrevoiusDiagnosesCoMorbiditesRow row = form.grdPrevoiusDiagnosesCoMorbidites().getRows().newRow();
                PatientDiagnosisEDischargeListVo patientDiagnosisListVo = voPreviousColl.get(i);

                setPreviousPatientDiagnosisRowData(row, patientDiagnosisListVo);
            }
        }
    }

}
项目:openmaxims-linux    文件:Logic.java   
private void setPreviousPatientDiagnosisRowData(grdPrevoiusDiagnosesCoMorbiditesRow row, PatientDiagnosisEDischargeListVo patientDiagnosisListVo)
{
    row.setColDCDesc(patientDiagnosisListVo.getDiagnosisDescriptionIsNotNull() ? patientDiagnosisListVo.getDiagnosisDescription() : "");
    row.setColDCDate(patientDiagnosisListVo.getDiagnosedDateIsNotNull() ? patientDiagnosisListVo.getDiagnosedDate() : null);

    row.setColDCCoMorbid(patientDiagnosisListVo.getIsComorbidityIsNotNull() ? (patientDiagnosisListVo.getIsComorbidity().booleanValue() ? form.getImages().Core.Pin : null) : null);
    row.setTooltipForColDCCoMorbid(patientDiagnosisListVo.getIsComorbidityIsNotNull() ? (patientDiagnosisListVo.getIsComorbidity().booleanValue() ? "Co-morbidity" : "") : "");

    boolean bComorb = findIfMarkedAsComorbInThisEDischarge(patientDiagnosisListVo.getCoMorbidityForEpisodeOfCares());
    row.setColComorbInCurrent(bComorb ? form.getImages().Core.Tick : null);
    row.setTooltipForColComorbInCurrent(bComorb ? "A tick means it is a Co-morbidity for this eDischarge" : "");

    row.setColInclude(findIfIncludeSetForThisCareContext(patientDiagnosisListVo.getIncludeDiagnosisInDiscReports()) ? Boolean.TRUE : Boolean.FALSE);

    row.setValue(patientDiagnosisListVo);
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onFormModeChanged() 
{
    if (form.getMode().equals(FormMode.EDIT))
    {
        PatientDiagnosisEDischargeListVo voPatientDiagnosis = form.getLocalContext().getSelectedPatientDiagnosisVo();
        boolean newRecord = voPatientDiagnosis == null || voPatientDiagnosis.getID_PatientDiagnosis() == null;
        form.ctnDetails().setccAuthoringEnabled(newRecord);

        if (form.getLocalContext().getCurrentDiagIncluded().booleanValue()
            || form.getLocalContext().getPreviousDiagIncluded().booleanValue())
            form.ctnDetails().setccAuthoringEnabled(false);
    }

    updateControlsState();
}
项目:openmaxims-linux    文件:Logic.java   
private void populateComorbidityGrid(PatientDiagnosisEDischargeListVoCollection voPatComorbColl)
{
    form.getLocalContext().setbExistingPrimaryComMorbidity(Boolean.FALSE);

    if (voPatComorbColl != null)
    {
        for (int i = 0; i < voPatComorbColl.size(); i++)
        {
            grdComorbidityRow row = form.ctnCurrentDiagnoses().grdComorbidity().getRows().newRow();
            PatientDiagnosisEDischargeListVo patientComorbidListVo = voPatComorbColl.get(i);

            setPatientComorbRowData(row, patientComorbidListVo);
        }
    }

}
项目:openmaxims-linux    文件:Logic.java   
private void setPatientDiagnosisRowData(grdDiagnosesRow row, PatientDiagnosisEDischargeListVo patientDiagnosisListVo)
{
    row.setColDiagnosis(patientDiagnosisListVo.getDiagnosisDescriptionIsNotNull() ? patientDiagnosisListVo.getDiagnosisDescription() : "");
    row.setColDateDiagnosed(patientDiagnosisListVo.getDiagnosedDateIsNotNull() ? patientDiagnosisListVo.getDiagnosedDate() : null);
    row.setColAuthoringHCPDateTime(patientDiagnosisListVo.getAuthoringInfoIsNotNull() ? patientDiagnosisListVo.getAuthoringInfo().toString() : null);

    if (patientDiagnosisListVo.getSysInfoIsNotNull() && patientDiagnosisListVo.getSysInfo().getLastupdateUser() != null)
        row.setColAudit(form.getImages().Core.EditDisabled);

    boolean isPrimaryDiagnosis = isPrimaryDiagnosisActive(patientDiagnosisListVo);
    row.setColPrimary(isPrimaryDiagnosis ? Boolean.TRUE : Boolean.FALSE);

    if (isPrimaryDiagnosis)
        form.getLocalContext().setbExistingPrimaryDiagnosis(Boolean.TRUE);

    row.setColInclude(findIfIncludeSetForThisCareContext(patientDiagnosisListVo.getIncludeDiagnosisInDiscReports()) ? Boolean.TRUE : Boolean.FALSE);

    row.setValue(patientDiagnosisListVo);
}
项目:openmaxims-linux    文件:Logic.java   
private void setPatientComorbRowData(grdComorbidityRow row, PatientDiagnosisEDischargeListVo patientComorbidityListVo)
{
    row.setColDiagnosis(patientComorbidityListVo.getDiagnosisDescriptionIsNotNull() ? patientComorbidityListVo.getDiagnosisDescription() : "");
    row.setColDateDiagnosed(patientComorbidityListVo.getDiagnosedDateIsNotNull() ? patientComorbidityListVo.getDiagnosedDate() : null);
    row.setColAuthoringHCPDateTime(patientComorbidityListVo.getAuthoringInfoIsNotNull() ? patientComorbidityListVo.getAuthoringInfo().toString() : null);

    if (patientComorbidityListVo.getSysInfoIsNotNull() && patientComorbidityListVo.getSysInfo().getLastupdateUser() != null)
        row.setColAudit(form.getImages().Core.EditDisabled);

    boolean isPrimaryDiagnosis = isPrimaryDiagnosisActive(patientComorbidityListVo);
    row.setColPrimary(isPrimaryDiagnosis ? Boolean.TRUE : Boolean.FALSE);

    if (isPrimaryDiagnosis)
        form.getLocalContext().setbExistingPrimaryComMorbidity(Boolean.TRUE);

    row.setColInclude(findIfIncludeSetForThisCareContext(patientComorbidityListVo.getIncludeDiagnosisInDiscReports()) ? Boolean.TRUE : Boolean.FALSE);

    row.setValue(patientComorbidityListVo);
}
项目:openmaxims-linux    文件:EDischargeDiagnosisEtcComponentImpl.java   
public void rieDiagnosis(PatientDiagnosisEDischargeListVo diag, FormName formName, Integer patientId, Integer contactId, Integer careContextId, String rieMessage, SummaryRefVo summary) throws StaleObjectException
{

    if (summary!=null && summary.getID_SummaryIsNotNull())
    {
        //Check to see if letter status is generated 
        String sql = "select count(summ.id) from Summary as summ left join summ.dischargeLetterStatus as lookup where (summ.id=:summId and lookup.id = :idGenerated)";

        long count = getDomainFactory().countWithHQL(sql, new String[]{"summId","idGenerated"}, new Object[]{summary.getID_Summary(),DischargeLetterStatus.GENERATED.getID()});
        if (count >0)
            throw new StaleObjectException(null);
    }

    markAsRie(diag, formName, patientId, contactId, careContextId, rieMessage);


}
项目:AvoinApotti    文件:Logic.java   
private void populateCurrentDiagnosisGrid(PatientDiagnosisEDischargeListVoCollection voPatDiagColl)
{
    if (voPatDiagColl != null)
    {
        for (int i = 0; i < voPatDiagColl.size(); i++)
        {
            grdDiagnosisComplicationsRow row = form.grdDiagnosisComplications().getRows().newRow();
            PatientDiagnosisEDischargeListVo patientDiagnosisListVo = voPatDiagColl.get(i);

            setPatientDiagnosisRowData(row, patientDiagnosisListVo);
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
private void setPatientDiagnosisRowData(grdDiagnosisComplicationsRow row, PatientDiagnosisEDischargeListVo patientDiagnosisListVo)
{
    row.setColDiagnosis(patientDiagnosisListVo.getDiagnosisDescriptionIsNotNull() ? patientDiagnosisListVo.getDiagnosisDescription() : "");
    row.setColDateDiagnosed(patientDiagnosisListVo.getDiagnosedDateIsNotNull() ? patientDiagnosisListVo.getDiagnosedDate() : null);
    row.setColAuthoringHCPDateTime(patientDiagnosisListVo.getAuthoringInfoIsNotNull() ? patientDiagnosisListVo.getAuthoringInfo().toString(): null);

    if (patientDiagnosisListVo.getSysInfoIsNotNull() && patientDiagnosisListVo.getSysInfo().getLastupdateUser() != null)
        row.setColAudit(form.getImages().Core.EditDisabled);

    row.setColInclude(findIfIncludeSetForThisCareContext(patientDiagnosisListVo.getIncludeDiagnosisInDiscReports()) ? Boolean.TRUE : Boolean.FALSE);

    row.setValue(patientDiagnosisListVo);
}
项目:AvoinApotti    文件:Logic.java   
private boolean isPrimaryDiagnosisActive(PatientDiagnosisEDischargeListVo voPatientDiagnosisList)
{
    if (voPatientDiagnosisList == null)
        return false;

    return isPrimaryDiagnosisActive(voPatientDiagnosisList, voPatientDiagnosisList.getPrimaryForCareSpells());
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onFormModeChanged()
{
    if (form.getMode().equals(FormMode.EDIT))
    {
        PatientDiagnosisEDischargeListVo voPatientDiagnosis = form.getLocalContext().getSelectedPatientDiagnosisVo();
        boolean newRecord = voPatientDiagnosis == null || voPatientDiagnosis.getID_PatientDiagnosis() == null;
        form.ctnDiagnosisControls().setccDiagAuthoringEnabled(newRecord);

        if (form.getLocalContext().getCurrentDiagIncluded().booleanValue() || form.getLocalContext().getPreviousDiagIncluded().booleanValue())
            form.ctnDiagnosisControls().setccDiagAuthoringEnabled(false);
    }

    updateControlsState();
}
项目:AvoinApotti    文件:Logic.java   
private void markAsRie(PatientDiagnosisEDischargeListVo value)
{
    if (value == null)
        return;

    form.getLocalContext().setDiagToBeRied(value);
    engine.open(form.getForms().Core.RieConfirmationDialog);
}
项目:AvoinApotti    文件:Logic.java   
private void populateDiagnosisGrid(PatientDiagnosisEDischargeListVoCollection voPatDiagColl)
{
    form.getLocalContext().setbExistingPrimaryDiagnosis(Boolean.FALSE);

    if (voPatDiagColl != null)
    {
        for (int i = 0; i < voPatDiagColl.size(); i++)
        {
            grdDiagnosesRow row = form.ctnCurrentDiagnoses().grdDiagnoses().getRows().newRow();
            PatientDiagnosisEDischargeListVo patientDiagnosisListVo = voPatDiagColl.get(i);

            setPatientDiagnosisRowData(row, patientDiagnosisListVo);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateComplicationsGrid(PatientDiagnosisEDischargeListVoCollection voPatComorbColl)
{
    if (voPatComorbColl != null)
    {
        for (int i = 0; i < voPatComorbColl.size(); i++)
        {
            grdComplicationsRow row = form.ctnCurrentDiagnoses().grdComplications().getRows().newRow();
            PatientDiagnosisEDischargeListVo patientCompListVo = voPatComorbColl.get(i);

            setPatientComplicationRowData(row, patientCompListVo);
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
private void setPatientComplicationRowData(grdComplicationsRow row, PatientDiagnosisEDischargeListVo patientCompListVo)
{
    row.setColDiagnosis(patientCompListVo.getDiagnosisDescriptionIsNotNull() ? patientCompListVo.getDiagnosisDescription() : "");
    row.setColDateDiagnosed(patientCompListVo.getDiagnosedDateIsNotNull() ? patientCompListVo.getDiagnosedDate() : null);
    row.setColAuthoringHCPDateTime(patientCompListVo.getAuthoringInfoIsNotNull() ? patientCompListVo.getAuthoringInfo().toString() : null);

    if (patientCompListVo.getSysInfoIsNotNull() && patientCompListVo.getSysInfo().getLastupdateUser() != null)
        row.setColAudit(form.getImages().Core.EditDisabled);

    row.setColInclude(findIfIncludeSetForThisCareContext(patientCompListVo.getIncludeDiagnosisInDiscReports()) ? Boolean.TRUE : Boolean.FALSE);

    row.setValue(patientCompListVo);
}
项目:AvoinApotti    文件:Logic.java   
private boolean isPrimaryDiagnosisActive(PatientDiagnosisEDischargeListVo voPatientDiagnosisList)
{
    if (voPatientDiagnosisList == null)
        return false;

    return isPrimaryDiagnosisActive(voPatientDiagnosisList, voPatientDiagnosisList.getPrimaryForCareSpells());
}