1
2
3
4
5
6
7
8
9
10 __version__ = "$Revision: 1.7 $"
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 if __name__ == '__main__':
18
19 import sys
20 sys.path.insert(0, '../../../')
21
22 from Gnumed.pycommon import gmI18N
23 gmI18N.activate_locale()
24 gmI18N.install_domain()
25
26
27 from Gnumed.wxpython import gmPlugin, gmNarrativeWidgets
28
29
30 _log = logging.getLogger('gm.ui')
31 _log.info(__version__)
32
33
35 """Plugin to encapsulate notebook based progress note input window."""
36
37 tab_name = _('Notes')
38
41
45
47 return ('emr', _('&Notes'))
48
49
51
52 if not self._verify_patient_avail():
53 return None
54 return True
55
56
57
58 if __name__ == "__main__":
59
60
61 import wx
62
63
64 from Gnumed.business import gmPersonSearch
65 from Gnumed.wxpython import gmSOAPWidgets
66
67 _log.info("starting Notebooked progress notes input plugin...")
68
69 try:
70
71 patient = gmPersonSearch.ask_for_patient()
72 if patient is None:
73 print "None patient. Exiting gracefully..."
74 sys.exit(0)
75 gmPatSearchWidgets.set_active_patient(patient=patient)
76
77
78 application = wx.wx.PyWidgetTester(size = (800,600))
79 multisash_notes = gmSOAPWidgets.cNotebookedProgressNoteInputPanel(application.frame, -1)
80
81 application.frame.Show(True)
82 application.MainLoop()
83
84
85 if patient is not None:
86 try:
87 patient.cleanup()
88 except:
89 print "error cleaning up patient"
90 except StandardError:
91 _log.exception("unhandled exception caught !")
92
93 raise
94
95 _log.info("closing Notebooked progress notes input plugin...")
96
97