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

项目:AvoinApotti    文件:RespiratoryTreatmentImpl.java   
/**
* get Respiratory Treatment
*/
public ims.core.vo.RespiratoryTreatmentVo getRespiratoryTreatment(ims.core.vo.ClinicalContactShortVo voClinicalContact)
{
    if (voClinicalContact == null)
        throw new RuntimeException("Cannot get RespiratoryTreatmentVo for null ClinicalContactShortVo");

    StringBuffer hql = new StringBuffer("from RespiratoryTreatment as r1_1 where r1_1.sOAPClinicalContact.id = :CCID and r1_1.isRIE is null order by r1_1.systemInformation.creationDateTime desc");
    List list = getDomainFactory().find(hql.toString(), "CCID", voClinicalContact.getID_ClinicalContact());

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

    RespiratoryTreatmentVoCollection voList = RespiratoryTreatmentVoAssembler.createRespiratoryTreatmentVoCollectionFromRespiratoryTreatment(list);;
    if (voList.size() > 0)
        return voList.get(0);

    return null;
}
项目:AvoinApotti    文件:RespiratoryTreatmentImpl.java   
/**
 * save Respiratory Treatment
 */
public RespiratoryTreatmentVo saveRespiratoryTreatment(ims.core.vo.RespiratoryTreatmentVo voRespiratoryTreatment) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if(!voRespiratoryTreatment.isValidated())
        throw new DomainRuntimeException("This Respiratory Treatment has not been validated");

    //if a new RespiratoryTreatmentVo record must be save check if already exist a RespiratoryTreatmentVo record for selected clinical contact
    if(voRespiratoryTreatment != null && voRespiratoryTreatment.getID_RespiratoryTreatment() == null)
    {           
        if(voRespiratoryTreatment.getSOAPClinicalContactIsNotNull())
        {
            RespiratoryTreatmentVo tempVo = getRespiratoryTreatment(voRespiratoryTreatment.getSOAPClinicalContact());
            if(tempVo != null)
                throw new DomainRuntimeException("A Respiratory Treatment record already exists for this SOAP clinical contact");
        }
    }
    DomainFactory factory = getDomainFactory();
    RespiratoryTreatment doRespiratoryTreatment = RespiratoryTreatmentVoAssembler.extractRespiratoryTreatment(factory, voRespiratoryTreatment);
    factory.save(doRespiratoryTreatment);   
    return RespiratoryTreatmentVoAssembler.create(doRespiratoryTreatment);
}
项目:openMAXIMS    文件:RespiratoryTreatmentImpl.java   
/**
* get Respiratory Treatment
*/
public ims.core.vo.RespiratoryTreatmentVo getRespiratoryTreatment(ims.core.vo.ClinicalContactShortVo voClinicalContact)
{
    if (voClinicalContact == null)
        throw new RuntimeException("Cannot get RespiratoryTreatmentVo for null ClinicalContactShortVo");

    StringBuffer hql = new StringBuffer("from RespiratoryTreatment as r1_1 where r1_1.sOAPClinicalContact.id = :CCID and r1_1.isRIE is null order by r1_1.systemInformation.creationDateTime desc");
    List list = getDomainFactory().find(hql.toString(), "CCID", voClinicalContact.getID_ClinicalContact());

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

    RespiratoryTreatmentVoCollection voList = RespiratoryTreatmentVoAssembler.createRespiratoryTreatmentVoCollectionFromRespiratoryTreatment(list);;
    if (voList.size() > 0)
        return voList.get(0);

    return null;
}
项目:openMAXIMS    文件:RespiratoryTreatmentImpl.java   
/**
 * save Respiratory Treatment
 */
