/// <summary>
        /// Navigates to default command.
        /// </summary>
        /// <param name="parameters">The parameters.</param>
        protected override void NavigateToDefaultCommand( KeyValuePair<string, string>[] parameters )
        {
            var agencyKey = parameters.GetValue<long> ( "AgencyKey" );

            _navigationService.Navigate (
                RegionManager,
                "AgencyDashboardProgramsRegion",
                "ProgramListView",
                null,
                new[] { new KeyValuePair<string, string> ( "AgencyKey", agencyKey.ToString () ) } );
        }
        /// <summary>
        /// Navigates to default command.
        /// </summary>
        /// <param name="parameters">The parameters.</param>
        protected override void NavigateToDefaultCommand( KeyValuePair<string, string>[] parameters )
        {
            _billingOfficeKey = parameters.GetValue<long> ( "BillingOfficeKey" );

            var shouldReload = true;
            if ( parameters.HasKey ( "ShouldReload" ) )
            {
                shouldReload = parameters.GetValue<bool> ( "ShouldReload" );
            }

            if ( shouldReload )
            {
                _navigationService.Navigate (
                    RegionManager,
                    "PayorTilesRegion",
                    "PayorTypeListView",
                    null,
                    new[] { new KeyValuePair<string, string> ( "BillingOfficeKey", _billingOfficeKey.ToString () ) } );

                _navigationService.Navigate (
                    RegionManager,
                    "PayorTilesRegion",
                    "PayorListView",
                    null,
                    new[] { new KeyValuePair<string, string> ( "BillingOfficeKey", _billingOfficeKey.ToString () ) } );
            }
        }
 /// <summary>
 /// Navigates to default command.
 /// </summary>
 /// <param name="parameters">The parameters.</param>
 protected override void NavigateToDefaultCommand( KeyValuePair<string, string>[] parameters )
 {
     _billingOfficeKey = parameters.GetValue<long> ( "BillingOfficeKey" );
     GetPayorTypesByBillingOfficeAsync ( _billingOfficeKey );
 }
        /// <summary>
        /// Navigates to default command.
        /// </summary>
        /// <param name="parameters">The parameters.</param>
        protected override void NavigateToDefaultCommand( KeyValuePair<string, string>[] parameters )
        {
            var key = parameters.GetValue<long> ( "MedicationKey" );
            var patientkey = parameters.GetValue<long> ( "PatientKey" );
            var dispatcher = _asyncRequestDispatcherFactory.CreateAsyncRequestDispatcher ();
            if ( key == 0 )
            {
                Medication = new MedicationDto ();
                Medication.PatientKey = patientkey;
            }
            else
            {
                dispatcher.Add ( new GetMedicationByKeyRequest { Key = key } );
                IsLoading = true;
            }
            dispatcher.AddLookupValuesRequest ( "MedicationStatus" );
            dispatcher.AddLookupValuesRequest ( "DiscontinuedReason" );
            dispatcher.ProcessRequests ( HandleRequestComplete, HandleRequestDispatcherException );
            IsLoading = true;

            StartRuleWatch ();
        }
Example #5
0
 /// <summary>
 /// Navigates to default command.
 /// </summary>
 /// <param name="parameters">The parameters.</param>
 protected override void NavigateToDefaultCommand( KeyValuePair<string, string>[] parameters )
 {
     Gender = parameters.GetValue<string> ( "Gender" );
     Score = parameters.GetValue<int> ( "Score" );
 }
        /// <summary>
        /// Navigates to default command.
        /// </summary>
        /// <param name="parameters">The parameters.</param>
        protected override void NavigateToDefaultCommand( KeyValuePair<string, string>[] parameters )
        {
            _patientKey = parameters.GetValue<long> ( "PatientKey" );

            var requestDispatcher = _asyncRequestDispatcherFactory.CreateAsyncRequestDispatcher ();
            requestDispatcher.Add ( new GetDefaultClinicalCaseByPatientRequest { PatientKey = _patientKey } );
            requestDispatcher.Add ( new GetAllClinicalCasesByPatientRequest { PatientKey = _patientKey } );

            IsLoading = true;
            requestDispatcher.ProcessRequests ( HandleInitializationCompleted, HandleInitializationException );

            _patientAccessService.LogEventAccess(_patientKey, "Patient Dashboard", "The Patient Dashboard for Patient {0} was accessed");
        }
