Service edit and adjustment¶
clsServiceEditor runs two passes per billed service line. EditService performs lightweight, non-adjusting validation and logging. For any service still flagged for re-audit (ReauditCode = "R"), AdjustService first normalizes the audited service (UpdateAuditService) and then runs two further rule groups that can generate full-charge disallowance adjustments and force the service out of the audit (ReauditCode = "X").
| Field | Value |
|---|---|
| Operation ID | OP-AA-03 |
| Trigger | BillAuditEngine.AuditBill calls clsServiceEditor.EditService(Bill, Service) for every service, then AdjustService(Bill, Service) for services where Service.IsAuditable |
| Inputs | clsBillAudit, clsBillAuditService for the current line (billed service + audited service + cached provider/NDC/fee state) |
| Outputs | Boolean pass/fail (ErrorCount = 0) per call; normalized audited-service fields; ReauditCode transitions to "X" on disallowance; full-charge adjustments; audit messages |
| Primary components | clsServiceEditor.EditService, clsServiceEditor.AdjustService, clsServiceEditor.UpdateAuditService |
| Entry point | Business\SAIF.Business.Claim.Bill.AutomatedAudit\AuditUtilities\clsServiceEditor.vb |
Steps¶
- EditService — set context and log. Store the current
Bill,BillAuditService, andAuditedService. Log the service date and either the NDC code (pharmacy services) or the service code/type (all other services). - EditService — run
#VALIDATE_SERVICE_LINE#. Clear broken rules and execute the rule group (BR-004): cse_ServiceDateExists— if the service date is null: error"{0} Invalid service date"(BR-008) and setReauditCode = "X".cse_ServiceDate_ReceivedDate— warning-only: warn"{0} Service date is after received date"if the service date is after the mailroom received date.cse_ServiceDate_ServiceEndDate— ifServiceEndDate < ServiceDate: error"{0} Service through date is before from date"(BR-009).cse_ValidSecondaryServiceCode— if a secondary service code is present but does not resolve: error"{0} Invalid secondary service code"(BR-013).ba_ValidatePharmacyPrescriberID— ifPrescribingProviderCode = "01"(NPI qualifier) and the prescriber ID is not exactly 10 numeric digits: error"Prescriber ID must be 10 numeric digits for NPI qualifier ({0})."(BR-014).cse_ServiceTypeCode_IsRevenueCode— forInpatientHospital/OutpatientHospitalbills, if neither the primary nor secondary service type is a revenue code: error"{0} Revenue code required"(BR-015).- Return
ErrorCount = 0to the caller. - AdjustService — normalize (
UpdateAuditService). - Reset the service wrapper's
FeeScheduleCodeto blank and clearTotalAdjustmentAmount,FeeScheduleAmount, and MCO eligibility/ID/admin-fee/rate. - If
ReauditCode = "R"and a charge amount exists: setAllowedAmount = ChargeAmountandOriginalBillCode = "O"as the starting point before adjustment. - Normalize NDC/service-code precedence: if an NDC is already present, clear
ServiceCode; if the service type is Pharmacy and the resolved national drug is valid, normalizeNationalDrugCodeand clearServiceCode. -
If a secondary service code exists but has not resolved, attempt to resolve its type via the service reference lookup, using
"U"(unknown) if it still does not resolve.Origin: Service type resolution is implemented by Service reference lookups in
SAIF.Business.Claim.Bill. - If the resolved service requires nurse review, setBillAuditService.IsNurseReviewRequired = True. - Log when a service description could not be found for the service date. 4. AdjustService — runADJUST_SERVICE#. Clear broken rules and execute the rule group (full-charge disallowance adjustments setReauditCode = "X"and stop the service from further audit): -cse_ServiceDate_InjuryDate— if the service date precedes the claim's injury date: message"{0} Adjustment SE-disallow service before date of injury", full-chargeSEadjustment (BR-010). -cse_ServiceDate_ReimbursementExpired— for non-federal Worker Reimbursement bills received more than 730 days after the service date: message"{0} Adjustment FN-disallow worker reimbursement", full-chargeFNadjustment (BR-011). -cse_ServiceLocation_ValidPlaceOfService— for service types other than Ambulance, Dental, Pharmacy, or Worker Reimbursement, if the location is missing or inactive: message"{0} Service location is invalid or does not exist", full-chargeTUadjustment (BR-012). -cse_ServiceQuantity_MinimumInterpreterMileage— forD0041below the era-specific minimum billed quantity (60.01 units before 4/1/2012, 15 units on/after): message"{0} Adjustment IC-disallow service", full-chargeICadjustment (BR-016). -cse_ProviderServiceCode_ValidateService— dispatches by service type: - Pharmacy (ValidatePharmacyServiceType): if the national drug is valid, resolves NDC pricing effective on the service date; if pricing is missing, full-chargeFAadjustment andReauditCode = "X"; otherwise normalizesNationalDrugCodeand blanksServiceCode. - Non-pharmacy (ValidateNonPharmacyServiceType): if the service resolves, clearsNationalDrugCode; if it does not resolve, message"{0} Adjustment FF-disallow unknown service code", full-chargeFFadjustment. -ba_ValidatePharmacyInfo— for Pharmacy provider typePHbills missing prescriber ID, Rx-written date, or prescriber last name: message"Invalid pharmacy information ({0}).", full-chargeGXadjustment (BR-017). -ba_ValidatePharmacyRXDate— for Pharmacy provider typePHbills where the Rx-written date is after the service date: message"Date rx written cannot be after the service date' ({0}).", full-chargeGXadjustment (BR-017). - Full-charge adjustments are created via the sharedGenerateAdjustmenthelper onclsBillAuditUtility, which caps the requested amount to the currentAllowedAmount, logs the request/cap, and updatesAllowedAmount/TotalAdjustmentAmountwhen the resulting amount is non-zero. 5. AdjustService — re-run#EDIT_SERVICE#if still auditable. If the service is stillReauditCode = "R"after the adjustment rules above (i.e., it was not disallowed), re-execute the#EDIT_SERVICE#group described in step 2 so validation reflects any normalization performed in step 3. 6. Return overall result.AdjustServicereturnsErrorCount = 0.
Process flow¶
flowchart TD
Start([Per-service loop in AuditBill]) --> Edit[EditService:<br>#VALIDATE_SERVICE_LINE# rules]
Edit --> Auditable{Service.IsAuditable?<br>ReauditCode = R}
Auditable -->|No| Skip([No adjustment pass])
Auditable -->|Yes| RemovePrior[Remove prior adjustments]
RemovePrior --> Normalize[UpdateAuditService:<br>reset fee/MCO fields,<br>resolve NDC/service type]
Normalize --> AdjustRules[ADJUST_SERVICE# rules:<br>DOI, reimbursement window,<br>place of service, mileage minimum,<br>service code, pharmacy info]
AdjustRules --> Disallowed{Disallowed?<br>ReauditCode = X}
Disallowed -->|Yes| Done([Service excluded from further audit])
Disallowed -->|No| ReEdit[Re-run #EDIT_SERVICE#]
ReEdit --> Done2([Return ErrorCount = 0])
Failure and edge-case behavior¶
EditServicenever itself setsReauditCode = "X"except throughcse_ServiceDateExists; most of its other checks are message-only and always allow the caller to proceed toAdjustService.*- Once a service is disallowed in the
ADJUST_SERVICE#group (ReauditCode = "X"), it is excluded from#EDIT_SERVICE#re-validation and from all downstream steps of Bill audit rule execution that requireReauditCode = "R". GenerateAdjustmentsilently caps an adjustment request larger than the currentAllowedAmount, logging"Adjustment reduced to allowed."rather than raising an error — a caller expecting the full requested disallowance amount will not see it if the allowed amount was already reduced by an earlier step.- Because
UpdateAuditServiceclears prior MCO/fee-schedule state on every adjustment pass, any MCO determination performed before this service's adjustment for the same run must be re-applied afterward by MCO determination and Bill audit rule execution.*
Related documentation¶
Note: Statements marked with
*were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.
Sources¶
Business\SAIF.Business.Claim.Bill.AutomatedAudit\AuditUtilities\clsServiceEditor.vbBusiness\SAIF.Business.Claim.Bill.AutomatedAudit\AuditUtilities\clsBillAuditUtility.vbBusiness\SAIF.Business.Claim.Bill.AutomatedAudit\clsBillAuditService.vb