public RespiratoryTreatmentVo saveRespiratoryTreatment(ims.core.vo.RespiratoryTreatmentVo voRespiratoryTreatment) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if(!voRespiratoryTreatment.isValidated())
        throw new DomainRuntimeException("This Respiratory Treatment has not been validated");

    //if a new RespiratoryTreatmentVo record must be save check if already exist a RespiratoryTreatmentVo record for selected clinical contact
    if(voRespiratoryTreatment != null && voRespiratoryTreatment.getID_RespiratoryTreatment() == null)
    {           
        if(voRespiratoryTreatment.getSOAPClinicalContactIsNotNull())
        {
            RespiratoryTreatmentVo tempVo = getRespiratoryTreatment(voRespiratoryTreatment.getSOAPClinicalContact());
            if(tempVo != null)
                throw new DomainRuntimeException("A Respiratory Treatment record already exists for this SOAP clinical contact");
        }
    }
    DomainFactory factory = getDomainFactory();
    RespiratoryTreatment doRespiratoryTreatment = RespiratoryTreatmentVoAssembler.extractRespiratoryTreatment(factory, voRespiratoryTreatment);
    factory.save(doRespiratoryTreatment);   
    return RespiratoryTreatmentVoAssembler.create(doRespiratoryTreatment);
}
项目:openMAXIMS    文件:RespiratoryTreatmentImpl.java   
/**
* get Respiratory Treatment
*/
public ims.core.vo.RespiratoryTreatmentVo getRespiratoryTreatment(ims.core.vo.ClinicalContactShortVo voClinicalContact)
{
    if (voClinicalContact == null)
        throw new RuntimeException("Cannot get RespiratoryTreatmentVo for null ClinicalContactShortVo");

    StringBuffer hql = new StringBuffer("from RespiratoryTreatment as r1_1 where r1_1.sOAPClinicalContact.id = :CCID and r1_1.isRIE is null order by r1_1.systemInformation.creationDateTime desc");
    List list = getDomainFactory().find(hql.toString(), "CCID", voClinicalContact.getID_ClinicalContact());

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

    RespiratoryTreatmentVoCollection voList = RespiratoryTreatmentVoAssembler.createRespiratoryTreatmentVoCollectionFromRespiratoryTreatment(list);;
    if (voList.size() > 0)
        return voList.get(0);

    return null;
}
项目:openMAXIMS    文件:RespiratoryTreatmentImpl.java   
/**
 * save Respiratory Treatment
 */
public RespiratoryTreatmentVo saveRespiratoryTreatment(ims.core.vo.RespiratoryTreatmentVo voRespiratoryTreatment) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if(!voRespiratoryTreatment.isValidated())
        throw new DomainRuntimeException("This Respiratory Treatment has not been validated");

    //if a new RespiratoryTreatmentVo record must be save check if already exist a RespiratoryTreatmentVo record for selected clinical contact
    if(voRespiratoryTreatment != null && voRespiratoryTreatment.getID_RespiratoryTreatment() == null)
    {           
        if(voRespiratoryTreatment.getSOAPClinicalContactIsNotNull())
        {
            RespiratoryTreatmentVo tempVo = getRespiratoryTreatment(voRespiratoryTreatment.getSOAPClinicalContact());
            if(tempVo != null)
                throw new DomainRuntimeException("A Respiratory Treatment record already exists for this SOAP clinical contact");
        }
    }
    DomainFactory factory = getDomainFactory();
    RespiratoryTreatment doRespiratoryTreatment = RespiratoryTreatmentVoAssembler.extractRespiratoryTreatment(factory, voRespiratoryTreatment);
    factory.save(doRespiratoryTreatment);   
    return RespiratoryTreatmentVoAssembler.create(doRespiratoryTreatment);
}
项目:openmaxims-linux    文件:RespiratoryTreatmentImpl.java   
/**
* get Respiratory Treatment
*/
public ims.core.vo.RespiratoryTreatmentVo getRespiratoryTreatment(ims.core.vo.ClinicalContactShortVo voClinicalContact)
{
    if (voClinicalContact == null)
        throw new RuntimeException("Cannot get RespiratoryTreatmentVo for null ClinicalContactShortVo");

    StringBuffer hql = new StringBuffer("from RespiratoryTreatment as r1_1 where r1_1.sOAPClinicalContact.id = :CCID and r1_1.isRIE is null order by r1_1.systemInformation.creationDateTime desc");
    List list = getDomainFactory().find(hql.toString(), "CCID", voClinicalContact.getID_ClinicalContact());

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

    RespiratoryTreatmentVoCollection voList = RespiratoryTreatmentVoAssembler.createRespiratoryTreatmentVoCollectionFromRespiratoryTreatment(list);;
    if (voList.size() > 0)
        return voList.get(0);

    return null;
}
项目:openmaxims-linux    文件:RespiratoryTreatmentImpl.java   
/**
 * save Respiratory Treatment
 */
