| Home | 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 v2 or later (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
30
32 self._widget = gmSOAPWidgets.cMultiSashedProgressNoteInputPanel(parent, -1)
33 return self._widget
34
36 return ('tools', _('progress notes'))
37
43
44 #======================================================================
45 # main
46 #----------------------------------------------------------------------
47 if __name__ == "__main__":
48
49 import sys
50
51 import wx
52
53 from Gnumed.business import gmPersonSearch
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 = gmPersonSearch.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
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Jun 25 03:58:27 2012 | http://epydoc.sourceforge.net |