public EpisodeofCareVo getEpisodeOfCare(EpisodeOfCareRefVo episodeOfCareRef) { if(episodeOfCareRef == null || episodeOfCareRef.getID_EpisodeOfCare()==null) throw new CodingRuntimeException("Cannot get EpisodeOfCare value on null episodeOfCareRef."); DomainFactory factory = getDomainFactory(); EpisodeOfCare doEpisodeOfcare = (EpisodeOfCare) factory.getDomainObject(EpisodeOfCare.class, episodeOfCareRef.getID_EpisodeOfCare()); return EpisodeofCareVoAssembler.create(doEpisodeOfcare); }
public EpisodeofCareVo saveEpisodeOfCare(EpisodeofCareVo episodeOfCare) throws StaleObjectException, UniqueKeyViolationException { if (!episodeOfCare.isValidated()) throw new CodingRuntimeException("EpisodeOfCare has not been validated!"); DomainFactory factory = getDomainFactory(); EpisodeOfCare domEpis = EpisodeofCareVoAssembler.extractEpisodeOfCare(factory, episodeOfCare); factory.save(domEpis); return EpisodeofCareVoAssembler.create(domEpis); }
public EpisodeofCareVo getEpisodeOfCare(EpisodeOfCareRefVo episodeRef) { if (episodeRef == null) return null; DomainFactory factory = getDomainFactory(); EpisodeOfCare doEpisodeOfCare = (EpisodeOfCare) factory.getDomainObject(EpisodeOfCare.class, episodeRef.getID_EpisodeOfCare()); return EpisodeofCareVoAssembler.create(doEpisodeOfCare); }
public EpisodeofCareVo saveEpisodeOfCare(EpisodeofCareVo episodeOfCare) throws StaleObjectException, UniqueKeyViolationException { if (!episodeOfCare.isValidated()) throw new CodingRuntimeException("EpisodeOfCare has not been validated!"); DomainFactory factory=getDomainFactory(); EpisodeOfCare domEpis = EpisodeofCareVoAssembler.extractEpisodeOfCare(factory, episodeOfCare); factory.save(domEpis); return EpisodeofCareVoAssembler.create(domEpis); }
public EpisodeofCareVo getEpisodeOfCare(EpisodeOfCareRefVo episodeRef) { if(episodeRef == null) return null; DomainFactory factory = getDomainFactory(); EpisodeOfCare doEpisodeOfCare = (EpisodeOfCare)factory.getDomainObject(EpisodeOfCare.class, episodeRef.getID_EpisodeOfCare()); return EpisodeofCareVoAssembler.create(doEpisodeOfCare); }
public EpisodeofCareVo getEpisodeOfCare(Integer id) { DomainFactory factory = getDomainFactory(); EpisodeOfCare doEpisodeOfCare = (EpisodeOfCare) factory.getDomainObject(EpisodeOfCare.class, id); return EpisodeofCareVoAssembler.create(doEpisodeOfCare); }
public Specialty getSpecialtyForEpisodeOfCare(EpisodeOfCareRefVo refVoEpisodeOfCare) { EpisodeOfCare episodeOfCare = (EpisodeOfCare)getDomainFactory().getDomainObject(EpisodeOfCare.class, refVoEpisodeOfCare.getID_EpisodeOfCare()); EpisodeofCareVo voEpisodeofCare = EpisodeofCareVoAssembler.create(episodeOfCare); return voEpisodeofCare.getSpecialty(); }
public TrackingLiteVo saveTrackingAndTrackingMovementTimes( TrackingLiteVo record, TrackingMovementTimesVo trackingMovementTimes, CurrentPartialAdmissionForSendToAreaVo partialAdmission, Boolean trigersPreAdmissiontoPAS, EpisodeofCareVo epOfCare, CareContextVo careContext) throws StaleObjectException // WDEV-18278 { if( record == null || trackingMovementTimes == null) throw new DomainRuntimeException(" Tracking or TrackingMovementTimes are not validated."); DomainFactory factory = getDomainFactory(); Tracking doTracking = TrackingLiteVoAssembler.extractTracking(factory, record); factory.save(doTracking); TrackingMovementTimes doTrackingMovementTimes = TrackingMovementTimesVoAssembler.extractTrackingMovementTimes(factory, trackingMovementTimes); factory.save(doTrackingMovementTimes); if (Boolean.TRUE.equals(trigersPreAdmissiontoPAS)) { if (partialAdmission != null) { EDPartialAdmission doPartialAdmission = CurrentPartialAdmissionForSendToAreaVoAssembler.extractEDPartialAdmission(factory, partialAdmission); factory.save(doPartialAdmission); } if (record != null) { EDPartialAdmissionDialog dom = (EDPartialAdmissionDialog) getDomainImpl(EDPartialAdmissionDialogImpl.class); try { dom.triggerCancelPartialAdmission(record.getAttendance(), record.getCurrentPartialAdmission()); } catch (DomainInterfaceException e) { e.printStackTrace(); } } } if (careContext != null && epOfCare != null) { CareContext doCare = CareContextVoAssembler.extractCareContext(factory,careContext); factory.save(doCare); EpisodeofCareVo lastEpofcare = getEpisodeOfCare(epOfCare.getID_EpisodeOfCare()); EpisodeOfCare doEpisode = EpisodeofCareVoAssembler.extractEpisodeOfCare(factory, lastEpofcare); doEpisode.getCareContexts().add(doCare); factory.save(doEpisode); } return TrackingLiteVoAssembler.create(doTracking); }