Back-up problem

donnocha wrote on Sunday, September 27, 2009:

Hi. I’m using a xampp openemr installation (v 3.0.1) on windows xp pro. For safety and security reasons I’m trying to back-up my data however when I click on  ‘Administration’ then ‘Backup’ it offers to create a file in tar format for me to save. when I click continue, I just get the following:

Dumping OpenEMR database …

 
"rm -rf /tmp/openemr_web_backup; mkdir -p /tmp/openemr_web_backup/emr_backup; mysqldump -u "openemr" -p"S0urc3_F0rg3!" -opt -quote-names -r /tmp/openemr_web_backup/emr_backup/openemr.sql "openemr"; gzip /tmp/openemr_web_backup/emr_backup/openemr.sql" returned 1:

I’m not sure what I’m meant to do with this. Is this a link to my backup, or am I missing something. One further point. Assuming I do manage to backup my data, can I then use the latest xampp installation to update my version of OpenEMR and populate my new software using my saved backup file. Maybe there is an easier way update. Any help gratefully received.

tmccormi wrote on Monday, September 28, 2009:

The Admin ->Backup only works in Linux.  We are working on a Multi-OS version of it that I hope to have out this week.

Tony

bradymiller wrote on Monday, September 28, 2009:

hey,

To back up OpenEMR data you need to back up the following:

1) openemr mysql database

2) the openemr web directory (c:\xampp\htdocs\openemr)

The first can be done via phpmyadmin in xampp or can be done with the mysqldump command on the command line.

The second can be done via copy/paste graphically or via the windows copy command.

The thing I’d like to stress is that the backup mechanism should be automatic and on a regular basis. This can be done in windows via batch files.

Restoring basically consist of replacing/creating the openemr mysql database and replacing/creating the openemr web directory from your backups.

Tony, having the admin>backup work in windows would be awesome. Could put this in the next 3.1.0 patch; post it in patches tracker when done.

-brady

donnocha wrote on Monday, September 28, 2009:

Thanks Brady & Tony.  This answers a lot of my questions. It sounds like when I create a backup, that I could use the latest xampp OpenEMR release to update my software, and then use the backup to import my data. If I’m way off the mark on this one maybe someone could let me know. It’s hard to test this one without taking a stab at it, by which time it would be too late to find out if it doesn’t work. Thanks again for all the help. Without your assistance it would be difficult, if not impossible, for newcomers like myself to venture into open source software. Donnocha.

bradymiller wrote on Monday, September 28, 2009:

hey,

If you are already using OpenEMR in a production environment, then I’d focus on ensuring you have a good backup mechanism in place. This means you can back it up (the entire openemr web directory and the openemr mysql database), and restore it on another computer (simply install the -xampp-openemr-3.0.1(same as your current version) on this testing computer and delete the openemr web directory and openemr mysql table on the testing computer, and you now have a testing server). Once you can do this, you now have a reliable backup. Then I’d suggest simply upgrading OpenEMR to 3.1.0 at that time via the wiki upgrading instructions at oemr.org (let me know if you need the link if wiki is confusing); there’s no advantage in upgrading the entire openemr/xampp package at this time - even if you do decide to upgrade the entire xampp package you still need to "upgrade" openemr to 3.1.0 first anyways.

-brady

bradymiller wrote on Monday, September 28, 2009:

hey,

Also, once you have a testing server, you can test upgrades etc. on this before touching your production server.

-brady

donnocha wrote on Tuesday, September 29, 2009:

Thanks Brady, once again for your help. I’ll try to get my head around backing up my data before looking at updating. My promary reason for updating is to be able to use the full benefits of SQL Ledger. As my business is cash, rather than insurance based, a lot of the financial aspects of openEMR are too useful to me, but as well as that I’d like to be able to keep all of my business financial data in one place and to do this within Open EMR would be ideal. This is the next challenge. Thanks again.

bradymiller wrote on Tuesday, September 29, 2009:

hey,

I don’t know much about the billing aspect of OpenEMR (hopefully somebody will more knowledge will jump in), but as of version 3.0.1 we have migrated lots of the billing/accounting/inventory(drug module) stuff from sql-ledger into OpenEMR. Again, not sure of the specifics, but as time goes on the connection to sql-ledger could possibly not work (since no real development going on in this area anymore). What specific functions do you want from sql-ledger?(then we could chime in whether OpenEMR currently has this or not) Notably, sql-ledger will add another level of difficulty to the installation (need postgresql database) and backup mechanism.

-brady

donnocha wrote on Tuesday, September 29, 2009:

