Пример #1
0
        /// <summary>
        /// Adjudicates the claims data task.
        /// </summary>
        /// <param name="taskId">The task identifier.</param>
        /// <param name="noOfRecords">The no of records.</param>
        /// <param name="claimsCount">The claims count for thread.</param>
        /// <param name="contracts">The contracts.</param>
        /// <param name="startRow">The start row.</param>
        /// <param name="endRow">The end row.</param>
        /// <param name="connectionString">The connection string.</param>
        /// <returns></returns>
        private void AdjudicateClaimsDataTask(long taskId, int noOfRecords, long claimsCount, List <Contract> contracts,
                                              long startRow, long endRow, string connectionString)
        {
            IAdjudicationEngine adjudicationEngine = Factory.CreateInstance <IAdjudicationEngine>(connectionString, true);

            try
            {
                while (claimsCount > 0)
                {
                    // Adjudication Starts
                    AdjudicatedClaimsResult paymentResultDictionary = adjudicationEngine.AdjudicateClaimsDataThread(taskId, noOfRecords, contracts, startRow, endRow);
                    lock (_paymentResultQueue)
                    {
                        // Adding payment result and claim information into Queue. If Job is paused, then have to stop adjudication by setting 'claimsCountForThread=0'
                        if (!paymentResultDictionary.IsPaused)
                        {
                            _paymentResultQueue.Enqueue(paymentResultDictionary);
                        }
                        else
                        {
                            claimsCount = 0;
                        }
                    }

                    claimsCount = claimsCount - noOfRecords;
                }
            }
            catch (Exception ex)
            {
                Log.LogError(Constants.AdjudicationExceptionLog + taskId, Constants.BackgroundServiceUser, ex);
            }
        }
Пример #2
0
 public RtaLogic(IRtaRepository rtaRepository, IAdjudicationEngine adjudicationEngine)
 {
     if (rtaRepository != null)
     {
         _rtaRepository = rtaRepository;
     }
     if (adjudicationEngine != null)
     {
         _adjudicationEngine = adjudicationEngine;
     }
 }
Пример #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ClaimSelectorLogic"/> class.
        /// </summary>
        /// <param name="selectClaimsRepository">The select claims repository.</param>
        /// <param name="adjudicationEngine">The adjudication engine.</param>
        public ClaimSelectorLogic(IClaimSelectorRepository selectClaimsRepository, IAdjudicationEngine adjudicationEngine)
        {
            if (selectClaimsRepository != null)
            {
                _claimSelectorRepository = selectClaimsRepository;
            }

            if (adjudicationEngine != null)
            {
                _adjudicationEngine = adjudicationEngine;
            }
        }
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ClaimSelectorLogic"/> class.
 /// </summary>
 /// <param name="connectionString">The connection string.</param>
 public ClaimSelectorLogic(string connectionString)
 {
     _connectionString        = connectionString;
     _adjudicationEngine      = Factory.CreateInstance <IAdjudicationEngine>(connectionString, true);
     _claimSelectorRepository = Factory.CreateInstance <IClaimSelectorRepository>(connectionString, true);
 }
Пример #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RtaLogic"/> class.
 /// </summary>
 /// <param name="connectionString">The connection string.</param>
 public RtaLogic(string connectionString)
 {
     _rtaRepository      = Factory.CreateInstance <IRtaRepository>(connectionString, true);
     _adjudicationEngine = Factory.CreateInstance <IAdjudicationEngine>(connectionString, true);
 }
Пример #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RtaLogic"/> class.
 /// </summary>
 public RtaLogic()
 {
     _rtaRepository      = Factory.CreateInstance <IRtaRepository>();
     _adjudicationEngine = Factory.CreateInstance <IAdjudicationEngine>();
 }