RxNorm Extract Failure in v4.1.1dev

mcaloon wrote on Monday, April 02, 2012:

Hello,
   Before messing with the ICD10 code to load the new code tables, I have an unmodified v4.1.1dev tree up and running and have the RxNorm_full_03052012.zip file that i wanted to install to see how the code works.

1.) I put the zip in the contrib/rxnorm directory
2.) set globals temp dir to “contrib” (no quotes)
3.) verified with a test php file in the document root that i can unzip the file correctly from the contrib/rxnorm location
4.) use the RxNorm interface to Install the file and I get the ERROR: Unable to extract the file.

Can’t seem to find any specific messages in the error.log file. Any ideas?

Mac

yehster wrote on Monday, April 02, 2012:

http://www.nlm.nih.gov/research/umls/rxnorm/docs/2010/rxnorm_doco_full_2010-1.html
You could always just try a manual import by following rxnorm’s instructions in section 13.

bradymiller wrote on Monday, April 02, 2012:

Hi,
What are you using as the full globals temp directory path?
-brady

mcaloon wrote on Tuesday, April 03, 2012:

Brady,
     The full globals temp directory path (located in Globals->miscellaneous->Path To Temporary Files) started out as /tmp and I’ve tried these other setting with nothing working correctly:

- contrib
- <document root>/contrib

I get to the Install page once i put the zip file in <docroot>contrib/rxnorm but get the unable to extract error.
I’ve taken a look at the code in library/standard_tables_capture.inc and I added an echo to display the directory the code is using -> /tmp/rxnorm. Not sure I am setting the correct variable. I have been restarting apache after changing the config but not sure if I need to be doing something else. After a couple of go-arounds my experiment was to take the code that opens and extracts the file and putting it into a test jig php file and that code works when i hard code the relative path name to the zip file for the open and subsequent extract.

Mac

p.s. new to php

bradymiller wrote on Tuesday, April 03, 2012:

Hi,

Generally best to use /tmp for the temporary directory (since this is used in other places of OpenEMR and will have write privileges). Also should ensure ZipArchive module for php is installed. To problem solve:
1. Remove /tmp/rxnorm
2. uncomment temp_dir_cleanup($mode); at line 182 of interface/code_systems/standard_tables_manage.php
3. Then run the rxnorm import within OpenEMR
4. If get the error, then see what is currently at /tmp/rxnorm/

let us know how it goes,
-brady
OpenEMR

bradymiller wrote on Thursday, April 05, 2012:

Hi,

Just tried this on Ubuntu Server and it worked (used RxNorm_full_04022012.zip). Used /tmp as the temporary directory. How large was the rxnorm file you downloaded (it should be about 132MB; I am asking this because wget does not work and downloads a much smaller file since you need to authenticate before you can download the file).

-brady
OpenEMR

bradymiller wrote on Thursday, April 05, 2012:

An aside,
The SNOMED import is broken since there is now a new release format (RF2) along with changing the name and directory structure of the package: http://www.nlm.nih.gov/pubs/techbull/ja11/ja11_umls_news_aug.html
-brady
OpenEMR

bradymiller wrote on Thursday, April 05, 2012:

An aside again,
Just committed the fix to sourceforge for the SNOMED bug.
-brady

mcaloon wrote on Monday, April 09, 2012:

Hello,
    I got to the bottom of this extract failure. While I was off reviewing code for the past week (and playing around with the load code for rxnorm) bradymiller IMPLEMENTED the better half of the ICD10 stuff! Thanks.
    The problem with this import failure was a bogus zip file. For anyone else ever seeing this error again, you don’t need to mess with the global settings but you do need to make sure you get the checksum on the file from the source site and validate the sum once you finish the download. Read up on the sum or md5 commands depending on source site’s checksum type …

Mac

p.s. i saw that SNOMED fix last night … I ended up taking your branch to work some additional ICD10 stuff that I will post on the developer’s forum.

lamspc wrote on Saturday, October 06, 2012:

Hello Brady,
I am new to OpenEMR.  I am unable to load RxNorm and SNOMED from with Openemr, getting the follow message: “ERROR: Unable to extract the file.”   I have tried to implement the above changes - but they dont even appear applicable to me.  I used the linux installation, Openemr 4.1.1 with the latest patch (6).
Help will be greatly appreciated.
Paul

bradymiller wrote on Saturday, October 06, 2012:

Hi Paul,

What are the exact filenames that you are trying to import? And what is your OS? And are the ICD9/ICD10 imports working?

-brady
OpenEMR

lamspc wrote on Sunday, October 07, 2012:

Hello Brady,
Yes - I was able to install ICD9 and 10 without any difficulty, using the standard external database load feature.

RxNorm_full_10012012.zip
SnomedCT_Release_INT_20120731.zip

OS: Embedded Linux
Intel® Atom™ 1.8GHz Dual-core Processor
1GB RAM

Many thanks
Paul

bradymiller wrote on Monday, October 08, 2012:

Hi Paul,
Away from my development environment for next couple days (guessing grep of above ERROR: Unable to extract the file string will pinpoint where in code the issue is happening), so if nobody helps you out, I look into it more in a couple days.
-brady
OpenEMR