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

项目:AvoinApotti    文件:BedAdmissionComponentImpl.java   
public PatientWithGPForCCGVo getPatientForCCG(PatientRefVo patient)
{
    if (patient == null || patient.getID_Patient() == null)
        return null;

    return PatientWithGPForCCGVoAssembler.create((ims.core.patient.domain.objects.Patient) getDomainFactory().getDomainObject(ims.core.patient.domain.objects.Patient.class, patient.getID_Patient()));
}
项目:openMAXIMS    文件:CCGContractForPostCodeHelper.java   
private PatientWithGPForCCGVo getPatientForCCG(PatientRefVo patient)
{
    if (patient == null || patient.getID_Patient() == null)
        return null;

    PatientWithGPForCCGVo patientWithGP = (PatientWithGPForCCGVo) PatientWithGPForCCGVoAssembler.create((ims.core.patient.domain.objects.Patient) getDomainFactory().getDomainObject(ims.core.patient.domain.objects.Patient.class, patient.getID_Patient()));
    return patientWithGP;
}
项目:openMAXIMS    文件:BedAdmissionComponentImpl.java   
public PatientWithGPForCCGVo getPatientForCCG(PatientRefVo patientRef)
{
    if (patientRef == null)
        return null;
    DomainFactory domainFactory = getDomainFactory();

    ims.core.patient.domain.objects.Patient record = (ims.core.patient.domain.objects.Patient) domainFactory.getDomainObject(ims.core.patient.domain.objects.Patient.class, patientRef.getID_Patient());

    if (record != null && Boolean.TRUE.equals(record.isIsActive()))
    {    
        return PatientWithGPForCCGVoAssembler.create(record);
    }
    return null;
}
项目:openMAXIMS    文件:PendingEmergencyAdmissionRequestImpl.java   
public CatsReferralRepatriationRequestVo save(PasEventRepatriationVo pasEvent, CareSpellRepatriationVo careSpell, CatsReferralRepatriationRequestVo repatriationReferral) throws ims.domain.exceptions.DomainInterfaceException, ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.ForeignKeyViolationException, ims.domain.exceptions.UniqueKeyViolationException
{
    if (pasEvent == null || careSpell == null || repatriationReferral == null)
        throw new CodingRuntimeException("Cannot save null records.");

    if (!pasEvent.isValidated() || !careSpell.isValidated() || !repatriationReferral.isValidated())
        throw new CodingRuntimeException("Records to save are not validated.");

    @SuppressWarnings("rawtypes")
    HashMap hashMap = new HashMap();

    PASEvent domPasEvent = PasEventRepatriationVoAssembler.extractPASEvent(getDomainFactory(), pasEvent, hashMap);
    getDomainFactory().save(domPasEvent);

    CareSpell domCareSpell = CareSpellRepatriationVoAssembler.extractCareSpell(getDomainFactory(), careSpell, hashMap);
    getDomainFactory().save(domCareSpell);

    CatsReferral domCatsReferral = CatsReferralRepatriationRequestVoAssembler.extractCatsReferral(getDomainFactory(), repatriationReferral, hashMap);

    //WDEV-21767 Pending Emergency Admissions - Ensure referral has a valid CCG Code (PCT)
    if (domCatsReferral.getReferralDetails().getPCT() == null)
    {
        PatientWithGPForCCGVo patientWithGP = PatientWithGPForCCGVoAssembler.create(domCatsReferral.getPatient());
        String ccgCode = getCCGCode(patientWithGP);
        if (ccgCode != null)
        {
            domCatsReferral.getReferralDetails().setPCT(ccgCode);
        }
    }

    getDomainFactory().save(domCatsReferral);

    return CatsReferralRepatriationRequestVoAssembler.create(domCatsReferral);
}
项目:openMAXIMS    文件:PendingEmergencyAdmissionRequestImpl.java   
public ims.core.vo.CatsReferralRepatriationRequestVo save(ims.core.vo.CatsReferralRepatriationRequestVo repatriationReferral) throws ims.domain.exceptions.DomainInterfaceException, ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.ForeignKeyViolationException, ims.domain.exceptions.UniqueKeyViolationException
{
    if (repatriationReferral == null)
        throw new CodingRuntimeException("Cannot save null record.");


    if (!repatriationReferral.isValidated())
        throw new CodingRuntimeException("Record to save is not validated.");


    @SuppressWarnings("rawtypes")
    HashMap map = new HashMap();
    CatsReferral domCats = CatsReferralRepatriationRequestVoAssembler.extractCatsReferral(getDomainFactory(), repatriationReferral, map);

    //WDEV-21767 Pending Emergency Admissions - Ensure referral has a valid CCG Code (PCT)
    if (domCats.getReferralDetails().getPCT() == null)
    {
        PatientWithGPForCCGVo patientWithGP = PatientWithGPForCCGVoAssembler.create(domCats.getPatient());
        String ccgCode = getCCGCode(patientWithGP);
        if (ccgCode != null)
        {
            domCats.getReferralDetails().setPCT(ccgCode);
        }
    }

    getDomainFactory().save(domCats);

    return CatsReferralRepatriationRequestVoAssembler.create(domCats);
}
项目:openMAXIMS    文件:ReferralDetailsComponentImpl.java   
public PatientWithGPForCCGVo getPatientWithGp(PatientRefVo patientRef)
{
    if (patientRef == null || patientRef.getID_Patient() == null)
        return null;

    PatientWithGPForCCGVo patientWithGP = (PatientWithGPForCCGVo) PatientWithGPForCCGVoAssembler.create((ims.core.patient.domain.objects.Patient) getDomainFactory().getDomainObject(ims.core.patient.domain.objects.Patient.class, patientRef.getID_Patient()));

    return patientWithGP;
}
项目:openMAXIMS    文件:BedAdmissionComponentImpl.java   
public PatientWithGPForCCGVo getPatientForCCG(PatientRefVo patient)
{
    if (patient == null || patient.getID_Patient() == null)
        return null;

    return PatientWithGPForCCGVoAssembler.create((ims.core.patient.domain.objects.Patient) getDomainFactory().getDomainObject(ims.core.patient.domain.objects.Patient.class, patient.getID_Patient()));
}
项目:openmaxims-linux    文件:BedAdmissionComponentImpl.java   
public PatientWithGPForCCGVo getPatientForCCG(PatientRefVo patient)
{
    if (patient == null || patient.getID_Patient() == null)
        return null;

    return PatientWithGPForCCGVoAssembler.create((ims.core.patient.domain.objects.Patient) getDomainFactory().getDomainObject(ims.core.patient.domain.objects.Patient.class, patient.getID_Patient()));
}