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: Sun, 15 Feb 2004 18:21:44 +0100
User-agent: Mutt/1.3.22.1i

Ian,

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

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]