Java 类ims.emergency.vo.EpisodeDetailsVo 实例源码

项目:AvoinApotti    文件:Logic.java   
protected void onBtnRTAClick() throws PresentationLogicException
{
    EpisodeDetailsVo tempVo = form.getLocalContext().getSelectedEmergencyEpisode();
    if (tempVo != null)
    {
        if (form.getLocalContext().getRTAIsNotNull())
            form.getGlobalContext().Emergency.setRTA(form.getLocalContext().getRTA());
        else
            form.getGlobalContext().Emergency.setRTA(tempVo.getRTADetails());
    }
    else
    {
        if (form.getLocalContext().getRTAIsNotNull())
            form.getGlobalContext().Emergency.setRTA(form.getLocalContext().getRTA());
        else
            form.getGlobalContext().Emergency.setRTA(null);
    }

    engine.open(form.getForms().Emergency.RTADialog, new Object[] { form.getMode() });
}
项目:AvoinApotti    文件:Logic.java   
protected void onBtnRTA1Click() throws PresentationLogicException
{
    EpisodeDetailsVo tempVo = form.getLocalContext().getSelectedEmergencyEpisode();
    if (tempVo != null)
    {
        if (form.getLocalContext().getRTAIsNotNull())
            form.getGlobalContext().Emergency.setRTA(form.getLocalContext().getRTA());
        else
            form.getGlobalContext().Emergency.setRTA(tempVo.getRTADetails());
    }
    else
    {
        if (form.getLocalContext().getRTAIsNotNull())
            form.getGlobalContext().Emergency.setRTA(form.getLocalContext().getRTA());
        else
            form.getGlobalContext().Emergency.setRTA(null);
    }

    engine.open(form.getForms().Emergency.RTADialog, new Object[] { form.getMode() });

}
项目:AvoinApotti    文件:Logic.java   
private void populateGrdDisplay(EpisodeDetailsVoCollection voCollEpisodeDetails)
{
    if (voCollEpisodeDetails == null)
        return;

    grdDisplayRow  episodeDetailsRow;

    for (int i = 0; i < voCollEpisodeDetails.size(); i++)
    {   
        EpisodeDetailsVo voEpisodeDetails = voCollEpisodeDetails.get(i);

        episodeDetailsRow = form.grdDisplay().getRows().newRow();       
        episodeDetailsRow.setcolDateTime(voEpisodeDetails.getInjuryDateTime());
        episodeDetailsRow.setcolPatCategory(voEpisodeDetails.getCategory().getText());
        episodeDetailsRow.setcolEpisodeNo(voEpisodeDetails.getID_EmergencyEpisode().toString());

        episodeDetailsRow.setCollapsedImage(form.getImages().Core.CareSpell);
        episodeDetailsRow.setExpandedImage(form.getImages().Core.CareSpell);

        episodeDetailsRow.setBackColor(Color.Bisque);
        episodeDetailsRow.setBold(true);
        episodeDetailsRow.setValue(voEpisodeDetails);
    }   
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onGrdDisplaySelectionChanged() throws PresentationLogicException
{
    if (form.grdDisplay().getSelectedRow().getValue() != null &&
            form.grdDisplay().getSelectedRow().getValue() instanceof EpisodeDetailsVo)
    {
        AttendanceDetailsVoCollection voCollAttendanceDetails = domain.listAttendanceByEpisodeDetails((EpisodeDetailsVo) form.grdDisplay().getSelectedRow().getValue());

        if (voCollAttendanceDetails != null)
        {
            form.grdDisplay().getSelectedRow().setExpanded(true);

            for (int j = 0; j < voCollAttendanceDetails.size(); j++)
            {
                AttendanceDetailsVo voEmergencyAttendances = voCollAttendanceDetails.get(j);

                grdDisplayRow episodeDetailsRow = form.grdDisplay().getSelectedRow().getRows().newRow();    

                episodeDetailsRow.setcolDateTime(voEmergencyAttendances.getArrivalDateTime());
                episodeDetailsRow.setcolPatCategory(voEmergencyAttendances.getOutcome() != null ? voEmergencyAttendances.getOutcome().getText() :  null);
                episodeDetailsRow.setcolEpisodeNo(voEmergencyAttendances.getID_EmergencyAttendance().toString());
            }
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    DateTime date1 = null;
    DateTime date2 = null;
    if(ob1 instanceof EpisodeDetailsVo)
    {
        EpisodeDetailsVo ps1 = (EpisodeDetailsVo)ob1;
        date1 = ps1.getInjuryDateTime();
    }
    if(ob2 instanceof EpisodeDetailsVo)
    {
        EpisodeDetailsVo ps2 = (EpisodeDetailsVo)ob2;
        date2 = ps2.getInjuryDateTime();
    }
    if(date1 != null )
        return  date1.compareTo(date2)*direction;
    if(date2 != null)
        return (-1)*direction;

    return 0;
}
项目:AvoinApotti    文件:Logic.java   
private void updateControlsState()
{
    boolean isEpisodeSelected = form.grdPrevious().getValue() instanceof EpisodeDetailsVo;

    form.btnOK().setEnabled(isEpisodeSelected);
    form.btnOK().setVisible(!isAttendanceHistory());
    form.btnCancel().setEnabled(true);
    form.btnCancel().setVisible(!isAttendanceHistory());

    form.btnClose().setEnabled(true);
    form.btnClose().setVisible(isAttendanceHistory());

    boolean isAttendanceSelected = form.grdPrevious().getValue() instanceof AttendanceDetailsVo;

    form.btnPrintCASCard().setEnabled(isAttendanceSelected);
    form.btnPrintSmallLabels().setEnabled(isAttendanceSelected);
    form.btnPrintLargeLabels().setEnabled(isAttendanceSelected);
    form.btnPrintGPLetters().setEnabled(isAttendanceSelected);
}
项目:AvoinApotti    文件:EmergencyAttendanceDetailsCcImpl.java   
public EpisodeDetailsVo getEmergencyEpisode(EmergencyEpisodeRefVo episodeId) 
{
    if( episodeId == null)
        throw new CodingRuntimeException("EmergencyEpisodeRefVo not provided");

    DomainFactory factory = getDomainFactory();

    String hsql = "select e1_1 from EmergencyEpisode as e1_1 where  (e1_1.id = :id)";

    List emergency = factory.find(hsql, new String[] {"id"}, new Object[] {episodeId.getID_EmergencyEpisode()});
    if(emergency != null && emergency.size() > 0)
    {
        EpisodeDetailsVoCollection EpisodeColl = EpisodeDetailsVoAssembler.createEpisodeDetailsVoCollectionFromEmergencyEpisode(emergency);
        if(EpisodeColl != null && EpisodeColl.size() > 0)
            return EpisodeColl.get(0);
    }
    return null;


}
项目:AvoinApotti    文件:AttendanceDetailsImpl.java   
public EpisodeDetailsVo getEmergencyEpisode(EmergencyEpisodeRefVo episodeId) 
{
    if( episodeId == null)
        throw new CodingRuntimeException("EmergencyEpisodeRefVo not provided");

    DomainFactory factory = getDomainFactory();

    String hsql = "select e1_1 from EmergencyEpisode as e1_1 where  (e1_1.id = :id)";

    List emergency = factory.find(hsql, new String[] {"id"}, new Object[] {episodeId.getID_EmergencyEpisode()});
    if(emergency != null && emergency.size() > 0)
    {
        EpisodeDetailsVoCollection EpisodeColl = EpisodeDetailsVoAssembler.createEpisodeDetailsVoCollectionFromEmergencyEpisode(emergency);
        if(EpisodeColl != null && EpisodeColl.size() > 0)
            return EpisodeColl.get(0);
    }
    return null;


}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnRTAClick() throws PresentationLogicException
{
    EpisodeDetailsVo tempVo = form.getLocalContext().getSelectedEmergencyEpisode();
    if (tempVo != null)
    {
        if (form.getLocalContext().getRTAIsNotNull())
            form.getGlobalContext().Emergency.setRTA(form.getLocalContext().getRTA());
        else
            form.getGlobalContext().Emergency.setRTA(tempVo.getRTADetails());
    }
    else
    {
        if (form.getLocalContext().getRTAIsNotNull())
            form.getGlobalContext().Emergency.setRTA(form.getLocalContext().getRTA());
        else
            form.getGlobalContext().Emergency.setRTA(null);
    }

    engine.open(form.getForms().Emergency.RTADialog, new Object[] { form.getMode() });
}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnRTA1Click() throws PresentationLogicException
{
    EpisodeDetailsVo tempVo = form.getLocalContext().getSelectedEmergencyEpisode();
    if (tempVo != null)
    {
        if (form.getLocalContext().getRTAIsNotNull())
            form.getGlobalContext().Emergency.setRTA(form.getLocalContext().getRTA());
        else
            form.getGlobalContext().Emergency.setRTA(tempVo.getRTADetails());
    }
    else
    {
        if (form.getLocalContext().getRTAIsNotNull())
            form.getGlobalContext().Emergency.setRTA(form.getLocalContext().getRTA());
        else
            form.getGlobalContext().Emergency.setRTA(null);
    }

    engine.open(form.getForms().Emergency.RTADialog, new Object[] { form.getMode() });

}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onGrdDisplaySelectionChanged() throws PresentationLogicException
{
    if (form.grdDisplay().getSelectedRow().getValue() != null &&
            form.grdDisplay().getSelectedRow().getValue() instanceof EpisodeDetailsVo)
    {
        EmergencyAttendanceLiteVoCollection voCollAttendanceDetails = domain.listAttendanceByEpisodeDetails((EpisodeDetailsVo) form.grdDisplay().getSelectedRow().getValue());

        if (voCollAttendanceDetails != null)
        {
            form.grdDisplay().getSelectedRow().setExpanded(true);

            for (EmergencyAttendanceLiteVo voEmergencyAttendances : voCollAttendanceDetails)
            {
                grdDisplayRow episodeDetailsRow = form.grdDisplay().getSelectedRow().getRows().newRow();    

                episodeDetailsRow.setcolDateTime(voEmergencyAttendances.getArrivalDateTime());
                episodeDetailsRow.setcolPatCategory(voEmergencyAttendances.getOutcome() != null ? voEmergencyAttendances.getOutcome().getText() :  null);
                episodeDetailsRow.setcolEpisodeNo(voEmergencyAttendances.getID_EmergencyAttendance().toString());
            }
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    DateTime date1 = null;
    DateTime date2 = null;
    if(ob1 instanceof EpisodeDetailsVo)
    {
        EpisodeDetailsVo ps1 = (EpisodeDetailsVo)ob1;
        date1 = ps1.getInjuryDateTime();
    }
    if(ob2 instanceof EpisodeDetailsVo)
    {
        EpisodeDetailsVo ps2 = (EpisodeDetailsVo)ob2;
        date2 = ps2.getInjuryDateTime();
    }
    if(date1 != null )
        return  date1.compareTo(date2)*direction;
    if(date2 != null)
        return (-1)*direction;

    return 0;
}
项目:openMAXIMS    文件:EmergencyAttendanceDetailsCcImpl.java   
public EpisodeDetailsVo getEmergencyEpisode(EmergencyEpisodeRefVo episodeId) 
{
    if( episodeId == null)
        throw new CodingRuntimeException("EmergencyEpisodeRefVo not provided");

    DomainFactory factory = getDomainFactory();

    String hsql = "select e1_1 from EmergencyEpisode as e1_1 where  (e1_1.id = :id)";

    List emergency = factory.find(hsql, new String[] {"id"}, new Object[] {episodeId.getID_EmergencyEpisode()});
    if(emergency != null && emergency.size() > 0)
    {
        EpisodeDetailsVoCollection EpisodeColl = EpisodeDetailsVoAssembler.createEpisodeDetailsVoCollectionFromEmergencyEpisode(emergency);
        if(EpisodeColl != null && EpisodeColl.size() > 0)
            return EpisodeColl.get(0);
    }
    return null;


}
项目:openMAXIMS    文件:AttendanceDetailsImpl.java   
public EpisodeDetailsVo getEmergencyEpisode(EmergencyEpisodeRefVo episodeId) 
{
    if( episodeId == null)
        throw new CodingRuntimeException("EmergencyEpisodeRefVo not provided");

    DomainFactory factory = getDomainFactory();

    String hsql = "select e1_1 from EmergencyEpisode as e1_1 where  (e1_1.id = :id)";

    List emergency = factory.find(hsql, new String[] {"id"}, new Object[] {episodeId.getID_EmergencyEpisode()});
    if(emergency != null && emergency.size() > 0)
    {
        EpisodeDetailsVoCollection EpisodeColl = EpisodeDetailsVoAssembler.createEpisodeDetailsVoCollectionFromEmergencyEpisode(emergency);
        if(EpisodeColl != null && EpisodeColl.size() > 0)
            return EpisodeColl.get(0);
    }
    return null;


}
项目:openMAXIMS    文件:EmergencyAttendancesDialogImpl.java   
public EpisodeDetailsVo getEmergencyEpisodeByCareContext(CareContextRefVo careContextRef)
{
    if(careContextRef == null || careContextRef.getID_CareContext() == null)
        throw new CodingRuntimeException("CareContext not provided");

    DomainFactory factory = getDomainFactory();

    String query = "select e1_1.emergencyEpisode from EmergencyAttendance as e1_1 where ( e1_1.careContext.id = :careContextID )  ";
    List<?> list= factory.find(query, new String[] {"careContextID"}, new Object[] {careContextRef.getID_CareContext()});

    if(list == null || list.size() == 0 )
    {
         return null;
    }

    return EpisodeDetailsVoAssembler.create((EmergencyEpisode) list.get(0));    
}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnRTAClick() throws PresentationLogicException
{
    EpisodeDetailsVo tempVo = form.getLocalContext().getSelectedEmergencyEpisode();
    if (tempVo != null)
    {
        if (form.getLocalContext().getRTAIsNotNull())
            form.getGlobalContext().Emergency.setRTA(form.getLocalContext().getRTA());
        else
            form.getGlobalContext().Emergency.setRTA(tempVo.getRTADetails());
    }
    else
    {
        if (form.getLocalContext().getRTAIsNotNull())
            form.getGlobalContext().Emergency.setRTA(form.getLocalContext().getRTA());
        else
            form.getGlobalContext().Emergency.setRTA(null);
    }

    engine.open(form.getForms().Emergency.RTADialog, new Object[] { form.getMode() });
}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnRTA1Click() throws PresentationLogicException
{
    EpisodeDetailsVo tempVo = form.getLocalContext().getSelectedEmergencyEpisode();
    if (tempVo != null)
    {
        if (form.getLocalContext().getRTAIsNotNull())
            form.getGlobalContext().Emergency.setRTA(form.getLocalContext().getRTA());
        else
            form.getGlobalContext().Emergency.setRTA(tempVo.getRTADetails());
    }
    else
    {
        if (form.getLocalContext().getRTAIsNotNull())
            form.getGlobalContext().Emergency.setRTA(form.getLocalContext().getRTA());
        else
            form.getGlobalContext().Emergency.setRTA(null);
    }

    engine.open(form.getForms().Emergency.RTADialog, new Object[] { form.getMode() });

}
项目:openMAXIMS    文件:Logic.java   
private void populateGrdDisplay(EpisodeDetailsVoCollection voCollEpisodeDetails)
{
    if (voCollEpisodeDetails == null)
        return;

    grdDisplayRow  episodeDetailsRow;

    for (int i = 0; i < voCollEpisodeDetails.size(); i++)
    {   
        EpisodeDetailsVo voEpisodeDetails = voCollEpisodeDetails.get(i);

        episodeDetailsRow = form.grdDisplay().getRows().newRow();       
        episodeDetailsRow.setcolDateTime(voEpisodeDetails.getInjuryDateTime());
        episodeDetailsRow.setcolPatCategory(voEpisodeDetails.getCategory().getText());
        episodeDetailsRow.setcolEpisodeNo(voEpisodeDetails.getID_EmergencyEpisode().toString());

        episodeDetailsRow.setCollapsedImage(form.getImages().Core.CareSpell);
        episodeDetailsRow.setExpandedImage(form.getImages().Core.CareSpell);

        episodeDetailsRow.setBackColor(Color.Bisque);
        episodeDetailsRow.setBold(true);
        episodeDetailsRow.setValue(voEpisodeDetails);
    }   
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onGrdDisplaySelectionChanged() throws PresentationLogicException
{
    if (form.grdDisplay().getSelectedRow().getValue() != null &&
            form.grdDisplay().getSelectedRow().getValue() instanceof EpisodeDetailsVo)
    {
        AttendanceDetailsVoCollection voCollAttendanceDetails = domain.listAttendanceByEpisodeDetails((EpisodeDetailsVo) form.grdDisplay().getSelectedRow().getValue());

        if (voCollAttendanceDetails != null)
        {
            form.grdDisplay().getSelectedRow().setExpanded(true);

            for (int j = 0; j < voCollAttendanceDetails.size(); j++)
            {
                AttendanceDetailsVo voEmergencyAttendances = voCollAttendanceDetails.get(j);

                grdDisplayRow episodeDetailsRow = form.grdDisplay().getSelectedRow().getRows().newRow();    

                episodeDetailsRow.setcolDateTime(voEmergencyAttendances.getArrivalDateTime());
                episodeDetailsRow.setcolPatCategory(voEmergencyAttendances.getOutcome() != null ? voEmergencyAttendances.getOutcome().getText() :  null);
                episodeDetailsRow.setcolEpisodeNo(voEmergencyAttendances.getID_EmergencyAttendance().toString());
            }
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    DateTime date1 = null;
    DateTime date2 = null;
    if(ob1 instanceof EpisodeDetailsVo)
    {
        EpisodeDetailsVo ps1 = (EpisodeDetailsVo)ob1;
        date1 = ps1.getInjuryDateTime();
    }
    if(ob2 instanceof EpisodeDetailsVo)
    {
        EpisodeDetailsVo ps2 = (EpisodeDetailsVo)ob2;
        date2 = ps2.getInjuryDateTime();
    }
    if(date1 != null )
        return  date1.compareTo(date2)*direction;
    if(date2 != null)
        return (-1)*direction;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
private void updateControlsState()
{
    boolean isEpisodeSelected = form.grdPrevious().getValue() instanceof EpisodeDetailsVo;

    form.btnOK().setEnabled(isEpisodeSelected);
    form.btnOK().setVisible(!isAttendanceHistory());
    form.btnCancel().setEnabled(true);
    form.btnCancel().setVisible(!isAttendanceHistory());

    form.btnClose().setEnabled(true);
    form.btnClose().setVisible(isAttendanceHistory());

    boolean isAttendanceSelected = form.grdPrevious().getValue() instanceof AttendanceDetailsVo;

    form.btnPrintCASCard().setEnabled(isAttendanceSelected);
    form.btnPrintSmallLabels().setEnabled(isAttendanceSelected);
    form.btnPrintLargeLabels().setEnabled(isAttendanceSelected);
    form.btnPrintGPLetters().setEnabled(isAttendanceSelected);
}
项目:openMAXIMS    文件:EmergencyAttendanceDetailsCcImpl.java   
public EpisodeDetailsVo getEmergencyEpisode(EmergencyEpisodeRefVo episodeId) 
{
    if( episodeId == null)
        throw new CodingRuntimeException("EmergencyEpisodeRefVo not provided");

    DomainFactory factory = getDomainFactory();

    String hsql = "select e1_1 from EmergencyEpisode as e1_1 where  (e1_1.id = :id)";

    List emergency = factory.find(hsql, new String[] {"id"}, new Object[] {episodeId.getID_EmergencyEpisode()});
    if(emergency != null && emergency.size() > 0)
    {
        EpisodeDetailsVoCollection EpisodeColl = EpisodeDetailsVoAssembler.createEpisodeDetailsVoCollectionFromEmergencyEpisode(emergency);
        if(EpisodeColl != null && EpisodeColl.size() > 0)
            return EpisodeColl.get(0);
    }
    return null;


}
项目:openMAXIMS    文件:AttendanceDetailsImpl.java   
public EpisodeDetailsVo getEmergencyEpisode(EmergencyEpisodeRefVo episodeId) 
{
    if( episodeId == null)
        throw new CodingRuntimeException("EmergencyEpisodeRefVo not provided");

    DomainFactory factory = getDomainFactory();

    String hsql = "select e1_1 from EmergencyEpisode as e1_1 where  (e1_1.id = :id)";

    List emergency = factory.find(hsql, new String[] {"id"}, new Object[] {episodeId.getID_EmergencyEpisode()});
    if(emergency != null && emergency.size() > 0)
    {
        EpisodeDetailsVoCollection EpisodeColl = EpisodeDetailsVoAssembler.createEpisodeDetailsVoCollectionFromEmergencyEpisode(emergency);
        if(EpisodeColl != null && EpisodeColl.size() > 0)
            return EpisodeColl.get(0);
    }
    return null;


}
项目:openmaxims-linux    文件:Logic.java   
protected void onBtnRTAClick() throws PresentationLogicException
{
    EpisodeDetailsVo tempVo = form.getLocalContext().getSelectedEmergencyEpisode();
    if (tempVo != null)
    {
        if (form.getLocalContext().getRTAIsNotNull())
            form.getGlobalContext().Emergency.setRTA(form.getLocalContext().getRTA());
        else
            form.getGlobalContext().Emergency.setRTA(tempVo.getRTADetails());
    }
    else
    {
        if (form.getLocalContext().getRTAIsNotNull())
            form.getGlobalContext().Emergency.setRTA(form.getLocalContext().getRTA());
        else
            form.getGlobalContext().Emergency.setRTA(null);
    }

    engine.open(form.getForms().Emergency.RTADialog, new Object[] { form.getMode() });
}
项目:openmaxims-linux    文件:Logic.java   
protected void onBtnRTA1Click() throws PresentationLogicException
{
    EpisodeDetailsVo tempVo = form.getLocalContext().getSelectedEmergencyEpisode();
    if (tempVo != null)
    {
        if (form.getLocalContext().getRTAIsNotNull())
            form.getGlobalContext().Emergency.setRTA(form.getLocalContext().getRTA());
        else
            form.getGlobalContext().Emergency.setRTA(tempVo.getRTADetails());
    }
    else
    {
        if (form.getLocalContext().getRTAIsNotNull())
            form.getGlobalContext().Emergency.setRTA(form.getLocalContext().getRTA());
        else
            form.getGlobalContext().Emergency.setRTA(null);
    }

    engine.open(form.getForms().Emergency.RTADialog, new Object[] { form.getMode() });

}
项目:openmaxims-linux    文件:Logic.java   
private void populateGrdDisplay(EpisodeDetailsVoCollection voCollEpisodeDetails)
{
    if (voCollEpisodeDetails == null)
        return;

    grdDisplayRow  episodeDetailsRow;

    for (int i = 0; i < voCollEpisodeDetails.size(); i++)
    {   
        EpisodeDetailsVo voEpisodeDetails = voCollEpisodeDetails.get(i);

        episodeDetailsRow = form.grdDisplay().getRows().newRow();       
        episodeDetailsRow.setcolDateTime(voEpisodeDetails.getInjuryDateTime());
        episodeDetailsRow.setcolPatCategory(voEpisodeDetails.getCategory().getText());
        episodeDetailsRow.setcolEpisodeNo(voEpisodeDetails.getID_EmergencyEpisode().toString());

        episodeDetailsRow.setCollapsedImage(form.getImages().Core.CareSpell);
        episodeDetailsRow.setExpandedImage(form.getImages().Core.CareSpell);

        episodeDetailsRow.setBackColor(Color.Bisque);
        episodeDetailsRow.setBold(true);
        episodeDetailsRow.setValue(voEpisodeDetails);
    }   
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onGrdDisplaySelectionChanged() throws PresentationLogicException
{
    if (form.grdDisplay().getSelectedRow().getValue() != null &&
            form.grdDisplay().getSelectedRow().getValue() instanceof EpisodeDetailsVo)
    {
        AttendanceDetailsVoCollection voCollAttendanceDetails = domain.listAttendanceByEpisodeDetails((EpisodeDetailsVo) form.grdDisplay().getSelectedRow().getValue());

        if (voCollAttendanceDetails != null)
        {
            form.grdDisplay().getSelectedRow().setExpanded(true);

            for (int j = 0; j < voCollAttendanceDetails.size(); j++)
            {
                AttendanceDetailsVo voEmergencyAttendances = voCollAttendanceDetails.get(j);

                grdDisplayRow episodeDetailsRow = form.grdDisplay().getSelectedRow().getRows().newRow();    

                episodeDetailsRow.setcolDateTime(voEmergencyAttendances.getArrivalDateTime());
                episodeDetailsRow.setcolPatCategory(voEmergencyAttendances.getOutcome() != null ? voEmergencyAttendances.getOutcome().getText() :  null);
                episodeDetailsRow.setcolEpisodeNo(voEmergencyAttendances.getID_EmergencyAttendance().toString());
            }
        }
    }

}
项目:openmaxims-linux    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    DateTime date1 = null;
    DateTime date2 = null;
    if(ob1 instanceof EpisodeDetailsVo)
    {
        EpisodeDetailsVo ps1 = (EpisodeDetailsVo)ob1;
        date1 = ps1.getInjuryDateTime();
    }
    if(ob2 instanceof EpisodeDetailsVo)
    {
        EpisodeDetailsVo ps2 = (EpisodeDetailsVo)ob2;
        date2 = ps2.getInjuryDateTime();
    }
    if(date1 != null )
        return  date1.compareTo(date2)*direction;
    if(date2 != null)
        return (-1)*direction;

    return 0;
}
项目:openmaxims-linux    文件:Logic.java   
private void updateControlsState()
{
    boolean isEpisodeSelected = form.grdPrevious().getValue() instanceof EpisodeDetailsVo;

    form.btnOK().setEnabled(isEpisodeSelected);
    form.btnOK().setVisible(!isAttendanceHistory());
    form.btnCancel().setEnabled(true);
    form.btnCancel().setVisible(!isAttendanceHistory());

    form.btnClose().setEnabled(true);
    form.btnClose().setVisible(isAttendanceHistory());

    boolean isAttendanceSelected = form.grdPrevious().getValue() instanceof AttendanceDetailsVo;

    form.btnPrintCASCard().setEnabled(isAttendanceSelected);
    form.btnPrintSmallLabels().setEnabled(isAttendanceSelected);
    form.btnPrintLargeLabels().setEnabled(isAttendanceSelected);
    form.btnPrintGPLetters().setEnabled(isAttendanceSelected);
}
项目:openmaxims-linux    文件:EmergencyAttendanceDetailsCcImpl.java   
public EpisodeDetailsVo getEmergencyEpisode(EmergencyEpisodeRefVo episodeId) 
{
    if( episodeId == null)
        throw new CodingRuntimeException("EmergencyEpisodeRefVo not provided");

    DomainFactory factory = getDomainFactory();

    String hsql = "select e1_1 from EmergencyEpisode as e1_1 where  (e1_1.id = :id)";

    List emergency = factory.find(hsql, new String[] {"id"}, new Object[] {episodeId.getID_EmergencyEpisode()});
    if(emergency != null && emergency.size() > 0)
    {
        EpisodeDetailsVoCollection EpisodeColl = EpisodeDetailsVoAssembler.createEpisodeDetailsVoCollectionFromEmergencyEpisode(emergency);
        if(EpisodeColl != null && EpisodeColl.size() > 0)
            return EpisodeColl.get(0);
    }
    return null;


}
项目:openmaxims-linux    文件:AttendanceDetailsImpl.java   
public EpisodeDetailsVo getEmergencyEpisode(EmergencyEpisodeRefVo episodeId) 
{
    if( episodeId == null)
        throw new CodingRuntimeException("EmergencyEpisodeRefVo not provided");

    DomainFactory factory = getDomainFactory();

    String hsql = "select e1_1 from EmergencyEpisode as e1_1 where  (e1_1.id = :id)";

    List emergency = factory.find(hsql, new String[] {"id"}, new Object[] {episodeId.getID_EmergencyEpisode()});
    if(emergency != null && emergency.size() > 0)
    {
        EpisodeDetailsVoCollection EpisodeColl = EpisodeDetailsVoAssembler.createEpisodeDetailsVoCollectionFromEmergencyEpisode(emergency);
        if(EpisodeColl != null && EpisodeColl.size() > 0)
            return EpisodeColl.get(0);
    }
    return null;


}
项目:AvoinApotti    文件:Logic.java   
private void createCareContextForAttendance(EpisodeDetailsVo voEpisodeDetails, AttendanceDetailsVo voAttendanceDetails)
{
    EpisodeofCareVo episodeOfCare = domain.getEpisodeOfCare(voEpisodeDetails.getEpisodeOfCare().getID_EpisodeOfCare());
    CareSpellVo careSpell = domain.getCareSpellByEpisodeOfCare(voEpisodeDetails.getEpisodeOfCare().getID_EpisodeOfCare());
    EpisodeofCareVoCollection episodeOfCareColl = careSpell.getEpisodes();
    episodeOfCare.setCareContexts(createNewCareContext(episodeOfCare));
    episodeOfCareColl.add(episodeOfCare);
    form.getLocalContext().setCurrentEpisodeOfCare(episodeOfCare);
    careSpell.setEpisodes(episodeOfCareColl);
    voAttendanceDetails.setCareContext(form.getLocalContext().getCurrentCareContext());
}
项目:AvoinApotti    文件:Logic.java   
protected void onBtnTIIGClick() throws PresentationLogicException
{
    emergencyepisodeliteVo tempVo = new emergencyepisodeliteVo();
    if (form.getLocalContext().getSelectedEmergencyEpisode() != null) // form.grdPreviousHistory().getSelectedRow() != null
    {
        EpisodeDetailsVo epdetVo = form.getLocalContext().getSelectedEmergencyEpisode();// (EpisodeDetailsVo) form.grdPreviousHistory().getSelectedRow().getParentRow().getValue();
        if (epdetVo != null)
        {
            tempVo.setIncidentLocation(form.cmbIncidentLocation().getValue());// WDEV-15122
            tempVo.setInjuryDateTime(form.dtimInjury().getValue());
            tempVo.setTiig(epdetVo.getTiig());
            // form.getLocalContext().setTIIG(epdetVo.getTiig());

        }

    }
    else
    {
        tempVo.setIncidentLocation(form.cmbIncidentLocation().getValue()); // wdev-14582
        tempVo.setInjuryDateTime(form.dtimInjury().getValue());
    }

    if (form.getLocalContext().getTIIGIsNotNull())
        tempVo.setTiig(form.getLocalContext().getTIIG());

    form.getGlobalContext().Emergency.setTIIG(tempVo);
    engine.open(form.getForms().Emergency.TIIGDialog,new Object[] { form.getMode() }); // wdev-14420
}
项目:AvoinApotti    文件:Logic.java   
public void setValue(ValueObject rowValue)
{

    form.getLocalContext().setSelectedRow(rowValue);

    if (rowValue instanceof AttendanceDetailsVo)
    {
        getAndDisplayRecord(rowValue);

        form.getLocalContext().setSelectedRecord((AttendanceDetailsVo) rowValue);
        form.getLocalContext().setSelectedEmergencyEpisode(domain.getEmergencyEpisode(form.getLocalContext().getSelectedRecord().getEmergencyEpisode()));

        // form.getLocalContext().setSelectedEmergencyEpisode((EpisodeDetailsVo) selectedRow.getParentRow().getValue());
        // form.getLocalContext().setSelectedRecord((AttendanceDetailsVo) selectedRow.getValue());

        form.getGlobalContext().Core.setCurrentCareContext(form.getLocalContext().getSelectedRecord().getCareContext());
        form.getGlobalContext().Emergency.setCurrentEmergencyAttendance((AttendanceDetailsVo) rowValue);

        if (form.getLocalContext().getSelectedEmergencyEpisodeIsNotNull() && form.getLocalContext().getSelectedEmergencyEpisode().getReferringGPIsNotNull())
        {
            GpShortVo gp = new GpShortVo();
            gp.setID_Gp(form.getLocalContext().getSelectedEmergencyEpisode().getReferringGP().getID_Gp());
            // form.getGlobalContext().Core.setGPDetails(gp);
            form.getLocalContext().setSelectedGp(gp); // wdev-14420
        }
    }
    else if (rowValue instanceof EpisodeDetailsVo)
    {
        getAndDisplayRecord(rowValue);
        form.getLocalContext().setSelectedEmergencyEpisode((EpisodeDetailsVo) rowValue);
    }

    updateControlState();
}
项目:AvoinApotti    文件:Logic.java   
private AttendanceDetailsVo getLastAttendanceFromLastEpisode(EpisodeDetailsVo emergencyEpisode)
{
    if(emergencyEpisode == null )
        return null;

    emergencyEpisode.getEmergencyAttendances().sort(new ArrivalDateComparator(SortOrder.DESCENDING));
    if(emergencyEpisode.getEmergencyAttendancesIsNotNull() && emergencyEpisode.getEmergencyAttendances().size() > 0)
    {
                return emergencyEpisode.getEmergencyAttendances().get(0);
    }

    return null;

}
项目:AvoinApotti    文件:Logic.java   
protected void onBtnOKClick() throws ims.framework.exceptions.PresentationLogicException
{
    if(form.grdPrevious().getValue() != null && form.grdPrevious().getValue()  instanceof EpisodeDetailsVo)
    {
        form.getGlobalContext().Emergency.setEmergencyEpisodeDetails((EpisodeDetailsVo)form.grdPrevious().getValue());
    }
    engine.close(DialogResult.OK);
}
项目:AvoinApotti    文件:EmergencyAttendancesDialogImpl.java   
private EpisodeDetailsVo copyEpisodeDetails(EpisodeDetailsWithoutAttendancesVo epWithoutVo)
{
    if(epWithoutVo == null)
        return null;
    EpisodeDetailsVo tempVo = new EpisodeDetailsVo(epWithoutVo.getID_EmergencyEpisode(),epWithoutVo.getVersion_EmergencyEpisode());
    tempVo.setCategory(epWithoutVo.getCategory());
    tempVo.setElapsedPeriod(epWithoutVo.getElapsedPeriod());
    tempVo.setElapsedTime(epWithoutVo.getElapsedTime());

    tempVo.setEpisodeOfCare(epWithoutVo.getEpisodeOfCare());
    tempVo.setIncidentLocation(epWithoutVo.getIncidentLocation());
    tempVo.setInjuryDateTime(epWithoutVo.getInjuryDateTime());
    tempVo.setIsRIE(epWithoutVo.getIsRIE());
    tempVo.setLocationDetails(epWithoutVo.getLocationDetails());
    tempVo.setMobility(epWithoutVo.getMobility());
    tempVo.setOccupation(epWithoutVo.getOccupation());
    tempVo.setOccupationStatus(epWithoutVo.getOccupationStatus());
    tempVo.setPlaceofEmployment(epWithoutVo.getPlaceofEmployment());
    tempVo.setPresentingComplaint(epWithoutVo.getPresentingComplaint());
    tempVo.setReferringGP(epWithoutVo.getReferringGP());
    tempVo.setSchool(epWithoutVo.getSchool());
    tempVo.setSourceOfReferral(epWithoutVo.getSourceOfReferral());
    tempVo.setTriageCategoryType(epWithoutVo.getTriageCategoryType());
    tempVo.setSpecialInterestDetails(epWithoutVo.getSpecialInterestDetails());
    tempVo.setRTADetails(epWithoutVo.getRTADetails());
    tempVo.setTiig(epWithoutVo.getTiig());

    return tempVo;
}
项目:openMAXIMS    文件:Logic.java   
private void createCareContextForAttendance(EpisodeDetailsVo voEpisodeDetails, AttendanceDetailsVo voAttendanceDetails)
{
    EpisodeofCareVo episodeOfCare = domain.getEpisodeOfCare(voEpisodeDetails.getEpisodeOfCare().getID_EpisodeOfCare());
    CareSpellVo careSpell = domain.getCareSpellByEpisodeOfCare(voEpisodeDetails.getEpisodeOfCare().getID_EpisodeOfCare());
    EpisodeofCareVoCollection episodeOfCareColl = careSpell.getEpisodes();
    episodeOfCare.setCareContexts(createNewCareContext(episodeOfCare));
    episodeOfCareColl.add(episodeOfCare);
    form.getLocalContext().setCurrentEpisodeOfCare(episodeOfCare);
    careSpell.setEpisodes(episodeOfCareColl);
    voAttendanceDetails.setCareContext(form.getLocalContext().getCurrentCareContext());
}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnTIIGClick() throws PresentationLogicException
{
    EmergencyEpisodeTIIGVo tempVo = new EmergencyEpisodeTIIGVo();
    if (form.getLocalContext().getSelectedEmergencyEpisode() != null) // form.grdPreviousHistory().getSelectedRow() != null
    {
        EpisodeDetailsVo epdetVo = form.getLocalContext().getSelectedEmergencyEpisode();// (EpisodeDetailsVo) form.grdPreviousHistory().getSelectedRow().getParentRow().getValue();
        if (epdetVo != null)
        {
            tempVo.setIncidentLocation(form.cmbIncidentLocation().getValue());// WDEV-15122
            tempVo.setInjuryDateTime(form.dtimInjury().getValue());
            tempVo.setTiig(epdetVo.getTiig());
            // form.getLocalContext().setTIIG(epdetVo.getTiig());

        }

    }
    else
    {
        tempVo.setIncidentLocation(form.cmbIncidentLocation().getValue()); // wdev-14582
        tempVo.setInjuryDateTime(form.dtimInjury().getValue());
    }

    if (form.getLocalContext().getTIIGIsNotNull())
        tempVo.setTiig(form.getLocalContext().getTIIG());

    form.getGlobalContext().Emergency.setTIIG(tempVo);
    engine.open(form.getForms().Emergency.TIIGDialog,new Object[] { form.getMode() }); // wdev-14420
}
项目:openMAXIMS    文件:Logic.java   
public void setValue(ValueObject rowValue)
{

    form.getLocalContext().setSelectedRow(rowValue);

    if (rowValue instanceof AttendanceDetailsVo)
    {
        getAndDisplayRecord(rowValue);

        form.getLocalContext().setSelectedRecord((AttendanceDetailsVo) rowValue);
        form.getLocalContext().setSelectedEmergencyEpisode(domain.getEmergencyEpisode(form.getLocalContext().getSelectedRecord().getEmergencyEpisode()));

        // form.getLocalContext().setSelectedEmergencyEpisode((EpisodeDetailsVo) selectedRow.getParentRow().getValue());
        // form.getLocalContext().setSelectedRecord((AttendanceDetailsVo) selectedRow.getValue());

        form.getGlobalContext().Core.setCurrentCareContext(form.getLocalContext().getSelectedRecord().getCareContext());
        form.getGlobalContext().Emergency.setCurrentEmergencyAttendance((AttendanceDetailsVo) rowValue);

        if (form.getLocalContext().getSelectedEmergencyEpisodeIsNotNull() && form.getLocalContext().getSelectedEmergencyEpisode().getReferringGPIsNotNull())
        {
            GpShortVo gp = new GpShortVo();
            gp.setID_Gp(form.getLocalContext().getSelectedEmergencyEpisode().getReferringGP().getID_Gp());
            // form.getGlobalContext().Core.setGPDetails(gp);
            form.getLocalContext().setSelectedGp(gp); // wdev-14420
        }
    }
    else if (rowValue instanceof EpisodeDetailsVo)
    {
        getAndDisplayRecord(rowValue);
        form.getLocalContext().setSelectedEmergencyEpisode((EpisodeDetailsVo) rowValue);
    }

    updateControlState();
}