Personal tools

Windows XP Installation

From OpenEMR Project Wiki

Jump to: navigation, search

OpenEMR Setup in Windows XP - Things I Have Learned Ver 2.081223 by Joe Holzer IDEA MAN for contact info.

This writeup is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. This writeup explains how to setup OpenEMR in Windows using Xampp for a localhost (stand-alone) usage only. For use with a web server, please follow the instructions for Linux only, since that will work for any browser pointing to that server. OpenEMR is actually designed to run in Linux, so some problems occur trying to port to Windows. As released in version 2.9.0 it requires using SQL-Ledger, which has problems working with Windows and makes things very complex. I believe it is best to use the current Development level 2.9.1dev version and I have requested that it be posted for a download link alongside the 2.9.0 current release at Please recognize, though, that this rev is still in testing, so some of the modules are subject to revision over time before the final release occurs. Install for both versions is the same, but the accounting is inclusive in 2.9.1dev so it does not need SQL-Ledger added. 2.9.0 can generate billing, but cannot do the followup accounting without SQL-Ledger. This instruction set also does NOT configure the Mercury email nor the FilezillaFTP file transfer functions, as these are likely already handled by other means by you. Do not START them, as I do not know what that will do.

If you already have an install of ver 2.9.0 (or earlier) with data you want to keep, you should first exit all including the Xampp icon in your taskbar at bottom right, then rename the prior install Xampp directory as something like Xampp290. You may be copying MySQL data from it to the new install after the full installation of the 2.9.1dev version. But 2.9.1dev contains modified databases, so each you actually changed earlier needs to be copied over without damaging any of the new databases. SOME structures have not been revised. But PLEASE NOTE that there is a known problem with ENCOUNTERS and others, and it is impossible for me to have tested all possible data conflicts, so I suggest you first make a backup of the new MySQL\Data\OpenEMR\ directory files somewhere as initially created, then copy your earlier data files ONLY if their MySQL\Data\OpenEMR\ directory listing modified date is LATER than your initial install date for the earlier version in individual pairs of MYI and MYD files, and that you test all your previous data to see it seems to operate correctly once copied over, and retain the earlier data for some time in case some problem occurs. If a problem occurs during the copy, that pair cannot be used and must be reconstructed manually by data re-entry, along with a re-start of OpenEMR. One change in the Dev version, for example, is the addition of a record check in/out function for files, and I do not know how that might affect those earlier records. The only data I am certain can be copied this way is the Codes, Prices and Fee_Sheet_Options, so it may be easier in the long run to simply re-enter it all.

Dr Bowen is currently working on a data loader which he hopes will allow those who understand data manipulation to upload patient information from a CSV file to the OpenEMR database. Notes on that will be added here as soon as possible.

An excellent instruction set for use of OpenEMR can be found at although it is not entirely up to date. It uses screenshots to guide users, and a Windows installation will look similar.

This instruction set assumes Xampp and OpenEMR Files are placed in directory locations as noted. Other locations will not work. Install Xampp in the lowest directory, hereafter called C:\ Directory for Localhost (stand-alone) or LAN usage only. This can not be used for web server setups. See OpenEMR website for those instructions. The files I obtained from XAMPP for Windows was and from OEMR.ORG was I have done the same for and all the fixes below are the same for both unless specifically noted.

Note for convention and text editing: case must be as shown (ie C:\ is not c:\, E:\ is not e:\ ) and the lowest directory level is always an uppercase letter in Windows.

Setting Up in Windows XP: I used XP Tablet 2005 on a Thinkpad X61 Tablet, but most XP Pro should work. XP Home may NOT work. Extract Xampp Zip file to the lowest level directory (eg C:\ - or lowest of whatever server address to be used - eg E:\ ) If given the option, select to display all files. You will be editing some. It is usually easiest to use only DOS edit using Command Prompt - EDIT function or another "pure" text editor. "Word" and "Wordpad" are NOT good. A good HTML editor should work also. Find and edit the following file: C:\xampp\apache\bin\php.ini and locate in Data Handling section, near line 370 - change line without ";" precursor to read "register_globals = Off" (put at end of line above it "////VALUE was On////"). Then near line 387 - change line without ";" precursor to read "magic_quotes_gpc = Off" (put at end of line above it "////VALUE was On////") Save then Exit Editor. Close Command Prompt window if it was opened. Extract OpenEMR Zip file to C:\xampp\htdocs\ Go to C:\xampp\htdocs\openemr\interface\main\calendar\modules\postcalendar\pntemplates\ - create two new folders called "cache" and "compiled" Edit (again, best to use DOS Edit or another "pure" editor) C:\xampp\htdocs\openemr\interface\globals.php - find $webserver_root = "/var/www/openemr"; near line 42 and change to explicit location using FORWARD slashes as shown - eg "C:/xampp/htdocs/openemr"; etc. But leave the $web_root = "/openemr"; as-is, unless you will use an internet server, which is NOT included in these directions. Double click (run) C:\xampp\setup-xampp.bat then place a shortcut to xampp-control.exe on your desktop for easy access.

