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

项目:AvoinApotti    文件:EDischargePatientReadyToLeaveSTHKComponentImpl.java   
public DischargeMedicationDetailsVo getMedication(CareContextRefVo careContextRefvo) 
    {
//TODO Put following two lines back in when the MEDS Componetn for STHK is implemented.
    //  EDischargeMedicationComponent impl = (EDischargeMedicationComponent)getDomainImpl(EDischargeMedicationComponentImpl.class);
    //  return impl.getMedication(careContextRefvo);

        if(careContextRefvo == null)
            throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. ");

        if(careContextRefvo != null)
        {
            DomainFactory factory = getDomainFactory();
            StringBuffer hql = new StringBuffer(" from MedicationDetails md where "); 
            String andStr = " ";

            ArrayList<String> markers = new ArrayList<String>();
            ArrayList<Serializable> values = new ArrayList<Serializable>();

            hql.append(andStr + " md.careContext.id = :careContextId");
            markers.add("careContextId");
            values.add(careContextRefvo.getID_CareContext());
            andStr = " and ";   

            List list = factory.find(hql.toString(), markers,values);
            if(list != null && list.size() > 0)
            { 
                DischargeMedicationDetailsVoCollection voColl = DischargeMedicationDetailsVoAssembler.createDischargeMedicationDetailsVoCollectionFromMedicationDetails(list);
                if(voColl != null && voColl.size() > 0)
                    return voColl.get(0);
            }
        }
        return null;
    }
项目:AvoinApotti    文件:EDischargeMedicationComponentImpl.java   
public ims.clinical.vo.DischargeMedicationDetailsVo getMedication(ims.core.admin.vo.CareContextRefVo careContextRefvo)
{
    if(careContextRefvo == null)
        throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. ");

    if(careContextRefvo != null)
    {
        DomainFactory factory = getDomainFactory();
        StringBuffer hql = new StringBuffer(" from MedicationDetails md where "); 
        String andStr = " ";

        ArrayList<String> markers = new ArrayList<String>();
        ArrayList<Serializable> values = new ArrayList<Serializable>();

        hql.append(andStr + " md.careContext.id = :careContextId");
            markers.add("careContextId");
        values.add(careContextRefvo.getID_CareContext());
        andStr = " and ";   

        List list = factory.find(hql.toString(), markers,values);
        if(list != null && list.size() > 0)
        { 
            DischargeMedicationDetailsVoCollection voColl = DischargeMedicationDetailsVoAssembler.createDischargeMedicationDetailsVoCollectionFromMedicationDetails(list);
            if(voColl != null && voColl.size() > 0)
                return voColl.get(0);
        }
    }
    return null;
}
项目:AvoinApotti    文件:EDischargePreViewComponentImpl.java   
public DischargeMedicationDetailsVo getDischargeMedicationDetailsForCareContext(CareContextRefVo careContext)   
{
    if(careContext == null ||
            careContext.getID_CareContext() == null)
        throw new CodingRuntimeException("CareContext is null or id not provided for getDischargeDetailsForCareContext");   

    DomainFactory factory = getDomainFactory();
    List dischargeMedication = factory.find("select md from MedicationDetails as md left join md.careContext as cc where cc.id = :idCareContext", new String[]{"idCareContext"}, new Object[]{careContext.getID_CareContext()});
    DischargeMedicationDetailsVoCollection medication = DischargeMedicationDetailsVoAssembler.createDischargeMedicationDetailsVoCollectionFromMedicationDetails(dischargeMedication);       

    return medication != null && medication.size() > 0 ? (medication.get(0) != null ? medication.get(0) : null) : null;
}
项目:openMAXIMS    文件:EDischargePatientReadyToLeaveSTHKComponentImpl.java   
public DischargeMedicationDetailsVo getMedication(CareContextRefVo careContextRefvo) 
    {
//TODO Put following two lines back in when the MEDS Componetn for STHK is implemented.
    //  EDischargeMedicationComponent impl = (EDischargeMedicationComponent)getDomainImpl(EDischargeMedicationComponentImpl.class);
    //  return impl.getMedication(careContextRefvo);

        if(careContextRefvo == null)
            throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. ");

        if(careContextRefvo != null)
        {
            DomainFactory factory = getDomainFactory();
            StringBuffer hql = new StringBuffer(" from MedicationDetails md where "); 
            String andStr = " ";

            ArrayList<String> markers = new ArrayList<String>();
            ArrayList<Serializable> values = new ArrayList<Serializable>();

            hql.append(andStr + " md.careContext.id = :careContextId");
            markers.add("careContextId");
            values.add(careContextRefvo.getID_CareContext());
            andStr = " and ";   

            List list = factory.find(hql.toString(), markers,values);
            if(list != null && list.size() > 0)
            { 
                DischargeMedicationDetailsVoCollection voColl = DischargeMedicationDetailsVoAssembler.createDischargeMedicationDetailsVoCollectionFromMedicationDetails(list);
                if(voColl != null && voColl.size() > 0)
                    return voColl.get(0);
            }
        }
        return null;
    }
