Trees | Indices | Help |
|
---|
|
1 #====================================================================== 2 # GnuMed multisash based progress note input plugin 3 # ------------------------------------------------- 4 # 5 # this plugin displays the list of patient problems 6 # toghether whith a multisash container for progress notes 7 # 8 # @copyright: author 9 #====================================================================== 10 __version__ = "$Revision: 1.15 $" 11 __author__ = "Carlos Moro, Karsten Hilbert" 12 __license__ = 'GPL (details at http://www.gnu.org)' 13 14 import logging 15 16 17 from Gnumed.wxpython import gmPlugin, gmSOAPWidgets 18 19 20 _log = logging.getLogger('gm.ui') 21 _log.info(__version__) 22 #======================================================================24 """Plugin to encapsulate multisash based progress note input window.""" 25 26 tab_name = _('progress notes (sash)') 27 3043 44 #====================================================================== 45 # main 46 #---------------------------------------------------------------------- 47 if __name__ == "__main__": 48 49 import sys 50 51 import wx 52 53 from Gnumed.business import gmPerson 54 55 _log.info("starting multisashed progress notes input plugin...") 56 57 try: 58 # make sure we have a db connection 59 pool = gmPG.ConnectionPool() 60 61 # obtain patient 62 patient = gmPerson.ask_for_patient() 63 if patient is None: 64 print "None patient. Exiting gracefully..." 65 sys.exit(0) 66 gmPatSearchWidgets.set_active_patient(patient=patient) 67 68 # display standalone multisash progress notes input 69 application = wx.wxPyWidgetTester(size=(800,600)) 70 multisash_notes = gmSOAPWidgets.cMultiSashedProgressNoteInputPanel(application.frame, -1) 71 72 application.frame.Show(True) 73 application.MainLoop() 74 75 # clean up 76 if patient is not None: 77 try: 78 patient.cleanup() 79 except: 80 print "error cleaning up patient" 81 except StandardError: 82 _log.exception("unhandled exception caught !") 83 # but re-raise them 84 raise 85 try: 86 pool.StopListeners() 87 except: 88 _log.exception('unhandled exception caught') 89 raise 90 91 _log.info("closing multisashed progress notes input plugin...") 92 93 #====================================================================== 94 # $Log: gmMultiSashedProgressNoteInputPlugin.py,v $ 95 # Revision 1.15 2009/06/04 16:31:24 ncq 96 # - use set-active-patient from pat-search-widgets 97 # 98 # Revision 1.14 2009/04/12 20:15:14 shilbert 99 # - various indentation errors in standalone mode fixed 100 # 101 # Revision 1.13 2008/03/06 18:32:31 ncq 102 # - standard lib logging only 103 # 104 # Revision 1.12 2008/01/27 21:21:59 ncq 105 # - no more gmCfg 106 # 107 # Revision 1.11 2007/10/12 07:28:25 ncq 108 # - lots of import related cleanup 109 # 110 # Revision 1.10 2007/03/08 11:54:44 ncq 111 # - cleanup 112 # 113 # Revision 1.9 2006/10/25 07:23:30 ncq 114 # - no gmPG no more 115 # 116 # Revision 1.8 2006/05/04 09:49:20 ncq 117 # - get_clinical_record() -> get_emr() 118 # - adjust to changes in set_active_patient() 119 # - need explicit set_active_patient() after ask_for_patient() if wanted 120 # 121 # Revision 1.7 2005/09/26 18:01:52 ncq 122 # - use proper way to import wx26 vs wx2.4 123 # - note: THIS WILL BREAK RUNNING THE CLIENT IN SOME PLACES 124 # - time for fixup 125 # 126 # Revision 1.6 2005/05/12 15:13:28 ncq 127 # - cleanup 128 # 129 # Revision 1.5 2005/05/08 21:44:08 ncq 130 # - cleanup 131 # 132 # Revision 1.4 2005/03/29 07:34:20 ncq 133 # - improve naming 134 # 135 # Revision 1.3 2005/03/18 16:48:42 cfmoro 136 # Fixes to integrate multisash notes input plugin in wxclient 137 # 138 # Revision 1.2 2005/03/16 18:37:57 cfmoro 139 # Log cvs history 140 # 14132 self._widget = gmSOAPWidgets.cMultiSashedProgressNoteInputPanel(parent, -1) 33 return self._widget3436 return ('tools', _('progress notes'))37
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Feb 9 04:02:38 2010 | http://epydoc.sourceforge.net |