OHDSI Home | Forums | Wiki | Github

MS SQL Server concept import error - invalid_reason truncated

I downloaded Anthem vocabulary on May 7. A week later I ran the provided windows batch file to download CPT-4 data. When I imported the combined concept csv file into MS SQL database I get an error for invalid_reason column truncated. I imported the concept csv without CPT-4 without an issue. I ran the batch file into an empty concept csv file. Base on comparing the concept_CPT4.csv file and the newly generated concept.csv file, it appears the code is putting a space in the invalid_reason column and concatenating the ā€œDā€ (when present in the concept_CPT4.csv). That give it a length of 2 which is grater than the concept table MS SQL DDL for the column length of 1.

My process is:

  1. download file from ANTHEM
  2. extract zipped file in the same directory
  3. From windows command prompt execute cpt.bat
  4. Batch insert concept.csv file into MS SQL Server table concept
  5. Do nothing with file CONCEPT_CPT4.csv

Is my process correct or am I missing a step?

Hello @matthbr,
CPT4 util was recently updated, may you please try to recreate (archive-restore) bundle and try one more time. Please let us know if it is still happening.

With the changes I was able to load the data.

t