public ims.emergency.vo.EmergencyAttendanceForTriageLiteVo getEmergencyAttendance(ims.core.admin.vo.EmergencyAttendanceRefVo attendanceRef) { if(attendanceRef == null) throw new CodingRuntimeException("Cannot get Attendance on null Id."); return EmergencyAttendanceForTriageLiteVoAssembler.create((EmergencyAttendance) getDomainFactory().getDomainObject(EmergencyAttendance.class, attendanceRef.getID_EmergencyAttendance())); }
public void refreshCoding(EmergencyAttendanceForTriageLiteVo attendanceToSave) throws StaleObjectException { // Check parameter to save if (attendanceToSave == null) throw new CodingRuntimeException("Can not save null record to data base."); if (!attendanceToSave.isValidated()) throw new CodingRuntimeException("Can not save record not validated to data base."); // Extract domain object EmergencyAttendance domEmergencyAtt = EmergencyAttendanceForTriageLiteVoAssembler.extractEmergencyAttendance(getDomainFactory(), attendanceToSave); getDomainFactory().save(domEmergencyAtt); AttendanceRequiringContracting tempAttReqContracting = attendanceFoundInAttendanceReqContracting(attendanceToSave); if (tempAttReqContracting==null ) { AttendanceRequiringContracting doAttendanceRequiringContracting=new AttendanceRequiringContracting(); doAttendanceRequiringContracting.setPatient(domEmergencyAtt.getPatient()); doAttendanceRequiringContracting.setAttendance(domEmergencyAtt); getDomainFactory().save(doAttendanceRequiringContracting); } else //if found, set the status to null { tempAttReqContracting.setStatus(null); getDomainFactory().save(tempAttReqContracting); } return; }
public EmergencyAttendanceForTriageLiteVo getEmergencyAttendance(EmergencyAttendanceRefVo attendanceRef) { if(attendanceRef == null) throw new CodingRuntimeException("Cannot get Attendance on null Id."); return EmergencyAttendanceForTriageLiteVoAssembler.create((EmergencyAttendance) getDomainFactory().getDomainObject(EmergencyAttendance.class, attendanceRef.getID_EmergencyAttendance())); }