1
2 """This plugin lets you manage laboratory requests
3 - add requests
4 - keep track of pending requests
5 - see import errors
6 - review newly imported lab results
7 """
8
9
10
11 __version__ = "$Revision: 1.40 $"
12 __author__ = "Sebastian Hilbert <Sebastian.Hilbert@gmx.net>"
13
14 import wx
15
16 from Gnumed.pycommon import gmI18N
17 from Gnumed.wxpython import gmLabWidgets, gmPlugin
18
19 _log = gmLog.gmDefLog
20 _log.Log(gmLog.lInfo, __version__)
21
22
25
26 wx.Panel.__init__(self, parent, id, wxDefaultPosition, wxDefaultSize)
27
28
29 self.nb = gmLabWidgets.cLabJournalNB(self, -1)
30
31
32 sizer = wx.BoxSizer(wx.VERTICAL)
33 szr_nb = wx.NotebookSizer( self.nb )
34
35 sizer.Add(szr_nb, 1, wxEXPAND, 0)
36 self.SetAutoLayout(1)
37 self.SetSizer(sizer)
38 sizer.Fit(self)
39 self.Layout()
40
41
43 tab_name = _("lab journal")
44
47
51
53 return ('tools', _('Show &lab journal'))
54
56
57 if self.gb['main.notebook.raised_plugin'] != self.__class__.__name__:
58 return 1
59 if self._widget.nb.update() is None:
60 _log.Log(gmLog.lErr, "cannot update lab journal with data")
61 return None
62 return 1
63
65
66 if not self._verify_patient_avail():
67 return None
68 return 1
69
70
71
72 if __name__ == '__main__':
73 print "do not run standalone like this"
74
75