/** * saveDiagnosisVo */ public PatientDiagnosisEDischargeVo saveDiagnosisVo(PatientDiagnosisEDischargeVo voDiagnosis, SummaryRefVo summaryVo) throws DomainInterfaceException, StaleObjectException, UniqueKeyViolationException { // Ensure the value object has been validated if (!voDiagnosis.isValidated()) throw new DomainRuntimeException("Diagnosis has not been validated"); DomainFactory factory = getDomainFactory(); PatientDiagnosis doPatDiag = PatientDiagnosisEDischargeVoAssembler.extractPatientDiagnosis(factory, voDiagnosis); factory.save(doPatDiag); if (summaryVo != null && voDiagnosis.getIsComplicationIsNotNull() && voDiagnosis.getIsComorbidityIsNotNull() && ! voDiagnosis.getIsComplication() && ! voDiagnosis.getIsComorbidity()) { IEDischargeHelper impl = (IEDischargeHelper) getDomainImpl(EDischargeHelper.class); impl.updateSummaryIfRequired(voDiagnosis, summaryVo, factory); } return PatientDiagnosisEDischargeVoAssembler.create(doPatDiag);//Create here to avoid possible StaleObj in PMH save }
/** * Get OPDEDVo */ public ims.core.vo.PatientDiagnosisEDischargeVo getDiagnosisVo(ims.core.clinical.vo.PatientDiagnosisRefVo patdiagrefVo) { if(patdiagrefVo == null) throw new DomainRuntimeException("Cannot get PatientDiagnosisVo for null PatientDiagnosisRefVo"); DomainFactory factory = getDomainFactory(); PatientDiagnosis doPatientDiagnosis = (PatientDiagnosis)factory.getDomainObject(PatientDiagnosis.class,patdiagrefVo.getID_PatientDiagnosis()); return PatientDiagnosisEDischargeVoAssembler.create(doPatientDiagnosis); }
/** * Get OPDEDVo */ public PatientDiagnosisEDischargeVo getDiagnosisVo(ims.core.clinical.vo.PatientDiagnosisRefVo patdiagrefVo) { if(patdiagrefVo == null) throw new DomainRuntimeException("Cannot get PatientDiagnosisVo for null PatientDiagnosisRefVo"); DomainFactory factory = getDomainFactory(); PatientDiagnosis doPatientDiagnosis = (PatientDiagnosis)factory.getDomainObject(PatientDiagnosis.class,patdiagrefVo.getID_PatientDiagnosis()); return PatientDiagnosisEDischargeVoAssembler.create(doPatientDiagnosis); }
/** * saveDiagnosisVo * @throws UniqueKeyViolationException */ public ims.core.vo.PatientDiagnosisEDischargeVo saveDiagnosisVo(ims.core.vo.PatientDiagnosisEDischargeVo voDiagnosis) throws ims.domain.exceptions.DomainInterfaceException, ims.domain.exceptions.StaleObjectException, UniqueKeyViolationException { // Ensure the value object has been validated if (!voDiagnosis.isValidated()) throw new DomainRuntimeException("Diagnosis has not been validated"); DomainFactory factory = getDomainFactory(); PatientDiagnosis doPatDiag = PatientDiagnosisEDischargeVoAssembler.extractPatientDiagnosis(factory, voDiagnosis); factory.save(doPatDiag); return PatientDiagnosisEDischargeVoAssembler.create(doPatDiag);//Create here to avoid possible StaleObj in PMH save }