Java 类ims.nursing.vo.domain.CarePlanAssembler 实例源码

项目:AvoinApotti    文件:ClinicalNotesUpdateActionsDialogImpl.java   
public ims.nursing.vo.CarePlanCollection listCarePlans(ims.nursing.vo.CarePlanTitleCollection collCps)
{
    String carePlanIDs = "";

    for (int i = 0 ; collCps != null && i < collCps.size() ; i++)
    {
        if (carePlanIDs != "") 
            carePlanIDs += " , ";

        carePlanIDs += collCps.get(i).getID_CarePlan();
    }
    List domainObjectList = null;
    DomainFactory factory = getDomainFactory();

    domainObjectList = factory.find("select cp from CarePlan as cp where cp.id in ( " + carePlanIDs + " )");

    return CarePlanAssembler.createCarePlanCollectionFromCarePlan(domainObjectList);
}
项目:AvoinApotti    文件:ClinicalNotesUpdateActionsDialogImpl.java   
public Boolean saveCarePlans(CarePlanCollection collCps) throws StaleObjectException 
{
    if (collCps == null)
        throw new DomainRuntimeException("Cannot save null value for CarePlanCollection");

    if (!collCps.isValidated())
        throw new DomainRuntimeException("CarePlanCollection has not been validated");

    DomainFactory factory = getDomainFactory();
    for ( int i = 0 ; i < collCps.size() ; i++)
    {
        CarePlan doCP = CarePlanAssembler.extractCarePlan(factory, collCps.get(i));
        factory.save(doCP);
    }
    return true;
}
项目:openMAXIMS    文件:ClinicalNotesUpdateActionsDialogImpl.java   
public ims.nursing.vo.CarePlanCollection listCarePlans(ims.nursing.vo.CarePlanTitleCollection collCps)
{
    String carePlanIDs = "";

    for (int i = 0 ; collCps != null && i < collCps.size() ; i++)
    {
        if (carePlanIDs != "") 
            carePlanIDs += " , ";

        carePlanIDs += collCps.get(i).getID_CarePlan();
    }
    List domainObjectList = null;
    DomainFactory factory = getDomainFactory();

    domainObjectList = factory.find("select cp from CarePlan as cp where cp.id in ( " + carePlanIDs + " )");

    return CarePlanAssembler.createCarePlanCollectionFromCarePlan(domainObjectList);
}
项目:openMAXIMS    文件:ClinicalNotesUpdateActionsDialogImpl.java   
public Boolean saveCarePlans(CarePlanCollection collCps) throws StaleObjectException 
{
    if (collCps == null)
        throw new DomainRuntimeException("Cannot save null value for CarePlanCollection");

    if (!collCps.isValidated())
        throw new DomainRuntimeException("CarePlanCollection has not been validated");

    DomainFactory factory = getDomainFactory();
    for ( int i = 0 ; i < collCps.size() ; i++)
    {
        CarePlan doCP = CarePlanAssembler.extractCarePlan(factory, collCps.get(i));
        factory.save(doCP);
    }
    return true;
}
项目:openMAXIMS    文件:ClinicalNotesUpdateActionsDialogImpl.java   
public ims.nursing.vo.CarePlanCollection listCarePlans(ims.nursing.vo.CarePlanTitleCollection collCps)
{
    String carePlanIDs = "";

    for (int i = 0 ; collCps != null && i < collCps.size() ; i++)
    {
        if (carePlanIDs != "") 
            carePlanIDs += " , ";

        carePlanIDs += collCps.get(i).getID_CarePlan();
    }
    List domainObjectList = null;
    DomainFactory factory = getDomainFactory();

    domainObjectList = factory.find("select cp from CarePlan as cp where cp.id in ( " + carePlanIDs + " )");

    return CarePlanAssembler.createCarePlanCollectionFromCarePlan(domainObjectList);
}
项目:openMAXIMS    文件:ClinicalNotesUpdateActionsDialogImpl.java   
public Boolean saveCarePlans(CarePlanCollection collCps) throws StaleObjectException 
{
    if (collCps == null)
        throw new DomainRuntimeException("Cannot save null value for CarePlanCollection");

    if (!collCps.isValidated())
        throw new DomainRuntimeException("CarePlanCollection has not been validated");

    DomainFactory factory = getDomainFactory();
    for ( int i = 0 ; i < collCps.size() ; i++)
    {
        CarePlan doCP = CarePlanAssembler.extractCarePlan(factory, collCps.get(i));
        factory.save(doCP);
    }
    return true;
}
项目:openmaxims-linux    文件:ClinicalNotesUpdateActionsDialogImpl.java   
public ims.nursing.vo.CarePlanCollection listCarePlans(ims.nursing.vo.CarePlanTitleCollection collCps)
{
    String carePlanIDs = "";

    for (int i = 0 ; collCps != null && i < collCps.size() ; i++)
    {
        if (carePlanIDs != "") 
            carePlanIDs += " , ";

        carePlanIDs += collCps.get(i).getID_CarePlan();
    }
    List domainObjectList = null;
    DomainFactory factory = getDomainFactory();

    domainObjectList = factory.find("select cp from CarePlan as cp where cp.id in ( " + carePlanIDs + " )");

    return CarePlanAssembler.createCarePlanCollectionFromCarePlan(domainObjectList);
}
项目:openmaxims-linux    文件:ClinicalNotesUpdateActionsDialogImpl.java   
public Boolean saveCarePlans(CarePlanCollection collCps) throws StaleObjectException 
{
    if (collCps == null)
        throw new DomainRuntimeException("Cannot save null value for CarePlanCollection");

    if (!collCps.isValidated())
        throw new DomainRuntimeException("CarePlanCollection has not been validated");

    DomainFactory factory = getDomainFactory();
    for ( int i = 0 ; i < collCps.size() ; i++)
    {
        CarePlan doCP = CarePlanAssembler.extractCarePlan(factory, collCps.get(i));
        factory.save(doCP);
    }
    return true;
}
项目:AvoinApotti    文件:ClinicalAdmissionImpl.java   
public CarePlanCollection getCareplans(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(" select c1_1 from CarePlan as c1_1 left join c1_1.careContext as c2_1 where  "); 
        String andStr = " ";

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

        hql.append(andStr + " c2_1.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)
        { 
            CarePlanCollection voColl = CarePlanAssembler.createCarePlanCollectionFromCarePlan(list);
            if(voColl != null && voColl.size() > 0)
                return voColl;
        }
    }
    return null;
}
项目:AvoinApotti    文件:CarePlanDetailsImpl.java   
/**
 * saves the interventions and the evaluation note
 */
