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())); }
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; }
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; }
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); }
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); }
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; }