| Home | Trees | Indices | Help |
|
|---|
|
|
1 #======================================================================
2 # GNUmed notebook based progress note input plugin
3 # ------------------------------------------------
4 #
5 # this plugin displays the list of patient problems
6 # together whith a notebook container for progress notes
7 #
8 # @copyright: author
9 #======================================================================
10 __version__ = "$Revision: 1.18 $"
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 # stdlib
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 # GNUmed
27 from Gnumed.wxpython import gmPlugin, gmSOAPWidgets
28 from Gnumed.wxpython import gmAccessPermissionWidgets
29
30
31 _log = logging.getLogger('gm.ui')
32 _log.info(__version__)
33
34 #======================================================================
35 -class gmNotebookedProgressNoteInputPlugin(gmPlugin.cNotebookPlugin):
36 """Plugin to encapsulate notebook based progress note input window."""
37
38 tab_name = _('Progress notes')
39 required_minimum_role = 'full clinical access'
40
41 @gmAccessPermissionWidgets.verify_minimum_required_role (
42 required_minimum_role,
43 activity = _('loading plugin <%s>') % tab_name,
44 return_value_on_failure = False,
45 fail_silently = False
46 )
49 #-------------------------------------------------
52
54 self._widget = gmSOAPWidgets.cNotebookedProgressNoteInputPanel(parent, -1)
55 return self._widget
56
59 #return ('emr', _('&Progress notes editor'))
60
66 #======================================================================
67 # main
68 #----------------------------------------------------------------------
69 if __name__ == "__main__":
70
71 # 3rd party
72 import wx
73
74 # GNUmed
75 from Gnumed.business import gmPersonSearch
76
77 _log.info("starting Notebooked progress notes input plugin...")
78
79 try:
80 # obtain patient
81 patient = gmPersonSearch.ask_for_patient()
82 if patient is None:
83 print "None patient. Exiting gracefully..."
84 sys.exit(0)
85 gmPatSearchWidgets.set_active_patient(patient=patient)
86
87 # display standalone multisash progress notes input
88 application = wx.wx.PyWidgetTester(size=(800,600))
89 multisash_notes = gmSOAPWidgets.cNotebookedProgressNoteInputPanel(application.frame, -1)
90
91 application.frame.Show(True)
92 application.MainLoop()
93
94 # clean up
95 if patient is not None:
96 try:
97 patient.cleanup()
98 except:
99 print "error cleaning up patient"
100 except StandardError:
101 _log.exception("unhandled exception caught !")
102 # but re-raise them
103 raise
104
105 _log.info("closing Notebooked progress notes input plugin...")
106 #======================================================================
107
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Sat Oct 5 03:57:15 2013 | http://epydoc.sourceforge.net |