OHDSI Home | Forums | Wiki | Github

Problem with CPT4 utility for CDM v4

After downloading the v4.5 vocabularies from Athena, I followed the instructions in the readme.txt file and ran java -jar cpt4.jar However, I’m on Linux and my filesystem is case-sensitive, so I get this error:

java.io.FileNotFoundException: ./concept_cpt4.csv (No such file or directory)
        at java.io.FileInputStream.open0(Native Method)
        at java.io.FileInputStream.open(FileInputStream.java:195)
        at java.io.FileInputStream.<init>(FileInputStream.java:138)
        at java.io.FileInputStream.<init>(FileInputStream.java:93)
        at java.io.FileReader.<init>(FileReader.java:58)
        at org.odhsi.Main.main(Main.java:33)

 CPT successfully updated.

That’s because the zip file contains files that are in all upper-case, like so:

-rw-r--r-- 1 ryan ryan 315496872 Jul  2 01:50 CONCEPT_ANCESTOR.csv
-rw-r--r-- 1 ryan ryan    653450 Jul  2 01:33 CONCEPT_CPT4.csv
-rw-r--r-- 1 ryan ryan 143409019 Jul  2 01:33 CONCEPT.csv
-rw-r--r-- 1 ryan ryan 460483701 Jul  2 01:42 CONCEPT_RELATIONSHIP.csv
-rw-r--r-- 1 ryan ryan 161230769 Jul  2 01:52 CONCEPT_SYNONYM.csv
-rwxr-xr-x 1 ryan ryan   1741192 Jun  4 15:51 cpt4.jar
-rw-r--r-- 1 ryan ryan   3723038 Jul  2 01:31 DRUG_STRENGTH.csv
drwxr-xr-x 2 ryan ryan      4096 May 12 12:19 lib
-rwxr-xr-x 1 ryan ryan       427 May 22 16:58 readme.txt
-rw-r--r-- 1 ryan ryan     15881 Jul  2 01:52 RELATIONSHIP.csv
-rw-r--r-- 1 ryan ryan 135092744 Jul  2 01:31 SOURCE_TO_CONCEPT_MAP.csv
-rw-r--r-- 1 ryan ryan       517 Jul  2 01:52 VOCABULARY.csv
-rw-r----- 1 ryan ryan 338051770 Jul 10 11:18 vocab_v4_5_20150707.zip

The file system on which cpt4.jar was developed must have been case-insensitive. I renamed CONCEPT_CPT4.csv to concept_cpt4.csv and the script ran successfully, but it created a file called concept.csv rather than appending to CONCEPT.csv

I don’t know where the repository that contains cpt4.jar lives, otherwise I would have posted an issue there instead of in the forums.

Thanks,
Ryan

@aguynamedryan:

Thanks so much. No idea when that happened, because it was tested on Linux at some point, but then the cases got changed. Will fix.

i had a different problem with the cpt loader–it parsed some of the rows incorrectly, putting fragments of concept name in the concept_id field, frameshifting everything to the left, and leaving “invalid_reason” blank. had to delete about 50 concepts. i think it relates to semicolons in concept_name – but it doesn’t throw sql syntax errors, so i have no idea. ran it on a mac, loaded into postgres using supplied script.

@rv816:

We’ll get back to you with some diagnostic. Thanks for letting us know.

@aguynamedryan, @rv816, all other Ryans and Friends:

We added full error reporting to the CPT4 utility. Can you be so kind and download and run it again? And post the nagging it will produce.

t