Mailinglist Archive: opensuse-medical (18 mails)

< Previous Next >
Re: [opensuse-medical] Announcement: Packagin openEMR
  • From: "Sascha 'saigkill' Manns" <samannsml@xxxxxxxxxxxxx>
  • Date: Fri, 30 Oct 2009 17:49:57 +0100
  • Message-id: <200910301749.58080@xxxxxxxxxxxxxxxxxxx>
Am Freitag 30 Oktober 2009 17:08:39 wrote Jay Woods:
I'd like to learn how it is done and specifically for openEMR 3.1.0.
I've added the Spec and my README.SUSE.

openEMR is an Package without Standalone Sourcecode, but with php. So
i've first tested the added Spec. In the Spec i move the Folder to
/var/www/html/openerm.
Normally i close the Packaging. Now the User have to go to
http://localhost/openemr/setup.php and create the FIles.

But i try it out on my local Machine. Maybe i add more...

--
Sincerely yours

Sascha Manns
openSUSE Member
openSUSE Ambassador
openSUSE Marketing Team
openSUSE Build Service
Web: http://saschamanns.gulli.to
Blog: http://saigkill.wordpress.com
ClaimID: http://claimid.com/saigkill
# Copyright (c) 2008 openSUSE-Build-Service
#
# Packaged by: <saigkill@xxxxxxxxxxxx>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# # norootforbuild


Name: openemr
BuildRequires: apache mysql php
BuildRequires: fdupes
Version: 3.1.0
Release: 1
License: GPL v3 or later
Provides: %{name} = %{version}-%{release}
Obsoletes: %{name} < %{version}-%{release}
Source0: %{name}-%{version}.tar.gz
Source1: README.SUSE
Group: Productivity/Office/Management
Summary: Practice Management, Electronic Medical Record
Url: http://sourceforge.net/projects/openemr/
AutoReqProv: on
BuildRoot: %{_tmppath}/%{name}-%{version}-build

%description
Open Source Practice Management, Electronic Medical Record, Prescription
Writing and Medical Billing application.


%prep
%setup -q -n %{name}-%{version}

%build

%install

install -m644 %{SOURCE1} README.SUSE
install -d %buildroot/var/www/html/openemr
mv * %buildroot/var/www/html/openemr
%fdupes -s %{buildroot}

%clean
%__rm -rf %buildroot

%files
%defattr(-,root,root)
%doc README.SUSE

%changelog
##################################################################
# README.SuSE for openEMR #
# Packaged by: saigkill@xxxxxxxxxxxx Date: 30.10.2009 #
##################################################################

Introduce:
Sadly i can't make an ready Package for you, because you must Setup the Program
into your Apache Server. I've copied openEMR into /var/www/html/openemr.
Please check if Apache is running, if yes you can start the Setup through this
URL:

http://localhost/openemr/setup.php

The setup script will step you through the configuration of the OpenEMR.

The first screen of the setup script will ensure that the webserver user
(in linux, often is "apache", "www-data", or "nobody") has write privileges on
certain files and directories. The files include openemr/interface/globals.php
and
openemr/library/sqlconf.php. In linux, these can be set by "chmod a+w filename"
command to grant global write permissions to the file, The directories include
openemr/gacl/admin/templates_c, openemr/edi, openemr/era, openemr/documents,
openemr/library/freeb, openemr/custom/letter_templates,
openemr/interface/main/calendar/modules/PostCalendar/pntemplates/compiled, and
openemr/interface/main/calendar/modules/PostCalendar/pntemplates/cache. In
linux, if the webserver user name is "apache", then the command
"chown -R apache:apache directory_name" will grant global write permissions
to the directories, and we recommend making these changes permanent.
Should the page display errors related to file or directory writing priviledges
you
may click the 'Check Again' button to try again (after fixing permissions).

In step 1, you need to tell setup whether it needs to create the database on
its own, or if you have already created the database. MySQL root priveleges
will
be required to create a database.

In step 2, you will be presented with a number of fields which specify the MySQL
server details and the openemr directory paths.

The "Server Host" field specifies the location of the MySQL server. If you
run MySQL and Apache/PHP on the same server, then leave this as 'localhost'.
If MySQL and Apache/PHP are on separate servers, then enter the IP address
(or host name) of the server running MySQL.