Example #7
0
 /// <summary>
 /// Navigates to default command.
 /// </summary>
 /// <param name="parameters">The parameters.</param>
 protected override void NavigateToDefaultCommand( KeyValuePair<string, string>[] parameters )
 {
     try
     {
         _patientKey = parameters.GetValue<long> ( "PatientKey" );
     }
     catch ( ArgumentException )
     {
         // Patient Key was not provided, so I must be outside of the context of a patient. I.e.:Interoperability workspace
         _patientKey = 0;
     }
 }
        private void NavigateToCloneCommand( KeyValuePair<string, string>[] parameters )
        {
            var systemRoleKeyToClone = parameters.GetValue<long> ( "SystemRoleKey" );

            var requestDispatcher = _asyncRequestDispatcherFactory.CreateAsyncRequestDispatcher ();
            requestDispatcher.Add ( new CloneSystemRoleRequest { SystemRoleKey = systemRoleKeyToClone } );
            requestDispatcher.ProcessRequests ( HandleCloneRequestCompleted, HandleCloneRequestException );
            IsLoading = true;
        }
Example #9
0
        /// <summary>
        /// Navigates to default command.
        /// </summary>
        /// <param name="parameters">The parameters.</param>
        protected override void NavigateToDefaultCommand( KeyValuePair<string, string>[] parameters )
        {
            var patientKey = parameters.GetValue<long> ( "PatientKey" );
            var staffKey = parameters.GetValue<long> ( "StaffKey" );
            var agencyKey = parameters.GetValue<long> ( "AgencyKey" );
            var locationKey = parameters.GetValue<long> ( "LocationKey" );

            var url = _launcher.BuildUrl ( patientKey, staffKey, agencyKey, locationKey );
            SourceUrl = url.AbsoluteUri;
        }
Example #10
0
 /// <summary>
 /// Navigates to default command.
 /// </summary>
 /// <param name="parameters">The parameters.</param>
 protected override void NavigateToDefaultCommand( KeyValuePair<string, string>[] parameters )
 {
     _agencyKey = parameters.GetValue<long> ( "AgencyKey" );
     GetAllProgramsByAgencyAsync ( _agencyKey );
 }
Example #11
0
 /// <summary>
 /// Navigates to default command.
 /// </summary>
 /// <param name="parameters">The parameters.</param>
 protected override void NavigateToDefaultCommand( KeyValuePair<string, string>[] parameters )
 {
     Title = parameters.GetValue<string> ( "Title" );
 }
 /// <summary>
 /// Navigates to default command.
 /// </summary>
 /// <param name="parameters">The parameters.</param>
 protected override void NavigateToDefaultCommand( KeyValuePair<string, string>[] parameters )
 {
     _billingOfficeKey = parameters.GetValue<long> ( "BillingOfficeKey" );
     RefreshList ();
 }
 /// <summary>
 /// Navigates to default command.
 /// </summary>
 /// <param name="parameters">The parameters.</param>
 protected override void NavigateToDefaultCommand(KeyValuePair<string, string>[] parameters)
 {
     var reload = parameters.GetValue<bool?> ( "ShouldReload" );
     if ( reload != false )
     {
         OnCurrentContextChanged ( this, new EventArgs () );
         ContextChanged += OnCurrentContextChanged;
     }
 }
 /// <summary>
 /// Navigates to default command.
 /// </summary>
 /// <param name="parameters">The parameters.</param>
 protected override void NavigateToDefaultCommand( KeyValuePair<string, string>[] parameters )
 {
     AgencyKey = parameters.GetValue<long> ( "AgencyKey" );
     var isCreateMode = parameters.GetValue<bool> ( "IsCreate" );
     LoadAgencySummary ( _agencyKey );
     if ( isCreateMode )
     {
         _navigationService.Navigate (
             RegionManager,
             "WorkspaceContentScopedRegion",
             "AgencyEditorView",
             null,
             new[]
                 {
                     new KeyValuePair<string, string> ( "AgencyKey", _agencyKey.ToString () ),
                     new KeyValuePair<string, string> ( "IsCreate", "true" )
                 } );
     }
     else
     {
         _navigationService.Navigate (
             RegionManager,
             "WorkspaceContentScopedRegion",
             "AgencyDashboardView",
             null,
             new[]
                 {
                     new KeyValuePair<string, string> ( "AgencyKey", _agencyKey.ToString () )
                 } );
     }
 }
 /// <summary>
 /// Determines whether this instance [can navigate to default command] the specified parameters.
 /// </summary>
 /// <param name="parameters">The parameters.</param>
 /// <returns><c>true</c> if this instance [can navigate to default command] the specified parameters; otherwise, <c>false</c>.</returns>
 protected override bool CanNavigateToDefaultCommand( KeyValuePair<string, string>[] parameters )
 {
     var agencyKey = parameters.GetValue<long> ( "AgencyKey" );
     return agencyKey == _agencyKey;
 }
 /// <summary>
 /// Navigates to default command.
 /// </summary>
 /// <param name="parameters">The parameters.</param>
 protected override void NavigateToDefaultCommand( KeyValuePair<string, string>[] parameters )
 {
     _patientKey = parameters.GetValue<long> ( "PatientKey" );
 }
        /// <summary>
        /// Navigates to default command.
        /// </summary>
        /// <param name="parameters">The parameters.</param>
        protected override void NavigateToDefaultCommand( KeyValuePair<string, string>[] parameters )
        {
            var patientKey = parameters.GetValue<long> ( "PatientKey" );

            if (SelfPayment != null)
            {
                _ruleExecutor.StopWatchingSubject ( this );
            }

            SelfPayment = new SelfPaymentDto ();
            SelfPayment.PatientKey = patientKey;
            SelfPayment.CollectedByStaffKey = _currentStaffKey;
            SelfPayment.CultureName = "en-US";
            SelfPayment.CurrencyWellKnownName = Currency.USDollars;

            _ruleExecutor.WatchSubject ( this );

            var requestDispatcher = _asyncRequestDispatcherFactory.CreateAsyncRequestDispatcher ();
            requestDispatcher.AddLookupValuesRequest ( "PaymentMethod" );
            requestDispatcher.ProcessRequests ( HandleInitializationCompleted, HandleInitializationError );
            IsLoading = true;
        }
