public TrackingForAllocateCubicleVo getTracking(TrackingRefVo trackingRef) { if( trackingRef == null) throw new CodingRuntimeException("Tracking not provided"); DomainFactory factory = getDomainFactory(); ims.emergency.domain.objects.Tracking doTracking = (ims.emergency.domain.objects.Tracking) factory.getDomainObject(ims.emergency.domain.objects.Tracking.class, trackingRef.getID_Tracking()); return TrackingForAllocateCubicleVoAssembler.create(doTracking); }
public void markCubicleAsRIEAndSaveTracking(CubicleAllocationShortVo cubicle, TrackingForAllocateCubicleVo tracking, FormName formName, Integer patientId, Integer careContextId, String rieMessage) throws StaleObjectException { if(cubicle == null) throw new CodingRuntimeException("Cannot RIE a null CubicleAllocationShortVo."); markAsRie(cubicle, formName, patientId, null, careContextId, rieMessage); if(tracking != null) { DomainFactory factory = getDomainFactory(); factory.save(TrackingForAllocateCubicleVoAssembler.extractTracking(factory, tracking)); } }
public ims.emergency.vo.CubicleAllocationVo saveCubicleAllocation(CubicleAllocationVo record, TrackingForAllocateCubicleVo tracking) throws ims.domain.exceptions.StaleObjectException { if( record == null && tracking == null) throw new CodingRuntimeException("CubicleAllocation not provided and TrackingForAllocateCubicleVo not provided"); DomainFactory factory = getDomainFactory(); if( record != null) { CubicleAllocation doCubicleAllocation = CubicleAllocationVoAssembler.extractCubicleAllocation(factory, record); factory.save(doCubicleAllocation); return CubicleAllocationVoAssembler.create(doCubicleAllocation); } else if( tracking != null) { ims.emergency.domain.objects.Tracking doTracking = TrackingForAllocateCubicleVoAssembler.extractTracking(factory, tracking); factory.save(doTracking); TrackingForAllocateCubicleVo track = TrackingForAllocateCubicleVoAssembler.create(doTracking); if( track != null) return track.getCurrentCubicle(); } return null; }