[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-bugs] <bug>: Just opened local db with any-doc user and
From: |
Karsten Hilbert |
Subject: |
Re: [Gnumed-bugs] <bug>: Just opened local db with any-doc user and |
Date: |
Wed, 15 Jul 2009 13:10:13 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hello !
Thanks for the report.
> user comment : Just opened local db with any-doc user and selected Patient
> and opened EMR tree.
>
> client version: 0.4.6
I cannot reproduce it, however.
> 2009-07-15 01:34:57 ERROR gm.person
> (/usr/share/gnumed/Gnumed/business/gmPerson.py::set_active_patient() #1917):
> error changing active patient to [[cIdentity:326]: ['n_id: 341',
> u'marital_status: unknown', 'title: None', 'dob: 1983-07-13
> 10:11:11.111000+03:00', u'gender: m', 'pk_identity: 326', 'dob_only:
> 1983-07-13 10:11:11.111000+03:00', 'pk_marital_status: None', u'preferred:
> Nicky', 'xmin_identity: 60513', u'l10n_marital_status: unknown',
> u'l10n_gender: m', 'cob: None', u'firstnames: Flavier II', 'tob: None',
> u'lastnames: Nicanor', 'pupic: None', 'karyotype: None']]
> Traceback (most recent call last):
> File "/usr/share/gnumed/Gnumed/business/gmPerson.py", line 1915, in
> set_active_patient
> gmCurrentPatient(patient=pat, forced_reload=forced_reload)
> File "/usr/share/gnumed/Gnumed/business/gmPerson.py", line 1060, in __init__
> self.patient.get_emr()
> File "/usr/share/gnumed/Gnumed/business/gmPerson.py", line 985, in get_emr
> self.__db_cache['clinical record'] =
> gmClinicalRecord.cClinicalRecord(aPKey =
> self._payload[self._idx['pk_identity']])
> File "/usr/share/gnumed/Gnumed/business/gmClinicalRecord.py", line 104, in
> __init__
> if not self.__initiate_active_encounter():
> File "/usr/share/gnumed/Gnumed/business/gmClinicalRecord.py", line 1246, in
> __initiate_active_encounter
> self.start_new_encounter()
> File "/usr/share/gnumed/Gnumed/business/gmClinicalRecord.py", line 1378, in
> start_new_encounter
> self.__encounter = gmEMRStructItems.create_encounter(fk_patient =
> self.pk_patient, enc_type = enc_type)
> File "/usr/share/gnumed/Gnumed/business/gmEMRStructItems.py", line 885, in
> create_encounter
> rows, idx = gmPG2.run_rw_queries(queries=queries, return_data=True,
> get_col_idx=True)
> File "/usr/share/gnumed/Gnumed/pycommon/gmPG2.py", line 1071, in
> run_rw_queries
> curs.execute(query['cmd'], args)
> File "/usr/lib/python2.5/site-packages/psycopg2/extras.py", line 89, in
> execute
> return _cursor.execute(self, query, vars, async)
> IntegrityError: insert or update on table "encounter" violates foreign key
> constraint "encounter_fk_patient_fkey"
> DETAIL: Key (fk_patient)=(326) is not present in table "identity".
That works for me just fine.
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346