Tuesday, November 26, 2013

Howto - Upgrade PostgreSQL 8.4 to PostgreSQL 9.3 for GNUmed

Here it is

0.) do a full backup. Save it on some other media then your harddisk ! Do it,
now.

1.) Install PG 9.3 ( I tried with 32bit but should not matter).
- http://get.enterprisedb.com/postgresql/postgresql-9.3.1-1-windows.exe

2.) Run the installer and select (English_UnitedStates) for locale (others
might work as well). Make sure it installs itself on port 5433 (or other but
never ! 5432).

3.) Make sure both PG 8.4 and PG 9.3 are running (e.g. via pgadmin3 from PG
9.3)

4.) open a command shell (dos box) - "run as" administrator (!) in Win7

5.) type : RUNAS /USER:postgres "CMD.EXE"
- this will open another black box (command shell) for user postgres
- for the password use 'postgrespassword' (default)

6.) type: SET PATH=%PATH%;C:\Programme\PostgreSQL\9.3\bin;
- instead of Programme it might be Program Files on your computer

7.) type: cd c:\windows\temp
- changes directory to a writable temporary directory

8.) type: pg_dump -p 5432 -Fc -f gnumedv18.backup gnumed_v18

9.) type: pg_dumpall -p 5432 --globals-only > globals.sql

Important : Protect your PG 8.4 by shutting it down temporarly

10.) type in the first command shell : net stop postgresql-8.4
- check that is says : successfully stopped

11.) psql -p 5433 -f globals.sql
- this will restore roles in the new database (PG 9.3 on port 5433)

12.) pg_restore -p 5433 --dbname postgres --create gnumedv18.backup
- this will restore the database v18 into the PG 9.3 on port 5433

Congratulations. You are done. Now to check some things.

########################################
Here you could run the fingerprint script on both databases to check for an
identical hash

https://gitorious.org/gnumed/gnumed/source/f4c52e7b2b874a65def2ee1b37d8ee3fb3566ceb:gnumed/gnumed/server/gm-fingerprint_db.py

########################################

13.) Open gnumed.conf in c:\programme\gnumed-client\
For the profile GNUmed database on this machine ("TCP/IP": Windows/Linux/Mac)]
change port=5432 to 5433.

14. Run the GNUmed client and check that it is working. If it works (no wrong
schema hash detected) you should see all your patient and data.

15. If you have managed to see you patients and everything is there close
GNUmed client 1.3.x.

16.) in the first command shell type: net stop postgresql-9.3

17.) Go to c:\Ptogramme\PostgresPlus\8.4SS\data and open postgresql.conf. Find
port = 5432 and change it to port = 5433

18.) Go to c:\Programme\Postgresql\9.3\data and open postgresql. Find port =
5433 and change it to 5432. This effectively switches ports for PG 8.4 and 9.3
so PG 9.3 runs on the default port 5432.

19.)  Open gnumed.conf in c:\programme\gnumed-client\
For the profile GNUmed database on this machine ("TCP/IP": Windows/Linux/Mac)]
change port=5433 to 5432.

20.) Restart PG 9.3 with: net start postgresql-9.3.

21.) Open the GNUmed client and connect (to PG 9.3 on port 5432).

22.) Leave PG 8.4 in a shutdown state.

So far we have transferred database v18 from PG 8.4 to 9.3. No data from PG
8.4 is touched/lost.

23.) Now you are free to install gnumed-server v19 and gnumed -client 1.4.
Having installed gnumed-server v19 select 'database upgrade' (not boostrap
database) and it will upgrade your v18 database to a v19 database.

In case you experience problems you can always shut down PG 9.3, switch ports again, install client 1.3.x, start PG 8.4 (net start postgresql-8.4) and work with your old setup.

Wednesday, November 13, 2013

GNUmed 1.4.0 - PostgreSQL upgrade to 9.1

The release notes prominently tell us that GNUmed 1.4.x requires at least PostgreSQL 9.1.

If you are running the Windows packages and have let GNUmed install PostgreSQL for you you are good to go since it comes with PostgreSQL 9.2 already.

If you are on Ubuntu or Debian Chances are your system still has PostgreSQL 8.x installed.

First check if you run any software that requires you to continue using PostgreSQL 8.x. If so you can install PG 9.1 side by side with it. If not let PG 9.1 replace PG 8.x

It usually works like this.

sudo apt-get install postgresql-9.1
sudo pg_upgradecluster 8.4 main

Then if you don't need PG 8.4 anymore you could

sudo pg_dropcluster --stop 8.4 main
sudo apt-get purge postgresql-8.4

