public PatientNoAlertInfoVo savePatientCoreClinicalData(PatientNoAlertInfoVo patientNoAlertInfo) throws StaleObjectException, UniqueKeyViolationException { if(!patientNoAlertInfo.isValidated()) { throw new CodingRuntimeException("PatientNoAlertInfoVo Value Object Alert has not been validated"); } DomainFactory factory = getDomainFactory(); PatientNoAlertInfo doPatientNoAlertInfo = PatientNoAlertInfoVoAssembler.extractPatientNoAlertInfo(factory, patientNoAlertInfo); try { factory.save(doPatientNoAlertInfo); } catch(UnqViolationUncheckedException e) { PatientNoAlertInfo noAlertInfo = PatientNoAlertInfo.getPatientNoAlertInfoFromPatient(factory, patientNoAlertInfo.getPatient().getID_Patient()); if (noAlertInfo != null && noAlertInfo.getId() != null && !(noAlertInfo.getId().equals(patientNoAlertInfo.getID_PatientNoAlertInfo()))) { throw new UniqueKeyViolationException(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue(), e); } throw (e); } return (PatientNoAlertInfoVoAssembler.create(doPatientNoAlertInfo)); }
public PatientNoAlertInfoVo getPatientNoAlertInfo(PatientRefVo patientRefVo) { DomainFactory factory = getDomainFactory(); PatientNoAlertInfo patientNoAlertInfo = PatientNoAlertInfo.getPatientNoAlertInfoFromPatient(factory, patientRefVo.getID_Patient()); return PatientNoAlertInfoVoAssembler.create(patientNoAlertInfo); }