1
2
3
4
5
6
7
8
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
43
44
45
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
59 pool = gmPG.ConnectionPool()
60
61
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
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
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
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