public ims.nursing.vo.CarePlan saveCarePlan(ims.nursing.vo.CarePlan carePlan) throws StaleObjectException
{
    // Ensure the value object has been validated
    if (!carePlan.isValidated())
        throw new DomainRuntimeException("CarePlan has not been validated");

    DomainFactory factory = getDomainFactory();

    CarePlan cp = CarePlanAssembler.extractCarePlan(factory, carePlan);

    factory.save(cp);
    return (CarePlanAssembler.create(cp));
}
项目:AvoinApotti    文件:CarePlanDetailsImpl.java   
/**
 * Retrieves the selected care plan
 */
public ims.nursing.vo.CarePlan getCarePlan(ims.nursing.vo.CarePlan voCarePlan)
{
    DomainFactory factory = getDomainFactory();

    CarePlan cp = (CarePlan) factory.getDomainObject(CarePlan.class, voCarePlan.getID_CarePlan());
    ims.nursing.vo.CarePlan voCp = CarePlanAssembler.create(cp);
    return voCp;
}
项目:AvoinApotti    文件:CarePlanDetailsImpl.java   
public CarePlanCollection listCarePlans(ims.nursing.vo.CarePlan voCarePlan) throws DomainInterfaceException 
{
    DomainFactory factory = getDomainFactory();

    CarePlan cp = (CarePlan) factory.getDomainObject(CarePlan.class, voCarePlan.getID_CarePlan());
    ims.nursing.vo.CarePlan voCp = CarePlanAssembler.create(cp);
    CarePlanCollection temVoColl = new CarePlanCollection();
    temVoColl.add(voCp);
    return temVoColl;

}
项目:openMAXIMS    文件:ClinicalAdmissionImpl.java   
public CarePlanCollection getCareplans(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(" select c1_1 from CarePlan as c1_1 left join c1_1.careContext as c2_1 where  "); 
        String andStr = " ";

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

        hql.append(andStr + " c2_1.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)
        { 
            CarePlanCollection voColl = CarePlanAssembler.createCarePlanCollectionFromCarePlan(list);
            if(voColl != null && voColl.size() > 0)
                return voColl;
        }
    }
    return null;
}
项目:openMAXIMS    文件:CarePlanDetailsImpl.java   
/**
 * saves the interventions and the evaluation note
 */
public ims.nursing.vo.CarePlan saveCarePlan(ims.nursing.vo.CarePlan carePlan) throws StaleObjectException
{
    // Ensure the value object has been validated
    if (!carePlan.isValidated())
        throw new DomainRuntimeException("CarePlan has not been validated");

    DomainFactory factory = getDomainFactory();

    CarePlan cp = CarePlanAssembler.extractCarePlan(factory, carePlan);

    factory.save(cp);
    return (CarePlanAssembler.create(cp));
}
项目:openMAXIMS    文件:CarePlanDetailsImpl.java   
/**
 * Retrieves the selected care plan
 */