Here is where we talk about SECURITY and passwords. I suggest using an 8-10 character string you will remember easily. It must contain ONLY letters and numbers, and no spaces, but is case specific. Make note of each as you use it, and save them.

Edit C:\xampp\phpmyadmin\ near line 85 which should show $config['servers'][$i]['password'] which is labeled to the right as MySQL Password but is blank. Enter your password between the open marks and save (it is OK to re-align the // marks which follow both items). As a (poor) example, you might select 'P4ssw0rd01'. This will be used again later, so be sure to keep it safe. Two lines above change the value 'config'; to read 'http'; where it is labeled on the right as Authentication Method.

Running OpenEMR requires first starting XAMPP to then start Apache & MySQL. You must be sure both these are not blocked by any firewall(s), and they will remain running throughout every OpenEMR session. Though you can then close the window, an Xampp icon will remain in the taskbar at bottom right. You must use this to Stop MySQL and Apache before Exiting Xampp. Open your browser (Firefox is best, but IE should work also) and select "localhost" or the URL for the LAN server as needed. You should see a splashscreen XAMPP with language links below. I can only attest to English. Click the language link. You should see Xampp for Windows confirmed. Verify PHP is ver 5+ at top left, and a set of admin subjects at left. You should probably bookmark this page for ease of subsequent usage, though it is only required for setup & admin. You can ignore the rest of the subject tabs at left and avoid changing any of the settings. That will be done within OpenEMR for you.

Once Xampp is running, again in the browser address line enter "localhost/openemr/setup.php" substituting for 'localhost' as needed. Hopefully, you will be prompted to "Continue". If not, something was overlooked. Exit ALL (select Xampp icon in taskbar, then click to close each of Apache and MySQL, then exit Xampp) and try again. You may need to remove and then reinstall all of the Xampp and its subdirectories in the worst case, but most likely is an overlooked step.

The screen should be explaining about needing MySQL and PHP setups, all of which have been configured if you have followed the directions so far. Select Continue. Note that if you previously installed an earlier version and have some data entered, you should review the information above about prior records data copying, but only copy the data AFTER selecting to create new databases and completing the initial installation and password changes. Selecting to use existing databases instead of creating new causes errors which prevent completion of the setup. Selecting to create new databases brings a form to fill. Use the same Password as before in Server Password. Leave Client info as shown (password will be blank for now to allow setup of OpenEMR databases) Change the User fields as you wish. Your initial login will be the User value, initial password will be "pass" If you leave the values as-is and do not create a new User password later, anyone with these instructions can access your data, so I advise you to immediately create a new password. Doing so will require an immediate re-login. After continuing and delays (ignore prompts about library/sqlfconf.php and the other instructions you have alrready performed) you will get a link to Start the OpenEMR.

Click that link which will bring up your OpenEMR login. I suggest you bookmark this for ease of all subsequent use. Enter the User you just defined and "pass" as the password. That will be changed as you fill out the user definitions inside. Once the login is done, you should see the OpenEMR screen(s). I suggest you first setup your practice and initial user info. Then close your browser, then reopen it and re-start OpenEMR and login again with the new password. Don't lose it!

Information below is from usage of OpenEMR which may benefit you: The instructions above only setup the minimum needed to run OpenEMR, and do not include SMS, email, or SQL-Ledger (which is needed to handle EOB's etc. only for ver 2.9.0 and earlier)

Note that some of the changes advised below may already be incorporated in the downloads, so please print the latest version of this (see the date code following the decimal in the writeup version at top of this document) when you get your download. Hopefully it will note what changes have been made, but I cannot control all changes which occur.

Appended 11/1/08: IMPORTANT - To have ability to edit lists, you must edit the file at C:\xampp\htdocs\openemr\library\ and look near line 88 for "if ($user == 'admin') return 'write';" and change the next line 'super' value of "0" to 'write' also. You must completely restart OpenEMR after this change. This is important because you must change some lists, like STATE, in order to enter the values for patients.

Appended 11/2/08: After starting OpenEMR, select Admin - Layouts and assure the "Demographics" is selected. As delivered, the "ProviderID" field in "Group3" has no label, but has a "Required" UOR status. That will make it invisible, but you will be prompted with an error if you try to save patient data until that field is filled, but with a misleading tag of "Referring Provider" (which can be found in the rightmost column, "Description" in the Layouts section). Since this is actually the provider for that patient from the set of users for OpenEMR, my advice is to change the UOR to "Optional", and change each of the Label and Description fields to "Provider". Also, if you want the patient ID to be used, it requires changing the "pubpid" (ID) row fields in the layout. I suggest making the Label be "Pt ID", the Group be "1Who", and the Order be "0" (a zero), leaving all else as-is. When you click on the SAVE at the bottom, which you MUST DO to actually make changes in almost all of OpenEMR, you will see the displayed layout list change, and will see the impact when you look at Patient information.

Appended 11/9/08: Errors in testing show problems caused by use of apostrophe ('), and possibly any text, in phone numbers. Also, omission of area code will leave a weird phone code like (123-456-7). Instead enter full area code & phone together. I tried but failed to set to default an area code in the field. But if you enter a phone number as simply the 10 digits, they will display the proper hyphen positions as if you entered them that way. For any text you might wish to add, I suggest using the "User Defined" ID's, and fill the fields as desired to show up in the Patient areas for your use. That will require defining their Label, Group (which will be "2Contact" usually), Order as a number according to their relative placement, changing all subsequent in that group to the next higher number, and UOR to "Optional". Make the Size be a number enough for what you need (max 254) and each of Label & Data Columns be "1", then Description as what you want the data for (eg, use "Whose Mobile" as Label and Description to show who owns the mobile number listed, as for example which parent, etc.). Again remember to SAVE before leaving the Layouts area, or all changes will be lost.

Appended 11/9/08: There is a known issue I am currently investigating. After an Encounter has been entered for a given patient, a weird error will display which mentions "latin_swedish.. COERCIBLE" as an "illegal collation". That will also be true if you try to list the past Encounters. I have no idea why yet, and it does NOT display if you change to the "Billing View". But the Encounter additions all seem to be in the database when I look at Reports for a given patient. Appended 11/29/08 The cause of this error was found, and can be prevented - see 11/29/08 append below. In case you do not realize it, you can list all patients on record, which will sort them by last name, by clicking any of the four choices of "Find By" with a blank field box above it, in the bottom left corner of the screen. That will display the listing in the main frame. Clicking on a patient there will make that the current patient, displayed in the lower left, which will then allow you to select any of the functions in the radio button list for that patient specifically. Clicking any of the choices (Name, ID, SSN & DOB) with a data value in the box instead will bring up that patient only, or list multiple matches.

Appended 11/10/08: Using any values in the Admin - Lists - Service Category will cause an undesired and unusable field in the Encounter - Fee Sheet which will simply be confusing. Only use the Admin - Lists - Fee Sheet to create new services, as these will allow selection of ICD and CPT codes as drop-downs.

Appended 11/29/08: Found cause of issue from 11/9/08; in openemr\library\ near line 43 needs // ahead of $sql .="ORDER BY FIND_IN_SET... " there are too many arguments for the next statement otherwise. This might want to be revised in the future if the listed order is not workable, but for now leave as adjusted to simply comment. Also, but merely for ease of use and understanding, in openemr\interface\billing\billing_report.php near line 266 should read [Update List] instead of [Change View] to match other conventions. Similarly in \openemr\interface\main\left_nav.php near line 130 should look like 'enc' => array('This Enctr',... instead of 'enc' => array('Encounter',... to conform to the actual resulting page. Also in \openemr\interface\patient_file\encounter\diagnosis.php change near line 207 to read ..x1('View & Print Invoice / Receipt','e'); since the printout is likely to be used for either. And in the same directory, change \forms.php near line 82 the label "Patient Encounter" is much more intuitive as "View Patient Encounter" or merely "View Encounter".

Joe Holzer