Friday, October 13, 2006

How to install OpenEMR with XAMPP in WindowsXP

Disclaimer: This 'howto' manual is written based on my personal experience while trying to implement OpenEMR in my clinic. I use Windows XP as a platform of trial and transform my Windows XP to become a local server using XAMPP.

Okay, before we go through the details on the 'how to', I just would like to recap on what is OpenEMR and XAMPP.

OpenEMR is a modular, HIPAA compliant, Open Source, cross-platform Electronic Medical Records system (EMRS). It facilitates efficient office management through automated patient record journaling and billing integration, and has been successfully integrated with third-party technologies including speech recognition, secure wireless access, touch screen portables, and biometric authentication. Interface screens are customizable and optimized for consistency, simplicity, speed of access to patient information, and minimum eye strain. OpenEMR is based upon widely-used public standards to achieve maximum compatibility with evolving technologies. Adherence to these standards diversifies implementation possibilities through minimum hardware compatibility requirements.

In short, it is an application to run your clinic management and patients database with a lot of room to expand.


XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. XAMPP is really very easy to install and to use - just download, extract and start. Many people know from their own experience that it's not easy to install an Apache web server and it gets harder if you want to add MySQL, PHP and Perl.

In short, XAMPP will make your Windows XP as a server for you to host your OpenEMR.

Few thing we need to consider before we go through:

  1. To run OpenEMR in your Windows XP is not as straightforward as installing another applications with an .exe extension in Windows.

  2. It will take some your time and effort to get the whole thing running.

  3. OpenEMR is a browser based application, means you need to install OpenEMR in a server and run the application using your web browser. I personally recommend Firefox with Google toolbar.

  4. I have not try this on a Linux and Mac. If you want to try to install it on those platform, check out from http://www.oemr.org.

  5. OpenEMR is developed in the US. Some of the medical variables and parameters on the applications may not be compatible with your local and country settings. The good news is, OpenEMR is an open source project, which means if you know how to write PHP code, you can change and modify the source code to tailor to your local clinic and country settings.

  6. I consider my attempt still in a very early stage. I appreciate any feedback from you.

  7. Discussion on implementing OpenEMR will be discuss in OpenEMR forum.

Installation of XAMPP.

Choose which distribution to install. I choose a stable production release. Because OpenEMR use PHP4 and mySQL4 to run, I use XAMPP 1.4.16 version. Newer version of XAMPP will not do the job properly.

Download the distribution you want to install. I downloaded the XAMPP 1.4.16 installer, xampp-win32-1.4.16-installer.exe, from the Apache Friends organization's Web site. Look for 'Older versions of XAMPP (even the "old" WAMPP) can downloaded directly from SourceForge' and download the package from there. Make sure you download the installer file.

Install the distribution. Installation of XAMPP is very easy. Just unpack and run the .exe package on the partition of your choice. I chose the default, creating the main directory in C:\Program files\xampp.

During the set up, you will be informed about installing Apache, mySQL and Filezilla services into your computer. Just agree with all the default settings.

Perform post-installation setup.
  1. By default, XAMPP services will start with PHP5 after you finished the installation. You need to switch PHP5 to PHP4 (because OpenEMR cannot run properly with PHP5).

  2. You need to stop Apache services first before the changes takes place. To do this, open XAMPP Control Panel Application (start menu > apachefriends > xampp > control xampp server panel)

  3. Select 'stop' apache services under 'modules'.

  4. Switch your PHP5 version to PHP4. To do this, select 'php switch' from the start menu. (start menu > apachefriends > xampp > php switch).

  5. A window with command prompt will pop out. Change your PHP to PHP4.

  6. Restart Apache services.

To make sure that you install XAMPP properly, open 'CONTROL XAMPP SERVER PANEL' from Start Menu > All Programs > apachefriends > xampp. Click 'Admin...' from the Apache service modules. It should open your browser and show this:



The URL address should be http://localhost/xampp/.

Installation of OpenEMR

Choose which distribution to install. I use the latest stable production release. For our project with Windows, it was the openemr-2.8.1.tar.gz version from SourceForge.net.

Download the distribution you want to install.

