How to install RxNorm and SNOMED Database?

haovn577 wrote on Thursday, May 31, 2012:

How to install RxNorm and SNOMED Database?I follow your instructions but nothing happens!
Steps to install/upgrade the RxNorm database

Copy the zipped RxNorm database file into the ‘contrib/rxnorm’ directory (this file can be downloaded from http://www.nlm.nih.gov/research/umls/rxnorm/docs/rxnormfiles.html; note you’ll need to get an account and that only the Full Monthly Releases currently work)
In OpenEMR, go to Administration->Other->RxNorm in order to then install/upgrade the RxNorm database.
Steps to install/upgrade the SNOMED database……

Pleases help me! Thanks thanks

bradymiller wrote on Thursday, May 31, 2012:

Hi,

Which OpenEMR version are you using. If using OpenEMR 4.1, then ensure you install the latest patch here:
http://www.open-emr.org/wiki/index.php/OpenEMR_Patches

Then follow the instructions here:
http://www.open-emr.org/wiki/index.php/Import_RxNorm_and_SNOMED_Tables

First, try SNOMED, and if it doesn’t work, then paste the text you see on the screen (and also let us know your operating system).

Second, try RxNORM, and if it doesn’t work, then paste the text you see on the scree (and also let us know your operating system).

-brady
OpenEMR

haovn577 wrote on Thursday, May 31, 2012:

Hi bradymiller,

Thank you so much. But RxNorm and SNOMED Database is not install.

RxNorm Database

Database is not installed.
Place the database zip file in the following directory if want the option to install: contrib/rxnorm

SNOMED Database

Database is not installed.
Place the database zip file in the following directory if want the option to install: contrib/snomed

I use Win 7 32bit.
And Can you give me RxNorm and SNOMED Database source and tutorial about it. I have registered at https://uts.nlm.nih.gov/ and I must waiting for a consent. But now I need for my work. Please help me :((

haovn577 wrote on Thursday, May 31, 2012:

and this is picture about that:

bradymiller wrote on Friday, June 01, 2012:

Hi,

Sorry, can’t really post the actual SNOMED/RXNORM databases because of licensing issues. Need to get them from the original site. It generally only takes a couple days after registering to get access. Once you download the files, then you’ll need to follow the instructions in the wiki page linked above. What do you plan to use them for in your work?

-brady
OpenEMR

haovn577 wrote on Monday, June 04, 2012:

Hi,

Thank Bradymiller, now I can install it (push directly into Database) :smiley:
But I can’t show  content of  RxNorm Database in website. I’m a technical worker so I get stuck in the health sector when built a health system for hospital :slight_smile:

Hao Tran

bradymiller wrote on Monday, June 04, 2012:

Hi,

Although we have a way to import the rxnorm, it is not yet integrated. This is a project awaiting a developer (either volunteer or needs to be sponsored).

The SNOMED database, however, will be integrated (diagnosis codes) for the next 4.1.1 OpenEMR release.

-brady
OpenEMR

haovn577 wrote on Monday, June 04, 2012:

and I have a problem, I thinks when install by Adminstrator->Other->RxNorm->install, it stop at step 3 (see code below) because I just see :

Copying the database file. This will take some time..
Extracting the file. This will take some time...
Loading the files into the database. This will take some time...

and it stop here…. I dont know cause?

Code in file standard_tables_manage.php

// 1. copy the file to temp directory
        echo htmlspecialchars( xl(‘Copying the database file. This will take some time…’), ENT_NOQUOTES).“<br>”;
        if (!temp_copy($file_revision_path,$mode)) {
            echo htmlspecialchars( xl(‘ERROR: Unable to copy the file.’), ENT_NOQUOTES).“<br>”;
            temp_dir_cleanup($mode);
            exit;
        }

        // 2. unarchive the file
        echo htmlspecialchars( xl(‘Extracting the file. This will take some time…’), ENT_NOQUOTES).“<br>”;
        if (!temp_unarchive($file_revision_path,$mode)) {
            echo htmlspecialchars( xl(‘ERROR: Unable to extract the file.’), ENT_NOQUOTES).“<br>”;
            temp_dir_cleanup($mode);
            exit;
        }

        // 3. load the database
        echo htmlspecialchars( xl(‘Loading the files into the database. This will take some time…’), ENT_NOQUOTES).“<br>”;
        if ($mode == ‘rxnorm’) {
            if (!rxnorm_import(IS_WINDOWS)) {
                echo htmlspecialchars( xl(‘ERROR: Unable to load the file into the database.’), ENT_NOQUOTES).“<br>”;
                temp_dir_cleanup($mode);
                exit;
            }
        }
        else { //$mode == ‘snomed’
            if (!snomed_import()) {
                echo htmlspecialchars( xl(‘ERROR: Unable to load the file into the database.’), ENT_NOQUOTES).“<br>”;
                temp_dir_cleanup($mode);
                exit;
            }
        }

        // 4. set the revision version in the database
        echo htmlspecialchars( xl(‘Setting the version number in the database…’), ENT_NOQUOTES).“<br>”;
        if (!update_tracker_table($mode,$file_revision_date)) {
            echo htmlspecialchars( xl(‘ERROR: Unable to set the version number.’), ENT_NOQUOTES).“<br>”;
            temp_dir_cleanup($mode);
            exit;
        }

        // done, so clean up the temp directory
        if ($pending_new) {
            echo “<b>”.htmlspecialchars( xl(‘Successfully installed the database.’), ENT_NOQUOTES).“</b><br>”;
        }
        else { //$pending_upgrade
            echo “<b>”.htmlspecialchars( xl(‘Successfully upgraded the database.’), ENT_NOQUOTES).“</b><br>”;
        }
        temp_dir_cleanup($mode);
    }

fndtn357 wrote on Monday, June 04, 2012:

Why do we need to directly integrate a copy of the RxNorm data into OpenEMR? There is an API, written in PHP, for querying here that could be incorporated instead. https://github.com/codeforamerica/rxNormRef_php

bradymiller wrote on Monday, June 04, 2012:

Hi James,

Check out this thread for comments on direct integration of the API:
http://sourceforge.net/projects/openemr/forums/forum/202506/topic/5325272

-brady
OpenEMR

bradymiller wrote on Tuesday, June 05, 2012:

Hi Hao,

It can take up to 15 minutes to import. Things to check out are the php error log and check to see if there are any rxnorm tables installed (an if they contain data) in Administration->Other->Database .

-brady
OpenEMR

haovn577 wrote on Wednesday, June 06, 2012:

Thank you so much, Brady.