[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: Sun, 15 Feb 2004 18:21:44 +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
Can you mail me the full log so I can figure out whence
we got into this situation ?

> My fix for this is to add new entries in xlnk_identity whenever we create a 
> new patient record. Is this right?
With xlnk_identity we are trying to channel missing
referential integrity links between the clinical and the
administrative services. Thus, as long as there is no
clinical data for a patient there is no need to have an entry
in xlnk_identity for that patient. Or, put another way, only
when one wants to store clinical data does one have to make
sure there's an entry in xlnk_identity for the current
patient. When using the business objects (gmClinicalRecord,
that is) this is done for your in _pkey_exists().

So, if by any means we feel the need to have a convenience
function for that it should be named something like
ensure_identity_xlnk() and become a method of
gmClinicalRecord, methinks.

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]