项目:openMAXIMS    文件:EDischargeMedicationComponentImpl.java   
public ims.clinical.vo.DischargeMedicationDetailsVo getMedication(ims.core.admin.vo.CareContextRefVo careContextRefvo)
{
    if(careContextRefvo == null)
        throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. ");

    if(careContextRefvo != null)
    {
        DomainFactory factory = getDomainFactory();
        StringBuffer hql = new StringBuffer(" from MedicationDetails md where "); 
        String andStr = " ";

        ArrayList<String> markers = new ArrayList<String>();
        ArrayList<Serializable> values = new ArrayList<Serializable>();

        hql.append(andStr + " md.careContext.id = :careContextId");
            markers.add("careContextId");
        values.add(careContextRefvo.getID_CareContext());
        andStr = " and ";   

        List list = factory.find(hql.toString(), markers,values);
        if(list != null && list.size() > 0)
        { 
            DischargeMedicationDetailsVoCollection voColl = DischargeMedicationDetailsVoAssembler.createDischargeMedicationDetailsVoCollectionFromMedicationDetails(list);
            if(voColl != null && voColl.size() > 0)
                return voColl.get(0);
        }
    }
    return null;
}
项目:openMAXIMS    文件:EDischargePatientReadyToLeaveSTHKComponentImpl.java   
public DischargeMedicationDetailsVo getMedication(CareContextRefVo careContextRefvo) 
    {
//TODO Put following two lines back in when the MEDS Componetn for STHK is implemented.
    //  EDischargeMedicationComponent impl = (EDischargeMedicationComponent)getDomainImpl(EDischargeMedicationComponentImpl.class);
    //  return impl.getMedication(careContextRefvo);

        if(careContextRefvo == null)
            throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. ");

        if(careContextRefvo != null)
        {
            DomainFactory factory = getDomainFactory();
            StringBuffer hql = new StringBuffer(" from MedicationDetails md where "); 
            String andStr = " ";

            ArrayList<String> markers = new ArrayList<String>();
            ArrayList<Serializable> values = new ArrayList<Serializable>();

            hql.append(andStr + " md.careContext.id = :careContextId");
            markers.add("careContextId");
            values.add(careContextRefvo.getID_CareContext());
            andStr = " and ";   

            List list = factory.find(hql.toString(), markers,values);
            if(list != null && list.size() > 0)
            { 
                DischargeMedicationDetailsVoCollection voColl = DischargeMedicationDetailsVoAssembler.createDischargeMedicationDetailsVoCollectionFromMedicationDetails(list);
                if(voColl != null && voColl.size() > 0)
                    return voColl.get(0);
            }
        }
        return null;
    }
