/// <summary> /// Requests the completed. /// </summary> /// <param name="receivedResponses">The received responses.</param> protected override void RequestCompleted(ReceivedResponses receivedResponses) { base.RequestCompleted(receivedResponses); //Publish visit changed event. var visitChangedEventArgs = new VisitChangedEventArgs { Sender = this, VisitKey = EditingDto.VisitKey, ClinicianKey = EditingDto.ClinicianKey, PatientKey = EditingDto.PatientKey, VisitStartDateTime = EditingDto.AppointmentStartDateTime }; _eventAggregator.GetEvent <VisitChangedEvent> ().Publish(visitChangedEventArgs); var activityChangedEventArgs = new ActivityChangedEventArgs { Sender = this, VisitKey = EditingDto.VisitKey, ClinicianKey = EditingDto.ClinicianKey, PatientKey = EditingDto.PatientKey }; _eventAggregator.GetEvent <ActivityChangedEvent> ().Publish(activityChangedEventArgs); if (EditingDto.IsNidaDrugQuestionnaireCreated) { _userDialogService.ShowDialog( "The following activity item(s) have been created: \nNidaDrugQuestionnaire", "Notification", UserDialogServiceOptions.Ok); } SetCanViewGuidanceFlag(); }
/// <summary> /// Requests the completed. /// </summary> /// <param name="receivedResponses">The received responses.</param> protected override void RequestCompleted(ReceivedResponses receivedResponses) { base.RequestCompleted(receivedResponses); //Publish visit changed event. var visitChangedEventArgs = new VisitChangedEventArgs { Sender = this, VisitKey = EditingDto.VisitKey, ClinicianKey = EditingDto.ClinicianKey, PatientKey = EditingDto.PatientKey, VisitStartDateTime = EditingDto.AppointmentStartDateTime }; _eventAggregator.GetEvent <VisitChangedEvent> ().Publish(visitChangedEventArgs); var activityChangedEventArgs = new ActivityChangedEventArgs { Sender = this, VisitKey = EditingDto.VisitKey, ClinicianKey = EditingDto.ClinicianKey, PatientKey = EditingDto.PatientKey }; _eventAggregator.GetEvent <ActivityChangedEvent> ().Publish(activityChangedEventArgs); if (EditingDto.IsDast10ResultChanged) { _userDialogService.ShowDialog("DAST-10 guidance has been changed.", "Notification", UserDialogServiceOptions.Ok); } }
private void VisitChangedEventHandler(VisitChangedEventArgs obj) { var requestDispatcher = _asyncRequestDispatcherFactory.CreateAsyncRequestDispatcher(); requestDispatcher.Add(new GetDtoRequest <AppointmentDetailsDto> (EditingDto.Key)); requestDispatcher.ProcessRequests(GetAppointmentDetailsRequestCompleted, HandleRequestDispatcherException); }
/// <summary> /// Requests the completed. /// </summary> /// <param name="receivedResponses">The received responses.</param> protected override void RequestCompleted(ReceivedResponses receivedResponses) { base.RequestCompleted(receivedResponses); var visitChangedEventArgs = new VisitChangedEventArgs { Sender = this, VisitKey = EditingDto.VisitKey, ClinicianKey = EditingDto.ClinicianKey, PatientKey = EditingDto.PatientKey, VisitStartDateTime = EditingDto.AppointmentStartDateTime }; _eventAggregator.GetEvent <VisitChangedEvent> ().Publish(visitChangedEventArgs); var createdActivityNames = GetCreatedActivityNames(); if (createdActivityNames.Count <= 0) { return; } var activityChangedEventArgs = new ActivityChangedEventArgs { Sender = this, VisitKey = EditingDto.VisitKey, ClinicianKey = EditingDto.ClinicianKey, PatientKey = EditingDto.PatientKey }; _eventAggregator.GetEvent <ActivityChangedEvent> ().Publish(activityChangedEventArgs); var nameBuilder = new StringBuilder(); var last = createdActivityNames.Last(); createdActivityNames.ForEach( name => { if (name != last) { nameBuilder.AppendFormat("{0}, ", name); } else { nameBuilder.Append(name); } }); var msg = "The following activity item(s) have been created: " + nameBuilder; _userDialogService.ShowDialog(msg, "Notification", UserDialogServiceOptions.Ok); }
/// <summary> /// Filters the visit changed events. /// </summary> /// <param name="visitChangedEventArgs">The <see cref="Rem.Ria.PatientModule.VisitChangedEventArgs"/> instance containing the event data.</param> /// <returns>A <see cref="System.Boolean"/></returns> public bool FilterVisitChangedEvents(VisitChangedEventArgs visitChangedEventArgs) { if (visitChangedEventArgs.Sender == this) { return(false); } var isVisitChanged = visitChangedEventArgs.ClinicianKey == ClinicianSchedule.ClinicianKey || ClinicianSchedule.ClinicianAppointments.Any( a => a.Key == visitChangedEventArgs.VisitKey); return(isVisitChanged && visitChangedEventArgs.VisitStartDateTime.Date == SelectedDate); }
private void RaiseVisitChanged() { var visitChangedEventArgs = new VisitChangedEventArgs { Sender = this, ClinicianKey = Visit.Staff.Key, VisitKey = Visit.Key, VisitStartDateTime = Visit.AppointmentStartDateTime, PatientKey = _patientKey, VisitStatus = Visit.VisitStatus }; _eventAggregator.GetEvent <VisitChangedEvent> ().Publish(visitChangedEventArgs); }
/// <summary> /// Filters the visit changed events. /// </summary> /// <param name="visitChangedEventArgs">The <see cref="Rem.Ria.PatientModule.VisitChangedEventArgs"/> instance containing the event data.</param> /// <returns>A <see cref="System.Boolean"/></returns> public bool FilterVisitChangedEvents(VisitChangedEventArgs visitChangedEventArgs) { var senderType = visitChangedEventArgs.Sender.GetType(); if (senderType.BaseType != null) { if (senderType.BaseType.IsGenericType && senderType.BaseType.GetGenericTypeDefinition() == typeof(ActivityViewModelBase <>)) { return(false); } } if (visitChangedEventArgs.Sender == this) { return(false); } return(_visit != null && visitChangedEventArgs.VisitKey == _visit.Key); }
/// <summary> /// Filters the visit changed events. /// </summary> /// <param name="visitChangedEventArgs">The <see cref="Rem.Ria.PatientModule.VisitChangedEventArgs"/> instance containing the event data.</param> /// <returns>A <see cref="System.Boolean"/></returns> public bool FilterVisitChangedEvents(VisitChangedEventArgs visitChangedEventArgs) { return(_activityList != null && _activityList.Select(a => a.VisitKey == visitChangedEventArgs.VisitKey).Any()); }
private void RaiseVisitChanged() { var visitChangedEventArgs = new VisitChangedEventArgs { Sender = this, ClinicianKey = Visit.Staff.Key, VisitKey = Visit.Key, VisitStartDateTime = Visit.AppointmentStartDateTime, PatientKey = _patientKey, VisitStatus = Visit.VisitStatus }; _eventAggregator.GetEvent<VisitChangedEvent> ().Publish ( visitChangedEventArgs ); }
/// <summary> /// Visits the changed event handler. /// </summary> /// <param name="visitChangedEventArgs">The <see cref="Rem.Ria.PatientModule.VisitChangedEventArgs"/> instance containing the event data.</param> public void VisitChangedEventHandler( VisitChangedEventArgs visitChangedEventArgs ) { Deployment.Current.InvokeIfNeeded ( () => GetVisitByVisitKeyAsync ( visitChangedEventArgs.VisitKey ) ); }
/// <summary> /// Filters the visit changed events. /// </summary> /// <param name="visitChangedEventArgs">The <see cref="Rem.Ria.PatientModule.VisitChangedEventArgs"/> instance containing the event data.</param> /// <returns>A <see cref="System.Boolean"/></returns> public bool FilterVisitChangedEvents( VisitChangedEventArgs visitChangedEventArgs ) { var senderType = visitChangedEventArgs.Sender.GetType (); if ( senderType.BaseType != null ) { if ( senderType.BaseType.IsGenericType && senderType.BaseType.GetGenericTypeDefinition () == typeof( ActivityViewModelBase<> ) ) { return false; } } if ( visitChangedEventArgs.Sender == this ) { return false; } return _visit != null && visitChangedEventArgs.VisitKey == _visit.Key; }
private bool FilterVisitChangedEvents(VisitChangedEventArgs visitChangedEventArgs) { return(visitChangedEventArgs.Sender != this && EditingDto.Key == visitChangedEventArgs.VisitKey); }
/// <summary> /// Filters the visit changed events. /// </summary> /// <param name="visitChangedEventArgs">The <see cref="Rem.Ria.PatientModule.VisitChangedEventArgs"/> instance containing the event data.</param> /// <returns>A <see cref="System.Boolean"/></returns> public bool FilterVisitChangedEvents( VisitChangedEventArgs visitChangedEventArgs ) { return _activityList != null && _activityList.Select ( a => a.VisitKey == visitChangedEventArgs.VisitKey ).Any (); }
/// <summary> /// Visits the changed event handler. /// </summary> /// <param name="args">The <see cref="Rem.Ria.PatientModule.VisitChangedEventArgs"/> instance containing the event data.</param> public void VisitChangedEventHandler( VisitChangedEventArgs args ) { GetAllActivitiesByClinicalCase ( _clinicalCaseKey ); }
/// <summary> /// Visits the changed event handler. /// </summary> /// <param name="args">The <see cref="Rem.Ria.PatientModule.VisitChangedEventArgs"/> instance containing the event data.</param> public void VisitChangedEventHandler(VisitChangedEventArgs args) { GetScheduledActivitiesByClinicalCase(_clinicalCaseKey); GetRecentActivitiesByClinicalCase(_clinicalCaseKey); }
/// <summary> /// Filters the visit changed events. /// </summary> /// <param name="visitChangedEventArgs">The <see cref="Rem.Ria.PatientModule.VisitChangedEventArgs"/> instance containing the event data.</param> /// <returns>A <see cref="System.Boolean"/></returns> public bool FilterVisitChangedEvents(VisitChangedEventArgs visitChangedEventArgs) { return((_scheduledActivities != null && _scheduledActivities.Select(a => a.VisitKey == visitChangedEventArgs.VisitKey).Any()) || (_recentActivities != null && _recentActivities.Select(a => a.VisitKey == visitChangedEventArgs.VisitKey).Any())); }
/// <summary> /// Visits the changed event handler. /// </summary> /// <param name="obj">The <see cref="Rem.Ria.PatientModule.VisitChangedEventArgs"/> instance containing the event data.</param> public void VisitChangedEventHandler(VisitChangedEventArgs obj) { Deployment.Current.InvokeIfNeeded(() => UpdateSchedule(true)); }
/// <summary> /// Filters the visit changed events. /// </summary> /// <param name="visitChangedEventArgs">The <see cref="Rem.Ria.PatientModule.VisitChangedEventArgs"/> instance containing the event data.</param> /// <returns>A <see cref="System.Boolean"/></returns> public bool FilterVisitChangedEvents( VisitChangedEventArgs visitChangedEventArgs ) { return ( _scheduledActivities != null && _scheduledActivities.Select ( a => a.VisitKey == visitChangedEventArgs.VisitKey ).Any () ) || ( _recentActivities != null && _recentActivities.Select ( a => a.VisitKey == visitChangedEventArgs.VisitKey ).Any () ); }
/// <summary> /// Handles the visit changed. /// </summary> /// <param name="visitChangedEventArgs">The <see cref="Rem.Ria.PatientModule.VisitChangedEventArgs"/> instance containing the event data.</param> public void HandleVisitChanged(VisitChangedEventArgs visitChangedEventArgs) { VisitStatusWellKnownName = visitChangedEventArgs.VisitStatus.WellKnownName; UpdateDtoReadOnly(); }
/// <summary> /// Visits the changed event handler. /// </summary> /// <param name="args">The <see cref="Rem.Ria.PatientModule.VisitChangedEventArgs"/> instance containing the event data.</param> public void VisitChangedEventHandler( VisitChangedEventArgs args ) { GetScheduledActivitiesByClinicalCase ( _clinicalCaseKey ); GetRecentActivitiesByClinicalCase ( _clinicalCaseKey ); }
/// <summary> /// Filters the visit changed events. /// </summary> /// <param name="visitChangedEventArgs">The <see cref="Rem.Ria.PatientModule.VisitChangedEventArgs"/> instance containing the event data.</param> /// <returns>A <see cref="System.Boolean"/></returns> public bool FilterVisitChangedEvents ( VisitChangedEventArgs visitChangedEventArgs ) { if ( visitChangedEventArgs.Sender == this ) { return false; } var isVisitChanged = visitChangedEventArgs.ClinicianKey == ClinicianSchedule.ClinicianKey || ClinicianSchedule.ClinicianAppointments.Any ( a => a.Key == visitChangedEventArgs.VisitKey ); return isVisitChanged && visitChangedEventArgs.VisitStartDateTime.Date == SelectedDate; }
/// <summary> /// Visits the changed event handler. /// </summary> /// <param name="visitChangedEventArgs">The <see cref="Rem.Ria.PatientModule.VisitChangedEventArgs"/> instance containing the event data.</param> public void VisitChangedEventHandler(VisitChangedEventArgs visitChangedEventArgs) { Deployment.Current.InvokeIfNeeded(() => GetVisitByVisitKeyAsync(visitChangedEventArgs.VisitKey)); }
/// <summary> /// Visits the changed event handler. /// </summary> /// <param name="obj">The <see cref="Rem.Ria.PatientModule.VisitChangedEventArgs"/> instance containing the event data.</param> public void VisitChangedEventHandler ( VisitChangedEventArgs obj ) { Deployment.Current.InvokeIfNeeded ( () => UpdateSchedule ( true ) ); }
/// <summary> /// Filters the visit changed events. /// </summary> /// <param name="visitChangedEventArgs">The <see cref="Rem.Ria.PatientModule.VisitChangedEventArgs"/> instance containing the event data.</param> /// <returns>A <see cref="System.Boolean"/></returns> public bool FilterVisitChangedEvents(VisitChangedEventArgs visitChangedEventArgs) { return(EditingDto != null && EditingDto.VisitKey == visitChangedEventArgs.VisitKey && visitChangedEventArgs.VisitStatus != null); }
/// <summary> /// Visits the changed event handler. /// </summary> /// <param name="args">The <see cref="Rem.Ria.PatientModule.VisitChangedEventArgs"/> instance containing the event data.</param> public void VisitChangedEventHandler(VisitChangedEventArgs args) { GetAllActivitiesByClinicalCase(_clinicalCaseKey); }