1
2
3
4
5
6
7
8
9
10
11 __version__ = "$Revision: 1.15 $"
12 __author__ = "Carlos Moro, Karsten Hilbert"
13 __license__ = 'GPL v2 or later (details at http://www.gnu.org)'
14
15 import logging
16
17
18 from Gnumed.wxpython import gmPlugin, gmSOAPWidgets
19
20
21 _log = logging.getLogger('gm.ui')
22 _log.info(__version__)
23
44
45
46
47
48 if __name__ == "__main__":
49
50 import sys
51
52 import wx
53
54 from Gnumed.business import gmPersonSearch
55
56 _log.info("starting multisashed progress notes input plugin...")
57
58 try:
59
60 pool = gmPG.ConnectionPool()
61
62
63 patient = gmPersonSearch.ask_for_patient()
64 if patient is None:
65 print "None patient. Exiting gracefully..."
66 sys.exit(0)
67 gmPatSearchWidgets.set_active_patient(patient=patient)
68
69
70 application = wx.wxPyWidgetTester(size=(800,600))
71 multisash_notes = gmSOAPWidgets.cMultiSashedProgressNoteInputPanel(application.frame, -1)
72
73 application.frame.Show(True)
74 application.MainLoop()
75
76
77 if patient is not None:
78 try:
79 patient.cleanup()
80 except:
81 print "error cleaning up patient"
82 except Exception:
83 _log.exception("unhandled exception caught !")
84
85 raise
86 try:
87 pool.StopListeners()
88 except:
89 _log.exception('unhandled exception caught')
90 raise
91
92 _log.info("closing multisashed progress notes input plugin...")
93
94
95