public TrackingForClinicianWorklistAndTriageVo saveRemoveBed(TrackingForClinicianWorklistAndTriageVo tracking, PendingEmergencyAdmissionShortVo pending) throws StaleObjectException, UniqueKeyViolationException { if( tracking == null ) throw new CodingRuntimeException("Cannot save a null TrackingForClinicianWorklistAndTriageVo record"); DomainFactory factory = getDomainFactory(); PendingEmergencyAdmission doPendingEmergencyAdmission = null; if( pending != null ) { doPendingEmergencyAdmission = PendingEmergencyAdmissionShortVoAssembler.extractPendingEmergencyAdmission(factory, pending); factory.save(doPendingEmergencyAdmission); } Tracking doTracking = TrackingForClinicianWorklistAndTriageVoAssembler.extractTracking(factory, tracking); if( doTracking != null && doPendingEmergencyAdmission != null) doTracking.setAssociatedPendingEmergencyAdmission(doPendingEmergencyAdmission); factory.save(doTracking); return TrackingForClinicianWorklistAndTriageVoAssembler.create(doTracking); }
public TrackingforDecisionToAdmitDialogVo saveRemoveBed(TrackingforDecisionToAdmitDialogVo tracking, PendingEmergencyAdmissionShortVo pending) throws StaleObjectException, UniqueKeyViolationException { if( tracking == null ) throw new CodingRuntimeException("Cannot save a null TrackingForClinicianWorklistAndTriageVo record"); DomainFactory factory = getDomainFactory(); PendingEmergencyAdmission doPendingEmergencyAdmission = null; if( pending != null ) { doPendingEmergencyAdmission = PendingEmergencyAdmissionShortVoAssembler.extractPendingEmergencyAdmission(factory, pending); //WDEV-234401 // factory.save(doPendingEmergencyAdmission); //WDEV-234401 } Tracking doTracking = TrackingforDecisionToAdmitDialogVoAssembler.extractTracking(factory, tracking); if( doTracking != null && doPendingEmergencyAdmission != null) doTracking.setAssociatedPendingEmergencyAdmission(doPendingEmergencyAdmission); factory.save(doTracking); factory.save(doPendingEmergencyAdmission); //WDEV-234401 return TrackingforDecisionToAdmitDialogVoAssembler.create(doTracking); }