Brady,
The specific functions I would want from SQL Ledger relate to the fact that my business (private psychotherapy practice) is about 90% cash based, with the rest of my clients being ‘funded’ in which case I send an invoice to the funder (not insurer) each month. While I have a standard fee, this is sometimes negotiated downward, and on occasion a client may pay a portion of their fee and the remainder on the next visit. So, I would need to be able to record a fee against each consultation, and to mark that fee as paid in full, in part, or to be invoiced later. For simplicity, it would also be useful to be able to record outgoings such as rent, insurance, phone, and so on. If it were not for the fact that I have no experience of programming, I would be very interested in working on this myself. In your view, would this sort of addition make OpenEMR too complex and unwieldly? Donnocha.

bradymiller wrote on Wednesday, September 30, 2009:

hey,

I think all your patient billing stuff can be accomplished with no code changes, but will defer to somebody with more billing experience (like Rod, Tony, Mark …). The other clinic overhead stuff (phone, electricity, etc.) is not done yet in OpenEMR, but using another program (sql-ledger or a dozen other accounting/business management) wouldn’t really add any complexity to OpenEMR since no communication would be required between the two. Or could ask a pro to customize this for you into OpenEMR also.

Can a "billing expert" help out with this question?

thanks,

brady

tmccormi wrote on Wednesday, September 30, 2009:

I think this is really a new topic now… but my recommendation is that if you are doing something more than Billing and Account Receivable related accounting that you use either SQL-Ledger or export your billing/collection data to QuickBooks or similar where you can have the whole enchilada.   The hooks are there for SQL-Ledger already …. :-)  There are XLS exports and at least one OFX export.

-Tony

donnocha wrote on Thursday, October 01, 2009:

Thanks again Brady and Tony. It looks like I would be best to look at a seperate accounts package. I had hoped to be able to accomplish everything with one piece of software but I am now exploring GNUcash and I think that it will manage all of my accounting needs. Thanks for all of your help and suggestions.

Denis.

blankev wrote on Friday, October 02, 2009:

GNUCash seems to be a lot like Quicken and Quickbooks. I miss the option to e-mail "many" invoices in a batch in GNUCash, but I might have missied it in the many options.

I also see the option to make connection with online bank interchange via internet connection or at least through *.XLM files. Correct me if I am wrong.

Would this be the right forum lane or do we have to open a new one to make GNUCash (WIndows, Mac,Linux etc) something that might work closer together with OpenEMR?

Since SQL Ledger seems to have stopped development some time and with the extra separated Postgress database give an extra mountain to overcome before using this included software part of OpenEMR.

I hope to be clear and not offensive to developers! (But I was never able as a non-programmer to include SQLledger.) I just downloaded GNUCash V 2.9.0 and everything worked like it should be except for the OpenEMR connection.

tmccormi wrote on Sunday, October 11, 2009:

I like that idea.  I’ll take a look at it and see what can be done.
-Tony

ideaman911 wrote on Monday, October 12, 2009:

OpenEMR already has the ability to handle the creation of a claim and print of an invoice/receipt.  That document could be improved by the changes I recommended much earlier, which add a practice header and/or practice address print, as well as enhancing the distribution print of the patient name to include address, phone, etc to help with mailing and followup.