Example #18
0
        /// <summary>
        /// Navigates to default command.
        /// </summary>
        /// <param name="parameters">The parameters.</param>
        protected override void NavigateToDefaultCommand( KeyValuePair<string, string>[] parameters )
        {
            var note = parameters.GetValue<string> ( "Note" );
            _name = parameters.GetValue<string> ( "Name" );
            RaisePropertyChanged ( () => Title );

            Note = note;
        }
        private void NavigateToEditCommand( KeyValuePair<string, string>[] parameters )
        {
            _initialSystemRoleKeyToEdit = parameters.GetValue<long> ( "SystemRoleKey" );
            var initialSystemRoleTypeToEdit =
                ( SystemRoleType )Enum.Parse ( typeof( SystemRoleType ), parameters.GetValue<string> ( "SystemRoleType" ), true );

            switch ( initialSystemRoleTypeToEdit )
            {
                case SystemRoleType.Task:
                    ExecuteRoleWorkingModeChangedCommand ( true );
                    break;
                case SystemRoleType.TaskGroup:
                    ExecuteRoleWorkingModeChangedCommand ( false );
                    break;
            }
        }
 /// <summary>
 /// Navigates to default command.
 /// </summary>
 /// <param name="parameters">The parameters.</param>
 protected override void NavigateToDefaultCommand( KeyValuePair<string, string>[] parameters )
 {
     _locationKey = parameters.GetValue<long> ( "LocationKey" );
     GetProgramOfferingsByLocationAsync ( _locationKey );
 }
 /// <summary>
 /// Determines whether this instance [can navigate to default command] the specified parameters.
 /// </summary>
 /// <param name="parameters">The parameters.</param>
 /// <returns><c>true</c> if this instance [can navigate to default command] the specified parameters; otherwise, <c>false</c>.</returns>
 protected override bool CanNavigateToDefaultCommand( KeyValuePair<string, string>[] parameters )
 {
     var patientKey = parameters.GetValue<long> ( "PatientKey" );
     return _patientKey == patientKey;
 }
Example #22
0
        /// <summary>
        /// Navigates to default command.
        /// </summary>
        /// <param name="parameters">The parameters.</param>
        protected override void NavigateToDefaultCommand( KeyValuePair<string, string>[] parameters )
        {
            _patientKey = parameters.GetValue<long>("PatientKey");
            var key = parameters.GetValue<long> ( "ClinicalCaseKey" );
            _clinicalCaseKey = key;

            if ( _clinicalCaseKey > 0 )
            {
                GetRecentActivitiesByClinicalCaseAsync ( key );
                GetScheduledActivitiesByClinicalCaseAsync ( key );
            }
        }
 private void NavigateToEditCommand( KeyValuePair<string, string>[] parameters )
 {
     var systemRoleKey = parameters.GetValue<long> ( "SystemRoleKey" );
     var dispatcher = _asyncRequestDispatcherFactory.CreateAsyncRequestDispatcher ();
     dispatcher.Add ( new GetDtoRequest<SystemRoleDto> { Key = systemRoleKey } );
     IsLoading = true;
     dispatcher.ProcessRequests ( HandleEditRequestComplete, HandleEditRequestDispatcherException );
 }
