[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-bugs] <bug>: trying to merge doubled patients
From: |
Karsten Hilbert |
Subject: |
Re: [Gnumed-bugs] <bug>: trying to merge doubled patients |
Date: |
Wed, 20 Mar 2013 12:59:50 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Mar 20, 2013 at 12:31:12PM +0100, Karsten Hilbert wrote:
> They quick way
> out for you is to activate either of patient 1109 or 1310
> and edit (remove) the cell phone number on either of them
> (hint: preferably prepend "old: " to the number string on
> the to-be-merged patient 1310).
>
> I did install a partial solution to this into the 1.3.next
> code at any rate.
Which does quite what the suggestion above sayeth:
# disambiguate potential dupes
# - same-url comm channels
queries.append ({
'cmd': u"""
UPDATE dem.lnk_identity2comm
SET url = url || ' (%s %s)'
WHERE
fk_identity = %%(pat2del)s
AND
EXISTS (
SELECT 1 FROM dem.lnk_identity2comm
d_li2c
WHERE d_li2c.fk_identity =
%%(pat2keep)s AND d_li2c.url = url
)
""" % (_('merged'), gmDateTime.pydt_strftime()),
'args': args
})
namely appending a translation of " (merged <TODAY NOW>" to
any duplicate comm channel URL which will make the window
for remaining duplicate comm channels rather small.
Karsten
--
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346