Can not get ICD to load from icd9data.com

advancedmedical wrote on Sunday, December 06, 2009:

HELP! i have a similar question; i have ubuntu v9, and openEMR v3.1 i tried to go to \openemr\contrib\util then loaded loadicddesc.plx to view. when i copy and paste a link line regarding placement of the icd9data.com into the “database”, i can not save the loadicddesc.plx

for the past 2 days i have read and read to find out the way to do this. the icd still blank. but per comments by some here, it is supposed to sync with the icd9data.com

PLease advise.

bradymiller wrote on Monday, December 07, 2009:

hey,

As an aside, no need doing multiple posts (all of us providing support follow all the threads), and this just creates confusion for users in the future searching these forums for answers.

To help clarify problem:

1) How did you install OpenEMR (via the ubuntu package or via the orignal pakcage)?

2) Ensure you have updated 3.1.0 with the patch (it appears you have), since the load\_icd\_desc.plx has been updated in the patch.

3) the load\_icd\_desc.plx is a perl file that can be run with following command:

    perl /var/www/openemr/contrib/util/load_icd_desc.plx

4) Before you run the script you need to modify it to place your openemr sql database name, your sql database username, and your sql database username password (these can all be found in /var/www/openemr/library/sqlconf.php ):

To modify the script place the database name within the quotations at line 36:

    my $DBNAME = “”;

For username and password, comment out line 45 and 46. Then uncomment line 48 and 49, and substitute the your sql username and database for _username_ and _password_ in this line (line 48).

let us know how it goes

-brady

advancedmedical wrote on Tuesday, December 08, 2009:

I must be one of the most backward person ever. After waiting for 2 days, i ended up convert and install the latest openEMR under winXP; I was basically lost in the Ubuntu. just because I did not have the time to understand it more; I am sure Ubuntu is one of the top notch as well;
Ok regarding your explanation; i tried to read it over and over again starting #3 and then #4;

I did not modify OpenEMR since i installed it; I was simply trying it out so I could use it at the office;
So is there anyway you can go to step by step (slowly) for this dummie? :slight_smile: or is there a webbase with picture that i can read to follow your advise?
Thanks in advance.
Sincerely

anonymous wrote on Tuesday, December 08, 2009:

I have installed this a few times on Debian/Ubuntu. If you need some assistance, I can walk you through step-by-step. I can set up a virtual box here an walk you through.

pkale.robinson@live.com

We can set up a time on tomorrow if you’d like. Just trying to help.

Pkale

advancedmedical wrote on Tuesday, December 08, 2009:

PKale,

actually, I also have problem with editting in Ubuntu. so I went back to winXP; i think the process like Mr. Miller suggested is similar to both. i read #3 and #4 and have both sqlconf and load_icd_desc open right now and still can’t figure exactly what to do next.

That would be great if you are able to set up a virtual box tomorrow; i live in Arizona, so when should it be best to catch you?

Thanks

bradymiller wrote on Tuesday, December 08, 2009:

Your issue has inspired a feature request(get this stuff incorporated within OpenEMR itself):
https://sourceforge.net/tracker/?func=detail&aid=2910517&group_id=60081&atid=493004

My suggestion is to get the instructions so nicely offered by PKale. I’d suggest checking out some basic ubuntu tutorials (especially pertaining to commandline, file permissions, and editing files). You tried to go from crawling to sprinting in one day (or in your case, one weekend)… a couple more days and it will all make much more sense.

-brady

ideaman911 wrote on Friday, December 11, 2009:

Brady & Rod;

As you will see elsewhere, I started to setup a batch file which would perform the perl / icd9 load in windows.  I am missing something, though, and I suspect it is another “shorthand instructions” issue.  I see that ActivePerl for Win32 is a lot bigger than the perl.exe in the C:/xampp/perl/bin/ location, so do I assume correctly that the perl.exe in the distribution in fact is NOT adequate by itself?  If so, what do I replace it with, and could we not include that in the distribution, naming it perlw.exe or something?  That would allow a batch processor.

Lastly, the plx contains callouts for “username” and “password” which I assume are the $login and $pass values from the sqlconf.php file.  I also assume the default DBASE name is “openemr” from the distribution.  If not, what are the distribution values for Windows, and where are they found in sqlconf.php?