Install the distribution. For installation, follow the steps below:

  1. Extract the downloaded file using WinZip. When you unzip, the package will become a folder. Rename the folder as 'openemr' and move the folder to 'htdocs' folder in C:\Program files\xampp\htdocs.

  2. You then need to do some script editing. Use WordPad or any text editor to open globals.php file, which is in C:\apachefriends\xampp\htdocs\openemr\interface.

  3. At about line 10, look for this line $webserver_root = "/var/www/html/openemr";

  4. Change $webserver_root ="/var/www/openemr"; to $webserver_root = "C:\\Program Files\\xampp\\htdocs\\openemr";

  5. At line 17, change the $web_root to $web_root = "/openemr";

  6. Next, OpenEMR expects Magic_quotes to be turned off. Again, edit C:\Program Files\xampp\apache\bin\php.ini with your Wordpad or any text editor.
    About ½ way down I located and changed
    Magic_quotes_gpc = On
    to
    Magic_quotes_gpc = Off

  7. Start Web browser and type in http: //localhost/openemr/setup.php.

  8. Click "Continue" button.

  9. For the first step, choose "Have setup create the databases" and click "Continue."

  10. For the next step, choose the following entries:

  • mysql root password – by default, XAMPP did not set any password for your mySQL,

  • openemr password – use something simple like "openemr1";

  • database name – for example, use "openemr";

  • change default clinic name to the name of your clinic – for example, use “clinic”
Click “Continue” and soon you will be seeing the message, "Congratulations..."

Perform post-installation setup.

You should get this page:

The URL address should be http://localhost/openemr/interface/login/login_frame.php. The default login name for OpenEMR is 'admin' and password would be 'pass'.

After successful installation, you need to read the user manual to get use to the application. Get the use manual here.

A matter of security (A MUST READ!)

As mentioned before, XAMPP is not meant for production use but only for developers in a development environment. The way XAMPP is configured is to be open as possible and allowing the developer anything he/she wants. For development environments this is great but in a production environment it could be fatal. Here a list of missing security in XAMPP:

  • The MySQL administrator (root) has no password.
  • The MySQL daemon is accessible via network.
  • phpMyAdmin is accessible via network.
  • Examples are accessible via network.
To get your XAMPP secured, just click on 'Security' on the sidebar when you are in the http://localhost/xampp/ page. Just follow the instructions.

That's it for now. If your trial is not successful, OR would like to participate in the discussion, OR queries OR giving any suggestion, I appreciate that you can register and voice you heart out in OpenEMR forum.

25 comments:

Unknown said...

thank you for the detailed explanation, I just wanted to let you know its appreciated for a physician with just enough computer savy to be dangerous.

drizad said...

Thanks for your comment. I've worked in Accident and Emergency Department before. I can tolerate the risk and danger of breaking my Windows. There is always Linux for me...

Turguta said...

hi

I installed xampp+Oemr on a XP machine succesfuly. However I am gettıng the following error I am unable to resolve, any ideas for solutions:
Warning: include_once(c:\Program Files\xamp\htdocs\openemr\library\sql.inc) [function.include-once]: failed to open stream: No such file or directory in C:\Program Files\xampp\htdocs\openemr\library\translation.inc.php on line 2

