26-2-2002 GNUMed User's Manual IanHaywood Ian Haywood Gerardo Arnaez Copyright (c) 2001,2002 GNUMed developers Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". 0.1.1 2002-09-01 gea Took into.sgml and modified. Adding a section of thigs noted while trying to get GnuMed up and running Forward This is the Forward to be written by someone else. Introduction GNUMed is a comprehensive scalable software solution for paperless medical practice with emphasis on privacy protection, secure patient-centric record sharing, decision support and ease of use. GNUMed is not yet ready for download as a package. It will become available at gnumed.org. It is released under the GNU General Public Licence, see the file LICENCE for details. The latest sources are available by CVS at savannah.gnu.org. If CVS asks for a password, use a blank line. The module name is gnumed Linux Installation GNUMed has run successfully on Linux. It requires a number of packages to be installed before it can be run. GNUMed requires the following packages: Requirements Package URL Version Python Scripting Language python.org 2.1 GTK libraries gtk.org 1.2 mx extension libraries mx mx PostgreSQL Database server postgresql.org Don't forget to include the Python interface libraries. 7.0 wxWindows windowing library wxwindows web site, wxpython (wxWindows for Python bindings) 2.3.1 (both must be the same)
This list looks daunting, but Python and GTK libraries are almost invariably installed, and PostgreSQL, if not installed, will be on your Linux CDs somewhere. Note that the packages should be installed in the listed order, as some depend upon others. Also, if using RPM, you must install the libraries (postgresql-lib), then the main package (postgresql), then the others, including postgresql-python. On some distros, some of the Python libraries get installed in funny places. So Python can find them, add this line to your .profile: export PYTHONPATH=/usr/lib/python1.5/site-packages:/usr/local/lib/python2.1/site-packages NOTE: on some the later distros (Mandrake is where I have seen this), wxGTK does not install as it requires a version of libpng older than what's installed. This old library is vanishing off the web. Here is a mirror Configuring PostgreSQL (quoting Steven Duffy) Some steps are required to get the PostgreSQL database system running. First, make sure you have the PostgreSQL server daemon running. Check under /etc/rc.d/, or run Linuxconf. If isn't you can set it up with these commands as root: su - postgres initdb -D ~postgres/data postmaster -D ~postgres/data >logfile 2>&1 & One minor issue has been overlooked so far, this is TCP/IP access to the database. In order to do this: find and open /etc/postgresql/postgresql.conf change tcpip_socket = false to tcpip_socket = on save changes and restart PostgreSQL This can also be accomplished by passing the -i option to the postmaster upon execution. If your distribution uses as postgresql script to start the server, it is likely the pg_ctl is used to run postmaster. In this case, find where pg_ctl is executed and add insert -o \"-i\" as one of the options to pg_ctl. Otherwise, find the script from which postmaster is executed and simply add -i as an argument. Once PostgreSQL is set up, go to the section on setting up the database (.) Mac This has been done, more information is needed. Windows GNUMed requires the following packages. Each link points to a .EXE file. Download them and run each in turn. Requirements Package URL Version Python Scripting Language python.org 2.1 wxWindows windowing library wxWindows for Python bindings 2.3.2 mx extension libraries mx 2.0.3 PyGresQL -- Python libraries for SQL PyGresQL3.2 CYGWIN UNIX emulator cygwin.com 2.1 IPC for Cygwin CygIPC (this is not an .EXE file. Save it to C:\CYGWIN) 1.11
Download these packages. For cygwin, make sure you select the package PostgreSQL in the Databases category. Installing PostgreSQL Double-click on the Cygwin icon on your desktop. The UNIX command prompt appears. Take a deep breath, and type: cd / tar xvjf /cygipc-1.11-1.bz2 /usr/local/bin/ipc-daemon & mkdir /usr/share/postgresql/data /usr/bin/initdb -D / /usr/bin/postmaster -D /usr/share/postgresql/data & Postgres should now be running. DO NOT close the window containing these commands. Every time to want to run PostgreSQL again, open up Cygwin as before and type: /usr/local/bin/ipc-daemon & /usr/bin/postmaster -D /usr/share/postgresql/data & Once PostgreSQL is set up, go to the section on setting up the database (.) Running PostgreSQL as an NT service On Windows NT, 2000 or XP it is possible to run PostgreSQL as a background process (similar to a UNIX daemon). Go to Control Panel: "Users", and create a new user for your system, called "postgres". Give the user privileges to run as a service. At the Cygwin prompt, type: ipc-daemon --install-as-service Then,as a single line: cygrunsrv --install postmaster --path /usr/bin/postmaster --args "-D /usr/share/postgresql/data -i" --dep ipc-daemon --termsig INT --user postgres --shutdown Then mkdir /usr/share/postgresql/data chown postgres /usr/share/postgresql/data If this directory (/usr/share/postgresql/data) already exists from your previous efforts, delete it with "rm -R /usr/share/postgresql/data", and repeat. Reboot the computer. Now log in as the "postgres" user, load Cygwin again and type: initdb -D /usr/share/postgresql/data The database will now run whenever Windows is loaded. You must be user "postgres" to use the database on this computer. Once PostgreSQL is set up, go to the section on setting up the database (.) Running the client Once you have done this, you can run GNUMed from the Python interpreter. Click on the Python icon and type: >>> import sys >>> sys.path.append ('path-to-gnumed-files') >>> import gnumed >>> gnumed.main ()
Setting up <application>PostgreSQL</application> Quoting Steven Duffy in the gnumed.org website Now that PostgreSQL is installed and working, the server scripts from the CVS repository can be executed. These scripts all end in .sql are intended to be executed from within psql. The one required script is gmconfiguration.sql. To set it up, do the following from the gnumed/gnumed/server/sql directory: # createdb gnumed # psql gnumed gnumed=> \i gmconfiguration.sql gnumed=> \i gmidentity.sql gnumed=> \i gmgis.sql Then enter the country.specific directory, then the directory for your country's code, and then install the .sql file there too. The only such directory at the moment is au, the only working databases is postcodes.au.sql FIXME: presumably some shell script to create all the databases and feed in the ER scripts? Getting GnuMed to run These are collected notes from trying to get Gnumed up and running. GNUMED_DIR