The "Server Port" field specifies the port to use when connecting to the MySQL
server over TCP/IP. This should be left as 3306 unless you changed it in your
MySQL configuration.

The "Database Name" field is the database where OpenEMR will reside. If you
selected to have the database created for you, this database will be created,
along with the user specified in "Login Name". If this database exists, setup
will not be able to create it, and will return an error. If you selected that
you have already created the database, then setup will use the information you
provide to connect to the MySQL server. Note that setup will not accept a
password that is not at least one (1) character in length.

The "Login Name" field is the MySQL user that will access the OpenEMR database.
If you selected to have the database created for you, this user will be
created. If you selected that you have already created the database,
then setup will use the information you provide to connect to the MySQL server.

The "Password" field is the password of the user entered into the above
"Login Name" field. If you selected to have the database created for you,
this user and password will be created. If you selected that you have already
created the database, then setup will use the information you provide to connect
to the MySQL server.

The "Name for Root Account" field will only appear if setup is creating the
database. It is the name of the MySQL root account. For localhost, it is
usually ok to leave it 'root'.

The "Root Pass" field will likewise only appear if setup is creating the
database. It is the password of your existing root user, and is used to acquire
the privileges to create the new database and user.

The "User Hostname" field will also only appear if setup is creating the
database. It is the hostname of the Apache/PHP server from which the user
("Login Name") is permitted to connect to the MySQL database. If you are
setting
up MySQL and Apache/PHP on the same computer, then you can use 'localhost'.

The "UTF-8 Collation" field is the collation setting for mysql. If the language
you are planning to use in OpenEMR is in the menu, then you can select it.
Otherwise, just select 'General'. Choosing 'None' is not recommended and
will force latin1 encoding.

The "Initial User" is the username of the first user, which is what they will
use to login. Limit this to one word only. Their default password will
always be "pass", without the quotes.

The "Initial User's Name" is the value to be used as their last name. This
information may be changed in the user administration page.

The "Initial Group" is the first group, basically name of the practice, that
will be created. A user may belong to multiple groups, which again, can be
altered on the user administration page. It is suggested that no more than
one group per office be used.

The "Absolute Path" is the full absolute directory path to openemr. The
default value is automatically created, so this should not need to be
modified. Note that it needs to end without a trailing slash. To avoid
confusion, either forward or backward slashes can be used.

The "Relative HTML Path" is the relative html path to openemr, ie. what you
would type into the web browser after the server address to get to OpenEMR.
For example, if you type "http://127.0.0.1/clinic/openemr/"; to load OpenEMR,
set this to "/clinic/openemr" without the trailing slash. To avoid
confusion, either forward or backward slashes can be used.

Step 3 is where setup will configure OpenEMR. It will first create the database
and connect to it to create the initial tables. It will then write the mysql
database configuration to a file. It will then write the webserver root
directory to the /openemr/interface/globals.php file. Should anything fail
during step 3, you may have to remove the existing database or tables before
you can try again. If no errors occur, you will see a "Continue" button at the
bottom.

Step 4 will install and configure the embedded phpGACL access controls. It
will first write configuration settings to files. It will then configure the
database. It will then give the "Initial User" administrator access.
Should anything fail during step 4, you may have to remove the existing database
or tables before you can try again. If no errors occur, you will see a
"Continue" button at the bottom.

Step 5 gives instructions on configuring the PHP. We suggest you print these
instructions for future reference. Instructions are given to edit the php.ini
configuration file. If possible, the location of your php.ini file
will be displayed in green. If your php.ini file location is not displayed,
then you will need to search for it. The location of the php.ini file is
dependent
on the operating system. In linux, php.ini is generally found in the /etc/
directory. In windows, the XAMPP 1.7.0 package places the php.ini file in
the xampp\apache\bin\ directory. To ensure proper functioning of OpenEMR
you must make sure that settings in the php.ini file include
"short_open_tag = On", "display_errors = Off", "register_globals = Off",
"magic_quotes_gpc = On", "max_execution_time" set to at least 60,
"max_input_time" set to at least 90 , and "memory_limit" set to at least
"128M". In order to take full advantage of the patient documents capability
you must make sure that settings in php.ini file include "file_uploads = On",
that "upload_max_filesize" is appropriate for your use and that
"upload_tmp_dir" is set to a correct value that will work on your system.

