| Home | Trees | Indices | Help |
|
|---|
|
|
1 # -*- coding: utf-8 -*-
2 #======================================================================
3 # GNUmed multisash based progress note input plugin
4 # -------------------------------------------------
5 #
6 # this plugin displays the list of patient problems
7 # toghether whith a multisash container for progress notes
8 #
9 # @copyright: author
10 #======================================================================
11 __version__ = "$Revision: 1.15 $"
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 from Gnumed.wxpython import gmPlugin, gmSOAPWidgets
19
20
21 _log = logging.getLogger('gm.ui')
22 _log.info(__version__)
23 #======================================================================
25 """Plugin to encapsulate multisash based progress note input window."""
26
27 tab_name = _('progress notes (sash)')
28
31
33 self._widget = gmSOAPWidgets.cMultiSashedProgressNoteInputPanel(parent, -1)
34 return self._widget
35
38
44
45 #======================================================================
46 # main
47 #----------------------------------------------------------------------
48 if __name__ == "__main__":
49
50 import sys
51
52 import wx
53
54 from Gnumed.business import gmPersonSearch
55
56 _log.info("starting multisashed progress notes input plugin...")
57
58 # make sure we have a db connection
59 pool = gmPG.ConnectionPool()
60
61 # obtain patient
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 # display standalone multisash progress notes input
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 # clean up
76 if patient is not None:
77 try:
78 patient.cleanup()
79 except Exception:
80 print "error cleaning up patient"
81 pool.StopListeners()
82
83 _log.info("closing multisashed progress notes input plugin...")
84
85 #======================================================================
86
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Sat Feb 29 02:55:27 2020 | http://epydoc.sourceforge.net |