Skip to content

Industry-specific operational data

Pharmacy claim reject and resolution data for pharmacy operations AI

Quick answer

Pharmacy claim rejection data for AI is a set of NCPDP Telecommunication vD.0 claim and response pairs in which each rejected B1 transaction is linked to what the pharmacy did next: a DUR/PPS override, a submission clarification code, a corrected rebill, a prior authorization, a coordination-of-benefits change or an abandoned fill. The reject code in field 511-FB is the label backbone, but the resolution path and the final paid or reversed outcome are what train a useful reject-resolution assistant.

By SourceX Editorial · Updated

Why pharmacy rejects need their own dataset

Pharmacy rejects need their own dataset because retail and long-term care pharmacies adjudicate in real time on the NCPDP Telecommunication Standard, not on the X12 837/835 cycle used for medical claims. A medical denial arrives days later as a CARC/RARC pair on a remittance; a pharmacy reject arrives in seconds while the patient waits at the counter. That changes the learning problem: the model must predict the next action inside a single dispensing session, from the response message, not draft an appeal weeks later. For the medical-claims equivalent, see matched 837 claims and 835 remittance outcomes for denial prediction.

The volume is real and well documented. A study of Part D claims from a large long-term care pharmacy found that roughly one in six claims was rejected, and that DUR, quantity limits and prior authorization grew as rejection drivers over 2006 to 2010 [1]. A New York State Comptroller audit counted 453,706 rejected Medicaid pharmacy encounter claims from January 2018 to March 2023, with an estimated $31.2 million in missed drug rebates, mostly from unverifiable managed-care enrollment [2]. Those are research and audit uses; the AI use is to shorten the time from reject to correct resolution.

Which NCPDP fields a reject-resolution dataset must carry

A usable dataset carries the full request segment set, the full response, and every follow-up transaction for the same prescription and fill. Rejects are only interpretable against what was submitted, so a file of reject codes alone teaches a model almost nothing. Ask for these fields at minimum, by NCPDP field ID:

  • Transaction header: 103-A3 Transaction Code (B1 billing, B2 reversal, B3 rebill), 401-D1 Date of Service, BIN and PCN, so the processor and plan routing are known.
  • Claim segment: 402-D2 Prescription/Service Reference Number, 403-D3 Fill Number, 407-D7 Product/Service ID (NDC), 442-E7 Quantity Dispensed, 405-D5 Days Supply, 420-DK Submission Clarification Code, 461-EU and 462-EV prior authorization type and number.
  • Response status: 112-AN Transaction Response Status, every repetition of 511-FB Reject Code, 526-FQ Additional Message Information and any free-text help-desk messages.
  • DUR/PPS: 439-E4 Reason for Service Code, 440-E5 Professional Service Code and 441-E6 Result of Service Code, both as returned by the processor and as submitted on the override.
  • Pricing (rights permitting): submitted ingredient cost, dispensing fee, patient pay amount and plan paid amount.
  • Resolution log: the pharmacy system's work-queue events, technician notes and timestamps that connect the reject to the next transaction.

Reject code meanings should be verified against the NCPDP External Code List for the version in use, because NCPDP licenses the standard and payers implement subsets. One processor's own reject appendix states plainly that it has not implemented every code it lists [5]. HL7's CARIN Blue Button guide carries NCPDP reject codes as a FHIR value set, which helps if the supplier's data has passed through a payer API [6].

How to define the resolution label

The resolution label is the action that turned a reject into a paid claim, or the documented decision to stop. Derive it by linking the rejected B1 to the next B1 or B3 for the same 402-D2 and 403-D3 within a time window, then diffing the two requests. The changed fields tell you the class:

