public ProviderSystemVo saveProviderSystem(ProviderSystemVo voProviderSystem) throws StaleObjectException, UniqueKeyViolationException { if(voProviderSystem == null) throw new RuntimeException("Cannot save null value for ProviderSystemVo"); if(!voProviderSystem.isValidated()) { throw new CodingRuntimeException("Provider System Value Object has not been validated"); } DomainFactory factory = getDomainFactory(); ProviderSystem doProviderSystem = ProviderSystemVoAssembler.extractProviderSystem(factory, voProviderSystem); try { factory.save(doProviderSystem); } catch(UnqViolationUncheckedException e) { throw new ims.domain.exceptions.UniqueKeyViolationException("A System called " + (voProviderSystem.getSystemNameIsNotNull()?voProviderSystem.getSystemName():"") + "or an HL7 Application called " + (voProviderSystem.getHl7ApplicationIsNotNull()?voProviderSystem.getHl7Application():"") + " already exists. Duplicates not allowed.", e); } return ProviderSystemVoAssembler.create(doProviderSystem); }
public ims.ocrr.vo.ProviderSystemVo saveProviderSystem(ims.ocrr.vo.ProviderSystemVo voProviderSystem) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException { if(voProviderSystem == null) throw new RuntimeException("Cannot save null value for ProviderSystemVo"); if(!voProviderSystem.isValidated()) { throw new CodingRuntimeException("Provider System Value Object has not been validated"); } DomainFactory factory = getDomainFactory(); ProviderSystem doProviderSystem = ProviderSystemVoAssembler.extractProviderSystem(factory, voProviderSystem); try { factory.save(doProviderSystem); } catch(UnqViolationUncheckedException e) { throw new ims.domain.exceptions.UniqueKeyViolationException("A System called " + (voProviderSystem.getSystemNameIsNotNull()?voProviderSystem.getSystemName():"") + "or an HL7 Application called " + (voProviderSystem.getHl7ApplicationIsNotNull()?voProviderSystem.getHl7Application():"") + " already exists. Duplicates not allowed.", e); } return ProviderSystemVoAssembler.create(doProviderSystem); }
public ProviderSystemVo getProviderSystem(String sendingApplication) { if (sendingApplication == null) return null; DomainFactory factory = getDomainFactory(); List lst = factory.find(" from ProviderSystem ps where ps.hl7Application = '" + sendingApplication + "'"); if (lst == null || lst.size() == 0) return null; return ProviderSystemVoAssembler.create((ProviderSystem) lst.get(0)); }
public ProviderSystemVo getProviderSystem(InvestigationRefVo invVo) { if (invVo == null) return null; DomainFactory factory = getDomainFactory(); Investigation domInv = (Investigation)factory.getDomainObject(Investigation.class, invVo.getID_Investigation()); return ProviderSystemVoAssembler.create(domInv.getProviderService().getProviderSystem()); }
public ExternalEventVo updateEventVoWithInvestigation(ExternalEventVo event) throws DomainInterfaceException, StaleObjectException { DomainFactory factory = getDomainFactory(); String hql = " select o.orderInvestigation from OrderInvAppt o " + " join o.appointment app where app.id = :apptId"; List<?> list = factory.find(hql, new String[] { "apptId" }, new Object[] { event.getAppointment() .getID_Booking_Appointment() }); if(null==list||list.size()==0||null==list.get(0))// If there is no investigation give up { return null; } OrderInvestigation domObj = (OrderInvestigation) list.get(0); OrderInvestigationRefVo orgInvRef = new OrderInvestigationRefVo(); orgInvRef.setID_OrderInvestigation(((OrderInvestigation) list.get(0)) .getId()); event.setInvestigation(orgInvRef); ProviderSystem p = domObj.getInvestigation().getProviderService() .getProviderSystem(); ProviderSystemVo provideSystem = ProviderSystemVoAssembler .create((ProviderSystem) factory.getDomainObject( ProviderSystem.class, p.getId())); event.setProviderSystem(provideSystem); return event; }
public ims.ocrr.vo.ProviderSystemVoCollection listProviderSystems() { return ProviderSystemVoAssembler.createProviderSystemVoCollectionFromProviderSystem(getDomainFactory().find("from ProviderSystem as p where p.iPAddress is not null and p.iPPort is not null order by p.systemName asc")); }
public ProviderSystemVoCollection listProviderSystems() { DomainFactory factory = getDomainFactory(); return ProviderSystemVoAssembler.createProviderSystemVoCollectionFromProviderSystem(factory.listDomainObjects(ProviderSystem.class)).sort(); }
public ims.ocrr.vo.ProviderSystemVoCollection listProviderSystems() { DomainFactory factory = getDomainFactory(); return ProviderSystemVoAssembler.createProviderSystemVoCollectionFromProviderSystem(factory.listDomainObjects(ProviderSystem.class)).sort(); }
/** * listProviderSystems */ public ims.ocrr.vo.ProviderSystemVoCollection listProviderSystems() { DomainFactory factory = getDomainFactory(); return ProviderSystemVoAssembler.createProviderSystemVoCollectionFromProviderSystem(factory.listDomainObjects(ProviderSystem.class)).sort(); }