added appointments-encounters report
[openemr.git] / INSTALL
blobb1ac4aa1a4e9b443994dfffc40a0f9b968f92b06
1 Installation Instructions
2 -------------------------------------
4 OSI Certified Open Source Software
6 -------------------------------------
8 I...................Overview of files
9 II..................Unpacking
10 III.................Setup
11 IV..................Upgrading
12 V...................Version History
14 -------------------------------------
16 I. Overview of Files
18 interface       - Contains User Interface scripts and configuration
19 library   - Contains backend library scripts
20 old       - Contains deprecated code and documentation
21 sql       - Contains initial database images
23 II. Unpacking
25 The OpenEMR release archive should be named as follows:
27 openemr-<version>.tar.gz  -or-  openemr-<version>.zip
29 To extract the archive, use either of the following commands from the command line:
31 bash# tar -pxvzf openemr-<version>-release.tar.gz
32 bash# unzip openemr-<version>-release.tar.gz
34 Be sure to use the -p flag when using tar, as certain permissions must be preserved.
36 OpenEMR will be extracted into a directory named openemr.
38 III. Setup
40 To run OpenEMR, MySQL and Apache or another PHP-capable webserver must be configured.
41 To download Apache, visit www.apache.org
42 For information on how to install MySQL, visit www.mysql.com
43 PHP may be downloaded from www.php.net
45 OpenEMR requires a number of webserver and PHP features which may not be
46 enabled on your system.  These include:
48 - PHP Index support (ensure that index.php is in your Index path in httpd.conf)
49 - Session variables
50 - PHP libcurl support (optional for operation, mandatory for billing
52 Copy the OpenEMR folder into the root folder of the webserver. On Mandrake
53 Linux, for example, use the command:
55   bash# mv openemr /var/www/html/
57 Make sure the webserver is running, and point a web-browser to setup.php located
58 within the openemr web folder.  If you installed OpenEMR in the root web
59 directory, the URL would read: http://localhost/openemr/setup.php.
60 The setup script will step you through the configuration of the database.
62 In step 1, you need to tell setup whether it needs to create the databases on
63 its own, or if they you have already created them.  MySQL root priveleges will
64 be required to create a database.
66 In step 2, you will be presented with a number of fields which specify the MySQL
67 server details.
69 The "Server Host" field is the hostname of the MySQL server.  If you use the
70 mysql command line client, this is the string you would type after the -h flag.
71 If this is on the same machine as the webserver, leave this as "localhost".
73 The "Server Port" field specifies the port to use when connecting to the MySQL
74 server over TCP/IP.  This should be left as 3306 unless you changed it in your
75 MySQL configuration.
77 The "Database Name" field is the database where OpenEMR will reside.  If you
78 selected to have the database created for you, this database will be created,
79 along with the user specified in "Login Name".  If this database exists, setup
80 will not be able to create it, and will return an error.  If you selected that
81 you have already created the database, then setup will use the information you
82 provide to connect to the MySQL server.  Note that setup will not accept a
83 password that is not at least one (1) character in length.
85 The "User Hostname" field accompanies the Login Name field.  It is the hostname
86 from which the user is permitted to connect to the database.  This will only
87 appear if setup is creating the database.
89 The "Root Pass" field will likewise only appear when setup is creating the
90 database.  It is the password of your existing root user, and is used to acquire
91 the privileges to create the new database and user.  The rest of the fields are
92 specific to your practice.
94 The "Initial User" is the username of the first user, which is what they will
95 use to login.  Their default password will always be "pass", without the quotes.
96 The "Initial User's Name" is the value to be used as their last name.  This
97 information may be changed in the user administration page.
99 The "Initial Group" is the first group that will be created.  A user may belong
100 to multiple groups, which again, can be altered on the user administration page.
101 It is suggested that no more than one group per office be used.
103 Step 3 is where setup will install the database and connect to it to create the
104 initial tables.  If no errors occur, you will see a "Continue" button at the
105 bottom.  Before clicking this, you need to ensure that the webserver user
106 (often "nobody", "apache", or "www-data") has write privileges on the
107 library/sqlconf.php file.  The command "chmod a+w library/sqlconf.php" will
108 grant global write permissions to the file.  Be sure to set them back to
109 something more secure (such as chmod 644) before actively using OpenEMR.
111 Should anything fail during step 3, you may have to remove the existing database
112 or tables before you can try again.
114 Step 4 is very much like step 3, except the only thing taking place is the
115 writing of SQL configuration to disk.  Should it fail due to permissions or any
116 other reason, you may click the reload button to try again.
118 Once setup is completed, one last thing must be done before OpenEMR can be used.
119 The file openemr/interface/globals.php must be edited by hand to reflect the
120 path and address of your webserver. The values for $webserver_root and $web_root
121 must be set accordingly. Also, to change the appearance of OpenEMR, uncomment or
122 comment theme-description lines at the bottom of config.php.
124 Once the system has been configured properly, you may login.  Connect to the
125 webserver where the files are stored with your web browser.  Login to the system
126 using the username that you picked (default 'admin' without quotes), and the
127 password 'pass', without the quotes.  From there, select the "Administration"
128 option, and customize the system to your needs.  Add users and groups as is
129 needed. For information on using OpenEMR, consult the User Documentation located
130 in the Documentation folder.
132 To create custom encounter forms, see the files
134   openemr/Documentation/3rd Party Form API.txt
135   openemr/interface/forms/OpenEMR_form_example-rev2.tar.gz
137 and read the included documentation. A few forms are provided initially as
138 examples.
140 Other configuration settings are stored under includes/config.php.
141 Everything should work out of the installation without touching those, but if 
142 you want fax, sql-ledger, and/or Freeb integration you will need to adjust some
143 parameters in that file.
145 IV. Setting Up Access Control
147 As of this writing the option of adding phpGACL to your OpenEMR installation is
148 a work in progress.  You can choose to do nothing about this, in which case
149 OpenEMR's traditional and very limited access controls will be used, or you can
150 choose to install phpGACL (see http://phpgacl.sourceforge.net/), in which case
151 you should read the phpGACL manual and the comments in library/acl.inc and also
152 modify that file to point to your phpGACL installation directory.  Note that
153 "AXOs" are not used here.
155 It is reasonable to first get a basic OpenEMR installation working and then add
156 these extended access controls later.
158 V. Upgrading
160 Upgrading OpenEMR is currently done by replacing the old openemr directory with
161 a newer version. Before replacing the old openemr directory, copy the following
162 two files out, and replace them into the new openemr folder afterwards:
164   openemr/interface/globals.php
165   openemr/library/sqlconf.php
166   openemr/library/sql-ledger.inc
167   openemr/includes/config.php (if you have modified it)
169 But before replacing them, compare the old and new files in case there are
170 new parameters that need to be included.  If there are other files that you
171 have customized, then you will also need to treat those carefully.
173 When upgrading, check the directory openemr/sql/ for files named *upgrade.sql
174 Those files have sql statements to modify tables in your database so they will 
175 match the layout of the current version.
176 Be sure to backup the content of your database before doing so.