| Home | Trees | Indices | Help |
|
|---|
|
|
1 # -*- coding: utf-8 -*-
2 #======================================================================
3 __author__ = "Karsten Hilbert"
4 __license__ = 'GPL v2 or later (details at http://www.gnu.org)'
5
6
7 #raise Exception
8
9
10 # stdlib
11 import logging
12
13
14 # GNUmed
15 if __name__ == '__main__':
16 # stdlib
17 import sys
18 sys.path.insert(0, '../../../')
19 from Gnumed.pycommon import gmI18N
20 gmI18N.activate_locale()
21 gmI18N.install_domain()
22 from Gnumed.wxpython import gmPlugin
23 from Gnumed.wxpython import gmNarrativeWidgets
24 from Gnumed.wxpython import gmAccessPermissionWidgets
25
26
27 _log = logging.getLogger('gm.ui')
28 #======================================================================
29 -class gmSimpleSoapPlugin(gmPlugin.cNotebookPlugin):
30
31 tab_name = _('SimpleNotes')
32 required_minimum_role = 'full clinical access'
33
34 @gmAccessPermissionWidgets.verify_minimum_required_role (
35 required_minimum_role,
36 activity = _('loading plugin <%s>') % tab_name,
37 return_value_on_failure = False,
38 fail_silently = False
39 )
42 #-------------------------------------------------
43
46
50
53
59 #======================================================================
60 # main
61 #----------------------------------------------------------------------
62 if __name__ == "__main__":
63
64 # 3rd party
65 import wx
66
67 # GNUmed
68 from Gnumed.business import gmPersonSearch
69
70 # obtain patient
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 # display standalone multisash progress notes input
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 # clean up
85 if patient is not None:
86 try:
87 patient.cleanup()
88 except Exception:
89 print("error cleaning up patient")
90
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Sat Feb 29 02:55:27 2020 | http://epydoc.sourceforge.net |