Freeb Install Improved
From OpenEMR Project Wiki
FreeBInstall-Improved contains as much of the configuration info that I have been able to come up with.
I installed MySQL, Apache, PHP, OpenEMR, SQL-Ledger manually. I Followed the FreeB mini-howto.
For SQL-Ledger I installed CPAN, DBI, DBD::Pg:
# perl -MCPAN -e shell cpan> install Bundle::CPAN cpan> install DBI cpan> install DBD::Pg
# perl -MCPAN -e shell cpan> install HTML::HeadParser cpan> install HTML::Template cpan> install Date::Calc cpan> install Frontier::Responder cpan> install HTTP::Daemon cpan> install PDF::Create cpan> exit
I downloaded lcwa-1.0.0 which contains LWP:: UserAgent
tar -zxvf lcwa-1.0.0.tar.gz mv lcwa-1.0.0 /usr/lib/perl5/site_perl/5.8.6/ cd /usr/lib/perl5/site_perl/5.8.6/lcwa-1.0.0/ ./configure make install
I also downloaded Apache-ConfigFile-1.18.tar.gz and installed manually:
tar -zxvf Apache-ConfigFile-1.18.tar.gz mv Apache-ConfigFile-1.18 /usr/lib/perl5/site_perl/5.8.6/ cd /usr/lib/perl5/site_perl/5.8.6/Apache-ConfigFile-1.18 perl Makefile.PL make make install
To get ConfigFile to work I then:
perl -MCPAN -e shell cpan> install ConfigFile cpan> exit
I modified /usr/share/freeb/etc/freeb.conf at line 3 to reflect my true path:
create a public directory where FreeB outoput is stored:
Make it owned by apache and writable by apache.
chown nobody:nobody /usr/share/freeb/public -R
Then start the FreeB server
I copied ws_server.pl to my sql-ledger bin directory sql-ledger/.
cp ~openemr/accounting/ws_server.pl /usr/local/sql-ledger/
I then opened ws_server.pl with a plain text editor and modified the path on line 7 to reflect the true path. In my case that is:
I moved sql-ledger.conf.default to sql-ledger.conf
cp /usr/local/sql-ledger/sql-ledger.conf.default /usr/local/sql-ledger/sql-ledger.conf
I added the following to /usr/local/sql-ledger/sql-ledger.conf:
# Some constants relevant to OpenEMR import. $oemr_username = 'openemr'; # sql-ledger user to post as $oemr_ar_acc = '1200'; # account number for accounts receivable $oemr_cash_acc = '1060'; # account number for checking (copay deposits) # In SQL-Ledger you must create a services item for medical services # before you do any OpenEMR billing. Specify its "part number" here: $oemr_services_partnumber = 'MS'; # This is the number of days added to the OpenEMR transaction date to # produce the invoice due date when there is insurance. This affects the # patient portion of the outstanding balance shown in the OpenEMR patient # summary, and of course SQL-Ledger's aging reports and statements. $oemr_due_days = 40;
I configured openemr/interface/globals.php at lines 142, 143, and 144 for the actual instance of sql-ledger, username and password.
$sl_cash_acc = '1060'; // sql-ledger account number for checking $sl_ar_acc = '1200'; // sql-ledger account number for a/r $sl_income_acc = '4020'; // sql-ledger account number for medical services income $sl_services_id = 'MS'; // sql-ledger parts table id for medical services $sl_dbname = 'demoledger'; // sql-ledger database name $sl_dbuser = 'sql-ledger'; // sql-ledger database login name $sl_dbpass = 'sometrickypassword'; // sql-ledger database login password
I then modified openemr/includes/config.php
$GLOBALS['oer_config']['freeb']['printer_name'] = "HP_LaserJet4L";
change to your default printer
for line 22:
chown nobody:nobody openemr/documents/ -R
Create a Prescription Logo 3 inches wide called prescription_logo.png
Create a signature 3 inches wide called sig.png
Change line 42 from false to true (the SQL-Ledger needs to be installed and PostgreSQL needs to be running) , line 45 needs to be altered to your true path line 46 is the sql-ledger initial user line 47 is the sql-ledger initial user password
$GLOBALS['oer_config']['ws_accounting']['enabled'] = true; $GLOBALS['oer_config']['ws_accounting']['server'] = "localhost"; $GLOBALS['oer_config']['ws_accounting']['port'] = "80"; $GLOBALS['oer_config']['ws_accounting']['url'] = "/sql-ledger/ws_server.pl"; $GLOBALS['oer_config']['ws_accounting']['username'] = "sql-ledgeruser"; $GLOBALS['oer_config']['ws_accounting']['password'] = "sq-ledgerpassword"; $GLOBALS['oer_config']['ws_accounting']['url_path'] = "http://" . $_SERVER["SERVER_NAME"] . "/sql-ledger/login.pl"; $GLOBALS['oer_config']['ws_accounting']['income_acct'] = "10035";
create the following directory and make it writable by the web server:
mkdir var/www/htdocs/openemr/library/freeb chown nobody:nobody var/www/htdocs/openemr/library/freeb -R
ConfigFile.pm will only work with version 1.3
If you are using Debian, you'll need to apt-get php4-cli, this module has its own php.ini, edit it and uncoment the line that reads: # module=myslq.so so it gets mysql support.
Also, bear in mind that in Debian the php.ini file hanging from php4-cli will overwrite some values from the php4/php.ini, remember that when you modify stuff in php.ini and changes are not being reflected. (things such as session timeout)
I restarted PostgreSQL and FreeB_Server.pl because all of the configuration changes.