I would like to suggest that I will make a windows batch file and post it on the wiki as a pdf so people can simply copy - paste it in the windows editor.  It will contain prompts to change the settings in the plx file as needed.  That should make for an easy use in windows once I actually get it to work for myself.  Help?

Joe Holzer    Idea Man    315-622-9241     im@holzerent.com
http://www.holzerent.com

Also, in looking at the plx file, the instruction

ideaman911 wrote on Friday, December 11, 2009:

OOPS - sorry, forgot to delete the last line.  Please ignore it.

Joe

sunsetsystems wrote on Friday, December 11, 2009:

I seldom work with OpenEMR on Windows servers, so I can’t contribute much here.  But make sure you have the dependencies (Perl modules) installed that are listed at the beginning of the load\_icd9\_desc.plx script.  You will most likely have to install one or more of these.  Instructions for installing Perl modules may depend on the Perl version that is used.  Otherwise it shouldn’t matter what that is.

Rod 
(http://www.sunsetsystems.com/)

bradymiller wrote on Friday, December 11, 2009:

Joe,

For a detailed rundown on how to use these files checkout message number 2 in this thread. This mechanism is not intuitive at all which is why the above rec feature request; by making these 3 needed pieces of information simple parameters then much easier to use and no file modification would be needed.

It appears simply missing some perl modules (the required modules are listed in the top of the icd9 script). These can be installed via cpan and appears xampp may have a specific executbale for this; search for cpanp.bat on this page :

-brady

  : http://www.apachefriends.org/en/xampp-windows.html

ideaman911 wrote on Friday, December 11, 2009:

Hi all;

FYI - I have just posted to the ActiveState forums seeking help per:

Hi;

Please excuse my ignorance - I have a specific need which I hope can be helped without my having to become an expert in Perl; it is hard enough learning the PHP, MySQL, Javascript, etc to do what I do daily.  I am not at all a Linux/Unix guy.  I work in windows (specifically XP, but I need to know for XP thru 7, including servers & IIS).

I am working with the OpenEMR community.  It was developed for Linux web servers.  But by combining it with Xampp, we got it to easy load and work for windows because Xampp comes with Apache & MySQL capability.  It also comes with Perl with perl.exe in the …/perl/bin/ folder.  However, when I try to run it for the once annual need to run the ICD9 code load script developed by Rod Roark, who does not work in Windows, (I use batch command perl icd9load.plx from the …/perl/bin/ folder) it crashes with:

"can’t locate strict.pm in @INC <@INC contains: .> at " the PLX file location “line 2 - BEGIN failed - compilation aborted at line 2”

I suspect what is missing are the various libraries needed for the compile.  Specifically, the PLX file lists the “use strict;”  as well as:

use DBI;                                           # libdbi-perl and libdbd-mysql-perl

use WWW::Mechanize;                  # libwww-mechanize-perl

use HTML::TokeParser;                # libhtml-parser-perl

I am hoping it is as simple as putting those various libraries needed into the …/perl/bin/ to allow it to run properly, but I have no ideas about:

1)  What library(s) do I need?  Where are they?  How do I get them?  Can I put them into the
        OpenEMR distribution pak (free downloads at oemr.org) for ease of use?
   

2)  I see in the ActivePerl a wperl.exe and others - does Windows need a specific version?

3)  If so, do I have to do a separate install, and will it conflict with the Xampp perl install, or do I have to add them to the …/perl/bin/ folder, or other?  It would seem it COULD work as-is once the Libraries are there, based on the errors shown, but what do I know?

Since the new ICD codes went into effect Oct 1, this is a pressing need right now, so please reply ASAP, and although I will monitor this, a direct reply to im@holzerent.com would be appreciated.  Thanks.

If any OpenEMR people know the answers, please respond.  We need to get this done.  I will build a windows batch program for each of the PLX files found in …/contrib/util/ and post it to the oemr wiki as a pdf so it can be copy-pasted, but I do not know enough to get past this yet.

Joe Holzer    Idea Man    315-622-9241     im@holzerent.com
http://www.holzerent.com

bradymiller wrote on Saturday, December 12, 2009:

Joe,

