I'm looking for a way to convert 30K NDC codes in normalized CMS/HIPAA format to dash format codes or otherwise identify them.

Examples '00002144509' -> 0002-1445-09 '00023917715' -> 0023-9177-15 '12634053995' -> 12634-539-95

I don't think it's possible to algorithmically convert normalized codes to dash codes is it?

Many of these codes go back years and may no longer be current. They don't show up in the current NDC or RXNORM data. Manufacturers are allowed to change product codes after 5 years so attaching a date to code is a big benefit.

If I can get the old codes I can convert to the 11 digit format and create a lookup table.

I'm looking at DailyMed SPL data, which does go back to the mid-2000s and includes a date (effectiveTime), but the XML seems very poorly structured and difficult to parse. I'm using Python & lxml.

NDC data archives go back a ways but only have the trade name and no dates. I wonder if collecting old versions of RXNORM might be the easiest, taking data from the NDC archive and then looking up the generic names in RXNORM.

Any suggestions?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.