Exemplo n.º 1
0
 ///<summary>Construct a new FeeCache with the provided _queueClinicNums size limit. If a clinic other than HQ is currently selected, add that
 ///clinic to the queue. When doInitialize is set to true load in all of the HQ fees and the fees for the current clinic if there is one.</summary>
 public FeeCache(int numClinics = 5, bool doInitialize = true)
 {
     _queueClinicNums = new FeeCacheQueue(numClinics);
     _queueClinicNums.CurClinicNum = Clinics.ClinicNum;
     _dict = new FeeCacheDictionary();
     if (doInitialize)
     {
         Initialize();
     }
 }
Exemplo n.º 2
0
 ///<summary>Copy the provided dictionary into the current dictionary, including _dictFeeSchedNums, and _dictFeeSchedClinicNums.</summary>
 public FeeCacheDictionary(FeeCacheDictionary dict) : base(dict.Where(x => x.Value != null).ToDictionary(x => x.Key, x => x.Value.Copy()))
 {
     _dictFeeSchedNums       = new ConcurrentDictionary <long, int>(dict._dictFeeSchedNums);
     _dictFeeSchedClinicNums = new ConcurrentDictionary <Tuple <long, long>, int>(dict._dictFeeSchedClinicNums);
 }
Exemplo n.º 3
0
        ///<summary>Load the dictionary with the non-hidden fee schedule fees for each of the clinics currently in the queue.</summary>
        public void Initialize()
        {
            List <long> listFeeScheds = FeeScheds.GetDeepCopy(true).Select(x => x.FeeSchedNum).ToList();

            _dict = new FeeCacheDictionary(Fees.GetByFeeSchedNumsClinicNums(listFeeScheds, _queueClinicNums.ToList()));
        }