Trees | Indices | Help |
|
---|
|
1 #====================================================================== 2 # GnuMed patient EMR Journal plugin 3 # ---------------------------------------------- 4 # 5 # @copyright: author 6 #====================================================================== 7 __version__ = "$Revision: 1.14 $" 8 __author__ = "Karsten Hilbert" 9 __license__ = 'GPL (details at http://www.gnu.org)' 10 11 import logging 12 13 14 from Gnumed.wxpython import gmPlugin, gmEMRBrowser 15 from Gnumed.pycommon import gmI18N 16 17 _log = logging.getLogger('gm.ui') 18 _log.info(__version__) 19 20 #====================================================================== 41 42 #====================================================================== 43 # main 44 #---------------------------------------------------------------------- 45 if __name__ == "__main__": 46 47 import sys 48 49 import wx 50 51 from Gnumed.exporters import gmPatientExporter 52 from Gnumed.business import gmPerson 53 54 _log.info("starting emr journal plugin...") 55 56 try: 57 # obtain patient 58 patient = gmPerson.ask_for_patient() 59 if patient is None: 60 print "None patient. Exiting gracefully..." 61 sys.exit(0) 62 gmPatSearchWidgets.set_active_patient(patient=patient) 63 64 # display standalone browser 65 application = wx.wxPyWidgetTester(size=(800,600)) 66 emr_journal = gmEMRBrowser.cEMRJournalPanel(application.frame, -1) 67 emr_journal.refresh_journal() 68 69 application.frame.Show(True) 70 application.MainLoop() 71 72 # clean up 73 if patient is not None: 74 try: 75 patient.cleanup() 76 except: 77 print "error cleaning up patient" 78 except StandardError: 79 _log.exception("unhandled exception caught !") 80 # but re-raise them 81 raise 82 83 _log.info("closing emr journal plugin...") 84 85 #====================================================================== 86 # $Log: gmEMRJournalPlugin.py,v $ 87 # Revision 1.14 2009/06/29 15:13:25 ncq 88 # - improved placement in menu hierarchy 89 # - add active letters 90 # 91 # Revision 1.13 2009/06/04 16:31:24 ncq 92 # - use set-active-patient from pat-search-widgets 93 # 94 # Revision 1.12 2008/03/06 18:32:30 ncq 95 # - standard lib logging only 96 # 97 # Revision 1.11 2008/01/27 21:21:59 ncq 98 # - no more gmCfg 99 # 100 # Revision 1.10 2007/10/21 20:25:43 ncq 101 # - fix syntax error 102 # 103 # Revision 1.9 2007/10/12 07:28:24 ncq 104 # - lots of import related cleanup 105 # 106 # Revision 1.8 2006/10/31 16:06:19 ncq 107 # - no more gmPG 108 # 109 # Revision 1.7 2006/10/25 07:23:30 ncq 110 # - no gmPG no more 111 # 112 # Revision 1.6 2006/05/04 09:49:20 ncq 113 # - get_clinical_record() -> get_emr() 114 # - adjust to changes in set_active_patient() 115 # - need explicit set_active_patient() after ask_for_patient() if wanted 116 # 117 # Revision 1.5 2005/12/27 19:05:36 ncq 118 # - use gmI18N 119 # 120 # Revision 1.4 2005/10/03 13:59:59 sjtan 121 # indentation errors 122 # 123 # Revision 1.3 2005/09/26 18:01:52 ncq 124 # - use proper way to import wx26 vs wx2.4 125 # - note: THIS WILL BREAK RUNNING THE CLIENT IN SOME PLACES 126 # - time for fixup 127 # 128 # Revision 1.2 2005/06/07 20:56:56 ncq 129 # - take advantage of improved EMR menu 130 # 131 # Revision 1.1 2005/04/12 16:26:33 ncq 132 # - added Journal style EMR display plugin 133 # 134
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sat Jan 23 04:05:58 2010 | http://epydoc.sourceforge.net |