public ims.nursing.vo.CarePlan getCarePlan(ims.nursing.vo.CarePlan voCarePlan)
{
    DomainFactory factory = getDomainFactory();

    CarePlan cp = (CarePlan) factory.getDomainObject(CarePlan.class, voCarePlan.getID_CarePlan());
    ims.nursing.vo.CarePlan voCp = CarePlanAssembler.create(cp);
    return voCp;
}
项目:openMAXIMS    文件:CarePlanDetailsImpl.java   
public CarePlanCollection listCarePlans(ims.nursing.vo.CarePlan voCarePlan) throws DomainInterfaceException 
{
    DomainFactory factory = getDomainFactory();

    CarePlan cp = (CarePlan) factory.getDomainObject(CarePlan.class, voCarePlan.getID_CarePlan());
    ims.nursing.vo.CarePlan voCp = CarePlanAssembler.create(cp);
    CarePlanCollection temVoColl = new CarePlanCollection();
    temVoColl.add(voCp);
    return temVoColl;

}
项目:openMAXIMS    文件:ClinicalAdmissionImpl.java   
public CarePlanCollection getCareplans(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(" select c1_1 from CarePlan as c1_1 left join c1_1.careContext as c2_1 where  "); 
        String andStr = " ";

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

        hql.append(andStr + " c2_1.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)
        { 
            CarePlanCollection voColl = CarePlanAssembler.createCarePlanCollectionFromCarePlan(list);
            if(voColl != null && voColl.size() > 0)
                return voColl;
        }
    }
    return null;
}
项目:openMAXIMS    文件:CarePlanDetailsImpl.java   
/**
 * saves the interventions and the evaluation note
 */
public ims.nursing.vo.CarePlan saveCarePlan(ims.nursing.vo.CarePlan carePlan) throws StaleObjectException
{
    // Ensure the value object has been validated
    if (!carePlan.isValidated())
        throw new DomainRuntimeException("CarePlan has not been validated");

    DomainFactory factory = getDomainFactory();

    CarePlan cp = CarePlanAssembler.extractCarePlan(factory, carePlan);

    factory.save(cp);
    return (CarePlanAssembler.create(cp));
}
项目:openMAXIMS    文件:CarePlanDetailsImpl.java   
/**
 * Retrieves the selected care plan
 */
public ims.nursing.vo.CarePlan getCarePlan(ims.nursing.vo.CarePlan voCarePlan)
{
    DomainFactory factory = getDomainFactory();

    CarePlan cp = (CarePlan) factory.getDomainObject(CarePlan.class, voCarePlan.getID_CarePlan());
    ims.nursing.vo.CarePlan voCp = CarePlanAssembler.create(cp);
    return voCp;
}
项目:openMAXIMS    文件:CarePlanDetailsImpl.java   
public CarePlanCollection listCarePlans(ims.nursing.vo.CarePlan voCarePlan) throws DomainInterfaceException 
{
    DomainFactory factory = getDomainFactory();

    CarePlan cp = (CarePlan) factory.getDomainObject(CarePlan.class, voCarePlan.getID_CarePlan());
    ims.nursing.vo.CarePlan voCp = CarePlanAssembler.create(cp);
    CarePlanCollection temVoColl = new CarePlanCollection();
    temVoColl.add(voCp);
    return temVoColl;

}
项目:openmaxims-linux    文件:ClinicalAdmissionImpl.java   
public CarePlanCollection getCareplans(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(" select c1_1 from CarePlan as c1_1 left join c1_1.careContext as c2_1 where  "); 
        String andStr = " ";

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

        hql.append(andStr + " c2_1.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)
        { 
            CarePlanCollection voColl = CarePlanAssembler.createCarePlanCollectionFromCarePlan(list);
            if(voColl != null && voColl.size() > 0)
                return voColl;
        }
    }
    return null;
}
项目:openmaxims-linux    文件:CarePlanDetailsImpl.java   
/**
 * saves the interventions and the evaluation note
 */
public ims.nursing.vo.CarePlan saveCarePlan(ims.nursing.vo.CarePlan carePlan) throws StaleObjectException
{
    // Ensure the value object has been validated
    if (!carePlan.isValidated())
        throw new DomainRuntimeException("CarePlan has not been validated");

    DomainFactory factory = getDomainFactory();

    CarePlan cp = CarePlanAssembler.extractCarePlan(factory, carePlan);

    factory.save(cp);
    return (CarePlanAssembler.create(cp));
}
项目:openmaxims-linux    文件:CarePlanDetailsImpl.java   
/**
 * Retrieves the selected care plan
 */
public ims.nursing.vo.CarePlan getCarePlan(ims.nursing.vo.CarePlan voCarePlan)
{
    DomainFactory factory = getDomainFactory();

    CarePlan cp = (CarePlan) factory.getDomainObject(CarePlan.class, voCarePlan.getID_CarePlan());
    ims.nursing.vo.CarePlan voCp = CarePlanAssembler.create(cp);
    return voCp;
}
项目:openmaxims-linux    文件:CarePlanDetailsImpl.java   
public CarePlanCollection listCarePlans(ims.nursing.vo.CarePlan voCarePlan) throws DomainInterfaceException 
{
    DomainFactory factory = getDomainFactory();

    CarePlan cp = (CarePlan) factory.getDomainObject(CarePlan.class, voCarePlan.getID_CarePlan());
    ims.nursing.vo.CarePlan voCp = CarePlanAssembler.create(cp);
    CarePlanCollection temVoColl = new CarePlanCollection();
    temVoColl.add(voCp);
    return temVoColl;

}