private void populateScreenFromData(PendingEmergencyAdmissionShortVo pendrec, BedAvailabilityForTrackVo bedAvailability) { clearControls(); if (pendrec == null) return; if (!EmergencyAdmissionStatus.CANCELLED.equals(pendrec.getAdmissionStatus())) //wdev-17254 { if (bedAvailability != null) form.ccRequestedBy().setValue(bedAvailability.getRequestedBy()); form.dtimDecisionToAdmitDate().setValue(pendrec.getDTADateTime()); form.cmbDTABedType().setValue(pendrec.getBedTypeRequested()); if (bedAvailability != null) form.dtimAvailableBedTime().setValue(bedAvailability.getAvailableDateTime()); } }
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); }