/** * Saves a vital sign */ public ims.core.vo.VitalSignsVo saveVitalSign(ims.core.vo.VitalSignsVo vitalSign, TriageForClinicianWorklistVo triageToSave) throws ims.domain.exceptions.StaleObjectException //WDEV-20426 { if (triageToSave!=null) { if (!triageToSave.isValidated()) { throw new DomainRuntimeException("This Triage has not been validated"); } DomainFactory factory = getDomainFactory(); Triage doTriage = TriageForClinicianWorklistVoAssembler.extractTriage(factory, triageToSave); factory.save(doTriage); } VitalSignsAll vs = (VitalSignsAll)getDomainImpl(VitalSignsImpl.class); return vs.saveVitalSign(vitalSign); }
private TriageForClinicianWorklistVo createNewTriage(TrackingAreaRefVo currentArea) { TriageForClinicianWorklistVo triage = new TriageForClinicianWorklistVo(); triage.setPatient(form.getGlobalContext().Core.getPatientShort()); triage.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort()); triage.setAttendance(form.getGlobalContext().Core.getCurrentCareContext()); triage.setTriageStartDateTime(new DateTime()); triage.setTrackingArea(currentArea); return triage; }
public TriageForClinicianWorklistVo getTriage(TriageRefVo triageRef) { if (triageRef == null || triageRef.getID_Triage()==null) throw new CodingRuntimeException("Can not retrieve TriageForClinicianWorklistVo for null triage."); Triage doTriage = (Triage)getDomainFactory().getDomainObject(Triage.class,triageRef.getID_Triage()); return TriageForClinicianWorklistVoAssembler.create(doTriage); }
private Image getPriorityChange() { if (form.getLocalContext().getSelectedWaitingPatient() == null || form.getLocalContext().getSelectedWaitingPatient().getTriageDetails() == null) return null; TriageForClinicianWorklistVo triageDetails = form.getLocalContext().getSelectedWaitingPatient().getTriageDetails(); if (triageDetails.getTriagePriorityChange() == null) return null; return triageDetails.getTriagePriorityChange().getImage(); }
private boolean changeStatusOnMove() { if(form.getLocalContext().getSelectedWaitingPatient() == null) return false; TriageForClinicianWorklistVo triageDetails = form.getLocalContext().getSelectedWaitingPatient().getTriageDetails(); TrackingAttendanceStatusVo currentTrackingStatus = form.getLocalContext().getSelectedWaitingPatient().getCurrentStatus(); if (triageDetails != null && triageDetails.getCurrentTriagePriority() != null && currentTrackingStatus != null && TrackingStatus.WAITING_TO_BE_TRIAGED.equals(currentTrackingStatus.getStatus())) return true; return false; }
public TrackingForClinicianWorklistAndTriageVo saveTracking(TrackingForClinicianWorklistAndTriageVo tracking, SeenByHCPVo seenByHcp, PatientMedsVo patmed) throws StaleObjectException { if(tracking == null) throw new CodingRuntimeException("Cannot save a null Tracking record."); if(!tracking.isValidated()) throw new CodingRuntimeException("Tracking record is not validated."); DomainFactory factory = getDomainFactory(); //wdev-15930 SeenByHCP doSeenBy = null; if( seenByHcp != null ) { doSeenBy = SeenByHCPVoAssembler.extractSeenByHCP(factory, seenByHcp); if( doSeenBy != null ) { factory.save(doSeenBy); } } //-------------wdev-15930------------ TriageForClinicianWorklistVo triagedetails = tracking.getTriageDetails(); ims.emergency.domain.objects.Triage doTriage = TriageForClinicianWorklistVoAssembler.extractTriage(factory, triagedetails); if( doTriage != null ) { factory.save(doTriage); } Tracking doTracking = TrackingForClinicianWorklistAndTriageVoAssembler.extractTracking(factory, tracking); if( doSeenBy != null ) { doTracking.setSeenBy(doSeenBy); } else if (seenByHcp == null && patmed==null && tracking.getCurrentStatusIsNotNull() && TrackingStatus.WAITING_TO_BE_SEEN_BY_A_MEDIC.equals(tracking.getCurrentStatus().getStatus()))//WDEV-18278 { //on Move,when setting the status to WAITING_TO_BE_SEEN_BY_A_MEDIC, mark currentSeenByAsCompleted and set SeenBy from Tracking to null SeenByHCP doSeenByHcp = doTracking.getSeenBy(); if (doSeenByHcp!=null) { doSeenByHcp.setCompletedDateTime(new Date()); factory.save(doSeenByHcp); doTracking.setSeenBy(null); } } if( doTriage != null) { doTracking.setTriageDetails(doTriage); } factory.save(doTracking); //wdev-17825 if( patmed != null) { PatientMedicationOnAttendance doPatientMedicationOnAttendance = PatientMedsVoAssembler.extractPatientMedicationOnAttendance(factory, patmed); if( doPatientMedicationOnAttendance != null ) factory.save(doPatientMedicationOnAttendance); } return TrackingForClinicianWorklistAndTriageVoAssembler.create(doTracking); }