Java 类ims.clinical.vo.lookups.VTEAsessmentStatus 实例源码

项目:AvoinApotti    文件:VTERiskAssessmentImpl.java   
public VTERiskAssessmentVo getInProgressVTERiskAsessment(PASEventRefVo pasEventRefVo) 
{
    if(pasEventRefVo == null )
        throw new CodingRuntimeException("PAS EVENT not provided");

    DomainFactory factory = getDomainFactory();
    List vteriskassess = factory.find("select v1_1 from InpatientEpisode as ie left join ie.vTERiskAssessment as v1_1 left join v1_1.careContext as c1_1 left join c1_1.pasEvent as p1_1 left join v1_1.vTEAssessmentStatus as l1_1 where (p1_1.id =:idPasEvent and l1_1.id = :idStatus)  ", new String[] {"idPasEvent","idStatus"}, new Object[] {pasEventRefVo.getID_PASEvent(),VTEAsessmentStatus.INPROGRESS.getId()});//WDEV-14993

    if( vteriskassess != null && vteriskassess.size() > 0)
    {
        VTERiskAssessmentVoCollection tempColl = VTERiskAssessmentVoAssembler.createVTERiskAssessmentVoCollectionFromVTERiskAssessment(vteriskassess).sort(SortOrder.DESCENDING);
        if( tempColl != null && tempColl.size() > 0)
            return tempColl.get(0);
    }


    return null;
}
项目:AvoinApotti    文件:VTERiskAssessmentImpl.java   
public VTERiskAssessmentVo getInProgressVTERiskAssessmentFromDischargeEpisode(PASEventRefVo pasEventRef) 
{
    if(pasEventRef == null )
        throw new CodingRuntimeException("PAS EVENT not provided");

    DomainFactory factory = getDomainFactory();
    List vteriskassess = factory.find("select vte from DischargedEpisode as de left join de.vTERiskAssessment as vte left join vte.careContext as cc left join cc.pasEvent as pas left join vte.vTEAssessmentStatus as vtes where (pas.id =:idPasEvent and vtes.id = :idStatus)  ", new String[] {"idPasEvent","idStatus"}, new Object[] {pasEventRef.getID_PASEvent(),VTEAsessmentStatus.INPROGRESS.getId()});

    if( vteriskassess != null && vteriskassess.size() > 0)
    {
        VTERiskAssessmentVoCollection tempColl = VTERiskAssessmentVoAssembler.createVTERiskAssessmentVoCollectionFromVTERiskAssessment(vteriskassess).sort(SortOrder.DESCENDING);
        if( tempColl != null && tempColl.size() > 0)
            return tempColl.get(0);
    }

    return null;
}
项目:openMAXIMS    文件:ADTImpl.java   
void RestorePreOpVTEAssessmentToSummaryRecord(PatientSummaryRecord patientSummaryRecord,InpatientEpisode episode)
{
    if(episode!=null
            &&episode.getVTERiskAssessment()!=null
            &&episode.getVTERiskAssessment().getContextType().equals(getDomLookup(VTEAssessmentContextType.PREOP)))
    {
        patientSummaryRecord.setPreOpVTEAssessment(episode.getVTERiskAssessment());
        patientSummaryRecord.getPreOpVTEAssessment().setValidatedInformation(null);
        if(patientSummaryRecord.getPreOpVTEAssessment().getVTEAssessmentStatus().equals(getDomLookup(VTEAsessmentStatus.VALIDATED)))
        {
            patientSummaryRecord.getPreOpVTEAssessment().setVTEAssessmentStatus(getDomLookup(VTEAsessmentStatus.COMPLETED));
        }
        patientSummaryRecord.setPreOpVTEValidationDate(null);
        if(patientSummaryRecord.getPreOpVTEAssessment().getRecordingInformation()!=null)
        {
            patientSummaryRecord.setPreOpVTECompletedDate(patientSummaryRecord.getPreOpVTEAssessment().getRecordingInformation().getRecordingDateTime());
        }
    }
}
项目:openMAXIMS    文件:VTERiskAssessmentImpl.java   
public VTERiskAssessmentVo getInProgressVTERiskAsessment(PASEventRefVo pasEventRefVo) 
{
    if(pasEventRefVo == null )
        throw new CodingRuntimeException("PAS EVENT not provided");

    DomainFactory factory = getDomainFactory();
    List vteriskassess = factory.find("select v1_1 from InpatientEpisode as ie left join ie.vTERiskAssessment as v1_1 left join v1_1.careContext as c1_1 left join c1_1.pasEvent as p1_1 left join v1_1.vTEAssessmentStatus as l1_1 where (p1_1.id =:idPasEvent and l1_1.id = :idStatus)  ", new String[] {"idPasEvent","idStatus"}, new Object[] {pasEventRefVo.getID_PASEvent(),VTEAsessmentStatus.INPROGRESS.getId()});//WDEV-14993

    if( vteriskassess != null && vteriskassess.size() > 0)
    {
        VTERiskAssessmentVoCollection tempColl = VTERiskAssessmentVoAssembler.createVTERiskAssessmentVoCollectionFromVTERiskAssessment(vteriskassess).sort(SortOrder.DESCENDING);
        if( tempColl != null && tempColl.size() > 0)
            return tempColl.get(0);
    }


    return null;
}
项目:openMAXIMS    文件:VTERiskAssessmentImpl.java   
public VTERiskAssessmentVo getInProgressVTERiskAssessmentFromDischargeEpisode(PASEventRefVo pasEventRef) 
{
    if(pasEventRef == null )
        throw new CodingRuntimeException("PAS EVENT not provided");

    DomainFactory factory = getDomainFactory();
    List vteriskassess = factory.find("select vte from DischargedEpisode as de left join de.vTERiskAssessment as vte left join vte.careContext as cc left join cc.pasEvent as pas left join vte.vTEAssessmentStatus as vtes where (pas.id =:idPasEvent and vtes.id = :idStatus)  ", new String[] {"idPasEvent","idStatus"}, new Object[] {pasEventRef.getID_PASEvent(),VTEAsessmentStatus.INPROGRESS.getId()});

    if( vteriskassess != null && vteriskassess.size() > 0)
    {
        VTERiskAssessmentVoCollection tempColl = VTERiskAssessmentVoAssembler.createVTERiskAssessmentVoCollectionFromVTERiskAssessment(vteriskassess).sort(SortOrder.DESCENDING);
        if( tempColl != null && tempColl.size() > 0)
            return tempColl.get(0);
    }

    return null;
}
项目:openMAXIMS    文件:VTERiskAssessmentImpl.java   
public VTERiskAssessmentVo getInProgressVTERiskAsessment(PASEventRefVo pasEventRefVo) 
{
    if(pasEventRefVo == null )
        throw new CodingRuntimeException("PAS EVENT not provided");

    DomainFactory factory = getDomainFactory();
    List vteriskassess = factory.find("select v1_1 from InpatientEpisode as ie left join ie.vTERiskAssessment as v1_1 left join v1_1.careContext as c1_1 left join c1_1.pasEvent as p1_1 left join v1_1.vTEAssessmentStatus as l1_1 where (p1_1.id =:idPasEvent and l1_1.id = :idStatus)  ", new String[] {"idPasEvent","idStatus"}, new Object[] {pasEventRefVo.getID_PASEvent(),VTEAsessmentStatus.INPROGRESS.getId()});//WDEV-14993

    if( vteriskassess != null && vteriskassess.size() > 0)
    {
        VTERiskAssessmentVoCollection tempColl = VTERiskAssessmentVoAssembler.createVTERiskAssessmentVoCollectionFromVTERiskAssessment(vteriskassess).sort(SortOrder.DESCENDING);
        if( tempColl != null && tempColl.size() > 0)
            return tempColl.get(0);
    }


    return null;
}
项目:openMAXIMS    文件:VTERiskAssessmentImpl.java   
public VTERiskAssessmentVo getInProgressVTERiskAssessmentFromDischargeEpisode(PASEventRefVo pasEventRef) 
{
    if(pasEventRef == null )
        throw new CodingRuntimeException("PAS EVENT not provided");

    DomainFactory factory = getDomainFactory();
    List vteriskassess = factory.find("select vte from DischargedEpisode as de left join de.vTERiskAssessment as vte left join vte.careContext as cc left join cc.pasEvent as pas left join vte.vTEAssessmentStatus as vtes where (pas.id =:idPasEvent and vtes.id = :idStatus)  ", new String[] {"idPasEvent","idStatus"}, new Object[] {pasEventRef.getID_PASEvent(),VTEAsessmentStatus.INPROGRESS.getId()});

    if( vteriskassess != null && vteriskassess.size() > 0)
    {
        VTERiskAssessmentVoCollection tempColl = VTERiskAssessmentVoAssembler.createVTERiskAssessmentVoCollectionFromVTERiskAssessment(vteriskassess).sort(SortOrder.DESCENDING);
        if( tempColl != null && tempColl.size() > 0)
            return tempColl.get(0);
    }

    return null;
}
项目:openmaxims-linux    文件:VTERiskAssessmentImpl.java   
public VTERiskAssessmentVo getInProgressVTERiskAsessment(PASEventRefVo pasEventRefVo) 
{
    if(pasEventRefVo == null )
        throw new CodingRuntimeException("PAS EVENT not provided");

    DomainFactory factory = getDomainFactory();
    List vteriskassess = factory.find("select v1_1 from InpatientEpisode as ie left join ie.vTERiskAssessment as v1_1 left join v1_1.careContext as c1_1 left join c1_1.pasEvent as p1_1 left join v1_1.vTEAssessmentStatus as l1_1 where (p1_1.id =:idPasEvent and l1_1.id = :idStatus)  ", new String[] {"idPasEvent","idStatus"}, new Object[] {pasEventRefVo.getID_PASEvent(),VTEAsessmentStatus.INPROGRESS.getId()});//WDEV-14993

    if( vteriskassess != null && vteriskassess.size() > 0)
    {
        VTERiskAssessmentVoCollection tempColl = VTERiskAssessmentVoAssembler.createVTERiskAssessmentVoCollectionFromVTERiskAssessment(vteriskassess).sort(SortOrder.DESCENDING);
        if( tempColl != null && tempColl.size() > 0)
            return tempColl.get(0);
    }


    return null;
}
项目:openmaxims-linux    文件:VTERiskAssessmentImpl.java   
public VTERiskAssessmentVo getInProgressVTERiskAssessmentFromDischargeEpisode(PASEventRefVo pasEventRef) 
{
    if(pasEventRef == null )
        throw new CodingRuntimeException("PAS EVENT not provided");

    DomainFactory factory = getDomainFactory();
    List vteriskassess = factory.find("select vte from DischargedEpisode as de left join de.vTERiskAssessment as vte left join vte.careContext as cc left join cc.pasEvent as pas left join vte.vTEAssessmentStatus as vtes where (pas.id =:idPasEvent and vtes.id = :idStatus)  ", new String[] {"idPasEvent","idStatus"}, new Object[] {pasEventRef.getID_PASEvent(),VTEAsessmentStatus.INPROGRESS.getId()});

    if( vteriskassess != null && vteriskassess.size() > 0)
    {
        VTERiskAssessmentVoCollection tempColl = VTERiskAssessmentVoAssembler.createVTERiskAssessmentVoCollectionFromVTERiskAssessment(vteriskassess).sort(SortOrder.DESCENDING);
        if( tempColl != null && tempColl.size() > 0)
            return tempColl.get(0);
    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void updateBtnVteRiskAssessment()
{
    VTERiskAssessmentShortVoCollection hasVTEs = domain.getVTEByCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    if (hasVTEs != null && hasVTEs.size() > 0)
    {
        for (int i = 0; i < hasVTEs.size(); i++)
        {
            if (form.getLocalContext().getInpatientEpForVTERiskAssessmentVoIsNotNull())
            {
                if (form.getLocalContext().getInpatientEpForVTERiskAssessmentVo().getVTERiskAssessmentIsNotNull())
                {
                    if (hasVTEs.get(i).equals(form.getLocalContext().getInpatientEpForVTERiskAssessmentVo().getVTERiskAssessment()))
                    {
                        form.lyrDetail().tabDischarge().btnVTERiskAssesssment().setVisible(! VTEAsessmentStatus.COMPLETED.equals(hasVTEs.get(i).getVTEAssessmentStatus()));
                        form.getLocalContext().setShowVTERiskAssessmentButton(! VTEAsessmentStatus.COMPLETED.equals(hasVTEs.get(i).getVTEAssessmentStatus()));
                        break;
                    }
                }
                else
                {
                    form.lyrDetail().tabDischarge().btnVTERiskAssesssment().setVisible(! VTEAsessmentStatus.COMPLETED.equals(hasVTEs.get(i).getVTEAssessmentStatus()));
                    form.getLocalContext().setShowVTERiskAssessmentButton(! VTEAsessmentStatus.COMPLETED.equals(hasVTEs.get(i).getVTEAssessmentStatus()));
                    break;
                }
            }
            else
            {
                form.lyrDetail().tabDischarge().btnVTERiskAssesssment().setVisible(false);
                form.getLocalContext().setShowVTERiskAssessmentButton(false);
                break;
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void bindVTEAssessmentStatusCombo() 
{
    form.cmbVTEStatus().clear();

    VTEAsessmentStatusCollection lookupCollection = ims.clinical.vo.lookups.LookupHelper.getVTEAsessmentStatus(this.domain.getLookupService());
    for(int i = 0; i < lookupCollection.size(); i++)
    {
        if(VTEAsessmentStatus.COMPLETED.equals(lookupCollection.get(i)))
            continue;

        form.cmbVTEStatus().newRow(lookupCollection.get(i), lookupCollection.get(i).getText(), lookupCollection.get(i).getImage(), lookupCollection.get(i).getTextColor());
    }
}
项目:AvoinApotti    文件:Logic.java   
private void updateControlsState() 
{
    boolean enableControls = !form.getTimers().gettimerRefresh().isEnabled();

    form.cmbHospital().setEnabled(enableControls);
    form.qmbWard().setEnabled(form.cmbHospital().getValue() != null && enableControls);

    form.dtimFrom().setEnabled(enableControls);
    form.dtimTo().setEnabled(enableControls);

    form.ccConsultant().setEnabled(enableControls);
    form.cmbSpecialty().setEnabled(enableControls);
    form.cmbVTEStatus().setEnabled(enableControls);

    form.txtSurname().setEnabled(enableControls);
    form.txtForename().setEnabled(enableControls);
    form.cmbIDType().setEnabled(enableControls);
    form.txtIDValue().setEnabled(enableControls);
    form.pdtDOB().setEnabled(enableControls);
    form.chkOver24Hours().setEnabled(enableControls);

    form.imbSearch().setEnabled(enableControls);
    form.imbClear().setEnabled(enableControls);

    form.getContextMenus().Clinical.getVTERiskAssessmentWorklistMenuCREATE_VTEASSESSMENTItem().setVisible(form.grdPatients().getValue() != null && VTEAsessmentStatus.REQUIRED.equals(form.grdPatients().getValue().getVTEAssessmentStatus()));
    form.getContextMenus().Clinical.getVTERiskAssessmentWorklistMenuVIEW_EDIT_VTEASSESSMENTItem().setVisible(form.grdPatients().getValue() != null && VTEAsessmentStatus.INPROGRESS.equals(form.grdPatients().getValue().getVTEAssessmentStatus()));
    form.getContextMenus().Clinical.getVTERiskAssessmentWorklistMenuREMOVEItem().setVisible(form.grdPatients().getValue() != null);
}
项目:openMAXIMS    文件:Logic.java   
private void updateBtnVteRiskAssessment()
{
    VTERiskAssessmentShortVoCollection hasVTEs = domain.getVTEByCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    if (hasVTEs != null && hasVTEs.size() > 0)
    {
        for (int i = 0; i < hasVTEs.size(); i++)
        {
            if (form.getLocalContext().getInpatientEpForVTERiskAssessmentVoIsNotNull())
            {
                if (form.getLocalContext().getInpatientEpForVTERiskAssessmentVo().getVTERiskAssessmentIsNotNull())
                {
                    if (hasVTEs.get(i).equals(form.getLocalContext().getInpatientEpForVTERiskAssessmentVo().getVTERiskAssessment()))
                    {
                        form.lyrDetail().tabDischarge().btnVTERiskAssesssment().setVisible(! VTEAsessmentStatus.COMPLETED.equals(hasVTEs.get(i).getVTEAssessmentStatus()));
                        form.getLocalContext().setShowVTERiskAssessmentButton(! VTEAsessmentStatus.COMPLETED.equals(hasVTEs.get(i).getVTEAssessmentStatus()));
                        break;
                    }
                }
                else
                {
                    form.lyrDetail().tabDischarge().btnVTERiskAssesssment().setVisible(! VTEAsessmentStatus.COMPLETED.equals(hasVTEs.get(i).getVTEAssessmentStatus()));
                    form.getLocalContext().setShowVTERiskAssessmentButton(! VTEAsessmentStatus.COMPLETED.equals(hasVTEs.get(i).getVTEAssessmentStatus()));
                    break;
                }
            }
            else
            {
                form.lyrDetail().tabDischarge().btnVTERiskAssesssment().setVisible(false);
                form.getLocalContext().setShowVTERiskAssessmentButton(false);
                break;
            }
        }
    }
}
项目:openMAXIMS    文件:ADTImpl.java   
void copyInpatientVTEtoEpisode(PatientSummaryRecord patientSummaryRecord,InpatientEpisode episode)
{
    if(episode!=null
        &&patientSummaryRecord!=null)
    {
        episode.setVTERiskAssessment(patientSummaryRecord.getInpatientVTEAssessment());
        episode.setVTEAssessmentStatus(getDomLookup( VTEAsessmentStatus.COMPLETED));
    }
}
项目:openMAXIMS    文件:Logic.java   
private void bindVTEAssessmentStatusCombo() 
{
    form.cmbVTEStatus().clear();

    VTEAsessmentStatusCollection lookupCollection = ims.clinical.vo.lookups.LookupHelper.getVTEAsessmentStatus(this.domain.getLookupService());
    for(int i = 0; i < lookupCollection.size(); i++)
    {
        if(VTEAsessmentStatus.INPROGRESS.equals(lookupCollection.get(i)) || VTEAsessmentStatus.VALIDATED.equals(lookupCollection.get(i)) || VTEAsessmentStatus.VALIDATION_DECLINED.equals(lookupCollection.get(i)))
            continue;

        form.cmbVTEStatus().newRow(lookupCollection.get(i), lookupCollection.get(i).getText(), lookupCollection.get(i).getImage(), lookupCollection.get(i).getTextColor());
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onFormOpen(Object[] args) throws PresentationLogicException 
{
    initialize();
    open();

    //WDEV-19884 if patient is an Inpatient and VTE Assessment Required automatically do a NEW (WDEV-19939)
    boolean viewMode = args != null && args.length > 0 && args[0].equals(FormMode.VIEW); //WDEV-20611
    boolean createNewRecord = !viewMode && form.getLocalContext().getInpatientEpisode() != null && VTEAsessmentStatus.REQUIRED.equals(form.getLocalContext().getInpatientEpisode().getVTEAssessmentStatus());

    if(createNewRecord || (args != null && args.length > 0 && args[0].equals(FormMode.EDIT))) 
    {
        newClickInst();
    }  

}
项目:openMAXIMS    文件:Logic.java   
private void updateVteStatus(VTEAsessmentStatus status, VTERemoveDeclineReasonVo reasonDeclined)
{
    VTERiskAssessmentVo voVTERiskAss = form.getLocalContext().getCurrentRecord();

    voVTERiskAss.setVTEAssessmentStatus(status);

    if (VTEAsessmentStatus.VALIDATED.equals(status))
    {
        AuthoringInformationVo validateInfo = new AuthoringInformationVo();

        validateInfo.setAuthoringHcp((HcpLiteVo) domain.getHcpLiteUser());
        validateInfo.setAuthoringDateTime(new DateTime());

        voVTERiskAss.setValidatedInformation(validateInfo);
    }
    else if (VTEAsessmentStatus.VALIDATION_DECLINED.equals(status))
    {
        AuthoringInformationVo declinedInfo = new AuthoringInformationVo();

        declinedInfo.setAuthoringHcp((HcpLiteVo) domain.getHcpLiteUser());
        declinedInfo.setAuthoringDateTime(new DateTime());

        voVTERiskAss.setDeclinedInformation(declinedInfo);

        voVTERiskAss.setDeclinedReason(reasonDeclined != null ? reasonDeclined.getReason() : null);
    }

    voVTERiskAss.validate();

    try
    {
        domain.saveVTERiskAssess(voVTERiskAss);
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        return;
    }
}
项目:openMAXIMS    文件:VTERiskAssessmentWorklistImpl.java   
public IVTERiskAssessment saveEpisode(IVTERiskAssessment vteRiskAssessment, VTERemoveDeclineReasonVo removedReason) throws StaleObjectException 
{
    if(vteRiskAssessment == null)
        throw new CodingRuntimeException("Cannot save a null Episode.");

    DomainFactory factory = getDomainFactory();

    // Try to see if an Inpatient Episode is found for the PasEvent
    String queryInpatient = "SELECT inpEp FROM InpatientEpisode AS inpEp LEFT JOIN inpEp.pasEvent AS pasEv WHERE pasEv.id = :PAS_ID";
    InpatientEpisode inpEpisode = (InpatientEpisode) factory.findFirst(queryInpatient, "PAS_ID", vteRiskAssessment.getPasEvent().getID_PASEvent());

    if (inpEpisode != null)
    {
        inpEpisode.setVTEAssessmentStatus(getDomLookup(VTEAsessmentStatus.COMPLETED));

        if (removedReason != null && removedReason.getReason() != null)
            inpEpisode.setVTEAssessmentStatusReason(getDomLookup(removedReason.getReason()));

        factory.save(inpEpisode);
        return VTERiskAssessmentWorklistVoAssembler.create(inpEpisode);
    }

    // If no Inpatient Episode is found, try to find a Discharged Episode for the PasEvent
    String queryDischarge = "SELECT disEp FROM DischargedEpisode AS disEp LEFT JOIN disEp.pasEvent AS pasEv WHERE pasEv.id = :PAS_ID";
    DischargedEpisode disEpisode = (DischargedEpisode) factory.findFirst(queryDischarge, "PAS_ID", vteRiskAssessment.getPasEvent().getID_PASEvent());

    if (disEpisode != null)
    {
        disEpisode.setVTEAssessmentStatus(getDomLookup(VTEAsessmentStatus.COMPLETED));

        if (removedReason != null && removedReason.getReason() != null)
            disEpisode.setVTEAssessmentStatusReason(getDomLookup(removedReason.getReason()));

        factory.save(disEpisode);
        return DischargedEpisodeForVTERiskAssessmentWorklistVoAssembler.create(disEpisode);
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void updateBtnVteRiskAssessment()
{
    VTERiskAssessmentShortVoCollection hasVTEs = domain.getVTEByCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    if (hasVTEs != null && hasVTEs.size() > 0)
    {
        for (int i = 0; i < hasVTEs.size(); i++)
        {
            if (form.getLocalContext().getInpatientEpForVTERiskAssessmentVoIsNotNull())
            {
                if (form.getLocalContext().getInpatientEpForVTERiskAssessmentVo().getVTERiskAssessmentIsNotNull())
                {
                    if (hasVTEs.get(i).equals(form.getLocalContext().getInpatientEpForVTERiskAssessmentVo().getVTERiskAssessment()))
                    {
                        form.lyrDetail().tabDischarge().btnVTERiskAssesssment().setVisible(! VTEAsessmentStatus.COMPLETED.equals(hasVTEs.get(i).getVTEAssessmentStatus()));
                        form.getLocalContext().setShowVTERiskAssessmentButton(! VTEAsessmentStatus.COMPLETED.equals(hasVTEs.get(i).getVTEAssessmentStatus()));
                        break;
                    }
                }
                else
                {
                    form.lyrDetail().tabDischarge().btnVTERiskAssesssment().setVisible(! VTEAsessmentStatus.COMPLETED.equals(hasVTEs.get(i).getVTEAssessmentStatus()));
                    form.getLocalContext().setShowVTERiskAssessmentButton(! VTEAsessmentStatus.COMPLETED.equals(hasVTEs.get(i).getVTEAssessmentStatus()));
                    break;
                }
            }
            else
            {
                form.lyrDetail().tabDischarge().btnVTERiskAssesssment().setVisible(false);
                form.getLocalContext().setShowVTERiskAssessmentButton(false);
                break;
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void bindVTEAssessmentStatusCombo() 
{
    form.cmbVTEStatus().clear();

    VTEAsessmentStatusCollection lookupCollection = ims.clinical.vo.lookups.LookupHelper.getVTEAsessmentStatus(this.domain.getLookupService());
    for(int i = 0; i < lookupCollection.size(); i++)
    {
        if(VTEAsessmentStatus.COMPLETED.equals(lookupCollection.get(i)))
            continue;

        form.cmbVTEStatus().newRow(lookupCollection.get(i), lookupCollection.get(i).getText(), lookupCollection.get(i).getImage(), lookupCollection.get(i).getTextColor());
    }
}
项目:openMAXIMS    文件:Logic.java   
private void updateControlsState() 
{
    boolean enableControls = !form.getTimers().gettimerRefresh().isEnabled();

    form.cmbHospital().setEnabled(enableControls);
    form.qmbWard().setEnabled(form.cmbHospital().getValue() != null && enableControls);

    form.dtimFrom().setEnabled(enableControls);
    form.dtimTo().setEnabled(enableControls);

    form.ccConsultant().setEnabled(enableControls);
    form.cmbSpecialty().setEnabled(enableControls);
    form.cmbVTEStatus().setEnabled(enableControls);

    form.txtSurname().setEnabled(enableControls);
    form.txtForename().setEnabled(enableControls);
    form.cmbIDType().setEnabled(enableControls);
    form.txtIDValue().setEnabled(enableControls);
    form.pdtDOB().setEnabled(enableControls);
    form.chkOver24Hours().setEnabled(enableControls);

    form.imbSearch().setEnabled(enableControls);
    form.imbClear().setEnabled(enableControls);

    form.getContextMenus().Clinical.getVTERiskAssessmentWorklistMenuCREATE_VTEASSESSMENTItem().setVisible(form.grdPatients().getValue() != null && VTEAsessmentStatus.REQUIRED.equals(form.grdPatients().getValue().getVTEAssessmentStatus()));
    form.getContextMenus().Clinical.getVTERiskAssessmentWorklistMenuVIEW_EDIT_VTEASSESSMENTItem().setVisible(form.grdPatients().getValue() != null && VTEAsessmentStatus.INPROGRESS.equals(form.grdPatients().getValue().getVTEAssessmentStatus()));
    form.getContextMenus().Clinical.getVTERiskAssessmentWorklistMenuREMOVEItem().setVisible(form.grdPatients().getValue() != null);
}
项目:openmaxims-linux    文件:Logic.java   
private void updateBtnVteRiskAssessment()
{
    VTERiskAssessmentShortVoCollection hasVTEs = domain.getVTEByCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    if (hasVTEs != null && hasVTEs.size() > 0)
    {
        for (int i = 0; i < hasVTEs.size(); i++)
        {
            if (form.getLocalContext().getInpatientEpForVTERiskAssessmentVoIsNotNull())
            {
                if (form.getLocalContext().getInpatientEpForVTERiskAssessmentVo().getVTERiskAssessmentIsNotNull())
                {
                    if (hasVTEs.get(i).equals(form.getLocalContext().getInpatientEpForVTERiskAssessmentVo().getVTERiskAssessment()))
                    {
                        form.lyrDetail().tabDischarge().btnVTERiskAssesssment().setVisible(! VTEAsessmentStatus.COMPLETED.equals(hasVTEs.get(i).getVTEAssessmentStatus()));
                        form.getLocalContext().setShowVTERiskAssessmentButton(! VTEAsessmentStatus.COMPLETED.equals(hasVTEs.get(i).getVTEAssessmentStatus()));
                        break;
                    }
                }
                else
                {
                    form.lyrDetail().tabDischarge().btnVTERiskAssesssment().setVisible(! VTEAsessmentStatus.COMPLETED.equals(hasVTEs.get(i).getVTEAssessmentStatus()));
                    form.getLocalContext().setShowVTERiskAssessmentButton(! VTEAsessmentStatus.COMPLETED.equals(hasVTEs.get(i).getVTEAssessmentStatus()));
                    break;
                }
            }
            else
            {
                form.lyrDetail().tabDischarge().btnVTERiskAssesssment().setVisible(false);
                form.getLocalContext().setShowVTERiskAssessmentButton(false);
                break;
            }
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void bindVTEAssessmentStatusCombo() 
{
    form.cmbVTEStatus().clear();

    VTEAsessmentStatusCollection lookupCollection = ims.clinical.vo.lookups.LookupHelper.getVTEAsessmentStatus(this.domain.getLookupService());
    for(int i = 0; i < lookupCollection.size(); i++)
    {
        if(VTEAsessmentStatus.COMPLETED.equals(lookupCollection.get(i)))
            continue;

        form.cmbVTEStatus().newRow(lookupCollection.get(i), lookupCollection.get(i).getText(), lookupCollection.get(i).getImage(), lookupCollection.get(i).getTextColor());
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void updateControlsState() 
{
    boolean enableControls = !form.getTimers().gettimerRefresh().isEnabled();

    form.cmbHospital().setEnabled(enableControls);
    form.qmbWard().setEnabled(form.cmbHospital().getValue() != null && enableControls);

    form.dtimFrom().setEnabled(enableControls);
    form.dtimTo().setEnabled(enableControls);

    form.ccConsultant().setEnabled(enableControls);
    form.cmbSpecialty().setEnabled(enableControls);
    form.cmbVTEStatus().setEnabled(enableControls);

    form.txtSurname().setEnabled(enableControls);
    form.txtForename().setEnabled(enableControls);
    form.cmbIDType().setEnabled(enableControls);
    form.txtIDValue().setEnabled(enableControls);
    form.pdtDOB().setEnabled(enableControls);
    form.chkOver24Hours().setEnabled(enableControls);

    form.imbSearch().setEnabled(enableControls);
    form.imbClear().setEnabled(enableControls);

    form.getContextMenus().Clinical.getVTERiskAssessmentWorklistMenuCREATE_VTEASSESSMENTItem().setVisible(form.grdPatients().getValue() != null && VTEAsessmentStatus.REQUIRED.equals(form.grdPatients().getValue().getVTEAssessmentStatus()));
    form.getContextMenus().Clinical.getVTERiskAssessmentWorklistMenuVIEW_EDIT_VTEASSESSMENTItem().setVisible(form.grdPatients().getValue() != null && VTEAsessmentStatus.INPROGRESS.equals(form.grdPatients().getValue().getVTEAssessmentStatus()));
    form.getContextMenus().Clinical.getVTERiskAssessmentWorklistMenuREMOVEItem().setVisible(form.grdPatients().getValue() != null);
}
项目:AvoinApotti    文件:Logic.java   
private void fillFromInpatRecords() 
{
    WardDataViewVoCollection voCollWdv = domain.listInpatientsInBedsByWard(form.cmbWard().getValue());
    if(voCollWdv != null)
    {
        for (WardDataViewVo voWdv : voCollWdv)
        {
            grdInpatientsRow row = form.grdInpatients().getRows().newRow();
            PatientShort voPatient = voWdv.getPatient();
            if(voPatient != null)
            {
                if(voPatient.getNameIsNotNull())
                {
                    row.setColForename(voPatient.getName().getForename());
                    row.setColSurname(voPatient.getName().getSurname());
                }

                PatientId patId = voPatient.getDisplayId();
                row.setColDisplayId(patId != null ? patId.getValue() : null);               
                Integer age = voPatient.calculateAge();
                if(age != null)
                    row.setColAge(String.valueOf(age));

                if(voPatient.getHasActiveAlertsIsNotNull() && voPatient.getHasActiveAlerts())   //wdev-11083
                    row.setColAlert(form.getImages().Core.Alert16); //WDEV-18011 
                row.setColInfant(calculateInfants(voPatient));
            }

            if(voWdv.getBayIsNotNull())
                row.setColBay(voWdv.getBay().getName());
            if(voWdv.getBedIsNotNull())
                row.setColBedNumber(voWdv.getBed().getBedNumber());     

            row.setColPasEventHidden(voWdv.getPasEvent());

            //wdev-14784
            if( voWdv.getInpatEpisodeIsNotNull() && voWdv.getInpatEpisode().getVTEAssessmentStatusIsNotNull()  && ConfigFlag.UI.VTE_RISK_ASSESSMENT_FUNCTIONALITY.getValue() == true) //wdev-15062
            {
                row.setColVTEStatus(VTEAsessmentStatus.REQUIRED.equals(voWdv.getInpatEpisode().getVTEAssessmentStatus()) ? form.getImages().OCRR.Requested : (VTEAsessmentStatus.INPROGRESS.equals(voWdv.getInpatEpisode().getVTEAssessmentStatus()) ? form.getImages().OCRR.InProgress : null));

            }
            else
            {
                row.setColVTEStatus(null);
            }
            //----------

            row.setTooltip(buildRowTooltip(voWdv));
            row.setValue(voPatient);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void fillGridFromHomeLeaveANDInpatRecords()
{
    InpatientEpisodeLiteVoCollection voCollHL = form.getLocalContext().getOnHomeLeave();
    for (int i=0; i < voCollHL.size() ; i++ )
    {
        InpatientEpisodeLiteVo voHLInpatEpis = voCollHL.get(i);
        grdInpatientsRow row = form.grdInpatients().getRows().newRow();

        PatientShort voPatient = voHLInpatEpis.getPasEvent().getPatient();
        if(voPatient != null)
        {
            if(voPatient.getNameIsNotNull())
            {
                row.setColForename(voPatient.getName().getForename());
                row.setColSurname(voPatient.getName().getSurname());
            }

            PatientId patId = voPatient.getDisplayId();
            row.setColDisplayId(patId != null ? patId.getValue() : null);               
            Integer age = voPatient.calculateAge();
            if(age != null)
                row.setColAge(String.valueOf(age));

            if(voPatient.getHasActiveAlertsIsNotNull() && voPatient.getHasActiveAlerts())   //wdev-11083
                row.setColAlert(form.getImages().Core.Alert16); //WDEV-18011 
            row.setColInfant(calculateInfants(voPatient));
        }
        //wdev-14784
        if( voHLInpatEpis != null && voHLInpatEpis.getVTEAssessmentStatusIsNotNull() && ConfigFlag.UI.VTE_RISK_ASSESSMENT_FUNCTIONALITY.getValue() == true ) //wdev-15062
        {
            row.setColVTEStatus(VTEAsessmentStatus.REQUIRED.equals(voHLInpatEpis.getVTEAssessmentStatus()) ? form.getImages().OCRR.Requested : (VTEAsessmentStatus.INPROGRESS.equals(voHLInpatEpis.getVTEAssessmentStatus()) ? form.getImages().OCRR.InProgress : null));

        }
        else
        {
            row.setColVTEStatus(null);
        }
        //----------

        row.setColBay("");
        row.setColBedNumber("(H)");     

        row.setColPasEventHidden(voHLInpatEpis.getPasEvent());      

        row.setTooltip(buildRowTooltip(voHLInpatEpis.getPasEvent(),voHLInpatEpis)); //wdev-14784

        row.setValue(voHLInpatEpis.getPasEvent().getPatient());
    }

    fillFromInpatRecords();


    form.grdInpatients().sort(0);
}
项目:AvoinApotti    文件:Logic.java   
private String buildRowTooltip(PasEventADTVo voPE, InpatientEpisodeLiteVo voHLInpatEpis)
{
    if (voPE == null)
        throw new CodingRuntimeException("voPE cannot be null in method buildRowTooltip");

    String consultant = voPE.getConsultantIsNotNull() ? voPE.getConsultant().getIMosName() : "";
    String nhsNo =  voPE.getPatientIsNotNull() && voPE.getPatient().getNhsn() != null ?  voPE.getPatient().getNhsn().getValue() : "";
    //wdev-14784
    String vteStatus = "";
    //wdev-14784
    if( voHLInpatEpis != null && voHLInpatEpis.getVTEAssessmentStatusIsNotNull() && ConfigFlag.UI.VTE_RISK_ASSESSMENT_FUNCTIONALITY.getValue() == true) //wdev-15062
    {
        vteStatus = VTEAsessmentStatus.REQUIRED.equals(voHLInpatEpis.getVTEAssessmentStatus()) ? voHLInpatEpis.getVTEAssessmentStatus().getIItemText()  : (VTEAsessmentStatus.INPROGRESS.equals(voHLInpatEpis.getVTEAssessmentStatus()) ? voHLInpatEpis.getVTEAssessmentStatus().getIItemText() : (VTEAsessmentStatus.COMPLETED.equals(voHLInpatEpis.getVTEAssessmentStatus()) ? voHLInpatEpis.getVTEAssessmentStatus().getIItemText() : ""));  //wdev-14858 
    }

    //---------

    StringBuffer strTooltip = new StringBuffer();

    if( ConfigFlag.UI.VTE_RISK_ASSESSMENT_FUNCTIONALITY.getValue() == true) //wdev-15062
    {
        strTooltip.append("<html><head></head><body><p><font color='#FF0000'><strong>Other Detail</strong></font>" +
            "<table width='210' border='0'><tr><td width='70'><font color='#0033FF'>NHS Number :</font></td><td>" +
            nhsNo +
            "</td></tr><tr><td><font color='#0033FF'>Consultant :</font></td><td>" +
            consultant +
            "</td></tr><tr><td><font color='#0033FF'>VTE Assessment Status :</font></td><td>" +
            vteStatus +
            "</td></tr></table></p>" +
            "</body></html>");
    }
    else
    {
        strTooltip.append("<html><head></head><body><p><font color='#FF0000'><strong>Other Detail</strong></font>" +
                "<table width='210' border='0'><tr><td width='70'><font color='#0033FF'>NHS Number :</font></td><td>" +
                nhsNo +
                "</td></tr><tr><td><font color='#0033FF'>Consultant :</font></td><td>" +
                consultant +
                "</td></tr></table></p>" +
                "</body></html>");
    }

    return strTooltip.toString();
}
项目:AvoinApotti    文件:Logic.java   
private String buildRowTooltip(WardDataViewVo voWdv)
{
    if (voWdv == null)
        throw new CodingRuntimeException("voWdv cannot be null in method buildRowTooltip");

    String consultant = voWdv.getPasEventIsNotNull() && voWdv.getPasEvent().getConsultantIsNotNull() ? voWdv.getPasEvent().getConsultant().getIMosName() : "";
    String nhsNo =  voWdv.getPatientIsNotNull() && voWdv.getPatient().getNhsn() != null ?  voWdv.getPatient().getNhsn().getValue() : "";

    //wdev-14784
    String vteStatus = "";
    //wdev-14784
    if( voWdv.getInpatEpisodeIsNotNull() && voWdv.getInpatEpisode().getVTEAssessmentStatusIsNotNull()  && ConfigFlag.UI.VTE_RISK_ASSESSMENT_FUNCTIONALITY.getValue() == true) //wdev-15062
    {
        vteStatus = VTEAsessmentStatus.REQUIRED.equals(voWdv.getInpatEpisode().getVTEAssessmentStatus()) ? voWdv.getInpatEpisode().getVTEAssessmentStatus().getIItemText()  : (VTEAsessmentStatus.INPROGRESS.equals(voWdv.getInpatEpisode().getVTEAssessmentStatus()) ? voWdv.getInpatEpisode().getVTEAssessmentStatus().getIItemText() :(VTEAsessmentStatus.COMPLETED.equals(voWdv.getInpatEpisode().getVTEAssessmentStatus()) ? voWdv.getInpatEpisode().getVTEAssessmentStatus().getIItemText() :"")); //wdev-14858
    }

    //---------

    StringBuffer strTooltip = new StringBuffer();

    if( ConfigFlag.UI.VTE_RISK_ASSESSMENT_FUNCTIONALITY.getValue() == true)   //wdev-15062
    {
        strTooltip.append("<html><head></head><body><p><font color='#FF0000'><strong>Other Detail</strong></font>" +
            "<table width='210' border='0'><tr><td width='70'><font color='#0033FF'>NHS Number :</font></td><td>" +
            nhsNo +
            "</td></tr><tr><td><font color='#0033FF'>Consultant :</font></td><td>" +
            consultant +
            "</td></tr><tr><td><font color='#0033FF'>VTE Assessment Status :</font></td><td>" +
            vteStatus +
            "</td></tr></table></p>" +
            "</body></html>");
    }
    else
    {
        strTooltip.append("<html><head></head><body><p><font color='#FF0000'><strong>Other Detail</strong></font>" +
                "<table width='210' border='0'><tr><td width='70'><font color='#0033FF'>NHS Number :</font></td><td>" +
                nhsNo +
                "</td></tr><tr><td><font color='#0033FF'>Consultant :</font></td><td>" +
                consultant +
                "</td></tr></table></p>" +
                "</body></html>");
    }

    return strTooltip.toString();
}
项目:AvoinApotti    文件:Logic.java   
protected void onBtnVTERiskAssesssmentClick() throws PresentationLogicException 
{
    form.getGlobalContext().Core.setInpatientEpisodeForVTERiskAssessmentWorklistVo(domain.getVTERiskAssessmentWorklistById(form.getLocalContext().getInpatientEpForVTERiskAssessmentVo()));
    InpatientEpisodeForVTERiskAsessmentVo tempVo = domain.getInpatEpisodeForVTERiskAssessment(form.getLocalContext().getInpatientEpForVTERiskAssessmentVo()); //wdev-14858

    form.getGlobalContext().Core.setCreateVTERiskAssessmentOnDischarge(Boolean.TRUE);
    if( tempVo == null )    
    {

        if( form.getGlobalContext().Core.getVTERiskAssessmentShortVoIsNotNull() && form.getGlobalContext().Core.getInpatientEpisodeForVTERiskAssessmentWorklistVoIsNotNull()) //WDEV-16200
        {

            form.getGlobalContext().Core.setEditVTERiskAssessmentFromInpatientEpisode(true);
            engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] {FormMode.VIEW});

        }
        else
        {

            form.getGlobalContext().Core.setEditVTERiskAssessmentFromInpatientEpisode(null);
            form.getGlobalContext().Core.setVTERiskAssessmentShortVo(new VTERiskAssessmentShortVo());

            if (form.getGlobalContext().Core.getDischargeEpisodeBedInfoIsNotNull()) //WDEV-16200
            {
                if (form.getGlobalContext().Core.getDischargeEpisodeBedInfo().getPasEventIsNotNull())
                {
                    form.getGlobalContext().Core.setDischargeEpisodeBedInfo(domain.getDischargedEpisodeADT(form.getGlobalContext().Core.getDischargeEpisodeBedInfo().getPasEvent()));
                }

                if (VTEAsessmentStatus.REQUIRED.equals(form.getGlobalContext().Core.getDischargeEpisodeBedInfo().getVTEAssessmentStatus()))
                {
                    engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] { FormMode.EDIT });
                }
                else
                {
                    engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] { FormMode.VIEW });
                }
            }
            else
            {
                engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] { FormMode.VIEW });
            }
        }
    }
    else if(tempVo.getVTERiskAssessment() == null)
    {
        form.getGlobalContext().Core.setVTERiskAssessmentShortVo(null);
        form.getGlobalContext().Core.setEditVTERiskAssessmentFromInpatientEpisode(true);
        engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] {FormMode.VIEW});
    }
    else if( tempVo != null && tempVo.getVTERiskAssessmentIsNotNull())
    {
        form.getGlobalContext().Core.setVTERiskAssessmentShortVo(null);
        form.getGlobalContext().Core.setEditVTERiskAssessmentFromInpatientEpisode(true);
        engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] {FormMode.VIEW});

    }



}
项目:AvoinApotti    文件:BedAdmissionComponentImpl.java   
public AdmissionDetailVo saveEmergencyAdmissionInElectiveCase(AdmissionDetailVo admission, CareSpellVo careSpell, CatsReferralEmergencyAdmissionVo catsReferral, BedSpaceStateLiteVo bedSpaceState, WardStayVo wardStay, ConsultantStayVo consultant) throws DomainInterfaceException, StaleObjectException
{
    if (admission == null)
        throw new CodingRuntimeException("Admission Details parameter is mandatory.");

    if (careSpell == null)
        throw new CodingRuntimeException("Care Spell parameter is mandatory.");

    if (catsReferral == null)
        throw new CodingRuntimeException("Cats Referral parameter is mandatory.");


    PatientPathwayJourneyRefVo journey = createPatientJourney(catsReferral, admission);
    catsReferral.setJourney(journey);

    @SuppressWarnings("rawtypes")
    HashMap domMap = new HashMap();
    AdmissionDetail domAdmissionDetail = AdmissionDetailVoAssembler.extractAdmissionDetail(getDomainFactory(), admission, domMap);
    CareSpell domCareSpell = CareSpellVoAssembler.extractCareSpell(getDomainFactory(), careSpell, domMap);
    CatsReferral domCatsReferral = CatsReferralEmergencyAdmissionVoAssembler.extractCatsReferral(getDomainFactory(), catsReferral, domMap);
    domCatsReferral.getCareContext().setPasEvent(domAdmissionDetail.getPasEvent());

    getDomainFactory().save(domAdmissionDetail);
    getDomainFactory().save(domCareSpell);
    getDomainFactory().save(domCatsReferral);

    InpatientEpisode inpatEpisode = new InpatientEpisode();
    inpatEpisode.setPasEvent(domAdmissionDetail.getPasEvent());
    inpatEpisode.getPasEvent().setConsultant(domAdmissionDetail.getConsultant());
    inpatEpisode.setAdmissionDateTime(domAdmissionDetail.getAdmissionDateTime());
    inpatEpisode.setEstDischargeDate(null);
    inpatEpisode.setWardType(domAdmissionDetail.getWardType());

    if (wardStay != null)
        inpatEpisode.getWardStays().add(WardStayVoAssembler.extractWardStay(getDomainFactory(), wardStay, domMap));
    if (consultant != null)
        inpatEpisode.getConsultantStays().add(ConsultantStayVoAssembler.extractConsultantStay(getDomainFactory(), consultant, domMap));

    BedSpaceState doBedSpaceState = BedSpaceStateLiteVoAssembler.extractBedSpaceState(getDomainFactory(), bedSpaceState, domMap);   
    if(doBedSpaceState != null)
    {
        doBedSpaceState.setInpatientEpisode(inpatEpisode);  
        inpatEpisode.setBed(doBedSpaceState);
        inpatEpisode.setBedNo(doBedSpaceState.getBedSpace().getBedNumber());
    }

    if (wardStay != null && wardStay.getWardIsNotNull() && ConfigFlag.UI.VTE_RISK_ASSESSMENT_FUNCTIONALITY.getValue() == true)
    {
        Location doloc = getLocation(wardStay.getWard().getID_Location(), getDomainFactory());
        if (doloc != null && !Boolean.TRUE.equals(doloc.isVTEAsessmentNotRequired()))
        {
            inpatEpisode.setVTEAssessmentStatus(getDomLookup(VTEAsessmentStatus.REQUIRED));
        }
    }

    getDomainFactory().save(inpatEpisode);

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void addEpisodeRow(IVTERiskAssessment ivteRiskAssessments) //WDEV-15414 
{
    if(ivteRiskAssessments == null)
        return;

    grdPatientsRow row = form.grdPatients().getRows().newRow();

    if(ivteRiskAssessments.getPasEvent() != null)//WDEV-15414 
    {
        row.setColHospNumber(ivteRiskAssessments.getPasEvent().getPatient().getHospNum() != null ? ivteRiskAssessments.getPasEvent().getPatient().getHospNum().getValue() : null);//WDEV-15414 
        row.setTooltipForColHospNumber(row.getColHospNumber());

        row.setColSurname(ivteRiskAssessments.getPasEvent().getPatient().getName().getSurname());//WDEV-15414 
        row.setTooltipForColSurname(row.getColSurname());

        row.setColForename(ivteRiskAssessments.getPasEvent().getPatient().getName().getForename());//WDEV-15414 
        row.setTooltipForColForename(row.getColForename());

        row.setColDOB(ivteRiskAssessments.getPasEvent().getPatient().getDobIsNotNull() ? ivteRiskAssessments.getPasEvent().getPatient().getDob().toString() : null);//WDEV-15414 
        row.setTooltipForColDOB(row.getColDOB());

        WardStayVo admWard =  getMinById(ivteRiskAssessments.getWardStays()); //wdev-14992, WDEV-15414 
        //row.setColAdWard(inpatient.getPasEvent().getLocationIsNotNull() ? inpatient.getPasEvent().getLocation().getName() : null);
        row.setColAdWard(admWard != null && admWard.getWardIsNotNull() ? admWard.getWard().getName() : null); //wdev-14492
        row.setTooltipForColAdWard(row.getColAdWard());

        row.setColWard(ivteRiskAssessments.getPasEvent().getPatient().getWardIsNotNull() ? ivteRiskAssessments.getPasEvent().getPatient().getWard().getName() : null);//WDEV-15414 
        row.setTooltipForColWard(row.getColWard());

        row.setColConsultant(ivteRiskAssessments.getPasEvent().getConsultantIsNotNull() ? ivteRiskAssessments.getPasEvent().getConsultant().getIHcpName() : null);//WDEV-15414 
        row.setTooltipForColConsultant(row.getColConsultant());

        row.setColSpecialty(ivteRiskAssessments.getPasEvent().getSpecialtyIsNotNull() ? ivteRiskAssessments.getPasEvent().getSpecialty().getText() : null);//WDEV-15414 
        row.setTooltipForColSpecialty(row.getColSpecialty());
    }

    row.setColAdmissionDate(ivteRiskAssessments.getAdmissionDateTime() != null ? ivteRiskAssessments.getAdmissionDateTime().toString() : null);//WDEV-15414 
    row.setTooltipForColAdmissionDate(row.getColAdmissionDate());

    row.setColVTEStatus(VTEAsessmentStatus.REQUIRED.equals(ivteRiskAssessments.getVTEAssessmentStatus()) ? form.getImages().OCRR.Requested : (VTEAsessmentStatus.INPROGRESS.equals(ivteRiskAssessments.getVTEAssessmentStatus()) ? form.getImages().OCRR.InProgress : null));//WDEV-15414 
    row.setTooltipForColVTEStatus(ivteRiskAssessments.getVTEAssessmentStatus() != null ? ivteRiskAssessments.getVTEAssessmentStatus().getText() : null);//WDEV-15414 

    row.setValue(ivteRiskAssessments);//WDEV-15414 

    if(ivteRiskAssessments.getAdmissionDateTime() != null)//WDEV-15414 
    {
        DateTime admissionDate = (DateTime) ivteRiskAssessments.getAdmissionDateTime().clone();//WDEV-15414 
        DateTime kpi = admissionDate.addHours(ConfigFlag.UI.VTE_RISK_ASSESSMENT_KPI_EXCEEDED_PERIOD.getValue());

        if(kpi.isLessThan(new DateTime()) && !VTEAsessmentStatus.COMPLETED.equals(ivteRiskAssessments.getVTEAssessmentStatus()))//WDEV-15414 
        {
            row.setBackColor(ConfigFlag.UI.VTE_RISK_ASSESSMENT_EXCEEDED_KPI_COLOR.getValue());
            return;
        }

        DateTime currentDate = new DateTime();
        DateTime breachWarning = ((DateTime) kpi.clone()).addHours(-ConfigFlag.UI.VTE_RISK_ASSESSMENT_BREACH_WARNING_PERIOD.getValue());
        if(currentDate.isGreaterOrEqualThan(breachWarning) && currentDate.isLessOrEqualThan(kpi))
        {   
            row.setBackColor(ConfigFlag.UI.VTE_RISK_ASSESSMENT_BREACH_WARNING_COLOR.getValue());
        }
    }   
}
项目:AvoinApotti    文件:Logic.java   
private void createOrViewVTEAssessment(FormMode dialogMode) 
{
    if(form.grdPatients().getValue() == null)
        return;

    //WDEV-15986 - starts here
    WasVTERiskAssessmentStatusChangedVo wasChanged = domain.wasStatusChanged(form.grdPatients().getValue(), form.grdPatients().getValue().getVTEAssessmentStatus());

    if(wasChanged != null && wasChanged.getWasStatusChanged())
    {
        String message = "";

        if(wasChanged.getVTEStatus() == null)
        {
            message = "Selected Episode has been removed from VTE Worklist";
        }
        else if(VTEAsessmentStatus.REQUIRED.equals(form.grdPatients().getValue().getVTEAssessmentStatus()))
        {
            message = "A new VTE Assessment has been created for this Episode";
        }
        else if(VTEAsessmentStatus.INPROGRESS.equals(form.grdPatients().getValue().getVTEAssessmentStatus()))
        {
            if(VTEAsessmentStatus.COMPLETED.equals(wasChanged.getVTEStatus()))
            {
                message = "The VTE Assessment linked to this Episode has been completed";
            }
            else if(VTEAsessmentStatus.REQUIRED.equals(wasChanged.getVTEStatus()))
            {
                message = "The VTE Assessment linked to this Episode has been marked as Recorded in Error";
            }
        }

        if(message.length() > 0)
            engine.showMessage(message);

        if(wasChanged.getVTEStatus() == null || VTEAsessmentStatus.REQUIRED.equals(form.grdPatients().getValue().getVTEAssessmentStatus()))
        {
            open();
            return;
        }
    }
    //WDEV-15986 - ends here

    selectPatient();

    form.getGlobalContext().Core.setInpatientEpisodeForVTERiskAssessmentWorklistVo(form.grdPatients().getValue());
    engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] {dialogMode});
}
项目:AvoinApotti    文件:VTERiskAssessmentWorklistImpl.java   
public WasVTERiskAssessmentStatusChangedVo wasStatusChanged(IVTERiskAssessment episode,  VTEAsessmentStatus currentStatus)
{
    if(episode == null || episode.getId() == null)
        throw new CodingRuntimeException("Cannot check the status for a null Episode ID.");

    DomainFactory factory = getDomainFactory();
    String query = null;//WDEV-15414
    List<?> list = null;//WDEV-15414

    //WDEV-15414
    if(episode instanceof VTERiskAssessmentWorklistVo)
    {
        query = "select ie from InpatientEpisode as ie where ie.id = :EpisodeId";
    }
    //WDEV-15414
    else if(episode instanceof DischargedEpisodeForVTERiskAssessmentWorklistVo)
    {
        query = "select de from DischargedEpisode as de where de.id = :EpisodeId";
    }

    list = factory.find(query, new String[] {"EpisodeId"}, new Object[] {episode.getId()});//WDEV-15414

    IVTERiskAssessment currentEpisode = null;
    if(list != null && list.size() > 0)
    {
        if(episode instanceof VTERiskAssessmentWorklistVo)
        {
            currentEpisode = VTERiskAssessmentWorklistVoAssembler.create((InpatientEpisode) list.get(0));
        }
        else if(episode instanceof DischargedEpisodeForVTERiskAssessmentWorklistVo)
        {
            currentEpisode = DischargedEpisodeForVTERiskAssessmentWorklistVoAssembler.create((DischargedEpisode) list.get(0));
        }
    }

    if(currentEpisode == null || currentStatus == null)
        return null;

    WasVTERiskAssessmentStatusChangedVo wasChanged = new WasVTERiskAssessmentStatusChangedVo();
    if(currentStatus.equals(currentEpisode.getVTEAssessmentStatus()))
    {
        wasChanged.setWasStatusChanged(false);
        wasChanged.setVTEStatus(null);
    }
    else
    {
        wasChanged.setWasStatusChanged(true);
        wasChanged.setVTEStatus(currentEpisode.getVTEAssessmentStatus());
    }

    return wasChanged;
}
项目:openMAXIMS    文件:Logic.java   
private String buildRowTooltip(PasEventADTVo voPE, InpatientEpisodeLiteVo voHLInpatEpis)
{
    if (voPE == null)
        throw new CodingRuntimeException("voPE cannot be null in method buildRowTooltip");

    String consultant = voPE.getConsultantIsNotNull() ? voPE.getConsultant().getIMosName() : "";
    String nhsNo =  voPE.getPatientIsNotNull() && voPE.getPatient().getNHS() != null ?  voPE.getPatient().getNHS().getValue() : "";
    //wdev-14784
    String vteStatus = "";
    //wdev-14784
    if( voHLInpatEpis != null && voHLInpatEpis.getVTEAssessmentStatusIsNotNull() && ConfigFlag.UI.VTE_RISK_ASSESSMENT_FUNCTIONALITY.getValue() == true) //wdev-15062
    {
        vteStatus = VTEAsessmentStatus.REQUIRED.equals(voHLInpatEpis.getVTEAssessmentStatus()) ? voHLInpatEpis.getVTEAssessmentStatus().getIItemText()  : (VTEAsessmentStatus.INPROGRESS.equals(voHLInpatEpis.getVTEAssessmentStatus()) ? voHLInpatEpis.getVTEAssessmentStatus().getIItemText() : (VTEAsessmentStatus.COMPLETED.equals(voHLInpatEpis.getVTEAssessmentStatus()) ? voHLInpatEpis.getVTEAssessmentStatus().getIItemText() : ""));  //wdev-14858 
    }

    //---------

    StringBuffer strTooltip = new StringBuffer();

    if( ConfigFlag.UI.VTE_RISK_ASSESSMENT_FUNCTIONALITY.getValue() == true) //wdev-15062
    {
        strTooltip.append("<html><head></head><body><p><font color='#FF0000'><strong>Other Detail</strong></font>" +
            "<table width='210' border='0'><tr><td width='70'><font color='#0033FF'>NHS Number: </font></td><td>" +
            nhsNo +
            "</td></tr><tr><td><font color='#0033FF'>Consultant: </font></td><td>" +
            consultant +
            "</td></tr><tr><td><font color='#0033FF'>VTE Assessment Status: </font></td><td>" +
            vteStatus +
            "</td></tr></table></p>" +
            "</body></html>");
    }
    else
    {
        strTooltip.append("<html><head></head><body><p><font color='#FF0000'><strong>Other Detail</strong></font>" +
                "<table width='210' border='0'><tr><td width='70'><font color='#0033FF'>NHS Number: </font></td><td>" +
                nhsNo +
                "</td></tr><tr><td><font color='#0033FF'>Consultant: </font></td><td>" +
                consultant +
                "</td></tr></table></p>" +
                "</body></html>");
    }

    return strTooltip.toString();
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onDyngrdInpatientsCellButtonClicked(DynamicGridCell cell)
{
    form.dyngrdInpatients().setValue(cell.getRow().getValue());

    if  (form.dyngrdInpatients().getValue() == null)
        return;

    inpatientsGridSelectionChanged();

    InpatientEpisodeRefVo inpatientEpisode = null;
    VTEAssessmentStatusReason vteStatusReason = null;
    VTEAsessmentStatus vteStatus = null;

    if (form.dyngrdInpatients().getValue() instanceof  WardDataViewPatientVo) 
    {
        inpatientEpisode = ((WardDataViewPatientVo)form.dyngrdInpatients().getValue()).getInpatientEpisodeRef();
        vteStatusReason = ((WardDataViewPatientVo)form.dyngrdInpatients().getValue()).getVTEAssessmentStatusReason();
        vteStatus = ((WardDataViewPatientVo)form.dyngrdInpatients().getValue()).getVteAssessmentStatus();
    }
    else if (form.dyngrdInpatients().getValue() instanceof  WardDataViewVo)
    {
        inpatientEpisode = ((WardDataViewVo)form.dyngrdInpatients().getValue()).getInpatEpisode();

        if (inpatientEpisode != null)
        {
            vteStatusReason = ((WardDataViewVo)form.dyngrdInpatients().getValue()).getInpatEpisode().getVTEAssessmentStatusReason();
            vteStatus = ((WardDataViewVo)form.dyngrdInpatients().getValue()).getInpatEpisode().getVTEAssessmentStatus();
        }
    }

    if  (VTEAssessmentStatusReason.EXCLUDED.equals(vteStatusReason))
        return;

    form.getGlobalContext().Core.setInpatientEpisodeForVTERiskAssessmentWorklistVo(domain.getInpatientEpisodeForVTE(inpatientEpisode));

    if (VTEAsessmentStatus.REQUIRED.equals(vteStatus))
    {
        engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] {FormMode.EDIT});
    }
    else 
        engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] {FormMode.VIEW});

}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnVTERiskAssesssmentClick() throws PresentationLogicException 
{
    form.getGlobalContext().Core.setInpatientEpisodeForVTERiskAssessmentWorklistVo(domain.getVTEForInpatient(form.getLocalContext().getInpatientEpForVTERiskAssessmentVo()));
    InpatientEpisodeForVTERiskAsessmentVo tempVo = domain.getInpatEpisodeForVTERiskAssessment(form.getLocalContext().getInpatientEpForVTERiskAssessmentVo()); //wdev-14858

    form.getGlobalContext().Core.setCreateVTERiskAssessmentOnDischarge(Boolean.TRUE);
    if( tempVo == null )    
    {

        if( form.getGlobalContext().Core.getVTERiskAssessmentShortVoIsNotNull() && form.getGlobalContext().Core.getInpatientEpisodeForVTERiskAssessmentWorklistVoIsNotNull()) //WDEV-16200
        {

            form.getGlobalContext().Core.setEditVTERiskAssessmentFromInpatientEpisode(true);
            engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] {FormMode.VIEW});

        }
        else
        {

            form.getGlobalContext().Core.setEditVTERiskAssessmentFromInpatientEpisode(null);
            form.getGlobalContext().Core.setVTERiskAssessmentShortVo(new VTERiskAssessmentShortVo());

            if (form.getGlobalContext().Core.getDischargeEpisodeBedInfoIsNotNull()) //WDEV-16200
            {
                if (form.getGlobalContext().Core.getDischargeEpisodeBedInfo().getPasEventIsNotNull())
                {
                    form.getGlobalContext().Core.setDischargeEpisodeBedInfo(domain.getDischargedEpisodeADT(form.getGlobalContext().Core.getDischargeEpisodeBedInfo().getPasEvent()));
                }

                if (VTEAsessmentStatus.REQUIRED.equals(form.getGlobalContext().Core.getDischargeEpisodeBedInfo().getVTEAssessmentStatus()))
                {
                    engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] { FormMode.EDIT });
                }
                else
                {
                    engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] { FormMode.VIEW });
                }
            }
            else
            {
                engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] { FormMode.VIEW });
            }
        }
    }
    else if(tempVo.getVTERiskAssessment() == null && VTEAsessmentStatus.REQUIRED.equals(tempVo.getVTEAssessmentStatus())) //WDEV-22218
    {
        form.getGlobalContext().Core.setVTERiskAssessmentShortVo(null);
        form.getGlobalContext().Core.setEditVTERiskAssessmentFromInpatientEpisode(true);
        engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] {FormMode.EDIT});
    }
    else if( tempVo != null && tempVo.getVTERiskAssessmentIsNotNull())
    {
        form.getGlobalContext().Core.setVTERiskAssessmentShortVo(null);
        form.getGlobalContext().Core.setEditVTERiskAssessmentFromInpatientEpisode(true);
        engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] {FormMode.VIEW});

    }



}
项目:openMAXIMS    文件:ADTImpl.java   
void copyPreOpVTEtoEpisode(PatientSummaryRecord patientSummaryRecord,InpatientEpisode episode)
{
    episode.setVTERiskAssessment(patientSummaryRecord.getPreOpVTEAssessment());
    episode.setVTEAssessmentStatus(getDomLookup( VTEAsessmentStatus.COMPLETED));
}
项目:openMAXIMS    文件:ADTImpl.java   
public void vteOnAdmission(ims.core.admin.pas.domain.objects.InpatientEpisode ipDo,
        ims.core.patient.domain.objects.Patient domPatient,
        Boolean isElective) 
{
    if (ConfigFlag.UI.VTE_RISK_ASSESSMENT_FUNCTIONALITY.getValue())
    {
        VTEAssessmentConfig config = getVTEAssessmentConfig();

        if (isExcluded(ipDo.getPasEvent().getLocation(), ipDo.getPasEvent().getSpecialty(), config))
        {
            ipDo.setVTEAssessmentStatus(getDomLookup(VTEAsessmentStatus.COMPLETED));
            ipDo.setVTEAssessmentStatusReason(getDomLookup(VTEAssessmentStatusReason.EXCLUDED));
        }
        else
        {
            PatientSummaryRecord patientSummaryRecord = getSummaryRecord(domPatient);

            if (Boolean.TRUE.equals(isElective))
            {
                //check the PreOp VTE is within the configured max period
                if (patientSummaryRecord != null && patientSummaryRecord.getPreOpVTEAssessment() != null && isValidCompletedDate(ipDo.getAdmissionDateTime(), patientSummaryRecord.getPreOpVTECompletedDate(), config))
                {

                    if (patientSummaryRecord.getPreOpVTEValidationDate() == null)
                    {
                        copyPreOpVTEtoEpisode(patientSummaryRecord, ipDo);
                        ipDo.setVTEAssessmentStatus(getDomLookup(VTEAsessmentStatus.VALIDATION_REQUIRED));
                        ipDo.setVTEAssessmentStatusReason(null);
                    }
                    else if (patientSummaryRecord.getPreOpVTEValidationDate() != null)
                    {
                        copyPreOpVTEtoEpisode(patientSummaryRecord, ipDo);
                        ipDo.setVTEAssessmentStatus(getDomLookup(VTEAsessmentStatus.VALIDATED));
                        ipDo.setVTEAssessmentStatusReason(null);
                    }
                } 
                //check if there is an Inpatient VTE Assessment to link
                else if (newIpVTEAssessmentExists(patientSummaryRecord, ipDo.getAdmissionDateTime()))
                {
                    copyInpatientVTEtoEpisode(patientSummaryRecord, ipDo);
                } 
                // no PreOp or Inpatient VTE Assessments found
                else
                {
                    ipDo.setVTEAssessmentStatus(getDomLookup(VTEAsessmentStatus.REQUIRED));
                    ipDo.setVTEAssessmentStatusReason(null);
                }
            } 
            //if there is an Emergency Admission, only check for the Inpatient VTE Assessment
            else if (newIpVTEAssessmentExists(patientSummaryRecord, ipDo.getAdmissionDateTime()))
            {
                copyInpatientVTEtoEpisode(patientSummaryRecord, ipDo);
            }
            else
            {
                ipDo.setVTEAssessmentStatus(getDomLookup(VTEAsessmentStatus.REQUIRED));
                ipDo.setVTEAssessmentStatusReason(null);
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void updateControlsState() 
{

    boolean enableControls = !form.getTimers().gettimerRefresh().isEnabled();
    boolean isTciSelected = Boolean.TRUE.equals(form.chkTciForToday().getValue());
    boolean recordRequiresVte = form.dyngrdPatients().getValue() != null && VTEAsessmentStatus.REQUIRED.equals(((IVTERiskAssessment)form.dyngrdPatients().getValue()).getVTEAssessmentStatus());
    boolean recordHasExcludedVte = form.dyngrdPatients().getValue() != null && VTEAsessmentStatus.COMPLETED.equals(((IVTERiskAssessment)form.dyngrdPatients().getValue()).getVTEAssessmentStatus()) && VTEAssessmentStatusReason.EXCLUDED.equals(((IVTERiskAssessment)form.dyngrdPatients().getValue()).getVTEAssessmentStatusReason());
    boolean hideViewVteCM =  recordRequiresVte || recordHasExcludedVte;

    form.cmbHospital().setEnabled(enableControls);
    form.qmbWard().setEnabled(!isTciSelected && form.cmbHospital().getValue() != null && enableControls);
    form.qmbCurrentWard().setEnabled(form.cmbHospital().getValue() != null && enableControls);

    form.dtimFrom().setEnabled(!isTciSelected && enableControls);
    form.dtimTo().setEnabled(!isTciSelected && enableControls);

    form.ccConsultant().setEnabled(enableControls);
    form.cmbSpecialty().setEnabled(!isTciSelected && enableControls);
    form.cmbVTEStatus().setEnabled(!isTciSelected && enableControls);

    form.txtSurname().setEnabled(enableControls);
    form.txtForename().setEnabled(enableControls);
    form.cmbIDType().setEnabled(enableControls);
    form.txtIDValue().setEnabled(enableControls);
    form.pdtDOB().setEnabled(enableControls);
    form.chkOver24Hours().setEnabled(enableControls);
    form.GroupPatients().setEnabled(enableControls);
    form.chkTciForToday().setEnabled(enableControls);

    form.imbSearch().setEnabled(enableControls);
    form.imbClear().setEnabled(enableControls);

    form.getContextMenus().Clinical.hideAllVTERiskAssessmentWorklistMenuMenuItems();

    if (form.dyngrdPatients().getValue() instanceof IVTERiskAssessment)
    {
        form.getContextMenus().Clinical.getVTERiskAssessmentWorklistMenuCREATE_VTEASSESSMENTItem().setVisible(form.dyngrdPatients().getValue() != null && VTEAsessmentStatus.REQUIRED.equals(((IVTERiskAssessment)form.dyngrdPatients().getValue()).getVTEAssessmentStatus()));
        form.getContextMenus().Clinical.getVTERiskAssessmentWorklistMenuVIEW_EDIT_VTEASSESSMENTItem().setVisible(!hideViewVteCM);
        form.getContextMenus().Clinical.getVTERiskAssessmentWorklistMenuREMOVEItem().setVisible(form.dyngrdPatients().getValue() != null && VTEAsessmentStatus.REQUIRED.equals(((IVTERiskAssessment)form.dyngrdPatients().getValue()).getVTEAssessmentStatus()));
    }
}
项目:openMAXIMS    文件:Logic.java   
private void createOrViewVTEAssessment(FormMode dialogMode) 
{
    if (form.dyngrdPatients().getValue() == null)
        return;

    //WDEV-15986 - starts here
    WasVTERiskAssessmentStatusChangedVo wasChanged = domain.wasStatusChanged((IVTERiskAssessment)form.dyngrdPatients().getValue(), ((IVTERiskAssessment)form.dyngrdPatients().getValue()).getVTEAssessmentStatus());

    if(wasChanged != null && wasChanged.getWasStatusChanged())
    {
        String message = "";

        if(wasChanged.getVTEStatus() == null)
        {
            message = "Selected Episode has been removed from VTE Worklist";
        }
        else if(VTEAsessmentStatus.REQUIRED.equals(((IVTERiskAssessment)form.dyngrdPatients().getValue()).getVTEAssessmentStatus()))
        {
            message = "A new VTE Assessment has been created for this Episode";
        }
        else if(VTEAsessmentStatus.INPROGRESS.equals(((IVTERiskAssessment)form.dyngrdPatients().getValue()).getVTEAssessmentStatus()))
        {
            if(VTEAsessmentStatus.COMPLETED.equals(wasChanged.getVTEStatus()))
            {
                message = "The VTE Assessment linked to this Episode has been completed";
            }
            else if(VTEAsessmentStatus.REQUIRED.equals(wasChanged.getVTEStatus()))
            {
                message = "The VTE Assessment linked to this Episode has been marked as Recorded in Error";
            }
        }

        if(message.length() > 0)
            engine.showMessage(message);

        if(wasChanged.getVTEStatus() == null || VTEAsessmentStatus.REQUIRED.equals(((IVTERiskAssessment)form.dyngrdPatients().getValue()).getVTEAssessmentStatus()))
        {
            open();
            return;
        }
    }
    //WDEV-15986 - ends here

    selectPatient();

    form.getGlobalContext().Core.setInpatientEpisodeForVTERiskAssessmentWorklistVo((IVTERiskAssessment)form.dyngrdPatients().getValue());
    engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] {dialogMode});
}