This may be rather tough. Turns out there is a perl add on for xampp 1.7.0 (which is what were using); check out the xampp sourceforge download site. So, our xampp doesn’t really have perl. Note, that version 1.7.2 of xampp does install this perl module by default. However, this doesn’t seem to be of utility, because I can’t get the install of the abover perl modules to work (WWW::Mechanize and HTML::TokeParser), which is done via command:

    perl -MCPAN -e “install WWW::Mechanize”

I just get a bunch of path errors it seem. May be best to go with a separate install of ActivePerl on Windows in it’s own directory (can’t use xampp’s perl since if a user upgrade to a new xampp would totally screw ithings up), since ActivePerl seems to have a cleaner way to grab new modules via the ‘ppm’ command. Try that out.

Truly, in the end, we need to do away with any perl script, and convert these to php for clean multi-os use. Perl is actually my favorite language, but for end users it is a real pain to set up a working environment.

-brady

bradymiller wrote on Sunday, December 13, 2009:

hey,

Ok, got it to work, so now you have a starting point at least:

1) Install ActivePerl (it defaults to C:\Perl directory, which is fine)

2) Configure the load\_icd\_desc.plx file via message #2 on this thread (get needed info from library/sqlconf.php file).

3) Run below commands on commandline:

    C:\Perl\bin\ppm install DBD-MySQL
    C:\Perl\bin\perl c:\xampp\htdocs\openemr\contrib\load_icd_desc.plx

This should work (ensure have most from recent load\_icd\_desc.plx file from the patch).

-brady

advancedmedical wrote on Monday, December 14, 2009:

brady,
Hi,
I have been tracking this particular topic and saw  that you have commented that it is worked! i have not tried it yet in fear that it will erase all that data that i have placed into the database for the ICD.

if it is works for you, then could u re-instruct us. I am sure there are others desperately waiting for your instruction.

Sincerely.

bradymiller wrote on Tuesday, December 15, 2009:

hey,

This script will remove all of your previously placed icd codes.

**LINUX INSTRUCTIONS**

- Modify the load\_icd\_desc.plx file:
- Place database name at line 36 (get this from the openemr/library/sqlconf.php file)
- Comment out line 45 and 46
- Uncomment line 48 and 49, and substitute the your sql username and database for username and password in this line (line 48). (get these from theopenemr/library/sqlconf.php file )
- Execute the script:

perl /var/www/openemr/contrib/util/load\_icd\_desc.plx

**WINDOWS INSTRUCTIONS**

- Modify the load\_icd\_desc.plx file:
- Place database name at line 36 (get this from the openemr/library/sqlconf.php file)
- Comment out line 45 and 46
- Uncomment line 48 and 49, and substitute the your sql username and database for username and password in this line (line 48). (get these from theopenemr/library/sqlconf.php file )
- Install ActivePerl (if not already installed, (it defaults to C:\Perl directory, which is fine)):
- Configure ActivePerl and run the script (via two below commands):

C:\Perl\bin\ppm install DBD-MySQL<br>
C:\Perl\bin\perl c:\xampp\htdocs\openemr\contrib\load_icd_desc.plx

bradymiller wrote on Tuesday, December 15, 2009:

Sorry, note the last command in the above windows instructions should be:

    C:\Perl\bin\perl c:\xampp\htdocs\openemr\contrib\load_icd_desc.plx

ideaman911 wrote on Tuesday, December 15, 2009:

Hi all;

Thanks to the work of Brady, I was finally able to get this to work, so I have put together a PDF file and will get it posted on the Wiki which explains everything so a newbie can do it in Windows.  The text of that is shown below (except that needed formatting is miswritten by the Sourceforge text handler - eg the “icd” in italics below is actually “icd” preceeded and followed by an underscore character in the PLX filename):

