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