Ejemplo n.º 1
0
        private void OnNavigateToCreateCommand(KeyValuePair <string, string>[] parameters)
        {
            var patientKey = parameters.GetValue <long> ("PatientKey");

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

            PayorCoverage            = new PayorCoverageCacheDto();
            PayorCoverage.PatientKey = patientKey;

            _ruleExecutor.WatchSubject(this);

            var requestDispatcher = _asyncRequestDispatcherFactory.CreateAsyncRequestDispatcher();

            requestDispatcher.Add(new GetDtoRequest <PatientSummaryDto> {
                Key = patientKey
            });
            AddLookupRequests(requestDispatcher);
            requestDispatcher.ProcessRequests(HandleInitializationCompleted, HandleInitializationError);
        }
Ejemplo n.º 2
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");

            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;
        }