[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnumed-bugs] 1.3.4 unhanded exception trying to merge patient
From: |
Busser, Jim |
Subject: |
[Gnumed-bugs] 1.3.4 unhanded exception trying to merge patient |
Date: |
Fri, 17 May 2013 22:45:45 +0000 |
This is a follow-on to the recently-posted thread
Possible failure of GNUmed to void duplicate values on a key
which I considered worth to post here in case anyone hits the same UE.
This arises when a value that is permitted to exist under two different
patients, is not allowed within a single patient to have two identical values.
While here, the problem was that the two "patients" (representing the same
person, who is to be merged) each had what was supposed to be a unique identity
number. This is what informs a discussion over on the -devel list, as to
whether to be able to make certain constraints unique across all patients.
Separately, there exists cases where the same home (or other) phone number was
entered for a patient, and there is no point to have redundant values in the
same merged patient.
I am thinking that for demographic data, it might be nice if identical values
could be ignored (not merged) instead of causing an exception. However this
might require a lot of manual work in the coding.
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"?
-- Jim
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"
- [Gnumed-bugs] 1.3.4 unhanded exception trying to merge patient,
Busser, Jim <=