[Top][All Lists]

[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/

> [PANIC] 
> (/home/ian/gnumed/gnumed/client/python-common/ 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/ 
> exception type : libpq.IntegrityError
> [PANIC] 
> (/home/ian/gnumed/gnumed/client/python-common/ 
> 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

> 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.

GPG key ID E4071346 @
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

reply via email to

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