<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://vistapedia.com/index.php?action=history&amp;feed=atom&amp;title=NDC_Rules</id>
	<title>NDC Rules - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://vistapedia.com/index.php?action=history&amp;feed=atom&amp;title=NDC_Rules"/>
	<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=NDC_Rules&amp;action=history"/>
	<updated>2026-05-09T16:22:12Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://vistapedia.com/index.php?title=NDC_Rules&amp;diff=15997&amp;oldid=prev</id>
		<title>Shabiel: Created page with &quot;Here are the references and the rules:  * http://www.rxtrace.com/2012/01/anatomy-of-the-national-drug-code.html/ * http://www.rxtrace.com/2012/01/depicting-an-ndc-within-a-gti...&quot;</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=NDC_Rules&amp;diff=15997&amp;oldid=prev"/>
		<updated>2014-11-09T11:30:43Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Here are the references and the rules:  * http://www.rxtrace.com/2012/01/anatomy-of-the-national-drug-code.html/ * http://www.rxtrace.com/2012/01/depicting-an-ndc-within-a-gti...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Here are the references and the rules:&lt;br /&gt;
&lt;br /&gt;
* http://www.rxtrace.com/2012/01/anatomy-of-the-national-drug-code.html/&lt;br /&gt;
* http://www.rxtrace.com/2012/01/depicting-an-ndc-within-a-gtin.html/&lt;br /&gt;
* http://www.ashp.org/DocLibrary/Advocacy/GAD/Bar-Code-Technologies-for-Drugs-and-Biological-Products.aspx&lt;br /&gt;
* https://www.pfizer.com/files/do/barcode_standard.pdf&lt;br /&gt;
&lt;br /&gt;
Briefly, here are the rules for human readable NDCs.&lt;br /&gt;
* HIPPA/NCPDP format NDC is always 5-4-2. If anybody enters an NDC manually, this is what we want.&lt;br /&gt;
* VISTA NDC format is 6-4-2. That&amp;#039;s what&amp;#039;s stored in the UPC/NDC file.&lt;br /&gt;
* On packages, manufactures put a human readable NDC of [4-5]-[3-4]-[1-2]. Yes, this is fricking confusing. If we have dashes, we can figure it out; if we don&amp;#039;t have dashes, we can&amp;#039;t.&lt;br /&gt;
&lt;br /&gt;
Here are the rules for Barcodes:&lt;br /&gt;
(GS1 = Various simple and stacked formats for a barcode; UPC = UPC formatted barcode)&lt;br /&gt;
There are five formats for Barcodes on drugs. They are as follows:&lt;br /&gt;
# UPC or GS1 12 digit NDC (GTIN-12) number, starting with the number 3, 10 digit NDC, and a single digit checksum&lt;br /&gt;
# UPC 12 digit UPC number, starting with the number 0, 10 digits, and a single digit checksum.&lt;br /&gt;
# 14 digit GS1 GTIN (GTIN-14) code. This starts with [0-1]03, then 10 digit NDC, then a single digit for checksum.&lt;br /&gt;
# 16 digit GS1 GTIN (GTIN-16?) code. This appends 01 to the [0-1]03.&lt;br /&gt;
# Composite GS1 code containing the GTIN-16 + Expiration Date and Lot Number. An example can be found here: https://www.pfizer.com/files/do/barcode_standard.pdf. This will always start with the 16 digit GTIN.&lt;br /&gt;
&lt;br /&gt;
The really sad thing is that there is no algorithm to map the barcode to NDC code; that&amp;#039;s why we need to store them both. An NDC embedded barcode is 10 numbers; and the real NCPDP NDC is 11 numbers. We can guess, but it&amp;#039;s only safe if the first number after the 3 is a zero.&lt;br /&gt;
&lt;br /&gt;
Down to our algorithms... so, how do we decide in our software what&amp;#039;s an NDC number and what&amp;#039;s a barcode?&lt;br /&gt;
# If it&amp;#039;s 10 or 11 digits, it&amp;#039;s an NDC. 10 digits need to be zero padded at the left to make an 11 digit NDC.&lt;br /&gt;
# If it&amp;#039;s 12, it has to start with a 3 or a zero. Starting with zero is frowned upon, but we don&amp;#039;t have any other choice in public data sources.&lt;br /&gt;
# There is no such thing as 13 digit barcodes.&lt;br /&gt;
# 14 digits must match 1(&amp;quot;0&amp;quot;,&amp;quot;1&amp;quot;)1&amp;quot;03&amp;quot; at the beginning.&lt;br /&gt;
#16 digits and higher must match 1&amp;quot;01&amp;quot;1(&amp;quot;0&amp;quot;,&amp;quot;1&amp;quot;)1&amp;quot;03&amp;quot; at the beginning. We can grab the exp date and lot number as well but we are not currently planning to since we don&amp;#039;t have the data structures yet to support this.&lt;br /&gt;
&lt;br /&gt;
Now, let&amp;#039;s figure out what VISTA already has in PSONDCUT:&lt;br /&gt;
&lt;br /&gt;
Okay, in NDCFMT^PSSNDCUT EITHER 11 digits are accepted, OR any of the 3 dashed formats are accepted.&lt;br /&gt;
VISTA doesn&amp;#039;t have an idea of a barcode.&lt;/div&gt;</summary>
		<author><name>Shabiel</name></author>
	</entry>
</feed>