Reject pattern (verify codes)Typical resolution signalLabel to derive
79 Refill Too SoonLater date of service, or a 420-DK value such as vacation supply or lost prescriptionwait, SCC override, or no fill
88 DUR Reject ErrorSame claim resubmitted with 439-E4, 440-E5 and 441-E6 populatedDUR/PPS override with codes
75 Prior Authorization Required461-EU/462-EV populated on rebill, or an ePA or fax event in the work queuePA obtained, PA pending, abandoned
76 Plan Limitations ExceededReduced 442-E7 or 405-D5 on the rebillquantity or days-supply change
70 Product/Service Not CoveredDifferent 407-D7 NDC on the rebilltherapeutic substitution
41 Submit Bill to Other Processor or Primary PayerNew BIN/PCN with COB segmentcoordination of benefits rebill

Illustrative example: invented to show structure; it does not describe an available dataset.

The DUR case shows why the override codes matter. California's Medi-Cal Rx guidance on reject 88 tells pharmacists to review each DUR alert, address each service code independently, answer all alerts on a single claim, and expect unresolved alerts to keep rejecting [3]. A dataset that preserves every E4/E5/E6 triplet on the override therefore gives you a multi-label target, not one class. Louisiana's report on claims denied after an approved authorization shows another trap: 79 and 75 still lead the counts after a PA was granted [4], so "PA approved" does not mean "claim paid" and both events need timestamps.

Pitfalls that break reject-resolution models

The main failure modes come from incomplete linkage and from payer-specific behavior that the model mistakes for general rules:

  • Missing reversals. If B2 reversals are dropped, a paid claim that was later reversed looks like a successful resolution.
  • Cascading rejects. One claim can return several 511-FB repetitions; keeping only the first teaches the wrong action.
  • Payer drift. Processor edits, formulary files and quantity limits change by plan year, so split train and test by time and by BIN/PCN, not at random.
  • Override leakage. If the override codes appear in features for the same transaction you are predicting, the model learns the answer.
  • Label noise. Technicians sometimes enter override codes to clear an edit rather than to record a clinical judgment. Audit a sample by pharmacist review; label errors of a few percent are enough to reorder model comparisons [9].
  • Unresolved tails. Abandoned prescriptions are a real outcome. Keep them as a class instead of filtering them out.

Agent teams should also capture the screen-level steps a technician takes in the pharmacy system, which the computer-use trajectory format describes.

Privacy, rights and confidentiality checks

Reject data is protected health information when it comes from a covered pharmacy, so it must be de-identified under HIPAA or shared as a limited data set under a data use agreement [7]. Safe Harbor removes every date element except the year for dates tied to the individual, which breaks refill-too-soon logic that depends on day-level intervals; Expert Determination can preserve shifted dates with a documented risk analysis. See HIPAA Safe Harbor vs Expert Determination for AI training and what date and ZIP removal costs temporal models.

Three more checks belong in diligence. Claims for substance use disorder medications can involve 42 CFR Part 2 records, whose confidentiality rule HHS aligned more closely with HIPAA in 2024, with a compliance date of 16 February 2026 [8]. Prescriber identifiers (NPI, DEA number) and pharmacy NCPDP provider IDs can re-identify small markets when combined with NDC and date, and reimbursement fields may be confidential under PBM network contracts, so ask whether pricing can be released at all. Many buyers also exclude prescription drug monitoring program queries, which state laws commonly restrict.

Buyer checklist for a pharmacy reject data request

Describe the data you need precisely so a supplier can check its systems. Use a short request like this:

Illustrative example: invented to show structure; it does not describe an available dataset.

Dataset: NCPDP vD.0 claim-response pairs with resolution linkage
Settings: retail and/or long-term care pharmacy; commercial, Part D, Medicaid
Period: at least 24 consecutive months (to span plan-year edit changes)
Required: full request and response segments; all 511-FB repetitions;
  DUR/PPS E4/E5/E6 on response and override; 420-DK; B2 reversals;
  rebill linkage by Rx number + fill number; work-queue events and notes
Optional: pricing fields (subject to contract review); ePA status events
De-identification: HIPAA Expert Determination preferred (date shifting kept)
Exclusions: PDMP data; Part 2 records unless consent basis documented
Use: training and evaluation of reject classification and next-action models

