public Icd10AmProcVo saveIcd10Record(Icd10AmProcVo vo) throws DomainInterfaceException, StaleObjectException, UniqueKeyViolationException { if (!vo.isValidated()) { throw new DomainRuntimeException("Opcs4 Vo has not been validated."); } DomainFactory factory = getDomainFactory(); Icd10AmProc icd10ProcBo = Icd10AmProcVoAssembler.extractIcd10AmProc(factory, vo); if (vo.getID_Icd10AmProcIsNotNull()) { //update factory.update(icd10ProcBo); } else { //insert factory.save(icd10ProcBo); } return Icd10AmProcVoAssembler.create(icd10ProcBo); }
public Icd10AmProcVo getIcd10Code(String code) throws DomainInterfaceException { if(code == null || code.trim().length() == 0) return null; ims.admin.vo.Icd10AmProcVoCollection coll = Icd10AmProcVoAssembler.createIcd10AmProcVoCollectionFromIcd10AmProc(getDomainFactory().find("" + "from Icd10AmProc icd10 WHERE icd10.code_id = '" + code + "'")); if (coll != null && coll.size()>0) return coll.get(0); return null; }
public Icd10AmProcVo getICD10(String code) { if(code == null) return null; DomainFactory factory = getDomainFactory(); String hqlList = "select icd from Icd10AmProc icd where icd.code_id = :Code"; List codesList = factory.find(hqlList, new String[] {"Code"}, new Object[] {code}); if(codesList == null || codesList.size() == 0) return null; return Icd10AmProcVoAssembler.create((Icd10AmProc) codesList.get(0)); }