gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] New entries into xlnk_identity


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] New entries into xlnk_identity
Date: Sat, 14 Feb 2004 17:21:26 +0100
User-agent: Mutt/1.3.22.1i

> [PANIC] 
> (/home/ian/gnumed/gnumed/client/python-common/gmPG.py::run_query:592): query 
> >>>insert into clin_health_issue (id_patient, description) values (%s, %s)<<< 
> with args >>>(17L, 'xxxDEFAULTxxx')<<< failed
> [PANIC] 
> (/home/ian/gnumed/gnumed/client/python-common/gmPG.py::run_query:592): 
> exception type : libpq.IntegrityError
> [PANIC] 
> (/home/ian/gnumed/gnumed/client/python-common/gmPG.py::run_query:592): 
> exception value: ERROR:  $1 referential integrity violation - key referenced 
> from clin_health_issue not found in xlnk_identity
This shouldn't happen but obviously I forgot something
somewhere...

> My fix for this is to add new entries in xlnk_identity whenever we create a 
> new patient record. Is this right?
No. xlnk_identity is in "historica" only at the moment.
Whenever gmClinicalRecord is instantiated for a patient it
checks for the patient link, see _pkey_exists().

However, if one is not going via the business objects (in an
SQL script, say) one has to take care of that oneself.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346




reply via email to

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