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

项目:AvoinApotti    文件:PlanOfCareImpl.java   
public PlanOfCareVo savePlanOfCare(PlanOfCareVo record) throws StaleObjectException 
{
    if(record == null)
    {
        throw new DomainRuntimeException("Invalid record");
    }
    if(!record.isValidated())
    {
        throw new CodingRuntimeException("Record not validated");
    }

    DomainFactory factory = getDomainFactory();
    PlanOfCare domainRecord = PlanOfCareVoAssembler.extractPlanOfCare(factory, record);     

    factory.save(domainRecord);

    return PlanOfCareVoAssembler.create(domainRecord);
}
项目:openMAXIMS    文件:PlanOfCareImpl.java   
public PlanOfCareVo savePlanOfCare(PlanOfCareVo record) throws StaleObjectException 
{
    if(record == null)
    {
        throw new DomainRuntimeException("Invalid record");
    }
    if(!record.isValidated())
    {
        throw new CodingRuntimeException("Record not validated");
    }

    DomainFactory factory = getDomainFactory();
    PlanOfCare domainRecord = PlanOfCareVoAssembler.extractPlanOfCare(factory, record);     

    factory.save(domainRecord);

    return PlanOfCareVoAssembler.create(domainRecord);
}
项目:openMAXIMS    文件:PlanOfCareImpl.java   
public PlanOfCareVo savePlanOfCare(PlanOfCareVo record) throws StaleObjectException 
{
    if(record == null)
    {
        throw new DomainRuntimeException("Invalid record");
    }
    if(!record.isValidated())
    {
        throw new CodingRuntimeException("Record not validated");
    }

    DomainFactory factory = getDomainFactory();
    PlanOfCare domainRecord = PlanOfCareVoAssembler.extractPlanOfCare(factory, record);     

    factory.save(domainRecord);

    return PlanOfCareVoAssembler.create(domainRecord);
}
项目:openmaxims-linux    文件:PlanOfCareImpl.java   
public PlanOfCareVo savePlanOfCare(PlanOfCareVo record) throws StaleObjectException 
{
    if(record == null)
    {
        throw new DomainRuntimeException("Invalid record");
    }
    if(!record.isValidated())
    {
        throw new CodingRuntimeException("Record not validated");
    }

    DomainFactory factory = getDomainFactory();
    PlanOfCare domainRecord = PlanOfCareVoAssembler.extractPlanOfCare(factory, record);     

    factory.save(domainRecord);

    return PlanOfCareVoAssembler.create(domainRecord);
}
项目:AvoinApotti    文件:PlanOfCareImpl.java   
public PlanOfCareVo getPlanOfCare(PlanOfCareRefVo voPlanOfCareRef) 
{
    if(voPlanOfCareRef == null || voPlanOfCareRef.getID_PlanOfCare() == null)
    {
        throw new DomainRuntimeException("Invalid record");
    }

    DomainFactory factory = getDomainFactory();
    PlanOfCare domainObject = (PlanOfCare)factory.getDomainObject(voPlanOfCareRef);

    return PlanOfCareVoAssembler.create(domainObject);
}
项目:AvoinApotti    文件:DailyPatientProgressImpl.java   
public IDPPItem savePatientAssessment(PatientAssessmentVo patientAssessment, PlanOfCareVoCollection planOfCareCollection) throws StaleObjectException
{
    if (patientAssessment == null)
        throw new CodingRuntimeException("Cannot save null PatientAssessmentVo");

    if (patientAssessment.isValidated() == false)
        throw new CodingRuntimeException("PatientAssessmentVo has not been validated");

    if (planOfCareCollection != null && planOfCareCollection.isValidated() == false)
        throw new CodingRuntimeException("PlanOfCareVoCollection have not been validated");

    DomainFactory factory = getDomainFactory();
    PatientAssessment doPatientAssessment = PatientAssessmentVoAssembler.extractPatientAssessment(factory, patientAssessment);
    factory.save(doPatientAssessment);

    int countNewCarePlan = 0;
    for (int i = 0; planOfCareCollection != null && i < planOfCareCollection.size(); i++)
    {
        PlanOfCareVo voPlanOfCare = planOfCareCollection.get(i);
        if (voPlanOfCare.getID_PlanOfCare() == null)
            countNewCarePlan++;
        PlanOfCare doPlanOfCare = PlanOfCareVoAssembler.extractPlanOfCare(factory, voPlanOfCare);
        factory.save(doPlanOfCare);
    }

    PatientAssessmentVo voPatAss = PatientAssessmentVoAssembler.create(doPatientAssessment);
    Integer newPlanOfCares = new Integer(countNewCarePlan);
    DPPItem item = new DPPItem(voPatAss, newPlanOfCares);

    return item;
}
项目:openMAXIMS    文件:PlanOfCareImpl.java   
public PlanOfCareVo getPlanOfCare(PlanOfCareRefVo voPlanOfCareRef) 
{
    if(voPlanOfCareRef == null || voPlanOfCareRef.getID_PlanOfCare() == null)
    {
        throw new DomainRuntimeException("Invalid record");
    }

    DomainFactory factory = getDomainFactory();
    PlanOfCare domainObject = (PlanOfCare)factory.getDomainObject(voPlanOfCareRef);

    return PlanOfCareVoAssembler.create(domainObject);
}
项目:openMAXIMS    文件:DailyPatientProgressImpl.java   
public IDPPItem savePatientAssessment(PatientAssessmentVo patientAssessment, PlanOfCareVoCollection planOfCareCollection) throws StaleObjectException
{
    if (patientAssessment == null)
        throw new CodingRuntimeException("Cannot save null PatientAssessmentVo");

    if (patientAssessment.isValidated() == false)
        throw new CodingRuntimeException("PatientAssessmentVo has not been validated");

    if (planOfCareCollection != null && planOfCareCollection.isValidated() == false)
        throw new CodingRuntimeException("PlanOfCareVoCollection have not been validated");

    DomainFactory factory = getDomainFactory();
    PatientAssessment doPatientAssessment = PatientAssessmentVoAssembler.extractPatientAssessment(factory, patientAssessment);
    factory.save(doPatientAssessment);

    int countNewCarePlan = 0;
    for (int i = 0; planOfCareCollection != null && i < planOfCareCollection.size(); i++)
    {
        PlanOfCareVo voPlanOfCare = planOfCareCollection.get(i);
        if (voPlanOfCare.getID_PlanOfCare() == null)
            countNewCarePlan++;
        PlanOfCare doPlanOfCare = PlanOfCareVoAssembler.extractPlanOfCare(factory, voPlanOfCare);
        factory.save(doPlanOfCare);
    }

    PatientAssessmentVo voPatAss = PatientAssessmentVoAssembler.create(doPatientAssessment);
    Integer newPlanOfCares = new Integer(countNewCarePlan);
    DPPItem item = new DPPItem(voPatAss, newPlanOfCares);

    return item;
}
项目:openMAXIMS    文件:PlanOfCareImpl.java   
public PlanOfCareVo getPlanOfCare(PlanOfCareRefVo voPlanOfCareRef) 
{
    if(voPlanOfCareRef == null || voPlanOfCareRef.getID_PlanOfCare() == null)
    {
        throw new DomainRuntimeException("Invalid record");
    }

    DomainFactory factory = getDomainFactory();
    PlanOfCare domainObject = (PlanOfCare)factory.getDomainObject(voPlanOfCareRef);

    return PlanOfCareVoAssembler.create(domainObject);
}
项目:openMAXIMS    文件:DailyPatientProgressImpl.java   
public IDPPItem savePatientAssessment(PatientAssessmentVo patientAssessment, PlanOfCareVoCollection planOfCareCollection) throws StaleObjectException
{
    if (patientAssessment == null)
        throw new CodingRuntimeException("Cannot save null PatientAssessmentVo");

    if (patientAssessment.isValidated() == false)
        throw new CodingRuntimeException("PatientAssessmentVo has not been validated");

    if (planOfCareCollection != null && planOfCareCollection.isValidated() == false)
        throw new CodingRuntimeException("PlanOfCareVoCollection have not been validated");

    DomainFactory factory = getDomainFactory();
    PatientAssessment doPatientAssessment = PatientAssessmentVoAssembler.extractPatientAssessment(factory, patientAssessment);
    factory.save(doPatientAssessment);

    int countNewCarePlan = 0;
    for (int i = 0; planOfCareCollection != null && i < planOfCareCollection.size(); i++)
    {
        PlanOfCareVo voPlanOfCare = planOfCareCollection.get(i);
        if (voPlanOfCare.getID_PlanOfCare() == null)
            countNewCarePlan++;
        PlanOfCare doPlanOfCare = PlanOfCareVoAssembler.extractPlanOfCare(factory, voPlanOfCare);
        factory.save(doPlanOfCare);
    }

    PatientAssessmentVo voPatAss = PatientAssessmentVoAssembler.create(doPatientAssessment);
    Integer newPlanOfCares = new Integer(countNewCarePlan);
    DPPItem item = new DPPItem(voPatAss, newPlanOfCares);

    return item;
}
项目:openmaxims-linux    文件:PlanOfCareImpl.java   
public PlanOfCareVo getPlanOfCare(PlanOfCareRefVo voPlanOfCareRef) 
{
    if(voPlanOfCareRef == null || voPlanOfCareRef.getID_PlanOfCare() == null)
    {
        throw new DomainRuntimeException("Invalid record");
    }

    DomainFactory factory = getDomainFactory();
    PlanOfCare domainObject = (PlanOfCare)factory.getDomainObject(voPlanOfCareRef);

    return PlanOfCareVoAssembler.create(domainObject);
}
项目:openmaxims-linux    文件:DailyPatientProgressImpl.java   
public IDPPItem savePatientAssessment(PatientAssessmentVo patientAssessment, PlanOfCareVoCollection planOfCareCollection) throws StaleObjectException
{
    if (patientAssessment == null)
        throw new CodingRuntimeException("Cannot save null PatientAssessmentVo");

    if (patientAssessment.isValidated() == false)
        throw new CodingRuntimeException("PatientAssessmentVo has not been validated");

    if (planOfCareCollection != null && planOfCareCollection.isValidated() == false)
        throw new CodingRuntimeException("PlanOfCareVoCollection have not been validated");

    DomainFactory factory = getDomainFactory();
    PatientAssessment doPatientAssessment = PatientAssessmentVoAssembler.extractPatientAssessment(factory, patientAssessment);
    factory.save(doPatientAssessment);

    int countNewCarePlan = 0;
    for (int i = 0; planOfCareCollection != null && i < planOfCareCollection.size(); i++)
    {
        PlanOfCareVo voPlanOfCare = planOfCareCollection.get(i);
        if (voPlanOfCare.getID_PlanOfCare() == null)
            countNewCarePlan++;
        PlanOfCare doPlanOfCare = PlanOfCareVoAssembler.extractPlanOfCare(factory, voPlanOfCare);
        factory.save(doPlanOfCare);
    }

    PatientAssessmentVo voPatAss = PatientAssessmentVoAssembler.create(doPatientAssessment);
    Integer newPlanOfCares = new Integer(countNewCarePlan);
    DPPItem item = new DPPItem(voPatAss, newPlanOfCares);

    return item;
}
项目:AvoinApotti    文件:DailyPatientProgressImpl.java   
public PlanOfCareVoCollection listPlanOfCare(CareContextRefVo careContext, AssessmentQuestionRefVoCollection assessmentQuestionRefVoColl)
{
    if (careContext == null)
        throw new CodingRuntimeException("Cannot list PlanOfCareVoCollection for null Care Context");

    if (assessmentQuestionRefVoColl == null || assessmentQuestionRefVoColl.size() == 0)
        return null;

    StringBuffer query = new StringBuffer("from PlanOfCare poc where ");
    ArrayList values = new ArrayList();
    ArrayList params = new ArrayList();

    query.append(" poc.status is not :status ");
    params.add("status");
    values.add(getDomLookup(PlanOfCareStatus.RESOLVED));

    if(careContext != null)
    {
        if(values.size() > 0)
            query.append(" and ");
        query.append("poc.careContext.id =:careContextID");
        params.add("careContextID");
        values.add(careContext.getID_CareContext());
    }

    if(assessmentQuestionRefVoColl != null  && assessmentQuestionRefVoColl.size() > 0)
    {
        if (values.size() > 0)
            query.append(" and ");
        query.append(" poc.assessmentQuestion.id in ");
        query.append("(");
        for (int i = 0; i < assessmentQuestionRefVoColl.size(); i++)
        {
            AssessmentQuestionRefVo voAssQ = assessmentQuestionRefVoColl.get(i);
            query.append(" :assQId" + Integer.toString(i));
            if (i < (assessmentQuestionRefVoColl.size() - 1))
                query.append(", ");
            params.add("assQId" + Integer.toString(i));
            values.add(voAssQ.getID_AssessmentQuestion());
        }
        query.append(")");
    }

    DomainFactory factory = getDomainFactory();
    List list = factory.find(query.toString(), params, values);

    return PlanOfCareVoAssembler.createPlanOfCareVoCollectionFromPlanOfCare(list);
}
项目:openMAXIMS    文件:DailyPatientProgressImpl.java   
public PlanOfCareVoCollection listPlanOfCare(CareContextRefVo careContext, AssessmentQuestionRefVoCollection assessmentQuestionRefVoColl)
{
    if (careContext == null)
        throw new CodingRuntimeException("Cannot list PlanOfCareVoCollection for null Care Context");

    if (assessmentQuestionRefVoColl == null || assessmentQuestionRefVoColl.size() == 0)
        return null;

    StringBuffer query = new StringBuffer("from PlanOfCare poc where ");
    ArrayList values = new ArrayList();
    ArrayList params = new ArrayList();

    query.append(" poc.status is not :status ");
    params.add("status");
    values.add(getDomLookup(PlanOfCareStatus.RESOLVED));

    if(careContext != null)
    {
        if(values.size() > 0)
            query.append(" and ");
        query.append("poc.careContext.id =:careContextID");
        params.add("careContextID");
        values.add(careContext.getID_CareContext());
    }

    if(assessmentQuestionRefVoColl != null  && assessmentQuestionRefVoColl.size() > 0)
    {
        if (values.size() > 0)
            query.append(" and ");
        query.append(" poc.assessmentQuestion.id in ");
        query.append("(");
        for (int i = 0; i < assessmentQuestionRefVoColl.size(); i++)
        {
            AssessmentQuestionRefVo voAssQ = assessmentQuestionRefVoColl.get(i);
            query.append(" :assQId" + Integer.toString(i));
            if (i < (assessmentQuestionRefVoColl.size() - 1))
                query.append(", ");
            params.add("assQId" + Integer.toString(i));
            values.add(voAssQ.getID_AssessmentQuestion());
        }
        query.append(")");
    }

    DomainFactory factory = getDomainFactory();
    List list = factory.find(query.toString(), params, values);

    return PlanOfCareVoAssembler.createPlanOfCareVoCollectionFromPlanOfCare(list);
}
项目:openMAXIMS    文件:DailyPatientProgressImpl.java   
public PlanOfCareVoCollection listPlanOfCare(CareContextRefVo careContext, AssessmentQuestionRefVoCollection assessmentQuestionRefVoColl)
{
    if (careContext == null)
        throw new CodingRuntimeException("Cannot list PlanOfCareVoCollection for null Care Context");

    if (assessmentQuestionRefVoColl == null || assessmentQuestionRefVoColl.size() == 0)
        return null;

    StringBuffer query = new StringBuffer("from PlanOfCare poc where ");
    ArrayList values = new ArrayList();
    ArrayList params = new ArrayList();

    query.append(" poc.status is not :status ");
    params.add("status");
    values.add(getDomLookup(PlanOfCareStatus.RESOLVED));

    if(careContext != null)
    {
        if(values.size() > 0)
            query.append(" and ");
        query.append("poc.careContext.id =:careContextID");
        params.add("careContextID");
        values.add(careContext.getID_CareContext());
    }

    if(assessmentQuestionRefVoColl != null  && assessmentQuestionRefVoColl.size() > 0)
    {
        if (values.size() > 0)
            query.append(" and ");
        query.append(" poc.assessmentQuestion.id in ");
        query.append("(");
        for (int i = 0; i < assessmentQuestionRefVoColl.size(); i++)
        {
            AssessmentQuestionRefVo voAssQ = assessmentQuestionRefVoColl.get(i);
            query.append(" :assQId" + Integer.toString(i));
            if (i < (assessmentQuestionRefVoColl.size() - 1))
                query.append(", ");
            params.add("assQId" + Integer.toString(i));
            values.add(voAssQ.getID_AssessmentQuestion());
        }
        query.append(")");
    }

    DomainFactory factory = getDomainFactory();
    List list = factory.find(query.toString(), params, values);

    return PlanOfCareVoAssembler.createPlanOfCareVoCollectionFromPlanOfCare(list);
}
项目:openmaxims-linux    文件:DailyPatientProgressImpl.java   
public PlanOfCareVoCollection listPlanOfCare(CareContextRefVo careContext, AssessmentQuestionRefVoCollection assessmentQuestionRefVoColl)
{
    if (careContext == null)
        throw new CodingRuntimeException("Cannot list PlanOfCareVoCollection for null Care Context");

    if (assessmentQuestionRefVoColl == null || assessmentQuestionRefVoColl.size() == 0)
        return null;

    StringBuffer query = new StringBuffer("from PlanOfCare poc where ");
    ArrayList values = new ArrayList();
    ArrayList params = new ArrayList();

    query.append(" poc.status is not :status ");
    params.add("status");
    values.add(getDomLookup(PlanOfCareStatus.RESOLVED));

    if(careContext != null)
    {
        if(values.size() > 0)
            query.append(" and ");
        query.append("poc.careContext.id =:careContextID");
        params.add("careContextID");
        values.add(careContext.getID_CareContext());
    }

    if(assessmentQuestionRefVoColl != null  && assessmentQuestionRefVoColl.size() > 0)
    {
        if (values.size() > 0)
            query.append(" and ");
        query.append(" poc.assessmentQuestion.id in ");
        query.append("(");
        for (int i = 0; i < assessmentQuestionRefVoColl.size(); i++)
        {
            AssessmentQuestionRefVo voAssQ = assessmentQuestionRefVoColl.get(i);
            query.append(" :assQId" + Integer.toString(i));
            if (i < (assessmentQuestionRefVoColl.size() - 1))
                query.append(", ");
            params.add("assQId" + Integer.toString(i));
            values.add(voAssQ.getID_AssessmentQuestion());
        }
        query.append(")");
    }

    DomainFactory factory = getDomainFactory();
    List list = factory.find(query.toString(), params, values);

    return PlanOfCareVoAssembler.createPlanOfCareVoCollectionFromPlanOfCare(list);
}