Exemple #1
0
        ///<summary>Gets the UCR fee for the provided procedure.</summary>
        public static double GetFeeUCR(Procedure proc)
        {
            //No need to check RemotingRole; no call to db.
            long provNum = proc.ProvNum;

            if (provNum == 0)           //if no prov set, then use practice default.
            {
                provNum = PrefC.GetLong(PrefName.PracticeDefaultProv);
            }
            int qty = proc.UnitQty + proc.BaseUnits;

            if (qty == 0)
            {
                qty = 1;
            }
            Provider providerFirst = Providers.GetFirst();          //Used in order to preserve old behavior...  If this fails, then old code would have failed.
            Provider provider      = Providers.GetFirstOrDefault(x => x.ProvNum == provNum) ?? providerFirst;
            //get the fee based on code and prov fee sched
            double ppoFee = Fees.GetAmount0(proc.CodeNum, provider.FeeSched, proc.ClinicNum, provNum);
            double ucrFee = proc.ProcFee;

            if (ucrFee > ppoFee)
            {
                return(qty * ucrFee);
            }
            else
            {
                return(qty * ppoFee);
            }
        }