Example #24
0
        private void NavigateToOpenSendNewMailViewCommand( KeyValuePair<string, string>[] parameters )
        {
            var mail = new DirectMailDto { From = _currentContext.Staff.DirectEmailAddress, FromName = _currentContext.Staff.FullName, Sent = DateTime.Now };

            _patientKey = parameters.GetValue<long> ( "PatientKey" );
            var patientName = parameters.GetValue<string> ( "PatientFullName" );
            if ( !string.IsNullOrEmpty ( patientName ) )
            {
                mail.AttachmentName = string.Format ( "{0}.xml, Preview.html", DateTime.Now.Ticks );
            }

            Mail = mail;
        }
 /// <summary>
 /// Determines whether this instance [can navigate to default command] the specified parameters.
 /// </summary>
 /// <param name="parameters">The parameters.</param>
 /// <returns><c>true</c> if this instance [can navigate to default command] the specified parameters; otherwise, <c>false</c>.</returns>
 protected override bool CanNavigateToDefaultCommand( KeyValuePair<string, string>[] parameters )
 {
     var key = parameters.GetValue<long> ( "MedicationKey" );
     return _medication == null || key == _medication.Key;
 }
 /// <summary>
 /// Determines whether this instance [can navigate to default command] the specified parameters.
 /// </summary>
 /// <param name="parameters">The parameters.</param>
 /// <returns><c>true</c> if this instance [can navigate to default command] the specified parameters; otherwise, <c>false</c>.</returns>
 protected override bool CanNavigateToDefaultCommand( KeyValuePair<string, string>[] parameters )
 {
     var locationKey = parameters.GetValue<long> ( "LocationKey" );
     return LocationSummary.Key == locationKey;
 }
Example #27
0
 /// <summary>
 /// Determines whether this instance [can navigate to default command] the specified parameters.
 /// </summary>
 /// <param name="parameters">The parameters.</param>
 /// <returns><c>true</c> if this instance [can navigate to default command] the specified parameters; otherwise, <c>false</c>.</returns>
 protected override bool CanNavigateToDefaultCommand( KeyValuePair<string, string>[] parameters )
 {
     var key = parameters.GetValue<long> ( "BillingOfficeKey" );
     return key == 0 || key == _billingOfficeKey;
 }
        /// <summary>
        /// Navigates to default command.
        /// </summary>
        /// <param name="parameters">The parameters.</param>
        protected override void NavigateToDefaultCommand( KeyValuePair<string, string>[] parameters )
        {
            _locationKey = parameters.GetValue<long> ( "LocationKey" );
            var isCreateMode = parameters.GetValue<bool> ( "IsCreate" );

            var requestDispatcher = _asyncRequestDispatcherFactory.CreateAsyncRequestDispatcher ();
            requestDispatcher.Add ( new GetDtoRequest<LocationSummaryDto> { Key = _locationKey } );
            requestDispatcher.ProcessRequests ( HandleGetLocationSummaryDtoCompleted, HandleGetLocationSummaryDtoException );
            IsLoading = true;

            if ( isCreateMode )
            {
                _navigationService.Navigate (
                    RegionManager,
                    "WorkspaceContentScopedRegion",
                    "LocationEditorView",
                    null,
                    new[]
                        {
                            new KeyValuePair<string, string> ( "LocationKey", _locationKey.ToString () ),
                            new KeyValuePair<string, string> ( "IsCreate", "true" )
                        } );
            }
            else
            {
                _navigationService.Navigate (
                    RegionManager,
                    "WorkspaceContentScopedRegion",
                    "LocationDashboardView",
                    null,
                    new[] { new KeyValuePair<string, string> ( "LocationKey", _locationKey.ToString () ) } );
            }
        }
 /// <summary>
 /// Navigates to default command.
 /// </summary>
 /// <param name="parameters">The parameters.</param>
 protected override void NavigateToDefaultCommand( KeyValuePair<string, string>[] parameters )
 {
     _clinicalCaseKey = parameters.GetValue<long> ( "ClinicalCaseKey" );
     _patientKey = parameters.GetValue<long> ( "PatientKey" );
     GetAllProblemsByClinicalCase ( _clinicalCaseKey );
 }
Example #30
0
        /// <summary>
        /// Navigates to default command.
        /// </summary>
        /// <param name="parameters">The parameters.</param>
        protected override void NavigateToDefaultCommand( KeyValuePair<string, string>[] parameters )
        {
            var clinicalCaseKey = parameters.GetValue<long> ( "ClinicalCaseKey" );
            var patientKey = parameters.GetValue<long> ( "PatientKey" );

            var navigationParameters = new[]
                {
                    new KeyValuePair<string, string> ( "ClinicalCaseKey", clinicalCaseKey.ToString () ),
                    new KeyValuePair<string, string> ( "PatientKey", patientKey.ToString () )
                };

            _navigationService.Navigate ( RegionManager, "SnapshotItemsRegion", "CaseSummaryView", null, navigationParameters );
        }