Java 类ims.clinical.vo.domain.RACPPastMedicalHistoryVoAssembler 实例源码

项目:AvoinApotti    文件:RACPCPMHExamImpl.java   
public ims.clinical.vo.RACPPastMedicalHistoryVo getRACPPastMedicalHistoryForrefCareContext(CareContextRefVo refCareContextRefVo)
{
    if (refCareContextRefVo == null)
        throw new CodingRuntimeException("Cannot get RACPSymptomRiskFactorsVo for null ClinicalContactRefVo");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" from RACPPastMedicalHistory pmh where "); 

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    hql.append(" pmh.careContext.id = :ccId");
    markers.add("ccId");
    values.add(refCareContextRefVo.getID_CareContext());

    List listRACPPastMedicalHistory = factory.find(hql.toString(), markers,values);
    if(listRACPPastMedicalHistory != null && listRACPPastMedicalHistory.size() > 0)
    { 
        RACPPastMedicalHistoryVoCollection voColl = RACPPastMedicalHistoryVoAssembler.createRACPPastMedicalHistoryVoCollectionFromRACPPastMedicalHistory(listRACPPastMedicalHistory);
        if(voColl != null && voColl.size() > 0)
            return voColl.get(0);
    }
    return null;
}
项目:AvoinApotti    文件:RACPCPMHExamImpl.java   
public ims.clinical.vo.RACPPastMedicalHistoryVo saveRACPPastMedicalHistoryVo(ims.clinical.vo.RACPPastMedicalHistoryVo voRACPPastMedicalHistory, VitalSignsVo voVitalSigns, Boolean bUpdateVitalSigns) throws ims.domain.exceptions.StaleObjectException
{
    if (voRACPPastMedicalHistory == null  || !voRACPPastMedicalHistory.isValidated())
        throw new CodingRuntimeException("Past Medical History is null or has not been validated");
    if (voVitalSigns == null  || !voVitalSigns.isValidated())
        throw new CodingRuntimeException("Vital Signs is null or has not been validated");

    DomainFactory factory=getDomainFactory();

    if(bUpdateVitalSigns){
        VitalSigns doVitalSigns = VitalSignsVoAssembler.extractVitalSigns(factory, voVitalSigns);
        factory.save(doVitalSigns);
    }

    RACPPastMedicalHistory doRACPPastMedicalHistory = RACPPastMedicalHistoryVoAssembler.extractRACPPastMedicalHistory(factory, voRACPPastMedicalHistory);
    factory.save(doRACPPastMedicalHistory);
    return RACPPastMedicalHistoryVoAssembler.create(doRACPPastMedicalHistory);
}
项目:openMAXIMS    文件:RACPCPMHExamImpl.java   
public ims.clinical.vo.RACPPastMedicalHistoryVo getRACPPastMedicalHistoryForrefCareContext(CareContextRefVo refCareContextRefVo)
{
    if (refCareContextRefVo == null)
        throw new CodingRuntimeException("Cannot get RACPSymptomRiskFactorsVo for null ClinicalContactRefVo");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" from RACPPastMedicalHistory pmh where "); 

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    hql.append(" pmh.careContext.id = :ccId");
    markers.add("ccId");
    values.add(refCareContextRefVo.getID_CareContext());

    List listRACPPastMedicalHistory = factory.find(hql.toString(), markers,values);
    if(listRACPPastMedicalHistory != null && listRACPPastMedicalHistory.size() > 0)
    { 
        RACPPastMedicalHistoryVoCollection voColl = RACPPastMedicalHistoryVoAssembler.createRACPPastMedicalHistoryVoCollectionFromRACPPastMedicalHistory(listRACPPastMedicalHistory);
        if(voColl != null && voColl.size() > 0)
            return voColl.get(0);
    }
    return null;
}
项目:openMAXIMS    文件:RACPCPMHExamImpl.java   
public ims.clinical.vo.RACPPastMedicalHistoryVo saveRACPPastMedicalHistoryVo(ims.clinical.vo.RACPPastMedicalHistoryVo voRACPPastMedicalHistory, VitalSignsVo voVitalSigns, Boolean bUpdateVitalSigns) throws ims.domain.exceptions.StaleObjectException
{
    if (voRACPPastMedicalHistory == null  || !voRACPPastMedicalHistory.isValidated())
        throw new CodingRuntimeException("Past Medical History is null or has not been validated");
    if (voVitalSigns == null  || !voVitalSigns.isValidated())
        throw new CodingRuntimeException("Vital Signs is null or has not been validated");

    DomainFactory factory=getDomainFactory();

    if(bUpdateVitalSigns){
        VitalSigns doVitalSigns = VitalSignsVoAssembler.extractVitalSigns(factory, voVitalSigns);
        factory.save(doVitalSigns);
    }

    RACPPastMedicalHistory doRACPPastMedicalHistory = RACPPastMedicalHistoryVoAssembler.extractRACPPastMedicalHistory(factory, voRACPPastMedicalHistory);
    factory.save(doRACPPastMedicalHistory);
    return RACPPastMedicalHistoryVoAssembler.create(doRACPPastMedicalHistory);
}
项目:openMAXIMS    文件:RACPCPMHExamImpl.java   
public ims.clinical.vo.RACPPastMedicalHistoryVo getRACPPastMedicalHistoryForrefCareContext(CareContextRefVo refCareContextRefVo)
{
    if (refCareContextRefVo == null)
        throw new CodingRuntimeException("Cannot get RACPSymptomRiskFactorsVo for null ClinicalContactRefVo");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" from RACPPastMedicalHistory pmh where "); 

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    hql.append(" pmh.careContext.id = :ccId");
    markers.add("ccId");
    values.add(refCareContextRefVo.getID_CareContext());

    List listRACPPastMedicalHistory = factory.find(hql.toString(), markers,values);
    if(listRACPPastMedicalHistory != null && listRACPPastMedicalHistory.size() > 0)
    { 
        RACPPastMedicalHistoryVoCollection voColl = RACPPastMedicalHistoryVoAssembler.createRACPPastMedicalHistoryVoCollectionFromRACPPastMedicalHistory(listRACPPastMedicalHistory);
        if(voColl != null && voColl.size() > 0)
            return voColl.get(0);
    }
    return null;
}
项目:openMAXIMS    文件:RACPCPMHExamImpl.java   
public ims.clinical.vo.RACPPastMedicalHistoryVo saveRACPPastMedicalHistoryVo(ims.clinical.vo.RACPPastMedicalHistoryVo voRACPPastMedicalHistory, VitalSignsVo voVitalSigns, Boolean bUpdateVitalSigns) throws ims.domain.exceptions.StaleObjectException
{
    if (voRACPPastMedicalHistory == null  || !voRACPPastMedicalHistory.isValidated())
        throw new CodingRuntimeException("Past Medical History is null or has not been validated");
    if (voVitalSigns == null  || !voVitalSigns.isValidated())
        throw new CodingRuntimeException("Vital Signs is null or has not been validated");

    DomainFactory factory=getDomainFactory();

    if(bUpdateVitalSigns){
        VitalSigns doVitalSigns = VitalSignsVoAssembler.extractVitalSigns(factory, voVitalSigns);
        factory.save(doVitalSigns);
    }

    RACPPastMedicalHistory doRACPPastMedicalHistory = RACPPastMedicalHistoryVoAssembler.extractRACPPastMedicalHistory(factory, voRACPPastMedicalHistory);
    factory.save(doRACPPastMedicalHistory);
    return RACPPastMedicalHistoryVoAssembler.create(doRACPPastMedicalHistory);
}
项目:openmaxims-linux    文件:RACPCPMHExamImpl.java   
public ims.clinical.vo.RACPPastMedicalHistoryVo getRACPPastMedicalHistoryForrefCareContext(CareContextRefVo refCareContextRefVo)
{
    if (refCareContextRefVo == null)
        throw new CodingRuntimeException("Cannot get RACPSymptomRiskFactorsVo for null ClinicalContactRefVo");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" from RACPPastMedicalHistory pmh where "); 

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    hql.append(" pmh.careContext.id = :ccId");
    markers.add("ccId");
    values.add(refCareContextRefVo.getID_CareContext());

    List listRACPPastMedicalHistory = factory.find(hql.toString(), markers,values);
    if(listRACPPastMedicalHistory != null && listRACPPastMedicalHistory.size() > 0)
    { 
        RACPPastMedicalHistoryVoCollection voColl = RACPPastMedicalHistoryVoAssembler.createRACPPastMedicalHistoryVoCollectionFromRACPPastMedicalHistory(listRACPPastMedicalHistory);
        if(voColl != null && voColl.size() > 0)
            return voColl.get(0);
    }
    return null;
}
项目:openmaxims-linux    文件:RACPCPMHExamImpl.java   
public ims.clinical.vo.RACPPastMedicalHistoryVo saveRACPPastMedicalHistoryVo(ims.clinical.vo.RACPPastMedicalHistoryVo voRACPPastMedicalHistory, VitalSignsVo voVitalSigns, Boolean bUpdateVitalSigns) throws ims.domain.exceptions.StaleObjectException
{
    if (voRACPPastMedicalHistory == null  || !voRACPPastMedicalHistory.isValidated())
        throw new CodingRuntimeException("Past Medical History is null or has not been validated");
    if (voVitalSigns == null  || !voVitalSigns.isValidated())
        throw new CodingRuntimeException("Vital Signs is null or has not been validated");

    DomainFactory factory=getDomainFactory();

    if(bUpdateVitalSigns){
        VitalSigns doVitalSigns = VitalSignsVoAssembler.extractVitalSigns(factory, voVitalSigns);
        factory.save(doVitalSigns);
    }

    RACPPastMedicalHistory doRACPPastMedicalHistory = RACPPastMedicalHistoryVoAssembler.extractRACPPastMedicalHistory(factory, voRACPPastMedicalHistory);
    factory.save(doRACPPastMedicalHistory);
    return RACPPastMedicalHistoryVoAssembler.create(doRACPPastMedicalHistory);
}