Using the …/config/util/*.PLX files to load data in Windows
Before starting this, you should make a duplicate copy of your entire Xampp directory, so you can verify all works correctly before
you actually change real data, unless you already have the ability to recover if your files are damaged. I prefer to rename the “Real”
data as “Xampp310Real”, and then name the copy “Xampp” so it will run properly. To copy, Logout from OpenEMR and stop both
your Apache and MySQL services. If you used the pre 3.1.0 and upgraded, you probably are using the Xampp “doggy bone” found in
your taskbar at lower right, where you should stop each of MySQL and Apache in that order, then select the “Exit” button - remember
to re-start all those before trying to start OpenEMR again. If you used the one-click to install 3.1.0 in windows, it uses the Apache and
MySQL services, which can be stopped using the Control Panel - Admin - Services, but that should not be necessary. Those must be
restarted, though, to run OpenEMR if you stopped them. Download Perl from

http://activestate.com/activeperl/

The following presumes a Windows install of ver 3.1.0 of OpenEMR. You may have to make changes if yours is not the same. To
use the PLX files in OpenEMR, you must first install a working version of Perl. Save your download to your desired location, but it is
advised that you actually do the install to the default location (c:\perl), which is accomplished by running the MSI file after download,
which will usually be named like …\activeperl-ver# -mswin32-x86-s/n.msi If yours does not have the MSI extension, it will not work
properly. To install, you simply double-click on the MSI filename and allow it to run. You might need administrator rights. During
the install, you should accept all the defaults, which will put all the needed files in the c:\perl location, including all the needed
libraries. Once installed, use the Command Prompt to run the following (the Perl install and this are only needed once):

c:\perl\bin\ppm install DBD-MySQL

The rest of the instructions here assume you have your windows OpenEMR install (including IIS as applicable) in c:\xampp\htdocs\ so
you may have to make adjustments if not. You must first edit each of the PLX files you intend to use with data found in the file
…/openemr/library/sqlconf.php at the very top. Why they do not use the same naming convention is again unknown, but the values
you must substitute for those shown in the PLX files are found in the first twelve lines of the sqlconf.php file. For example, the utility
PLX file to load the ICD9 codes from icd9data.com into the Admin - Services (Superbill in radio view) is

…/openemr/contrib/util/load_icd_desc.plx

which must be edited to use. You must first assure you have the latest version so it is compatible with the icd9data.com website where it will be getting the info, and the first change you must make is to assure the correct year is selected - as of Oct 1 2009 that should be 2010, which you should change near line 30 for the value " my $START_URL".
Below that you should see “my $DBNAME” whose value you will change to the value shown in sqlconf.php at line 10 for $dbase,
which is likely “openemr” (make certain to include the quote marks). You will want to comment out lines 45-46 which starts with
“my $dbh”, and my preference is to copy lines 48-49 to lines 51-52 so I retain the explanation as a commented line, then uncomment
lines 51-52 which also start with “my $dbh”. Within them you will replace “username” with the value from sqlconf.php line 8 $login
which may also be “openemr” (remember to include the quote marks) and replace “password” with the value from sqlconf.php line 9
$pass which can be anything (again remember the quote marks) and save the edited PLX file. Then create a batch file so you have it
thereafter to read (note the space between the second perl and the c) for each PLX file you want to use like:

c:\perl\bin\perl c:\xampp\htdocs \openemr\contrib\util\load_icd_desc.plx

If you have done all per above, you should be able to run that batch file at any time, once you have the correct year in the plx file, But
remember that every update or patch containing the plx file will overwrite yours, so you should make a copy of yours to use as a
model (eg. load_icd_desc-copy.plx) in the same util folder, and verify before you run that the settings are correct. Changes must be
made any time the icd9data.com website changes (or others), so please be aware the PLX files may NOT be current at all times .
You should make similar changes to any of the other PLX files you wish to use (find their purpose within them), and make a similar
batch file for each of those you intend to use. You need not re-install ActivePerl anytime thereafter unless you uninstall it.

Joe Holzer    Idea Man    315-622-9241     im@holzerent.com
http://www.holzerent.com

advancedmedical wrote on Thursday, December 17, 2009:

Thanks Joe and brady for the great work

lakkarajun wrote on Monday, December 21, 2009:

Hello Brady,

Thanks for your help.
I followed your instructions and I got the following error.

Can’t locate WWW/Mechanize.pm in @INC (@INC contains: /usr/local/lib/perl5/5.8.8/x86_64-linux /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl .) at load_icd_desc.plx line 21.
BEGIN failed-compilation aborted at load_icd_desc.plx line 21.

Can you help me how to resolve this issue?

Thanks & regards,
Raju

bradymiller wrote on Monday, December 21, 2009:

hey,

You need the following Perl modules:
<pre><code>DBI
WWW::Mechanize
HTML::TokeParser</code></pre>
Generally can be installed via your OS package installer (just need to find the package name via online search). I’d install WWW::Mechanize first and then try again, and then install others if it says is missing. If still ahving issues, give us your linux operating system.

-brady