ICD, rxNorm and Snomed data loads

arnabnaha wrote on Friday, July 13, 2012:

Hi Brady….I installed a fresh instance of openemr from your branch…It works…and shows the list of files too…after pressing install now it shows the following error:

ERROR: query failed: LOAD DATA LOCAL INFILE ‘C:\Windows\TEMP/ICD10/2012_I10gem.txt’ INTO TABLE icd10_gem_dx_10_9 FIELDS TERMINATED BY ‘’ (@var) SET revision = 0, dx_icd10_source = trim(Substring(@var, 1, 7)),dx_icd9_target = trim(Substring(@var, 9, 5)),flags = trim(Substring(@var, 15, 5))

Error: File ‘C:WindowsTEMP\ICD10\2012_I10gem.txt’ not found (Errcode: 2)

I guess something is not getting inside the temp folder of C drive…

arnabnaha wrote on Friday, July 13, 2012:

FOR ICD 9:

ERROR: query failed: LOAD DATA LOCAL INFILE ‘C:\Windows\TEMP/ICD9/CMS30_DESC_LONG_DX.txt’ INTO TABLE icd9_dx_long_code FIELDS TERMINATED BY ‘’ (@var) SET revision = 0, dx_code = trim(Substring(@var, 1, 5)),long_desc = trim(Substring(@var, 7, 300))

Error: File ‘C:WindowsTEMP\ICD9\CMS30_DESC_LONG_DX.txt’ not found (Errcode: 2)

arnabnaha wrote on Friday, July 13, 2012:

Got the problem…it is a error in the path…it should have been C:\Windows\TEMP\….
The back slash error I guess…

arnabnaha wrote on Friday, July 13, 2012:

Hi Mac…
I Use my_emr branch as my production version…Just now merged my branch with the latest official dev tip…I am a novice in handling git…have learnt only the basic steps of updating with the official codebase and to commit a few things…

mcaloon wrote on Friday, July 13, 2012:

Hey Arnab,
    You and me both :slight_smile: Brady, is the gitMaster! I am glad to see that you sorted out the Windows directory issue. I think you are the first to get the new ICD data load up and running besides Brady and me. I am hoping that the ICD10 effort will be the start of a new push in the community to make openEMR more robust. I am focusing on population analytics and will be interested in using the ICD10 as the basis for many analytic capabilities from both the procedural and diagnostic perspectives. Post any issues you run into on this thread. Thanks.

Mac

arnabnaha wrote on Friday, July 13, 2012:

Thanks Mac…
Brady is simply a maestro…newyas…I am looking into the codes but can figure out how to fix the path issues. Please can you tell me or point out the file and what to change??

Openemr is a robust system and ICD 10 strengthens it a lot…thanks to you for contributing so much to openemr…and i am always thankful to brady…

arnabnaha wrote on Friday, July 13, 2012:

Found the problem:

In the file - library\standard_tables_capture.inc
at line no. 241

$dir_icd = $GLOBALS."/".$type."/";

change it to…

$dir_icd = $GLOBALS."/".$type."";

This works and I just installed the ICD 10 database…wohoo!!!

mcaloon wrote on Friday, July 13, 2012:

Anrab,
    Please clarify when you state “Please can you tell me or point out the file and what to change??” - what is it that you are trying to determine?

Mac

mcaloon wrote on Friday, July 13, 2012:

Brady,
    Arnab has identified a compatability issue with the implementation. Is there some windows/unix trick used in openEMR that we can leverage to accommodate this in the code somehow?

Mac

arnabnaha wrote on Friday, July 13, 2012:

Hi…Mac
I meant…there was a windows path issues as pointed out earlier (backslash error)…I was trying to find the file which contained that information…Got the file and changed the direction of the slash….thats all…

arnabnaha wrote on Friday, July 13, 2012:

I am sorry….it seems the ICD 10 database is still under the process of installation…taking long time….will keep updating…

mcaloon wrote on Friday, July 13, 2012:

Arnab,
    Please check the <your windows apache logdir>/apache2/error_log to see if there are any errors. I know during testing that I “hang” was not too long when the load worked correctly. Should run longer than a couple minutes depending on your hardware configuration.

Mac

mcaloon wrote on Friday, July 13, 2012:

“not” run longer i meant

arnabnaha wrote on Friday, July 13, 2012:

The error log of apache shows the following…

error:  syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\\xampp\\htdocs\\optest\\library\\standard_tables_capture.inc on line 251, referer: http://nahahealthclinic.dyndns.org/optest/interface/code_systems/dataloads_ajax.php

mcaloon wrote on Friday, July 13, 2012:

I had tested the external data load release on Mac OS X and Ubuntu without any issues related to the php tables defined in standard_tables_capture.inc:251 that is the line of code being identified in your error log. Not sure if this is a PHP’ism on the windows platform. Anyone have any insight into this?

Mac

arnabnaha wrote on Friday, July 13, 2012:

Hope Brady can figure it out…

mcaloon wrote on Friday, July 13, 2012:

Arnab,
     What version of Windows are you running?
Mac

mcaloon wrote on Friday, July 13, 2012:

Arnab,
    What version of PHP are you running?
Mac

arnabnaha wrote on Friday, July 13, 2012:

Windows 7 ultimate and PHP version: 5.3.1

bradymiller wrote on Friday, July 13, 2012:

Hi,

Looks like error is at this line:

        $incoming['SHORT_DX'] = array('#TABLENAME#' => "icd9_dx_code",
                '#FLD1#' => "dx_code", '#POS1#' => 1, '#LEN1#' => 5,
                '#FLD2#' => "short_desc", '#POS2#' => 7, '#LEN2#' => 60);

Try this first:

        $incoming['SHORT_DX'] = array('#TABLENAME#' => 'icd9_dx_code'",
                '#FLD1#' => 'dx_code', '#POS1#' => 1, '#LEN1#' => 5,
                '#FLD2#' => 'short_desc', '#POS2#' => 7, '#LEN2#' => 60);

Then try this:

        $incoming['SHORT_DX'] = array('#TABLENAME#' => "icd9_dx_code", '#FLD1#' => "dx_code", '#POS1#' => 1, '#LEN1#' => 5, '#FLD2#' => "short_desc", '#POS2#' => 7, '#LEN2#' => 60);

Then try this:

        $incoming['SHORT_DX'] = array('#TABLENAME#' => 'icd9_dx_code', '#FLD1#' => 'dx_code', '#POS1#' => 1, '#LEN1#' => 5, '#FLD2#' => 'short_desc', '#POS2#' => 7, '#LEN2#' => 60);

I do not expect above to fix all the errors. Just seeing if it fixes error on that line. If it does then expect to see sane error on line 254 (but we will now know how to fix the rest of it then).

-brady
OpenEMR