项目:openMAXIMS    文件:EDischargeMedicationComponentImpl.java   
public ims.clinical.vo.DischargeMedicationDetailsVo getMedication(ims.core.admin.vo.CareContextRefVo careContextRefvo)
{
    if(careContextRefvo == null)
        throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. ");

    if(careContextRefvo != null)
    {
        DomainFactory factory = getDomainFactory();
        StringBuffer hql = new StringBuffer(" from MedicationDetails md where "); 
        String andStr = " ";

        ArrayList<String> markers = new ArrayList<String>();
        ArrayList<Serializable> values = new ArrayList<Serializable>();

        hql.append(andStr + " md.careContext.id = :careContextId");
            markers.add("careContextId");
        values.add(careContextRefvo.getID_CareContext());
        andStr = " and ";   

        List list = factory.find(hql.toString(), markers,values);
        if(list != null && list.size() > 0)
        { 
            DischargeMedicationDetailsVoCollection voColl = DischargeMedicationDetailsVoAssembler.createDischargeMedicationDetailsVoCollectionFromMedicationDetails(list);
            if(voColl != null && voColl.size() > 0)
                return voColl.get(0);
        }
    }
    return null;
}
项目:openMAXIMS    文件:EDischargePreViewComponentImpl.java   
public DischargeMedicationDetailsVo getDischargeMedicationDetailsForCareContext(CareContextRefVo careContext)   
{
    if(careContext == null ||
            careContext.getID_CareContext() == null)
        throw new CodingRuntimeException("CareContext is null or id not provided for getDischargeDetailsForCareContext");   

    DomainFactory factory = getDomainFactory();
    List dischargeMedication = factory.find("select md from MedicationDetails as md left join md.careContext as cc where cc.id = :idCareContext", new String[]{"idCareContext"}, new Object[]{careContext.getID_CareContext()});
    DischargeMedicationDetailsVoCollection medication = DischargeMedicationDetailsVoAssembler.createDischargeMedicationDetailsVoCollectionFromMedicationDetails(dischargeMedication);       

    return medication != null && medication.size() > 0 ? (medication.get(0) != null ? medication.get(0) : null) : null;
}
项目:openmaxims-linux    文件:EDischargePatientReadyToLeaveSTHKComponentImpl.java   
public DischargeMedicationDetailsVo getMedication(CareContextRefVo careContextRefvo) 
    {
//TODO Put following two lines back in when the MEDS Componetn for STHK is implemented.
    //  EDischargeMedicationComponent impl = (EDischargeMedicationComponent)getDomainImpl(EDischargeMedicationComponentImpl.class);
    //  return impl.getMedication(careContextRefvo);

        if(careContextRefvo == null)
            throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. ");

        if(careContextRefvo != null)
        {
            DomainFactory factory = getDomainFactory();
            StringBuffer hql = new StringBuffer(" from MedicationDetails md where "); 
            String andStr = " ";

            ArrayList<String> markers = new ArrayList<String>();
            ArrayList<Serializable> values = new ArrayList<Serializable>();

            hql.append(andStr + " md.careContext.id = :careContextId");
            markers.add("careContextId");
            values.add(careContextRefvo.getID_CareContext());
            andStr = " and ";   

            List list = factory.find(hql.toString(), markers,values);
            if(list != null && list.size() > 0)
            { 
                DischargeMedicationDetailsVoCollection voColl = DischargeMedicationDetailsVoAssembler.createDischargeMedicationDetailsVoCollectionFromMedicationDetails(list);
                if(voColl != null && voColl.size() > 0)
                    return voColl.get(0);
            }
        }
        return null;
    }
项目:openmaxims-linux    文件:EDischargeMedicationComponentImpl.java   
public ims.clinical.vo.DischargeMedicationDetailsVo getMedication(ims.core.admin.vo.CareContextRefVo careContextRefvo)
{
    if(careContextRefvo == null)
        throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. ");

    if(careContextRefvo != null)
    {
        DomainFactory factory = getDomainFactory();
        StringBuffer hql = new StringBuffer(" from MedicationDetails md where "); 
        String andStr = " ";

        ArrayList<String> markers = new ArrayList<String>();
        ArrayList<Serializable> values = new ArrayList<Serializable>();

        hql.append(andStr + " md.careContext.id = :careContextId");
            markers.add("careContextId");
        values.add(careContextRefvo.getID_CareContext());
        andStr = " and ";   

        List list = factory.find(hql.toString(), markers,values);
        if(list != null && list.size() > 0)
        { 
            DischargeMedicationDetailsVoCollection voColl = DischargeMedicationDetailsVoAssembler.createDischargeMedicationDetailsVoCollectionFromMedicationDetails(list);
            if(voColl != null && voColl.size() > 0)
                return voColl.get(0);
        }
    }
    return null;
}
项目:openmaxims-linux    文件:EDischargePreViewComponentImpl.java   
public DischargeMedicationDetailsVo getDischargeMedicationDetailsForCareContext(CareContextRefVo careContext)   
{
    if(careContext == null ||
            careContext.getID_CareContext() == null)
        throw new CodingRuntimeException("CareContext is null or id not provided for getDischargeDetailsForCareContext");   

    DomainFactory factory = getDomainFactory();
    List dischargeMedication = factory.find("select md from MedicationDetails as md left join md.careContext as cc where cc.id = :idCareContext", new String[]{"idCareContext"}, new Object[]{careContext.getID_CareContext()});
    DischargeMedicationDetailsVoCollection medication = DischargeMedicationDetailsVoAssembler.createDischargeMedicationDetailsVoCollectionFromMedicationDetails(dischargeMedication);       

    return medication != null && medication.size() > 0 ? (medication.get(0) != null ? medication.get(0) : null) : null;
}