Identifying Authorized Generics and Mapping to NDC codes

I hope continuing an older thread is OK, as I have a similar question. It seemed preferable to starting a new thread, but I would be glad to. I am looking into the feasibility of finding generic equivalents of a drug, given, as a starting point, the NDC code of a brand name drug.

Could you clarify what you mean by “NDC is too low level”? Given the NDC 43353084915 of the brand name “Abilify 20MG” medication, I was able to use the following process to find the equivalent generic:

MariaDB [rx]>  select rxcui from RXNSAT s where s.atn='NDC' and s.atv='43353084915';
+--------+
| rxcui  |
+--------+
| 352309 |
+--------+
MariaDB [rx]>  select r.rxcui1 from RXNREL r where r.rxcui2=352309 and r.rela='tradename_of';
+--------+
| rxcui1 |
+--------+
| 349553 |
+--------+
MariaDB [rx]> select c.str from RXNCONSO c where c.rxcui=349553 and c.tty='PSN';
+--------------------------------+
| str                            |
+--------------------------------+
| ARIPiprazole 20 MG Oral Tablet |
+--------------------------------+

(I also did this as a single query with joins, but it took several minutes to run, I’m sure because of indexes I am missing).

I was wondering if you could elaborate on a couple things:

  1. Pitfalls of this process, as your comment implies
  2. How comprehensive is RXNORM’s NDC collection? I tried the same with NDC “49491066” (Zoloft/Sertraline 100MG) but I can’t find that NDC at all in RXNORM. (Possibly because it is eight digits? I did try padding with zeroes to 10 and 11 and all the dashed forms).

Thank you for any assistance.