In order to understand the initial wizard configuration, one must have some understanding of how FreeMED works.
The main configuration file for FreeMED is settings.php, which is found in the /lib directory. This usually turns out to be /usr/share/freemed/lib/settings.php
There are main settings here that will determine how your installation of FreeMED will act. There are several that I will point out here but all of them will soon be documented under ?FreemedSettingsPhp.
First is DB_HOST!
This is value represents where on the network, FreeMED expects to find its database. For very large installations (In excess of 50 doctors) it might be wise to seperate the FreeMED database and the FreeMED application to two seperate computers. In this case you would replace "localhost" with the IP address or domain name of the computer that hosted the FreeMED database. 95% of the time, a single computer is powerful enough to both run the database and the application for FreeMED. "localhost" is actually a domain name that maps to the local computer. The IP address that maps to the local computer is 127.0.0.1. (For jollies try the command "ping localhost" from the command line and you will see that this is true). Anywho, using localhost as the value for DB_HOST just means that the database is on the same computer as FreeMED.
Second is DB_NAME
In order for FreeMED to function, you must have created a database for it to use. This variable tells FreeMED what database that is! You can easily run several copies of a freemed database on a single computer, in which case you can also run several copies of freemed! For now it is enough to know that when you create the database for freemed, you must put the name you used here. The default is freemed and there is usually no reason not to use that default. In which case the command to create the database is
Next is DB_USER
This is the user that you will use for FreeMED. The default is root, but if you have any other database on your system besides freemed, you should probably use a different user name, with more limited rights. Look in the mysql documentation for more info. http://www.mysql.com If you do not have any other databases on your system, that officially makes the database for FreeMED the most important one!! In this case just use root... it is easier
Now we come to DB_PASSWORD
This is the only default that you should ABSOLUTLY change. You can read more about this under InstallationOfFreemed I will leave it alone here.
Now I am going to skip a few variables and continue to document the important variables!!
Now we talk about ALWAYS_SELFTEST
This variable bears some extra explination. FreeMED has the ability to check that the system is healthy, but this process does take time. So setting this to true, your system will run a little slower, but you can be confident that every time you login to FreeMED there are no massive problems with the system. Before you mail questions, try setting this to true and see what happens!!! You will find that FreeMED itself will give you very intelligent guesses about what problems you are having and what you can do about it!!
Now lets talk about INIT_ADDR
Before we go on, we must talk about the distinction between the database user and the admin user for FreeMED. FreeMEDs user system is ENTIRELY INDEPENDANT of the database user system, in anything later than the .6 version. The "admin" user is the all-powerful user on the FreeMED system. This user can create and sadly destroy almost anything about the FreeMED system. An unauthorized user having access to this account is a very bad thing (Not to mention illegal under HIPPA). To prevent this from ever happening there are two security measures that are always in place, and there is a third recommended measure.
First, in order to create the admin account initially, you must have the database password that you configured in the settings.php file. This proves that you have command line access to the FreeMED system, and have the right to be trusted. This is the reason that the init_wizard (which runs only the first time FreeMED is used) asks you for this information.
The second measure is the INIT_ADDR. This is the only address from which the init_wizard can be used. The default configuration is set to 127.0.0.1 which is the same as "localhost", or essentially the same computer that FreeMED is using. This means that no one else on your network or one the Internet can take control of the FreeMED installation before you do. (Unless they have remote root access to your machine in which case, frankly, this is the least of your security problems)
The last security measure that should be in place is to use the HTTPS to run FreeMED. This means that all traffic going to and from FreeMED is encrypted. In fact, when the security rule of HIPPA comes into effect, it will be illegal to run FreeMED in any other way!! Take a look at the documentation on your webserver for instructions on how to do this... (We will have instructions here soon)
The last thing I want to talk to you is about some of the logging features of FreeMED. Most notably its ability to log MD5 sums. FreeMED logs to the local syslog system. You can easily view any recent FreeMED log event by typing the following command as root.
This will cause all of the freemed generated log events to pour accross your screen. By default FreeMED logs everything that HIPPA requires it to. Which is ALOT!! Essentially any data that a user views is recorded in the logs, using the logs it is possible to reconstruct everything that a user has ever seen or done.
If you would like to view only those events that have happend most recently, use the command...
This command will display any freemed related logs in the last 100 lines of the log file.
Note: Some people might want to seperate freemed logs from all of there other system messages. To do this, consider using syslog-ng... which can do this kind of cools stuff plud much more.
Now I am ready to talk about LOG_MD5ATTEMPTS
This should NEVER and I mean NEVER be left on in a production system. But this can be very useful for troubleshooting access! By turing this on, FreeMED will log the MD5 hash of a password. If you dont understand what that means I suggest you read all about password hashes here...
http://hotwired.lycos.com/webmonkey/00/20/index4a.html
Sufficed to say the FreeMED user database does not actually track user passwords, rather it tracks the hashes of those passwords. Thus you cannot really ever check to see if you are entering a password correctly, but you can verify that the MD5 sum of the password your are typing does or does not match the MD5 password of the value in the database.
In order to perform this trouble shooting, you need to perform the following process...
from the command line type
This will create a text file version of your FreeMED database (note that HIPAA regulations apply to this file!!)
will allow you to edit the file, if you do not like using vi you can use some other editor, look for documentation on vi here...
http://www.eng.hawaii.edu/Tutor/vi.html
You need to search for the user table. This table contains the MD5 values of each password for ever user.
Then compare these values with those that are being generated by your system. This will tell you when there is a password-sync problem. If an honest user is re-typing the same bad password over and over again, you as the admin can just fix the problem!!!