[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-bugs] <bug>: add medication

From: Karsten Hilbert
Subject: Re: [Gnumed-bugs] <bug>: add medication
Date: Mon, 1 Jul 2019 12:39:27 +0200
User-agent: Mutt/1.10.1 (2018-07-13)

Dear Lars,

thanks for taking the time to report this issue.

> user comment  : add medication
> client version: 1.6.15

You are running the latest released version in the 1.6
branch, good, which is what comes with your version of

> Platform: ('Linux', 'MAIN-SYSTEM', '4.18.0-24-generic', '#25~18.04.1-Ubuntu 
> SMP Thu Jun 20 11:13:08 UTC 2019', 'x86_64', 'x86_64')

The problem you have encountered

> 2019-06-30 18:15:49  DEBUG     gm.gui 
> (/usr/share/gnumed/Gnumed/wxpython/
>  #227): unhandled exception caught:
> Traceback (most recent call last):
>   File "/usr/share/gnumed/Gnumed/wxpython/", line 340, in 
> _on_save_button_pressed
>     if
>   File "/usr/share/gnumed/Gnumed/wxpython/", line 203, in save
>     if self._save_as_new():
>   File "/usr/share/gnumed/Gnumed/wxpython/", line 623, 
> in _save_as_new
>     preparation = self._PRW_preparation.GetValue().strip()
>   File "/usr/share/gnumed/Gnumed/business/", line 3793, in 
> turn_into_intake
>     preparation = self._payload[self._idx['preparation']]
>   File "/usr/share/gnumed/Gnumed/business/", line 2824, in 
> create_substance_intake
>     rows, idx = gmPG2.run_rw_queries(queries = [{'cmd': cmd, 'args': args}], 
> return_data = True)
>   File "/usr/share/gnumed/Gnumed/pycommon/", line 1860, in 
> run_rw_queries
>     curs.execute(query['cmd'], args)
>   File "/usr/lib/python2.7/dist-packages/psycopg2/", line 144, in 
> execute
>     return super(DictCursor, self).execute(query, vars)
> IntegrityError: null value in column "fk_substance" violates not-null 
> constraint
> DETAIL:  Failing row contains (31229, 0, 2019-06-30 18:15:49.016549+02, 
> 736040d0a9b823c5, 691, 2019-06-30 18:15:49.016549+02, 4194, 380, null, p, 
> 147, null, null, null, null, null, f, null, null, null, null, null, null).

happens when a user attempts to add a medication to a medical
record and the selected drug is a vaccine.

The recommended way to document a vaccination is to use the
dedicated user interface for that. One has to admit, GNUmed
fails to shield the user from being able to select a vaccine
in the add-medication dialog. The GNUmed backend does at
least protect the user from saving an invalid state into the
database, though, but GNUmed does not do a particularly good
job of failing gracefully.

However: There's been a whole new stable branch (1.7)
released for quite some time which ought to behave better.
You could attempt to install that from Debian Testing, or
soon from Debian Stable

        gnumed-client | 1.4.12+dfsg-1 | oldstable  | source, all
        gnumed-client | 1.6.11+dfsg-3 | stable     | source, all
        gnumed-client | 1.7.5+dfsg-3  | testing    | source, all
        gnumed-client | 1.7.5+dfsg-3  | unstable   | source, all

or download a version to be run from a local directory:

Given that it is quite unlikely that any new version fixing
non-security related problems will be accepted into any
currently stable Debian or Ubuntu we won't publish an
explicit fix for the 1.6 branch UNLESS any given problem can
be demonstrated to be an active problem in a REAL LIFE

Feel free to report back and ask if any other questions arise.

GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B

reply via email to

[Prev in Thread] Current Thread [Next in Thread]