gnumed-devel
[Top][All Lists]
Advanced

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

[Gnumed-devel] error in gmPG?


From: sjtan
Subject: [Gnumed-devel] error in gmPG?
Date: 01 Jun 2003 11:23:10 +1000

I use the demographics panel to select a patient.
This works the first time.
I make an entry into the allergy panel . 
I added code so it creates a allergy health issue if
one doesn't exist for the current patient or use
the existing allergy health issue, 
it gets the current clinical encounter , which is bound
to the creation of a gmCurrentPatient object, rtal 
and it creates a new clinical episode , using the 
id of the allergy health issue. The info is then 
stored in the allergy table.
When I go back to the demographics screen and select another
patient, 
I get a portal NOT found error.
I don't think closing the most recently opened cursor closes the
connection , does it ?

this is the error message:


[INFO] 
(/home/sjtan/gnumed/gnumed/client/python-common/gmLog.py::Info:181):
Button with label Ok pressed : owner of buttons = allergy
[INFO] 
(/home/sjtan/gnumed/gnumed/client/python-common/gmLog.py::Info:181):
Values of allergy are {'allergy class': '', 'substance': 'rulide',
'reaction': 'rash', 'generic': '', 'definite': '0', 'date recorded':
'1/1/2002'}
[INFO] 
(/home/sjtan/gnumed/gnumed/client/python-common/gmLog.py::Info:181):
Running query : select id from clin_health_issue where id_patient=6 and
description='allergy'
[INFO] 
(/home/sjtan/gnumed/gnumed/client/python-common/gmLog.py::Info:181):
Running query : insert into clin_health_issue ( id_patient, description)
values ( 6, 'allergy')
[INFO] 
(/home/sjtan/gnumed/gnumed/client/python-common/gmLog.py::Info:181):
Running query : select id from clin_health_issue where id_patient=6 and
description='allergy'
[INFO] 
(/home/sjtan/gnumed/gnumed/client/python-common/gmLog.py::Info:181):
Running query : insert into clin_episode( id_health_issue, description )
values ( 37 , 'Sun Jun  1 11:13:04 2003')
[INFO] 
(/home/sjtan/gnumed/gnumed/client/python-common/gmLog.py::Info:181):
Running query : select id from clin_episode where id_health_issue=37 
and description='Sun Jun  1 11:13:04 2003'
[INFO] 
(/home/sjtan/gnumed/gnumed/client/python-common/gmLog.py::Info:181):
Running query : insert into allergy(id_type, id_encounter, id_episode, 
substance, reaction, definate ) values (1, 90, 48,  'rulide', 'rash',
'0' )
[INFO] 
(/home/sjtan/gnumed/gnumed/client/python-common/gmLog.py::Info:181):
Running query : commit
def OnSearchResultKeyDown(self, event):
def OnSearchResultKeyDown(self, event):
[INFO] 
(/home/sjtan/gnumed/gnumed/client/python-common/gmLog.py::Info:181):
kwargs for PATIENT = {'dob': '1974-10-23 00:00:00.00', 'n_id': '5',
'cob': 'DE', 'firstnames': 'Karsten', 'gender': 'm', 'title': 'Dr.',
'id': '5', 'lastnames': 'Hilbert', 'ID': 5, 'i_id': '5'}received
patient_selected notification
{'n_id': '5', 'sender': 'patient.selector', 'title': 'Dr.', 'dob':
'1974-10-23 00:00:00.00', 'gender': 'm', 'signal': 'patient_selected',
'ID': 5, 'cob': 'DE', 'firstnames': 'Karsten', 'lastnames': 'Hilbert',
'i_id': '5', 'id': '5'}
[INFO] 
(/home/sjtan/gnumed/gnumed/client/python-common/gmLog.py::Info:181):
date part = 1974-10-23
[INFO] 
(/home/sjtan/gnumed/gnumed/client/python-common/gmLog.py::Info:181):
Running query : select id from identity where id = 5
[PANIC] (../python-common/gmPG.py::run_query:498): query >>>select id
from identity where id = 5<<< failed

>>>>>>>>>>>> I think the root error is here.

[PANIC] (../python-common/gmPG.py::run_query:498): exception type :
libpq.Warning
[PANIC] (../python-common/gmPG.py::run_query:498): exception value:
WARNING:  PerformPortalClose: portal "pgsql_08765714" not found

[PANIC] (../python-common/gmPG.py::run_query:498): Traceback (most
recent call last):<#10-0x0A-lf>
[PANIC] (../python-common/gmPG.py::run_query:498):   File
"../python-common/gmPG.py", line 496, in run_query<#10-0x0A-lf>   
aCursor.execute(aCmd)<#10-0x0A-lf>
[PANIC] (../python-common/gmPG.py::run_query:498):   File
"/usr/local/lib/python2.2/site-packages/pyPgSQL/PgSQL.py", line 2953, in
execute<#10-0x0A-lf>    raise Warning,
self.conn.notices.pop()<#10-0x0A-lf>
[PANIC] (../python-common/gmPG.py::run_query:498): Warning: WARNING: 
PerformPortalClose: portal "pgsql_08765714" not
found<#10-0x0A-lf><#10-0x0A-lf>
[ERROR]
(/home/sjtan/gnumed/gnumed/client/business/gmClinicalRecord.py::execute:335): 
Unable to check existence of id 5 in identity
[INFO] 
(/home/sjtan/gnumed/gnumed/client/python-common/gmLog.py::Info:181):
result of id check = None
Traceback (most recent call last):
  File "/home/sjtan/gnumed/gnumed/client/wxpython/gmSQLSimpleSearch.py",
line 110, in OnSearchResultItemActivated
    self.ProcessSelection(self.selected)
  File "/home/sjtan/gnumed/gnumed/client/wxpython/gmSelectPerson.py",
line 107, in ProcessSelection
    gmDispatcher.send(gmSignals.patient_selected(), kwds=kwargs)
  File "/home/sjtan/gnumed/gnumed/client/python-common/gmDispatcher.py",
line 137, in send    response = _call(receiver, signal=signal,
sender=sender, **kwds)
  File "/home/sjtan/gnumed/gnumed/client/python-common/gmDispatcher.py",
line 161, in _call
    return receiver(**kwds)
  File "/home/sjtan/gnumed/gnumed/client/business/gmTmpPatient.py", line
650, in _patient_selected
    adjust_data(kwargs)
  File "/home/sjtan/gnumed/gnumed/client/business/gmTmpPatient.py", line
662, in adjust_data
    map['clinical record'] =
gmClinicalRecord.gmClinicalRecord(map['ID'])
  File "/home/sjtan/gnumed/gnumed/client/business/gmClinicalRecord.py",
line 49, in __init__
    if not self._pkey_exists():
  File "/home/sjtan/gnumed/gnumed/client/business/gmClinicalRecord.py",
line 103, in _pkey_exists
    res = rows[0][0]
TypeError: unsubscriptable object







reply via email to

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