Warning: include_once() [function.include]: Failed opening 'c:\Program Files\xamp\htdocs\openemr\library\sql.inc' for inclusion (include_path='.;C:\Program Files\xampp\php\pear\') in C:\Program Files\xampp\htdocs\openemr\library\translation.inc.php on line 2

The line 2 in translation.inc.php on [ include_once($GLOBALS['srcdir'] . "\\sql.inc"); ]

Unknown said...

Setup Step 3:

Please make sure 'library/sqlconf.php' is world-writeable for the next step.

How???

Unknown said...

Setup Step Final:

Congratulations! OpenEMR is now successfully installed.

Please Edit the 'interface/globals.php' file now to specify the correct URL paths, and to select a theme.
Please make sure that the two folders underneath 'openemrwebroot/interface/main/calendar/modules/PostCalendar/pntemplates/' exist and are writable by the web server. The two subdirectories are 'compiled' and 'cache'.
Try "chown apache:apache -R openemrwebroot/interface/main/calendar/modules/PostCalendar/pntemplates/compiled" and "chown apache:apache -R openemrwebroot/interface/main/calendar/modules/PostCalendar/pntemplates/cache". (If either subdirectory doesn't exist, create it first then do the chown above).
The user name and group of apache may differ depending on your OS, i.e. for Debian they are www-data and www-data.

I could really use some help with this step. Thanks.

drizad said...

You have to change the permission of the directory in the XAMPP server to read and writeable by chmod sqlconf.php to 666.

drizad said...

Hi Chris,

Mostly you don't have to do anything if you install XAMPP in Windows. It may affect your installation if you use Linux.

nhasrul said...

Dear Dr Izad
I manage to follow the steps and got the outputs, but failed in the step 4 of installation. It said:
Step 3:
OpenEMR Setup

Step 3

Connecting to MySQL Server... OK.
Opening database...OK.
Creating initial tables... OK
Adding Initial User... OK

Please make sure 'library/sqlconf.php' is world-writeable for the next step.

Step 4:
Writing SQL Configuration to disk... ERROR. Could not open config file 'library/sqlconf.php' for writing.

May you help me with that. Which files I need to reconfigure to allow the installation. I am using WIndows XP.
nizam

Unknown said...

Great information and tutorial. If anyone needs some great User tutorials on how to use the system after installing it visit: www.ehrlive.com

and look for a link that takes you to free online video training... it's great. The company EHR Live even provides a great offline backup service and other installation and support programs for OpenEMR.

eremenchik said...

How do we connect Open EMR with availity? who has done this and what software/computer company did you hire to write the interface? Is anyone in Texas using open EMR? We desperately need to get our billing started and need to interface with availity...

eremench@yahoo.com

Unknown said...

As a lot of people have realized, OpenEMR's interface looks like something that came out of a 60's time capsule. A company, EHR Live, has updated the interface to provide a more visually appealing interface that makes OpenEMR marketable in today's marketplace.

This new interface could change the immediate perception of the program and bring OpenEMR into the same arena as other big time proprietary software vendors with nicely done interfaces. The feature set of OpenEMR has been always fair, but you can't sell a diamond if it looks like a piece of coal.

KrishaLiva said...

Great post! I also wonder "How to install OpenEMR with XAMPP in WindowsXP" Anyway, thanks for sharing this very informative post. I will use this as a guide. Looking forward for your next post.

electronic medical records

Seo online said...

Ehealth of the greatest hurdles is overcoming misconceptions in the minds of regulators, doctors and patients alike. I just returned from a trip to Germany and colleagues there are amused about America's 3rd World-like medical records situation.

Emr vendors

Prabakaran said...

prabakaran
i getting this error when i am installing in down i posted here

Prabakaran said...

i am getting error in 3rd step i posted the error msg here


error-Creating database... ERROR. Check your login credentials. unable to execute SQL: 'create database openemr character set utf8 collate utf8_general_ci' due to: Can't create database 'openemr'; database exists

and also i need how to insert global openemr text also but i inserted i cant save in notepad whn i am using like this as possible reply soon

Prof Kitchener said...

Thank you for your guide throughout installation of openemr, but unfortunately after completing the setup when I was trying to start the program I get the following error message:
Class ADODB_Iterator contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Iterator::valid) in C:\Program Files\xampp\htdocs\openemr\library\adodb\adodb-iterator.inc.php on line 47

Anoushka Sakthi said...

PHP – Hypertext preprocessor is a general purpose scripting language specially designed for the web development that is easily embedded into HTML language. Some of the excellent features in PHP include capability to create dynamic page content, send and receive cookies, encrypt data.
Regards:
PHP Institutes in Chennai
PHP Training Center in Chennai

Ram said...

Nice blog!!!!! Thank you for sharing with us. EMR Clinic Software is very useful in provides solutions to clinics, medium and large multispecialty hospitals and enterprises houses.

Mirnalini Sathya said...

Excellent blog!! Such an interesting content to read, your idea made to take Web Designing Certifications. Keep updating more ideas. Thank you.
Regards:

web designing course in chennai
web designing training

Appiah K. Clems said...
This comment has been removed by the author.
Number said...

Can i have your number or email?

jvimala said...

Thanks for providing wonderful information with us. Thank you so much.
Regards,
PHP Training in Chennai | PHP Course in Chennai | PHP Training Institute in Chennai

Gautham SLA said...

It's a nice blog.I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.
Best PHP Course in Chennai

subha said...

Fantastic work! This is the type of information that should follow collective approximately the web. Embarrassment captivating position Google for not positioning this transmit higher! Enlarge taking place greater than and visit my web situate great jobs.
Ai & Artificial Intelligence Course in Chennai
PHP Training in Chennai
Ethical Hacking Course in Chennai Blue Prism Training in Chennai
UiPath Training in Chennai

livoci said...

I need to thank you for the endeavors you have carefully recorded this site. I'm expecting to see a similar high-grade blog entries from you later on too. Truth be told, your experimental writing capacities has roused me to get my own, own blog now ;)
live