GNU Health/Developer's corner

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Welcome to the GNU Health Developer's corner[edit | edit source]

This chapter focus on the development of the upcoming version in different components of GNU Health

The developer's corner is highly volatile. It's chaotic and unstable, and we love it like that ;)

Please respect the target build of each component.

Hospital Management Information System[edit | edit source]

Target build : 3.5

Installation on openSUSE Leap 15.1

Update 24.10.2019: Beta packages can now be installed from OBS repository using zypper

Server[edit | edit source]

 $ sudo zypper in patch gcc libxml2-devel  postgresql postgresql-server unoconv
 $ cd
 $ wget
 $ tar -xzvf gnuhealth-3.6RC2.tar.gz
 $ cd gnuhealth-3.6RC2
 $ ./gnuhealth-setup install
 $ cd
 $ source .bashrc
 $ ./ -v

Upgrade[edit | edit source]

This information comes from the Tryton migration. You should check the latest updates : + +


  1. Assign rules linked to users to a group (must be done before update).
  2. Check taxes and tax codes definitions (inactivate old children taxes and add them to the right codes)
  3. Before update, set an accounting category to all products which have accounts and taxes defined (see issue3805 )
  4. Execute the script "before.sql"
  5. update tryton server (./trytond-admin --all)


  1. Execute the script "after.sql"
  2. synchronize records from Administration > Models > Models > Data
  3. You should create the WriteOff Methods and Payment Methods to override the cash journals used for invoice payments and writeoff journals used for writeoff reconciliation. (see Tryton issue7450)

GTK Client[edit | edit source]

  • Disable Non-OSS repositoriess
  • Desktop with KDE Plasma
  • Create user "gnuhealth"

  • Login as "gnuhealth" user
  • Update PATH
   $ export PATH=$HOME/.local/bin:$PATH
  • Update pip3
   $ pip3 install update --user pip
  • Get the needed packages / dependencies
   $ sudo zypper install cairo-devel pkg-config python3-devel gcc gobject-introspection-devel 
  • Install cairo for pyhton3
   $ zypper in python3-cairo
  • Install Introspection bindings for the GTK+
   $ zypper in typelib-1_0-Gtk-3_0
  • Upgrade PyGobject
   $ pip3 install --user --upgrade PyGobject
  • Install GNU Health client from test
   $ pip3 install --user --index-url --extra-url gnuhealth-client==3.6rc2

Plugins[edit | edit source]

The search path for plugins goes like this:

1. <config dir>/plugins

Example: /home/lfm/.config/gnuhealth/3.5/plugins

2. <current_gnuhealth_dir>/tryton/plugins

Example: /home/lfm/health/gnuhealth-client/tryton/plugins

3. $HOME/gnuhealth_plugins

Example: /home/lfm/gnuhealth_plugins

The third one ($HOME/gnuhealth_plugins) is the recommended place for most users. It makes easy automation and allows convinient drag and drop for plugins.

The first option is recommended for users that have different GH GTK client versions installed.

Interfases[edit | edit source]

GNU Health Federation[edit | edit source]

Thalamus[edit | edit source]

GH Federation Portal[edit | edit source]

MyGNUHealth mobile application[edit | edit source]

Installation of MyGNUHealth PinePhone and Manjaro Plasma Mobile[edit | edit source]

Install requirements

  • Update de system (pacman -Syu)
  • Install gcc (pacman -S gcc)
  • Install base devel tools (pacman -S base-devel)
  • Install pyside2 package (pacman -S pyside2-es2) (Make sure you use this package! The regular "pyside2" won't work. Thanks Anupam!)

Installation on PinePhone and KDE Neon[edit | edit source]

Install required packages

  • apt-get install python3-pip
  • apt-get install qt5-qmake
  • apt-get install cmake
  • apt-get install qtbase5-dev
  • apt-get install clang clang libclang-6.0-dev
  • apt-get install qtbase5-private-dev
  • apt-get install qtdeclarative5-dev qtdeclarative5-private-dev

Create a swapfile (it will be needed during the building process)

  1. sudo bash
  2. cd /opt
  3. dd if=/dev/zero of=swapfile bs=1G count=1
  4. mkswap swapfile
  5. swapon swapfile

(you can later add it to the fstab if you want to have it permanent) add to /etc/fstab
/opt/swapfile swap swap defaults 0 0

Download,extract and build PySide2

Fix the following symlinks that are broken:

$ cd pyside2/pyside-setup/pyside3_install/py3.6-qt5.14.2-64bit-release/bin$

$ ln -si /usr/bin/qtchooser ./designer
$ ln -si /usr/bin/qtchooser ./rcc
$ ln -si /usr/bin/qtchooser ./uic

Installation on the Desktop[edit | edit source]

Nightly Builds to install MyGNHealth on a GNU/Linux Desktop are available at OpenBuildService

Issues[edit | edit source]

The following are issues that need to be fixed:

  • FIXED: DRM_IOCTL_MODE_CREATE_DUMB failed: Cannot allocate memory at startup. Using CMA=340m as a kernel boot param gives enough CMA memory. Colleagues at the KDE plasma channel said they would include it in next image.