public STHKCurrentInpatientListVo saveIP(STHKCurrentInpatientListVo voIP) throws DomainInterfaceException, StaleObjectException { if(voIP == null) throw new CodingRuntimeException("Cannot save null STHKCurrentInpatientListVo"); if (!voIP.isValidated()) throw new CodingRuntimeException("Inpatient Record has not been validated"); DomainFactory factory = getDomainFactory(); InpatientEpisode doIP = STHKCurrentInpatientListVoAssembler.extractInpatientEpisode(factory, voIP); //WDEV-18059 patient was discharged form another session. if (doIP == null) throw new StaleObjectException(doIP); factory.save(doIP); return (STHKCurrentInpatientListVoAssembler.create(doIP)); }
public STHKCurrentInpatientListVo getCurrentIPRecord(InpatientEpisodeRefVo ipRefVo) { DomainFactory factory = getDomainFactory(); return STHKCurrentInpatientListVoAssembler.create((InpatientEpisode) factory.getDomainObject(InpatientEpisode.class, ipRefVo.getID_InpatientEpisode())); }