Code Set Scripts
updated December 23, 2021
*** NOTE *** - As of November 14th, 2016, all of the flat files noted below now require 'https' instead of 'http'
This information is being posted as a public service to those using the CDC Immunization Information Systems' Code Sets.
Many of these code sets are available as pipe-delimited flat files, lending themselves to
retrieval by automated scripts that can then parse and process the data contained in them.
However, there are some idiosyncrasies involved with these files about which developers
should be aware. The following is a summary of those idiosyncrasies, organized by each Code Set.
CVX Code Set - evaluated 9/5/2015
Flat file: http://www2a.cdc.gov/vaccines/iis/iisstandards/downloads/cvx.txt
- the first two characters of the file are ASCII 255 and ASCII 254
- starting with the 4th character, every other character is the null character (ASCII 0)
- the CVX codes are followed by 7-8 trailing spaces before the next pipe delimiter, for a fixed length of 10
- there is an undescribed boolean value between pipes 5 and 6, resulting in an extra field when parsed
- the column order is not consistent with what is displayed on the
web site or the
PDF format:
PDF: Short Description, Full Vaccine Name, CVX Code, Vaccine Status, Last Updated Date, Notes
Flat: CVX Code, Short Description, Full Vaccine Name, Notes, Vaccine Status, (extra boolean value), Last Updated Date
MVX Code Set - evaluated 9/5/2015
Flat file: http://www2a.cdc.gov/vaccines/iis/iisstandards/downloads/mvx.txt
- the first two characters of the file are ASCII 255 and ASCII 254
- starting with the 4th character, every other character is the null character (ASCII 0)
CVX Mapped to Vaccine Groups - evaluated 9/6/2015
Flat file: http://www2a.cdc.gov/vaccines/iis/iisstandards/downloads/VG.txt
- no unusual leading characters in the file; no null characters embedded
- the CVX codes in the 2nd column are followed by 7-8 trailing spaces before the next pipe delimiter, for a fixed length of 10
Product Name Mapped to CVX/MVX - evaluated 9/7/2015
Flat file: http://www2a.cdc.gov/vaccines/iis/iisstandards/downloads/TRADENAME.txt
- no unusual leading characters in the file; no null characters embedded
- the CVX codes are followed by 7-8 trailing spaces before the next pipe delimiter, for a fixed length of 10
- the MVX codes are followed by 7-8 trailing spaces before the next pipe delimiter, for a fixed length of 10
- there is an extra pipe delimiter at the end of each record
CPT Mapped to CVX - evaluated 9/7/2015
Flat file: http://www2a.cdc.gov/vaccines/iis/iisstandards/downloads/cpt.txt
- no unusual leading characters in the file; no null characters embedded
- the CPT codes are followed by 5 trailing spaces before the next pipe delimiter, for a fixed length of 10
- the CVX codes are followed by 7-8 trailing spaces before the next pipe delimiter, for a fixed length of 10
- there is an extra numeric field at the end of each record
- there appears to be an extra blank field between pipes 2 and 3
- the column order is not consistent with what is displayed on the PDF format:
PDF: CPT Code, CPT Description, CVX Code, Vaccine Name, CPT Code Status, Comments, Last Updated Date
Flat: CPT Code, CPT Description, (extra blank field), Vaccine Name, CVX Code, Comments, Last Updated Date, (extra numeric field)
CVX Mapped to VIS - evaluated 9/7/2015
Flat file: http://www2a.cdc.gov/vaccines/iis/iisstandards/downloads/cvx_vis.txt
- the first two characters of the file are ASCII 255 and ASCII 254
- starting with the 4th character, every other character is the null character (ASCII 0)
- the CVX codes are followed by 7-8 trailing spaces before the next pipe delimiter, for a fixed length of 10
- the format of the VIS Edition Date is a timestamp (YYYY-MM-DD hh:mm:ss) which differs from the more common date format (YYYY/MM/DD) for dates in other flat files
NDC Unit of Sale - evaluated 11/22/2015
Flat file: http://www2a.cdc.gov/vaccines/iis/iisstandards/downloads/NDC/NDC_Unit_sale.txt
When using the Sale NDC table in the Technical Guidance document to create a database table for use with the flat file:
- the table is missing the OuterPackForm field which appears in the flat file and the PDF document after the OuterEndDate field
- the table lists a field called CVX code which would be an illegal field name in a mySQL table because of the space
- the table lists the OuterGTIN field between the OuterRoute and last_update_date fields, but the field is actually last in the flat file and
PDF document
- the table states that the NDCouterID field is a unique primary key, but the flat file lists the same ID multiple times (examples: 516, 658, 722, 744)
- the CVX codes in the flat file are followed by 7-8 trailing spaces before the next pipe delimiter, for a fixed length of 10
- the format of the last_update_date field is a timestamp (YYYY-MM-DD hh:mm:ss) which differs from the more common date format (YYYY/MM/DD) for
dates in other flat files and also differs from the format in the PDF document
NDC Unit of Use - evaluated 12/17/2015
Flat file: http://www2a.cdc.gov/vaccines/iis/iisstandards/downloads/NDC/NDC_Unit_use.txt
When using the Use NDC table in the Technical Guidance document to create a database table for use with the flat file:
- the table states that the NDCUseUnit_ID field is the primary key, but the flat file lists the same ID multiple times (examples: 327, 328, 329, 330, 331, 332, 333, 339, 341, 377)
- the table is missing the NoInner field which appears in the flat file and the
PDF document
after the vaccine_name field (listed as CVX Short Description in the PDF
- the table is missing the GTIN field which appears in the flat file and the PDF document as the last field
- the CVX codes in the flat file are followed by 7-8 trailing spaces before the next pipe delimiter, for a fixed length of 10
- the format of the last_updated_date field is a timestamp (YYYY-MM-DD hh:mm:ss) which differs from the more common date format (YYYY/MM/DD) for dates in other flat files and also differs from the format in the
PDF document
- 10/14/2019 - The NDCUseUnit_ID field appears to have been renamed NDCInnerID.
- 10/14/2019 - There appears to be a new field UseUnitPackForm which has been added...
|
|