Picture the ticket. A rep writes in on Monday because their territory is short about 40 TRx. You trace it to one prescriber whose NPI in the specialty pharmacy feed doesn’t match the NPI in Veeva. Ten digits, all numeric. Two of them are transposed, and the join has been dropping that prescriber since March. The pattern test on that column was green the entire time.
That is the mismatch half of the problem. The duplicate half runs the other way. IQVIA says Dr. Smith wrote 30 scripts. Your MDM says there are two Dr. Smiths. Now the targeting list has a ghost and your alignment double-counts, and nobody notices until the incentive comp run.
Both come from the same fact: no single source holds the whole prescriber. The record is assembled from syndicated data, specialty pharmacy, claims, and CRM, and each source is keyed its own way.
Test the identifier before you trust the match
A matching rule is only as good as the keys it matches on. So the first tests run on the landing table, before anything joins.
An NPI’s tenth digit is a Luhn check digit computed over the first nine, with the 80840 prefix the spec requires folded into the sum. Here is the arithmetic for CMS’s published example NPI, 1234567893, and an illustrative transposition of it with the fourth and fifth digits swapped:
| Step | 1234567893 | 1235467893 (illustrative: 4 and 5 transposed) |
|---|---|---|
| Double every other digit of the first nine, starting with the first (subtract 9 if over 9) | 2, 2, 6, 4, 1, 6, 5, 8, 9 | 2, 2, 6, 5, 8, 6, 5, 8, 9 |
| Sum | 43 | 51 |
| Add 24 for the 80840 prefix | 67 | 75 |
| Check digit needed to reach the next multiple of 10 | 3 | 5 |
| Check digit in the value | 3 | 3 |
| Result | Pass | Fail |
A regex sees ten digits in both columns and passes both.
Luhn has one blind spot: swap an adjacent 0 and 9 and the sum doesn’t change, so that transposition passes the check digit too.
DEA numbers carry their own checksum: the seventh digit has to equal the first, third, and fifth digits added together, plus twice the sum of the second, fourth, and sixth, mod ten. As of 27 August 2026, DataOps TestGen Enterprise generates Valid NPI and Valid DEA from your profiling run, along with ten other Commercial Pharma tests. Generation needs the column name and the profiled values to agree, so a column named code_3 gets nothing. Add that one by hand.
Then test the relationships
Every individual value can be valid while the relationship between them is broken. That is the failure column-level checks never see. Four tests cover most of it:
| What you check | What it catches | TestGen test |
|---|---|---|
| Every prescriber key in each feed exists in the master | A prescriber in one source and absent from the master, so their activity never reaches a report | Reference Match |
| Each master key appears once | Two records for one prescriber after a multi-source merge | Duplicate Rows, Unique Values |
| Every target and call plan entry resolves to a current master record | Targets pointing at prescribers who no longer exist | Reference Match |
| CRM activity lands on an account in the account master | Calls that disappear from the roll-up | Reference Match |
Watch the vendor IDs too. A syndicated provider ID is stable within a vendor and meaningless across vendors, so it can’t be the master key. ME numbers show up in some sources and not others. The analytic master we build links prescribers on NPI, ME, DEA, and vendor provider IDs together, and keeps prescribers the MDM never mastered instead of excluding them.
Expect the gaps you didn’t design for
Master data built around physicians breaks on everyone else. When we tested the 2024 CMS Open Payments file, 13,890 physician and practitioner records were missing an NPI, a license state, or a specialty. 7,729 of them were nurse practitioners and physician assistants, who only became covered recipients in 2021. Manufacturers assemble that file from expense systems, CRM, and vendor feeds, which is the same plumbing your HCP master runs on.
The Massachusetts slice of the same file spelled Boston three ways, and its 740 distinct recipient cities collapsed to 445 after stripping punctuation and spaces. Don’t match prescribers on name and address. Match on identifiers you have tested.
What the tests won’t tell you
None of this replaces Veeva Network or whatever you use for HCP mastering. A Luhn-valid NPI could have been issued; it isn’t proof that it was, and the tests never call NPPES. MDM tells you what it could match. Identifier and relationship tests tell you what arrived broken and what fell out of the match, on every load, before the comp run finds it for you.