Step 6 gives instructions on configuring the Apache web server. We suggest
you print these instructions for future reference. Instructions are given to
secure the "openemrwebroot/documents", "openemrwebroot/edi" and
"openemrwebroot/era" directories, which contain patient information. This can
be done be either placing pertinent .htaccess fiels in these directories
or by editing the apache configuration file. The location of the apache
configuration file is dependent on the operating system. In linux, you can
type 'httpd -V' on the commandline; the location to the configuration file
will be the HTTPD_ROOT variable plus the SERVER_CONFIG_FILE variable.
In windows, the XAMPP 1.7.0 package places the configuration file at
xampp\apache\conf\httpd.conf. To secure the /documents, /edi and /era
directories you can paste following to the end of the apache configuration
file (ensure you put full path to directories):
<Directory "openemrwebroot/documents">
order deny,allow
Deny from all
</Directory>
<Directory "openemrwebroot/edi">
order deny,allow
Deny from all
</Directory>
<Directory "openemrwebroot/era">
order deny,allow
Deny from all
</Directory>

The final screen includes some additional instructions and important
information. We suggest you print these instructions for future reference.

Once the system has been configured properly, you may login. Connect to the
webserver where the files are stored with your web browser. Login to the system
using the username that you picked (default 'admin' without quotes), and the
password 'pass', without the quotes. From there, select the "Administration"
option, and customize the system to your needs. Add users and groups as is
needed. For information on using OpenEMR, consult the User Documentation located
in the Documentation folder, the wiki at http://www.oemr.org, and the forums
at http://sourceforge.net/projects/openemr.

Reading openemr/includes/config.php and openemr/interface/globals.php is a
good idea. These files contain many options to choose from including themes.

To create custom encounter forms, see the files

openemr/Documentation/3rd Party Form API.txt
openemr/interface/forms/OpenEMR_form_example-rev2.tar.gz

and read the included documentation. Many forms exist in contrib/forms as well
as in interface/forms and may be used as examples.

Other configuration settings are stored under includes/config.php.
Everything should work out of the installation without touching those, but if
you want fax, sql-ledger, and/or Freeb integration you will need to adjust some
parameters in that file.

General-purpose fax support requires customization of interface/globals.php
and custom/faxcover.txt; it also requires the following utilities:

* faxstat and sendfax from the HylaFAX client package
* mogrify from the ImageMagick package
* tiff2pdf, tiffcp and tiffsplit from the libtiff-tools package
* enscript


IV. Setting Up Access Control

Since OpenEMR version 2.9.0.3, phpGACL access controls are installed and
configured automatically during OpenEMR setup. It can be administered
within OpenEMR in the admin->acl menu. This is very powerful
access control software. To learn more about phpGACL
(see http://phpgacl.sourceforge.net/), recommend reading the phpGACL manual,
the /openemr/Documentation/README.phpgacl file, and the online wiki at
www.oemr.org. Also recommend reading the comments in /openemr/library/acl.inc.

V. Upgrading

Be sure to back up your OpenEMR installation and database before upgrading!

Upgrading OpenEMR is currently done by replacing the old openemr directory with
a newer version. Copy the following file from the old version to the new
version:

openemr/library/sqlconf.php

Ensure you copy your settings from the following old openemr
files to the new configuration files (we do not recommend simply
copying the entire files):

openemr/interface/globals.php
openemr/includes/config.php (if you have modified it)

The following directories should be copied from the old version to the
new version:

openemr\documents
openemr\era
openemr\edi
openemr\custom\letter_templates

If there are other files that you have customized, then you will also need
to treat those carefully.

To upgrade the database, run the sql_upgrade.php script from your web
browser (for example http://openemr.location/sql_upgrade.php). It will
prompt you to select the old release number, and will display the SQL
commands issued as the upgrade occurs.

Next, if you are converting from SQL-Ledger to OpenEMR's internal A/R
management (normally you should), run the sl_convert.php script
(e.g. http://openemr.location/sl_convert.php). Note this script may
run for several minutes or longer.

If phpGACL is installed (automatically installed since OpenEMR version 2.9.0.3),
then you should upgrade your Access Controls by running the acl_upgrade.php
program using your web browser (e.g. http://openemr.location/acl_upgrade.php).
< Previous Next >