Have fun.

Sunday, November 10, 2013

GNUmed 1.4.0 released

Hello all,

I am glad to be able to announce the immediate availability
of the GNUmed 1.4.0 Feature Release.


************************************************
 There are two important things to consider
 before upgrading !

 1) GNUmed 1.4/19.0 REQUIRES PostgreSQL 9.1

 2) Before starting the new client for the first
    time it is VERY advisable to set up an
    organization and a unit thereof to be your
    praxis and praxis location.

************************************************


It brings about the following new features:


        1.4.0

        NEW: generic search in lists
        NEW: nested placeholders
        NEW: placeholder $$
        NEW: list sorting by column header click [thanks J.Luszawski]
        NEW: "Grünes Rezept" for Germany
        NEW: manage your praxis with its branches
        NEW: auto-hint "GVK-GU überfällig"
        NEW: placeholder $$
        NEW: placeholder $$
        NEW: placeholder $$
        NEW: dialog for post-processing template-generated documents
        NEW: meta test type editing
        NEW: management of billables
        NEW: turn patient report results into waiting list entries
        NEW: show relevant measurements in current substances list
        NEW: AUDIT alcohol disorder screening
        NEW: print/export of EMR timeline
        NEW: ATRIA OAC bleeding risk score
        NEW: export of individual document parts
        NEW: EMR tree: support showing revisions
        NEW: manual deletion of encounters

        IMPROVED: hook nesting/cycling detection
        IMPROVED: document in chart mailing of document parts
        IMPROVED: just set DB lang at startup if missing, do not ask
        IMPROVED: substance intake EA: PRW_aim context dependant on substance
        IMPROVED: encounter EA: improved display of patient context
        IMPROVED: new patient EA: warn on existing external ID
        IMPROVED: new patient EA: warn on existing name + DOB
        IMPROVED: substance PRW: prefer previously used as suggestions
        IMPROVED: report failing auto-hints to the user
        IMPROVED: make  be category "admin" so they do not 
delete to soapU
        IMPROVED: measurements workflow adjustments [thanks Jim and Rogerio]
        IMPROVED: enable generic lists" extra buttons to operate on 
multi-selections
        IMPROVED: access level role names
        IMPROVED: check MD5 sum of newly inserted document objects for extra 
paranoia
        IMPROVED: current medication list template
        IMPROVED: backup/restore automatically applies DB settings adjustments
        IMPROVED: default episode "administrative" rather than "administration"
        IMPROVED: EMR tree: listing/editing switch button label
        IMPROVED: EMR tree: show journal for unassociated episodes pool
        IMPROVED: EMR tree: keep expansion state across node edits
        IMPROVED: current_meds_tables/*_notes placeholder can now span pages
        IMPROVED: waiting list [thanks Jerzy]
        IMPROVED: streamlined form templates management
        IMPROVED: display of long-text test results
        IMPROVED: improved SOAP selection list
        IMPROVED: more clinically relevant display of substance intake start
        IMPROVED: test results plotting: deal with "N" pseudo-numeric 
values
        IMPROVED: patient search now supports "LASTNAME, NICKNAME"
        IMPROVED: document tree: keep expansion state across node edits

        19.0

        Requires PostgreSQL 9.1 !

        FIX: disable faulty clin-encounter.sql in v4 -> v5

        NEW: view changes for Jerzy's plugins
        NEW: support data checksums with PG 9.3

        IMPROVED: much simplified table mod announcement signal
        IMPROVED: include FKs in schema version check
        IMPROVED: remove .ddd/.unit from ref.atc
        IMPROVED: EMR entry on deleting a document


Downloads available from:

        http://www.gnumed.de/downloads/client/1.4/
        http://www.gnumed.de/downloads/server/v19/


Client installation:

 Easily installable packages for your platform of choice
 will be available shortly.

 Meanwhile you can run the client from a downloaded tarball
 or use the net based client installer:

        http://www.gnumed.de/downloads/client/gm-install_client_locally.sh

 which you need to download, make executable, and run.

 More information available here:

        http://wiki.gnumed.de/bin/view/Gnumed/InstallerGuideHomeShort


Database installation / upgrade:

 Note that this release, as usual, DOES require
 a database upgrade which you install by

        $> gm-upgrade_server 18 19

 or

        $> cd .../server/bootstrap/
        $> ./upgrade-db.sh 19

 Related information is found here:

        http://wiki.gnumed.de/bin/view/Gnumed/GmManualServerUpgrade


Please download, install, and report problems !

Thanks,
Karsten
-- 
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346