1
2
3
4
5 import wx
6
7
8
9
10
11
14
15 from Gnumed.wxpython.gmPatPicWidgets import cPatientPicture
16 from Gnumed.wxpython.gmPatSearchWidgets import cActivePatientSelector
17 from Gnumed.wxpython.gmDemographicsWidgets import cImageTagPresenterPnl
18 from Gnumed.wxpython.gmEMRStructWidgets import cActiveEncounterPnl
19
20
21 kwds["style"] = wx.RAISED_BORDER
22 wx.Panel.__init__(self, *args, **kwds)
23 self._BMP_patient_picture = cPatientPicture(self, -1, wx.NullBitmap)
24 self._TCTRL_patient_selector = cActivePatientSelector(self, -1, "")
25 self._LBL_age = wx.StaticText(self, -1, _("<age>"))
26 self._LBL_allergies = wx.StaticText(self, -1, _("Caveat"))
27 self._TCTRL_allergies = wx.TextCtrl(self, -1, "", style=wx.TE_READONLY)
28 self._PNL_tags = cImageTagPresenterPnl(self, -1, style=wx.NO_BORDER)
29 self._PNL_enc = cActiveEncounterPnl(self, -1, style=wx.SIMPLE_BORDER)
30
31 self.__set_properties()
32 self.__do_layout()
33
34
36
37 self._BMP_patient_picture.SetMinSize((50, 54))
38 self._TCTRL_patient_selector.SetFont(wx.Font(12, wx.SWISS, wx.NORMAL, wx.BOLD, 0, ""))
39 self._LBL_age.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.BOLD, 0, ""))
40 self._LBL_age.SetToolTipString(_("The age."))
41 self._LBL_allergies.SetForegroundColour(wx.Colour(255, 0, 0))
42 self._LBL_allergies.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.BOLD, 0, ""))
43 self._TCTRL_allergies.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND))
44 self._TCTRL_allergies.SetForegroundColour(wx.Colour(255, 0, 0))
45 self._TCTRL_allergies.SetFont(wx.Font(12, wx.SWISS, wx.NORMAL, wx.BOLD, 0, ""))
46
47
49
50 __szr_main = wx.BoxSizer(wx.HORIZONTAL)
51 __szr_stacked_rows = wx.BoxSizer(wx.VERTICAL)
52 __szr_bottom_row = wx.BoxSizer(wx.HORIZONTAL)
53 __szr_top_row = wx.BoxSizer(wx.HORIZONTAL)
54 __szr_main.Add(self._BMP_patient_picture, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 2)
55 __szr_top_row.Add(self._TCTRL_patient_selector, 2, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
56 __szr_top_row.Add(self._LBL_age, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 10)
57 __szr_top_row.Add(self._LBL_allergies, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 2)
58 __szr_top_row.Add(self._TCTRL_allergies, 3, wx.ALIGN_CENTER_VERTICAL, 0)
59 __szr_stacked_rows.Add(__szr_top_row, 0, wx.BOTTOM | wx.EXPAND, 2)
60 __szr_bottom_row.Add(self._PNL_tags, 1, wx.ALIGN_CENTER_VERTICAL, 0)
61 __szr_bottom_row.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL, 0)
62 __szr_bottom_row.Add(self._PNL_enc, 1, wx.ALIGN_CENTER_VERTICAL, 0)
63 __szr_stacked_rows.Add(__szr_bottom_row, 0, wx.EXPAND, 0)
64 __szr_main.Add(__szr_stacked_rows, 1, 0, 0)
65 self.SetSizer(__szr_main)
66 __szr_main.Fit(self)
67
68
69
70