The treatment of payments made is pretty simple as well - if you collect cash at the time of visit, it can all be entered in the Fee Sheet (see my writeup on Fee Sheet Configuration on the Wiki) as a COPAY, which is how the system knows what to bill/charge for the services provided.  Payments you receive are handled in the same Invoice/EOB  area if received after the visit, and the COPAY posts there already, so if it amounts to the bill total, OpenEMR already handles all that.  However, if you are discounting, you need only go to the Invoice/EOB via the Billing section "EOB" or the Collections Report link for that patient and encounter under "Invoice" and enter the discount and its reason at the "W" field (don’t ask me why the "W" :wink:

But I do not believe it would be reasonable to expect OpenEMR to handle the entire financial management of a practice for things like heat, lights, maintenance and supplies ordering.  As noted above, there are plenty of better systems already existing for doing that.

In my case we use Quicken to track revenues (and those other items), and associate those with the individual claims in OpenEMR.  It is effectively a doubling of the inputs, but also allows for better checks and balances on that critical activity, as it affords us a way to determine when we have a mis-match and fix it.  We actually have a third process as well - an XLS which tracks payments received by payor, with running seven day and monthly summaries, and an immediate indicator if we have a mis-match anywhere which allows immediate identification.  That requires me to enter the receipts in the XLS for that day as well as into Quicken, then I pass the EOBs to the biller who enters their info into OpenEMR, and keeps her own running XLS.  If her monthly summary does not match mine and the Quicken report, we know we have missed something.  It works great and adds VERY little extra effort.

And the XLS has the added advantage of proving the 1099 statements we receive from the payors (and have supported successful defense of IRS audits).  Which is why we follow the payments for a full year, including tracking to the prior year any EOB’s which show a payment date in the prior year.  We do that with a single line "Last Year" in the current year, so we can track against bank statements for specific days, but against 1099’s for the year.  They work extremely well.

If anyone wants to receive a copy of the "master" XLS simply drop me a line.

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

ideaman911 wrote on Monday, October 12, 2009:

BTW - as Brady notes, Windows has the ability to write simple batch files which will backup the needed sections of OpenEMR, and allow them to be restored to another machine quite simply.

The syntax is easy, and I suggest using a Daily approach which will result in seven days’ ability to go back to fix something.  I also strongly urge that you use a network drive either instead of or in addition to your "master" so you have at least duplicate backup drives.  We keep no fewer than five copies, because we are obsessive about data loss :wink:

All the Linux guys will tell you that my practice is risky because it violates MySQL rules.  But it also works perfectly provided the backups occur while there is no write activity to the system.  Since OpenEMR will log you out by default after six hours anyway, it is best to simply logout before you leave a workstation (which is a best practice for data security in any case).

The typical batch file looks like this:

rem  Local Machine
xcopy c:\xampp\mysql\data\openemr\*.* c:\backup\mon\openemr\ /d /e /c /i /f /h /k /y

xcopy c:\xampp\htdocs\openemr\documents\*.* c:\backup\mon\documents\ /d /e /c /i /f /h /k /y

xcopy c:\xampp\htdocs\openemr\edi\*.* c:\backup\mon\edi\ /d /e /c /i /f /h /k /y

xcopy c:\xampp\htdocs\openemr\era\*.* c:\backup\mon\era\ /d /e /c /i /f /h /k /y

and you would replace the c:\backup… with d:\backup… for another network drive, and so forth, and "mon" with "tue" for the tuesday backups, etc…  The "find and replace" function in your editor is brilliant for making this process a snap.   You would make a set like this for each day, and set the scheduler on the "master" machine to run each on its respective day to make the backups.

If you have been working with 3.0.1 on machine "1", you would want an equal install on another machine, which we will call "2", and fully login with the startup password.  You would then copy the directories "documents" and "edi" and "era" from the backup location to machine "2" at c:\xampp\htdocs\openemr  and copy the "openemr" directory to machine "2" at c:\xampp\mysql\data  to complete the "restore" to the "2" machine. (You will accept the overwrites for all).  You should be able to login to that as though it were the "1" machine now.

If you upgrade, you must upgrade each machine identically, and then assure you do not try to restore a ver 301 data set to a 310 machine.  To prevent that, I suggest you rename the "backup" directory(s) you were using as "backup301" as soon as you complete the upgrades, which will effectively create new "backup" directory structure(s) with the next time your backup occurs.  That backup will now be the 310 version data, which will work fine with the 310 installs.

I hope that is clear as mud?  :wink:

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

bradymiller wrote on Tuesday, October 13, 2009:

Joe,

Also add this directory to your backups, then will be complete (this directory holds the custom letters created in the letter generator):

c:\xamp\htdocs\openemr\custom\letter_templates

As predicted and per tradition, I will continue in my attempts to persuade you to use the mysqldump command instead of a straight copy of your openemr mysql database (c:\xampp\mysql\data\openemr). Then no need to ensure users are not using OpenEMR during your backups. But you’ve heard it before, so I will quietly move along :slight_smile:

-brady

ideaman911 wrote on Tuesday, October 13, 2009:

Brady;

I have not yet seen a complete instruction set for the dump as you suggest plus a restore from that dump.  Before I commit to doing things your way, I’d like to know those steps and be able to verify a backup & restore from start to finish.  I will happily writeup a detail as per above once I am certain it works as well as my process, especially in Windows.

Might I suggest you send it to me directly, and I will go from there?  Thanks.

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

tmccormi wrote on Tuesday, October 13, 2009:

The Windows OS compatible backup.php script will be ready to share this week for sure.  It’s in it final testing today.  I’ll actually add …custom\letter_templates to it before I send it along.  Thanks for the pointer

(it uses mysqdump) :slight_smile:

-Tony

bradymiller wrote on Tuesday, October 13, 2009:

Tony,

Very cool. I just issued a bug here in the tracker regarding backup not working in windows. I’ll gladly put this in the next 3.1.0 patch.

-brady