Before signing, confirm the code list version, the payer mix by BIN/PCN, the share of rejects with a linked outcome, and how free-text notes were scrubbed. For adjacent data, compare pharmacy prior authorization and formulary exception records, claims adjudication decisions and the wider industry-specific operational data guide. You can also review medical coding and claims datasets, healthcare administration buyers and what AI companies build with pharmacy data. When the specification is ready, describe it to SourceX for sourcing on request.

Sourcing pharmacy claim reject and resolution data

SourceX sources operational datasets, such as finance workflows and operational records, from US companies on request, and every release is approved by the supplying company. Each dataset is rights-reviewed, personal details are removed or replaced before delivery, and health records require HIPAA de-identification. Describe the pharmacy reject data you need.

This page is general information, not legal advice. Confirm requirements with counsel for your jurisdiction and use case.

Frequently asked questions

Can public data replace pharmacy reject logs?

Not for resolution modeling. Public Part D and Medicaid files describe paid claims and utilization, while the AJMC and New York studies used private pharmacy or encounter data to see rejects [1][2]. The reject-to-rebill sequence exists only in pharmacy systems and switch logs.

Is the free-text reject message useful?

Yes. Field 526-FQ and processor help-desk text often name the specific edit, quantity limit or contact number, which the numeric code does not. Treat it as PHI-adjacent text and confirm how it was scrubbed.

How should model quality be measured?

Measure next-action accuracy on held-out later months and unseen BIN/PCNs, and track the rate of rebills that still reject. A model that suggests the right class but the wrong E4/E5/E6 combination will still fail at the counter [3].

Sources

  1. The American Journal of Managed Care, "Medicare Part D Claims Rejections for Nursing Home Residents, 2006 to 2010" (2012). https://www.ajmc.com/view/medicare-part-d-claims-rejections-for-nursing-home-residents-2006-to-2010
  2. Office of the New York State Comptroller, "Medicaid Program: Impact of Rejected Encounters on the Collection of Drug Rebates" (2024). https://osc.ny.gov/state-agencies/audits/2024/12/23/medicaid-program-impact-rejected-encounters-collection-drug-rebates
  3. California Department of Health Care Services, Medi-Cal Rx, "Appendix A: Reject Code 88 DUR Service Codes Scenarios" (2022). https://medi-calrx.dhcs.ca.gov/cms/medicalrx/static-assets/documents/provider/bulletins/2022.06_A_AppendixA-Reject_Code_88-DUR_Service_Codes_Scenarios.pdf
  4. Louisiana Department of Health, "Pharmacy Claims Denied after Authorization (Act 212 report, SFY22)" (2022). https://ldh.la.gov/assets/HealthyLa/Act212/SFY22/X_PharmacyClaimsDeniedafterAuthorization.pdf
  5. CVS Caremark (hosted on pbm.aetna.com), "CVS Caremark Payer Sheet Reject Codes" (2022). https://pbm.aetna.com/portal/asset/CVSCaremarkPayerSheetRejectCodes.pdf
  6. HL7 International, "ValueSet: NCPDP Reject Code (CARIN IG for Blue Button)". https://build.fhir.org/ig/HL7/carin-bb/en/ValueSet-NCPDPRejectCode.xml.html
  7. eCFR, Office of the Federal Register / HHS, "45 CFR 164.514 - Other requirements relating to uses and disclosures of protected health information". https://www.ecfr.gov/current/title-45/subtitle-A/subchapter-C/part-164/subpart-E/section-164.514
  8. U.S. Department of Health and Human Services, "Fact Sheet: 42 CFR Part 2 Final Rule" (2024). https://www.hhs.gov/hipaa/for-professionals/regulatory-initiatives/fact-sheet-42-cfr-part-2-final-rule/
  9. Northcutt, Athalye, Mueller, "Pervasive Label Errors in Test Sets Destabilize Machine Learning Benchmarks" (2021). https://arxiv.org/abs/2103.14749

Tell us what your models need

Share scope, volume, language, format, timing and licensing requirements.

Request data