Java 类ims.clinical.vo.WasVTERiskAssessmentStatusChangedVo 实例源码

项目: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 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});
}
项目:openMAXIMS    文件: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 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});
}
项目:openMAXIMS    文件: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-linux    文件: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});
}
项目:openmaxims-linux    文件: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;
}