gnumed-bugs
[Top][All Lists]
Advanced

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

Re: [Gnumed-bugs] 1.3.4 unhanded exception trying to merge patient


From: Karsten Hilbert
Subject: Re: [Gnumed-bugs] 1.3.4 unhanded exception trying to merge patient
Date: Mon, 20 May 2013 22:18:13 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, May 17, 2013 at 10:45:45PM +0000, Jim Busser wrote:

> Can a UE be avoided by warning the user "please delete
> redundant values, such as a home phone or identity numbers,
> from one record and then try again"?

That would not avoid the UE ?

> Traceback (most recent call last):
>   File 
> "/Users/djb/Downloads/gnumed-client.1.3.4/Gnumed/wxpython/gmPatSearchWidgets.py",
>  line 124, in _on_merge_button_pressed
>     success, msg = patient2keep.assimilate_identity(other_identity = 
> patient2merge, link_obj = conn)
>   File 
> "/Users/djb/Downloads/gnumed-client.1.3.4/Gnumed/business/gmPerson.py", line 
> 811, in assimilate_identity
>     gmPG2.run_rw_queries(link_obj = link_obj, queries = queries, end_tx = 
> True)
>   File "/Users/djb/Downloads/gnumed-client.1.3.4/Gnumed/pycommon/gmPG2.py", 
> line 1206, in run_rw_queries
>     curs.execute(query['cmd'], args)
>   File 
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/psycopg2/extras.py",
>  line 121, in execute
>     return super(DictCursor, self).execute(query, vars)
> IntegrityError: duplicate key value violates unique constraint 
> "lnk_identity2ext_id_id_identity_key"

Fixed for 1.3.4.

Duplicate external IDs are now merged by appending

        " (merged <NOW>)"

to the ID of the patient that is merged into the patient
that's staying.

Just like same-URL comm channels.

For 1.4 I will rewrite patient merging to create an SQL
script which is then run automatically. On failure, said
file can be inspected, perhaps modified and re-run if
desired.

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



reply via email to

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