Java 类ims.core.vo.domain.PatientNoAllergyInfoVoAssembler 实例源码

项目:AvoinApotti    文件:AllergiesImpl.java   
public PatientNoAllergyInfoVo savePatientNoAllergyInfo(PatientNoAllergyInfoVo patientNoAllergyInfo) throws StaleObjectException, UniqueKeyViolationException 
{
    if(!patientNoAllergyInfo.isValidated())
    {
        throw new CodingRuntimeException("PatientNoAllergyInfoVo Value Object Alert has not been validated");
    }

    DomainFactory factory = getDomainFactory();
    PatientNoAllergyInfo doPatientNoAllergyInfo = PatientNoAllergyInfoVoAssembler.extractPatientNoAllergyInfo(factory, patientNoAllergyInfo);

    try
    {
        factory.save(doPatientNoAllergyInfo);
    } 
    catch(UnqViolationUncheckedException e)
    {       
        PatientNoAllergyInfo noAllergyInfo = PatientNoAllergyInfo.getPatientNoAllergyInfoFromPatient(factory, patientNoAllergyInfo.getPatient().getID_Patient());
        if (noAllergyInfo != null && noAllergyInfo.getId() != null && !(noAllergyInfo.getId().equals(patientNoAllergyInfo.getID_PatientNoAllergyInfo())))
        {
            throw new UniqueKeyViolationException("A No Known Allergy record already exists for this patient. Duplicates not allowed.", e);                 
        }

        throw (e);
    }
    return (PatientNoAllergyInfoVoAssembler.create(doPatientNoAllergyInfo));        
}
项目:openMAXIMS    文件:AllergiesImpl.java   
public PatientNoAllergyInfoVo savePatientNoAllergyInfo(PatientNoAllergyInfoVo patientNoAllergyInfo) throws StaleObjectException, UniqueKeyViolationException 
{
    if(!patientNoAllergyInfo.isValidated())
    {
        throw new CodingRuntimeException("PatientNoAllergyInfoVo Value Object Alert has not been validated");
    }

    DomainFactory factory = getDomainFactory();
    PatientNoAllergyInfo doPatientNoAllergyInfo = PatientNoAllergyInfoVoAssembler.extractPatientNoAllergyInfo(factory, patientNoAllergyInfo);

    try
    {
        factory.save(doPatientNoAllergyInfo);
    } 
    catch(UnqViolationUncheckedException e)
    {       
        PatientNoAllergyInfo noAllergyInfo = PatientNoAllergyInfo.getPatientNoAllergyInfoFromPatient(factory, patientNoAllergyInfo.getPatient().getID_Patient());
        if (noAllergyInfo != null && noAllergyInfo.getId() != null && !(noAllergyInfo.getId().equals(patientNoAllergyInfo.getID_PatientNoAllergyInfo())))
        {
            throw new UniqueKeyViolationException("A No Known Allergy record already exists for this patient. Duplicates not allowed.", e);                 
        }

        throw (e);
    }
    return (PatientNoAllergyInfoVoAssembler.create(doPatientNoAllergyInfo));        
}
项目:openMAXIMS    文件:AllergiesImpl.java   
public PatientNoAllergyInfoVo savePatientNoAllergyInfo(PatientNoAllergyInfoVo patientNoAllergyInfo) throws StaleObjectException, UniqueKeyViolationException 
{
    if(!patientNoAllergyInfo.isValidated())
    {
        throw new CodingRuntimeException("PatientNoAllergyInfoVo Value Object Alert has not been validated");
    }

    DomainFactory factory = getDomainFactory();
    PatientNoAllergyInfo doPatientNoAllergyInfo = PatientNoAllergyInfoVoAssembler.extractPatientNoAllergyInfo(factory, patientNoAllergyInfo);

    try
    {
        factory.save(doPatientNoAllergyInfo);
    } 
    catch(UnqViolationUncheckedException e)
    {       
        PatientNoAllergyInfo noAllergyInfo = PatientNoAllergyInfo.getPatientNoAllergyInfoFromPatient(factory, patientNoAllergyInfo.getPatient().getID_Patient());
        if (noAllergyInfo != null && noAllergyInfo.getId() != null && !(noAllergyInfo.getId().equals(patientNoAllergyInfo.getID_PatientNoAllergyInfo())))
        {
            throw new UniqueKeyViolationException("A No Known Allergy record already exists for this patient. Duplicates not allowed.", e);                 
        }

        throw (e);
    }
    return (PatientNoAllergyInfoVoAssembler.create(doPatientNoAllergyInfo));        
}
项目:openmaxims-linux    文件:AllergiesImpl.java   
public PatientNoAllergyInfoVo savePatientNoAllergyInfo(PatientNoAllergyInfoVo patientNoAllergyInfo) throws StaleObjectException, UniqueKeyViolationException 
{
    if(!patientNoAllergyInfo.isValidated())
    {
        throw new CodingRuntimeException("PatientNoAllergyInfoVo Value Object Alert has not been validated");
    }

    DomainFactory factory = getDomainFactory();
    PatientNoAllergyInfo doPatientNoAllergyInfo = PatientNoAllergyInfoVoAssembler.extractPatientNoAllergyInfo(factory, patientNoAllergyInfo);

    try
    {
        factory.save(doPatientNoAllergyInfo);
    } 
    catch(UnqViolationUncheckedException e)
    {       
        PatientNoAllergyInfo noAllergyInfo = PatientNoAllergyInfo.getPatientNoAllergyInfoFromPatient(factory, patientNoAllergyInfo.getPatient().getID_Patient());
        if (noAllergyInfo != null && noAllergyInfo.getId() != null && !(noAllergyInfo.getId().equals(patientNoAllergyInfo.getID_PatientNoAllergyInfo())))
        {
            throw new UniqueKeyViolationException("A No Known Allergy record already exists for this patient. Duplicates not allowed.", e);                 
        }

        throw (e);
    }
    return (PatientNoAllergyInfoVoAssembler.create(doPatientNoAllergyInfo));        
}
项目:AvoinApotti    文件:AllergiesImpl.java   
public PatientNoAllergyInfoVo getPatientNoAllergyInfo(PatientRefVo patientRefVo) 
{
    DomainFactory factory = getDomainFactory();

    PatientNoAllergyInfo patientNoAllergyInfo = PatientNoAllergyInfo.getPatientNoAllergyInfoFromPatient(factory, patientRefVo.getID_Patient());
    return PatientNoAllergyInfoVoAssembler.create(patientNoAllergyInfo);
}
项目:openMAXIMS    文件:AllergiesImpl.java   
public PatientNoAllergyInfoVo getPatientNoAllergyInfo(PatientRefVo patientRefVo) 
{
    DomainFactory factory = getDomainFactory();

    PatientNoAllergyInfo patientNoAllergyInfo = PatientNoAllergyInfo.getPatientNoAllergyInfoFromPatient(factory, patientRefVo.getID_Patient());
    return PatientNoAllergyInfoVoAssembler.create(patientNoAllergyInfo);
}
项目:openMAXIMS    文件:AllergiesImpl.java   
public PatientNoAllergyInfoVo getPatientNoAllergyInfo(PatientRefVo patientRefVo) 
{
    DomainFactory factory = getDomainFactory();

    PatientNoAllergyInfo patientNoAllergyInfo = PatientNoAllergyInfo.getPatientNoAllergyInfoFromPatient(factory, patientRefVo.getID_Patient());
    return PatientNoAllergyInfoVoAssembler.create(patientNoAllergyInfo);
}
项目:openmaxims-linux    文件:AllergiesImpl.java   
public PatientNoAllergyInfoVo getPatientNoAllergyInfo(PatientRefVo patientRefVo) 
{
    DomainFactory factory = getDomainFactory();

    PatientNoAllergyInfo patientNoAllergyInfo = PatientNoAllergyInfo.getPatientNoAllergyInfoFromPatient(factory, patientRefVo.getID_Patient());
    return PatientNoAllergyInfoVoAssembler.create(patientNoAllergyInfo);
}