Calculation type
For charges billed by a non-physician practitioner (mid-level provider), sets the allowed amount to the lesser of a percentage of the current fee-schedule (already-priced) amount and a percentage of actual charges, per NUCC taxonomy classification.
for i in 1..NumCharges: if !charge.IsZeroCharge() && !IgnoreCharge(calc,charge,ctx) && IsMidLevelProviderCharge(charge) [caches ProviderTaxonomy for charge.ProviderID as a side effect]: settings = ClassificationSettings.Where(s => s.Classifications.Contains(taxonomy.Classification)).FirstOrDefault() ?? new MidLevelProviderClassifcationSettings() [defaults FeeSchedulePercentage=100, ChargePercentage=100]; feeScheduleAdjustment = MoneyMath.Multiply(detail.Amount, GetNormalizedProportion(settings.FeeSchedulePercentage)); chargeAdjustment = MoneyMath.Multiply(charge.AmountCharged, GetNormalizedProportion(settings.ChargePercentage)); detail.Adjust(Math.Min(feeScheduleAdjustment, chargeAdjustment), calc) // GetNormalizedProportion(p) = (p<0 ? 100 : p)/100.0
| Key | Meaning |
|---|---|
| ClassificationSettings | List of {Classifications: NUCC provider-taxonomy classification names (e.g. "Physician Assistant", "Nurse Practitioner"), FeeSchedulePercentage: percent of the already-priced allowed amount this classification is capped at, ChargePercentage: percent of actual billed charges this classification is capped at}. Defaults ship pre-populated from Medicare Claims Processing Manual 100-04 Ch.12 Sections 110/120/130/240/250 |
Gotchas
Does not read a named fee/code schedule; resolves the charge's Provider then ProviderTaxonomy (via IProviderRepo/IProviderTaxonomyRepo) and checks ProviderTaxonomy.IsNonphysicianPractitionerTaxonomy plus Classification against ClassificationSettings. If ProviderID is null, the provider/taxonomy can't be resolved, or the taxonomy isn't a non-physician-practitioner type, the charge is skipped with NO adjustment recorded at all (not a zero adjustment). The per-charge amounts use MoneyMath.Multiply(decimal, double), which casts to double and applies Math.Round(double,2) with default (banker's/ToEven) rounding -- different from the decimal AwayFromZero rounding used elsewhere in the engine; a reimplementer using straight decimal multiplication+rounding will diverge on .xx5 boundaries. GetNormalizedProportion treats a negative configured percentage as 100 (a defensive no-adjust guard), so a misconfigured negative FeeSchedulePercentage silently becomes a no-op cap rather than erroring. Non-obvious control-flow coupling: ApplyAdjustment's own providerTaxonomyMap.TryGetValue lookup (line 41 of the Calculator) only succeeds because IncludeCharge(charge) -- evaluated moments earlier in the same `if` -- has just populated that cache as a side effect inside IsMidLevelProviderCharge; the two calls are not otherwise connected, and refactoring away that caching side effect would silently make every charge fall through as non-mid-level with no error.
class · /home/cary/src/mdc/MdClarity/MDClarity/MDClarityCore/Backend/PricingEngine/Adjustments/MidLevelProviderAdjustment.cs:9
calculator · /home/cary/src/mdc/MdClarity/MDClarity/MDClarityCore/Backend/PricingEngine/Adjustments/Calculators/MidLevelProviderAdjustmentCalculator.cs
dispatch · CalculationEngine.cs:832-835 (case MidLevelProviderAdjustment midLevelProviderAdjustment: new MidLevelProviderAdjustmentCalculator(...).ApplyAdjustment())
CONFIRMED - class declaration read at MidLevelProviderAdjustment.cs:9-31 (Calculation, IAdjustment; CalculationLevel hardcoded Charge) and Field class at line 51 (matches draft's line citation), dispatch confirmed at CalculationEngine.cs:832-835, full calculator algorithm read at MidLevelProviderAdjustmentCalculator.cs:1-109, MoneyMath.Multiply(decimal,double) rounding behavior confirmed directly in GeneralUtils/MoneyMath.cs:20-23. Draft's core claims were accurate; corrected the formula to cite the actual MoneyMath.Multiply/GetNormalizedProportion calls (draft's formula used plain arithmetic notation that obscured the double-cast rounding) and added the caching-side-effect and negative-percentage gotchas.