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

项目:AvoinApotti    文件:BedInfoDialogImpl.java   
public DischargedEpisodeADTVo getDischargedEpisodeADT(PASEventRefVo pasEventRef)
{
    if (pasEventRef == null)
        throw new CodingRuntimeException("Cannot get DischargeEpisode on null PASEventRef");

    DomainFactory factory = getDomainFactory();

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    String query = "SELECT dis FROM DischargedEpisode AS dis LEFT JOIN dis.pasEvent AS pasev WHERE pasev.id = :ID_PASEV";

    paramNames.add("ID_PASEV");
    paramValues.add(pasEventRef.getID_PASEvent());

    DischargedEpisodeADTVoCollection dischargeEpisode = DischargedEpisodeADTVoAssembler.createDischargedEpisodeADTVoCollectionFromDischargedEpisode(factory.find(query.toString(), paramNames, paramValues));

    if (dischargeEpisode != null && dischargeEpisode.size() > 0)
    {
        return dischargeEpisode.get(0);
    }

    return null;
}
项目:openMAXIMS    文件:BedInfoDialogImpl.java   
public DischargedEpisodeADTVo getDischargedEpisodeADT(PASEventRefVo pasEventRef)
{
    if (pasEventRef == null)
        throw new CodingRuntimeException("Cannot get DischargeEpisode on null PASEventRef");

    DomainFactory factory = getDomainFactory();

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    String query = "SELECT dis FROM DischargedEpisode AS dis LEFT JOIN dis.pasEvent AS pasev WHERE pasev.id = :ID_PASEV";

    paramNames.add("ID_PASEV");
    paramValues.add(pasEventRef.getID_PASEvent());

    DischargedEpisodeADTVoCollection dischargeEpisode = DischargedEpisodeADTVoAssembler.createDischargedEpisodeADTVoCollectionFromDischargedEpisode(factory.find(query.toString(), paramNames, paramValues));

    if (dischargeEpisode != null && dischargeEpisode.size() > 0)
    {
        return dischargeEpisode.get(0);
    }

    return null;
}
项目:openmaxims-linux    文件:BedInfoDialogImpl.java   
public DischargedEpisodeADTVo getDischargedEpisodeADT(PASEventRefVo pasEventRef)
{
    if (pasEventRef == null)
        throw new CodingRuntimeException("Cannot get DischargeEpisode on null PASEventRef");

    DomainFactory factory = getDomainFactory();

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    String query = "SELECT dis FROM DischargedEpisode AS dis LEFT JOIN dis.pasEvent AS pasev WHERE pasev.id = :ID_PASEV";

    paramNames.add("ID_PASEV");
    paramValues.add(pasEventRef.getID_PASEvent());

    DischargedEpisodeADTVoCollection dischargeEpisode = DischargedEpisodeADTVoAssembler.createDischargedEpisodeADTVoCollectionFromDischargedEpisode(factory.find(query.toString(), paramNames, paramValues));

    if (dischargeEpisode != null && dischargeEpisode.size() > 0)
    {
        return dischargeEpisode.get(0);
    }

    return null;
}
项目:openMAXIMS    文件:BedInfoDialogImpl.java   
public DischargedEpisodeADTVo getDischargedEpisodeADT(PASEventRefVo pasEventRef)
{
    if (pasEventRef == null)
        throw new CodingRuntimeException("Cannot get DischargeEpisode on null PASEventRef");

    DomainFactory factory = getDomainFactory();

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    String query = "SELECT dis FROM DischargedEpisode AS dis LEFT JOIN dis.pasEvent AS pasev WHERE pasev.id = :ID_PASEV";

    paramNames.add("ID_PASEV");
    paramValues.add(pasEventRef.getID_PASEvent());

    DischargedEpisodeADTVoCollection dischargeEpisode = DischargedEpisodeADTVoAssembler.createDischargedEpisodeADTVoCollectionFromDischargedEpisode(factory.find(query.toString(), paramNames, paramValues));

    if (dischargeEpisode != null && dischargeEpisode.size() > 0)
    {
        if (dischargeEpisode.get(0) != null && dischargeEpisode.get(0).getDeferredReasonIsNotNull())
        {   
            dischargeEpisode.get(0).setDeferredReasonConfig(getDeferredReason(dischargeEpisode.get(0).getDeferredReason()));
        }
        return dischargeEpisode.get(0);
    }

    return null;
}