1
2
3
4
5
6
7
8
9
10
11 __version__ = "$Revision: 1.7 $"
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 if __name__ == '__main__':
19
20 import sys
21 sys.path.insert(0, '../../../')
22
23 from Gnumed.pycommon import gmI18N
24 gmI18N.activate_locale()
25 gmI18N.install_domain()
26
27
28 from Gnumed.wxpython import gmPlugin, gmNarrativeWidgets
29 from Gnumed.wxpython import gmAccessPermissionWidgets
30
31
32 _log = logging.getLogger('gm.ui')
33 _log.info(__version__)
37 """Plugin to encapsulate notebook based progress note input window."""
38
39 tab_name = _('Notes')
40 required_minimum_role = 'full clinical access'
41
42 @gmAccessPermissionWidgets.verify_minimum_required_role (
43 required_minimum_role,
44 activity = _('loading plugin <%s>') % tab_name,
45 return_value_on_failure = False,
46 fail_silently = False
47 )
50
51
54
58
60 return ('emr', _('&Notes'))
61
62
64
65 if not self._verify_patient_avail():
66 return None
67 return True
68
69
70
71 if __name__ == "__main__":
72
73
74 import wx
75
76
77 from Gnumed.business import gmPersonSearch
78 from Gnumed.wxpython import gmSOAPWidgets
79
80 _log.info("starting Notebooked progress notes input plugin...")
81
82
83 patient = gmPersonSearch.ask_for_patient()
84 if patient is None:
85 print("None patient. Exiting gracefully...")
86 sys.exit(0)
87 gmPatSearchWidgets.set_active_patient(patient=patient)
88
89
90 application = wx.wx.PyWidgetTester(size = (800,600))
91 multisash_notes = gmSOAPWidgets.cNotebookedProgressNoteInputPanel(application.frame, -1)
92
93 application.frame.Show(True)
94 application.MainLoop()
95
96
97 if patient is not None:
98 try:
99 patient.cleanup()
100 except Exception:
101 print("error cleaning up patient")
102
103 _log.info("closing Notebooked progress notes input plugin...")
104
105