public Opcs4Vo saveOpcs4Record(Opcs4Vo vo) throws DomainInterfaceException, StaleObjectException, UniqueKeyViolationException { if (!vo.isValidated()) { throw new DomainRuntimeException("Opcs4 Vo has not been validated."); } DomainFactory factory = getDomainFactory(); Opcs4 opcs4Bo = Opcs4VoAssembler.extractOpcs4(factory, vo); if (vo.getID_Opcs4IsNotNull()) { //update factory.update(opcs4Bo); } else { //insert factory.save(opcs4Bo); } return Opcs4VoAssembler.create(opcs4Bo); }
private ReferralExternalCodingVo populateCodingItemsWithDescription(ReferralExternalCodingVo referralCodingVo) { if(referralCodingVo == null || referralCodingVo.getCodingItems() == null) return null; for(ReferralExternalCodingItemVo item : referralCodingVo.getCodingItems()) { if(item == null) continue; if(item.getID_ReferralCodingItem() == null || item.getItemDescription() == null) { if(item.getICD10() != null) { Icd10AmProcVo icd10Code = domain.getICD10(item.getICD10()); item.setItemShortDescription(icd10Code != null ? icd10Code.getAscii_short_desc() : null); item.setItemDescription(icd10Code != null ? icd10Code.getAscii_desc() : null); } else if(item.getOPCS4() != null) { Opcs4Vo opcs4Code = domain.getOPCS4(item.getOPCS4()); item.setItemShortDescription(opcs4Code != null ? opcs4Code.getOpname3() : null); item.setItemDescription(opcs4Code != null ? opcs4Code.getOpname4() : null); } else if(item.getHRG() != null) { HrgConfigLiteVo hrgCode = domain.getHRG(item.getHRG()); item.setItemDescription(hrgCode != null ? hrgCode.getHRGDescription() : null); } } } return referralCodingVo; }
public Opcs4Vo getOPCS4(String code) { if(code == null) return null; DomainFactory factory = getDomainFactory(); String hqlList = "select opcs4 from Opcs4 opcs4 where opcs4.opcode = :Code"; List codesList = factory.find(hqlList, new String[] {"Code"}, new Object[] {code}); if(codesList == null || codesList.size() == 0) return null; return Opcs4VoAssembler.create((Opcs4) codesList.get(0)); }
public Opcs4Vo getOpcs4Code(String code) throws DomainInterfaceException { if(code == null || code.trim().length() == 0) return null; ims.admin.vo.Opcs4VoCollection coll = Opcs4VoAssembler.createOpcs4VoCollectionFromOpcs4(getDomainFactory().find("from Opcs4 opcs4 WHERE opcs4.opcode = '" + code + "'")); if (coll != null && coll.size()>0) return coll.get(0); return null; }