Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PayorCoverageCache"/> class.
 /// </summary>
 /// <param name="patient">The patient.</param>
 /// <param name="payorCache">The payor cache.</param>
 /// <param name="effectiveDateRange">The effective date range.</param>
 /// <param name="memberNumber">The member number.</param>
 /// <param name="payorSubscriber">The payor subscriber.</param>
 /// <param name="payorCoverageCacheType">Type of the payor coverage cache.</param>
 protected internal PayorCoverageCache(
     Patient patient,
     PayorCache payorCache,
     DateRange effectiveDateRange,
     string memberNumber,
     PayorSubscriberCache payorSubscriber,
     PayorCoverageCacheType payorCoverageCacheType)
 {
     Patient                = patient;
     PayorCache             = payorCache;
     EffectiveDateRange     = effectiveDateRange;
     MemberNumber           = memberNumber;
     PayorSubscriberCache   = payorSubscriber;
     PayorCoverageCacheType = payorCoverageCacheType;
 }
        /// <summary>
        /// Creates the payor coverage.
        /// </summary>
        /// <param name="patient">The patient.</param>
        /// <param name="payorCache">The payor cache.</param>
        /// <param name="effectiveDateRange">The effective date range.</param>
        /// <param name="memberNumber">The member number.</param>
        /// <param name="payorSubscriberCache">The payor subscriber cache.</param>
        /// <param name="payorCoverageCacheType">Type of the payor coverage cache.</param>
        /// <returns>A Payor coverage cache.</returns>
        public PayorCoverageCache CreatePayorCoverage(
            Patient patient,
            PayorCache payorCache,
            DateRange effectiveDateRange,
            string memberNumber,
            PayorSubscriberCache payorSubscriberCache,
            PayorCoverageCacheType payorCoverageCacheType)
        {
            var payorCoverage = new PayorCoverageCache(patient, payorCache, effectiveDateRange, memberNumber, payorSubscriberCache, payorCoverageCacheType);

            PayorCoverageCache createdPayorCoverage = null;

            DomainRuleEngine.CreateRuleEngine(payorCoverage, "CreatePayorCoverageRuleSet")
            .WithContext(payorCoverage.PayorCoverageCacheType)
            .WithContext(payorCoverage.EffectiveDateRange)
            .Execute(() =>
            {
                createdPayorCoverage = payorCoverage;

                _payorCoverageCacheRepository.MakePersistent(payorCoverage);
            });

            return(createdPayorCoverage);
        }
Example #3
0
 /// <summary>
 /// Revises the payor subscriber cache.
 /// </summary>
 /// <param name="payorSubscriberCache">The payor subscriber cache.</param>
 public virtual void RevisePayorSubscriberCache(PayorSubscriberCache payorSubscriberCache)
 {
     PayorSubscriberCache = payorSubscriberCache;
 }