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