public RespiratoryTreatmentVo saveRespiratoryTreatment(ims.core.vo.RespiratoryTreatmentVo voRespiratoryTreatment) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if(!voRespiratoryTreatment.isValidated())
        throw new DomainRuntimeException("This Respiratory Treatment has not been validated");

    //if a new RespiratoryTreatmentVo record must be save check if already exist a RespiratoryTreatmentVo record for selected clinical contact
    if(voRespiratoryTreatment != null && voRespiratoryTreatment.getID_RespiratoryTreatment() == null)
    {           
        if(voRespiratoryTreatment.getSOAPClinicalContactIsNotNull())
        {
            RespiratoryTreatmentVo tempVo = getRespiratoryTreatment(voRespiratoryTreatment.getSOAPClinicalContact());
            if(tempVo != null)
                throw new DomainRuntimeException("A Respiratory Treatment record already exists for this SOAP clinical contact");
        }
    }
    DomainFactory factory = getDomainFactory();
    RespiratoryTreatment doRespiratoryTreatment = RespiratoryTreatmentVoAssembler.extractRespiratoryTreatment(factory, voRespiratoryTreatment);
    factory.save(doRespiratoryTreatment);   
    return RespiratoryTreatmentVoAssembler.create(doRespiratoryTreatment);
}
项目:AvoinApotti    文件:Logic.java   
private void populateInstanceControls()
{
    clearControls();

    if(form.getLocalContext().getRespiratoryTreatment() == null) return;

    RespiratoryTreatmentVo voRespiratoryTreat = form.getLocalContext().getRespiratoryTreatment();

    form.qmbAuthoringCP().newRow(voRespiratoryTreat.getAuthoringCP(),voRespiratoryTreat.getAuthoringCP().toString());
    super.populateScreenFromData(voRespiratoryTreat);
    populateTreatmentGrd(voRespiratoryTreat.getTreatments().sort());
}
项目:AvoinApotti    文件:Logic.java   
private void populateInstanceControlsUpdate()  throws PresentationLogicException
{
    if(form.getLocalContext().getRespiratoryTreatment() == null) return;

    RespiratoryTreatmentVo voRespiratoryTreat = form.getLocalContext().getRespiratoryTreatment();

    prePopulateTreatmentGrd();      
    populateTreatmentGrd(voRespiratoryTreat.getTreatments());
}
项目:AvoinApotti    文件:RespiratoryTreatmentImpl.java   
public ClinicalContactShortVoCollection listRespTreatContacts(Integer idCareContext) 
{

    if (idCareContext != null)
    {
        DomainFactory factory = getDomainFactory();
        List RespTrList  = factory.find(" from RespiratoryTreatment rt where rt.sOAPClinicalContact.careContext.id = :ccId  and rt.isRIE is null order by rt.authoringDateTime",
                new String[]{"ccId"},
                new Object[]{idCareContext});

        ClinicalContactShortVoCollection voCareContactList = new ClinicalContactShortVoCollection();
        for (int x = 0; x < RespTrList.size(); x++)
        {
            RespiratoryTreatment domRespTr = (RespiratoryTreatment) RespTrList.get(x);

            RespiratoryTreatmentVo voRespTreat = RespiratoryTreatmentVoAssembler.create(domRespTr);

            //TODO: check that SOAP clinical contact is the correct vo to handle here.
            voCareContactList.add(voRespTreat.getSOAPClinicalContact());
        }

        return voCareContactList;
    }

    return null;

}
项目:openMAXIMS    文件:Logic.java   
private void populateInstanceControls()
{
    clearControls();

    if(form.getLocalContext().getRespiratoryTreatment() == null) return;

    RespiratoryTreatmentVo voRespiratoryTreat = form.getLocalContext().getRespiratoryTreatment();

    form.qmbAuthoringCP().newRow(voRespiratoryTreat.getAuthoringCP(),voRespiratoryTreat.getAuthoringCP().toString());
    super.populateScreenFromData(voRespiratoryTreat);
    populateTreatmentGrd(voRespiratoryTreat.getTreatments().sort());
}
项目:openMAXIMS    文件:Logic.java   
private void populateInstanceControlsUpdate()  throws PresentationLogicException
{
    if(form.getLocalContext().getRespiratoryTreatment() == null) return;

    RespiratoryTreatmentVo voRespiratoryTreat = form.getLocalContext().getRespiratoryTreatment();

    prePopulateTreatmentGrd();      
    populateTreatmentGrd(voRespiratoryTreat.getTreatments());
}
项目:openMAXIMS    文件:RespiratoryTreatmentImpl.java   
public ClinicalContactShortVoCollection listRespTreatContacts(Integer idCareContext) 
{

    if (idCareContext != null)
    {
        DomainFactory factory = getDomainFactory();
        List RespTrList  = factory.find(" from RespiratoryTreatment rt where rt.sOAPClinicalContact.careContext.id = :ccId  and rt.isRIE is null order by rt.authoringDateTime",
                new String[]{"ccId"},
                new Object[]{idCareContext});

        ClinicalContactShortVoCollection voCareContactList = new ClinicalContactShortVoCollection();
        for (int x = 0; x < RespTrList.size(); x++)
        {
            RespiratoryTreatment domRespTr = (RespiratoryTreatment) RespTrList.get(x);

            RespiratoryTreatmentVo voRespTreat = RespiratoryTreatmentVoAssembler.create(domRespTr);

            //TODO: check that SOAP clinical contact is the correct vo to handle here.
            voCareContactList.add(voRespTreat.getSOAPClinicalContact());
        }

        return voCareContactList;
    }

    return null;

}
项目:openMAXIMS    文件:Logic.java   
private void populateInstanceControls()
{
    clearControls();

    if(form.getLocalContext().getRespiratoryTreatment() == null) return;

    RespiratoryTreatmentVo voRespiratoryTreat = form.getLocalContext().getRespiratoryTreatment();

    form.qmbAuthoringCP().newRow(voRespiratoryTreat.getAuthoringCP(),voRespiratoryTreat.getAuthoringCP().toString());
    super.populateScreenFromData(voRespiratoryTreat);
    populateTreatmentGrd(voRespiratoryTreat.getTreatments().sort());
}
项目:openMAXIMS    文件:Logic.java   
private void populateInstanceControlsUpdate()  throws PresentationLogicException
{
    if(form.getLocalContext().getRespiratoryTreatment() == null) return;

    RespiratoryTreatmentVo voRespiratoryTreat = form.getLocalContext().getRespiratoryTreatment();

    prePopulateTreatmentGrd();      
    populateTreatmentGrd(voRespiratoryTreat.getTreatments());
}
项目:openMAXIMS    文件:RespiratoryTreatmentImpl.java   
public ClinicalContactShortVoCollection listRespTreatContacts(Integer idCareContext) 
{

    if (idCareContext != null)
    {
        DomainFactory factory = getDomainFactory();
        List RespTrList  = factory.find(" from RespiratoryTreatment rt where rt.sOAPClinicalContact.careContext.id = :ccId  and rt.isRIE is null order by rt.authoringDateTime",
                new String[]{"ccId"},
                new Object[]{idCareContext});

        ClinicalContactShortVoCollection voCareContactList = new ClinicalContactShortVoCollection();
        for (int x = 0; x < RespTrList.size(); x++)
        {
            RespiratoryTreatment domRespTr = (RespiratoryTreatment) RespTrList.get(x);

            RespiratoryTreatmentVo voRespTreat = RespiratoryTreatmentVoAssembler.create(domRespTr);

            //TODO: check that SOAP clinical contact is the correct vo to handle here.
            voCareContactList.add(voRespTreat.getSOAPClinicalContact());
        }

        return voCareContactList;
    }

    return null;

}
项目:openmaxims-linux    文件:Logic.java   
private void populateInstanceControls()
{
    clearControls();

    if(form.getLocalContext().getRespiratoryTreatment() == null) return;

    RespiratoryTreatmentVo voRespiratoryTreat = form.getLocalContext().getRespiratoryTreatment();

    form.qmbAuthoringCP().newRow(voRespiratoryTreat.getAuthoringCP(),voRespiratoryTreat.getAuthoringCP().toString());
    super.populateScreenFromData(voRespiratoryTreat);
    populateTreatmentGrd(voRespiratoryTreat.getTreatments().sort());
}
项目:openmaxims-linux    文件:Logic.java   
private void populateInstanceControlsUpdate()  throws PresentationLogicException
{
    if(form.getLocalContext().getRespiratoryTreatment() == null) return;

    RespiratoryTreatmentVo voRespiratoryTreat = form.getLocalContext().getRespiratoryTreatment();

    prePopulateTreatmentGrd();      
    populateTreatmentGrd(voRespiratoryTreat.getTreatments());
}
项目:openmaxims-linux    文件:RespiratoryTreatmentImpl.java   
public ClinicalContactShortVoCollection listRespTreatContacts(Integer idCareContext) 
{

    if (idCareContext != null)
    {
        DomainFactory factory = getDomainFactory();
        List RespTrList  = factory.find(" from RespiratoryTreatment rt where rt.sOAPClinicalContact.careContext.id = :ccId  and rt.isRIE is null order by rt.authoringDateTime",
                new String[]{"ccId"},
                new Object[]{idCareContext});

        ClinicalContactShortVoCollection voCareContactList = new ClinicalContactShortVoCollection();
        for (int x = 0; x < RespTrList.size(); x++)
        {
            RespiratoryTreatment domRespTr = (RespiratoryTreatment) RespTrList.get(x);

            RespiratoryTreatmentVo voRespTreat = RespiratoryTreatmentVoAssembler.create(domRespTr);

            //TODO: check that SOAP clinical contact is the correct vo to handle here.
            voCareContactList.add(voRespTreat.getSOAPClinicalContact());
        }

        return voCareContactList;
    }

    return null;

}