Package Gnumed :: Package wxGladeWidgets :: Module wxgPrimaryCareVitalsInputPnl |
[frames] | no frames]

# Source Code for Module Gnumed.wxGladeWidgets.wxgPrimaryCareVitalsInputPnl

      1  #!/usr/bin/env python
      2  # -*- coding: utf-8 -*-
      3  # generated by wxGlade 0.6.3 from "/home/ncq/Projekte/gm-cvs/branches/HEAD/gnumed/gnumed/client/wxg/wxgPrimaryCareVitalsInputPnl.wxg"
      4
      5  import wx
      6
      7  # begin wxGlade: extracode
      8  import wx.lib.analogclock
      9  import wx.lib.hyperlink
     10  import wx.lib.hyperlink
     11  import wx.lib.masked
     12  # end wxGlade
     13
     14
     15
     16 -class wxgPrimaryCareVitalsInputPnl(wx.Panel):
     17 -    def __init__(self, *args, **kwds):
     18          # begin wxGlade: wxgPrimaryCareVitalsInputPnl.__init__
     19          kwds["style"] = wx.TAB_TRAVERSAL
     20          wx.Panel.__init__(self, *args, **kwds)
     21          self._TCTRL_RR_left = wx.lib.masked.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     22          self._LNK_SI = wx.lib.hyperlink.HyperLinkCtrl(self, -1, _("Schock index"), style=wx.TE_READONLY|wx.TE_CENTRE|wx.NO_BORDER)
     23          self._TCTRL_RR_right = wx.lib.masked.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     24          self._LBL_SI_value = wx.StaticText(self, -1, _("<SI>"), style=wx.ALIGN_CENTRE)
     25          self._TCTRL_pulse = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     26          self._RBTN_rhythmic = wx.RadioButton(self, -1, _("rhythmic"))
     27          self._RBTN_arrhythmic = wx.RadioButton(self, -1, _("arrhythmic"))
     28          self._TCTRL_pulse_quality = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     29          self._TCTRL_temp_periph = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     30          self._TCTRL_temp_rect = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     31          self._RBTN_centigrade = wx.RadioButton(self, -1, _(u"°C"), style=wx.RB_GROUP)
     32          self._RBTN_fahrenheit = wx.RadioButton(self, -1, _(u"°F"))
     33          self._TCTRL_respiration = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     34          self._TCTRL_height = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     35          self._LBL_last_height = wx.StaticText(self, -1, _("<last height>"))
     36          self._LNK_BMI = wx.lib.hyperlink.HyperLinkCtrl(self, -1, _("BMI"), style=wx.TE_READONLY|wx.TE_CENTRE|wx.NO_BORDER)
     37          self._TCTRL_weight = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     38          self._LBL_last_weight = wx.StaticText(self, -1, _("<last weight>"))
     39          self._LBL_BMI_value = wx.StaticText(self, -1, _("<BMI>"), style=wx.ALIGN_CENTRE)
     40          self._TCTRL_waist = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     41          self._LBL_last_waist = wx.StaticText(self, -1, _("<last waist>"))
     42          self._clock = wx.lib.analogclock.AnalogClock(self, -1)
     43
     44          self.__set_properties()
     45          self.__do_layout()
     46          # end wxGlade
     47
     48 -    def __set_properties(self):
     49          # begin wxGlade: wxgPrimaryCareVitalsInputPnl.__set_properties
     50          self._TCTRL_RR_left.SetToolTipString(_("RR measured on the left arm."))
     51          self._LNK_SI.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND))
     52          self._LNK_SI.SetToolTipString(_("SI = Pulse / RR (syst)\n\n  0.4-0.7 = normal\n  >1 = critical"))
     53          self._TCTRL_RR_right.SetToolTipString(_("RR measured on the right arm."))
     54          self._TCTRL_pulse.SetToolTipString(_("Heart rate in beats per minute."))
     55          self._RBTN_rhythmic.SetValue(1)
     56          self._TCTRL_pulse_quality.SetToolTipString(_("The quality of the pulse.\nLet's not forget good old GP medicine !"))
     57          self._TCTRL_temp_periph.SetToolTipString(_("Peripheral body temperature:\n axillar\n oral\n forehead\n tympanic"))
     58          self._TCTRL_temp_rect.SetToolTipString(_("\"Core\" body temperature:\n rectal\n intravascular"))
     59          self._RBTN_centigrade.SetValue(1)
     60          self._TCTRL_respiration.SetToolTipString(_("Respiration rate."))
     61          self._TCTRL_height.SetToolTipString(_("Current height in cm."))
     62          self._LNK_BMI.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND))
     63          self._LNK_BMI.SetToolTipString(_(u"Body Mass Index.\n\nBMI = weight / height²"))
     64          self._TCTRL_weight.SetToolTipString(_("Current weight in gram or kg.\n\nCutoff is 500:\n <500: kg\n >500: g"))
     65          self._TCTRL_waist.SetToolTipString(_("Current waist circumference in cm."))
     66          self._clock.SetMinSize((100, 100))
     67          # end wxGlade
     68
     69 -    def __do_layout(self):
     70          # begin wxGlade: wxgPrimaryCareVitalsInputPnl.__do_layout
     71          __szr_main = wx.BoxSizer(wx.VERTICAL)
     72          __gzsr_main = wx.FlexGridSizer(14, 3, 2, 4)
     73          __szr_waist = wx.BoxSizer(wx.HORIZONTAL)
     74          __szr_weight = wx.BoxSizer(wx.HORIZONTAL)
     75          __szr_height = wx.BoxSizer(wx.HORIZONTAL)
     76          __szr_respiration = wx.BoxSizer(wx.HORIZONTAL)
     77          __szr_temp_details = wx.BoxSizer(wx.HORIZONTAL)
     78          __szr_pulse_details = wx.BoxSizer(wx.HORIZONTAL)
     79          __szr_pulse = wx.BoxSizer(wx.HORIZONTAL)
     80          __szr_RR_right = wx.BoxSizer(wx.HORIZONTAL)
     81          __szr_RR = wx.BoxSizer(wx.HORIZONTAL)
     82          __gzsr_main.Add((20, 20), 0, wx.EXPAND, 0)
     83          __lbl_vitals = wx.StaticText(self, -1, _("Vitals"))
     84          __lbl_vitals.SetForegroundColour(wx.Colour(95, 159, 159))
     85          __gzsr_main.Add(__lbl_vitals, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 0)
     86          __gzsr_main.Add((20, 20), 0, wx.EXPAND, 0)
     87          __lbl_RR_left = wx.StaticText(self, -1, _("RR left"))
     88          __gzsr_main.Add(__lbl_RR_left, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 0)
     89          __szr_RR.Add(self._TCTRL_RR_left, 0, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 3)
     90          __lbl_mmHg_left = wx.StaticText(self, -1, _("mmHg"))
     91          __szr_RR.Add(__lbl_mmHg_left, 0, wx.ALIGN_CENTER_VERTICAL, 15)
     92          __gzsr_main.Add(__szr_RR, 1, wx.EXPAND, 0)
     93          __gzsr_main.Add(self._LNK_SI, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 15)
     94          __lbl_RR_right = wx.StaticText(self, -1, _("RR right"))
     95          __gzsr_main.Add(__lbl_RR_right, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 0)
     96          __szr_RR_right.Add(self._TCTRL_RR_right, 0, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 3)
     97          __lbl_mmHg_right = wx.StaticText(self, -1, _("mmHg"))
     98          __szr_RR_right.Add(__lbl_mmHg_right, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     99          __gzsr_main.Add(__szr_RR_right, 1, wx.EXPAND, 0)
    100          __gzsr_main.Add(self._LBL_SI_value, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 15)
    101          __lbl_pulse = wx.StaticText(self, -1, _("Pulse"))
    102          __gzsr_main.Add(__lbl_pulse, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 0)
    103          __szr_pulse.Add(self._TCTRL_pulse, 0, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 3)
    104          __lbl_bpm = wx.StaticText(self, -1, _("/min"))
    105          __szr_pulse.Add(__lbl_bpm, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 10)
    106          __szr_pulse.Add(self._RBTN_rhythmic, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 3)
    107          __szr_pulse.Add(self._RBTN_arrhythmic, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    108          __gzsr_main.Add(__szr_pulse, 1, wx.EXPAND, 0)
    109          __gzsr_main.Add((20, 20), 0, wx.EXPAND, 0)
    110          __gzsr_main.Add((20, 20), 0, wx.EXPAND, 0)
    111          __szr_pulse_details.Add(self._TCTRL_pulse_quality, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
    112          __gzsr_main.Add(__szr_pulse_details, 1, wx.EXPAND, 0)
    113          __gzsr_main.Add((20, 20), 0, wx.EXPAND, 0)
    114          __lbl_temp = wx.StaticText(self, -1, _("Temp"))
    115          __gzsr_main.Add(__lbl_temp, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 0)
    116          __szr_temp_details.Add(self._TCTRL_temp_periph, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 3)
    117          __lbl_temp_periph = wx.StaticText(self, -1, _("(axill./oral/...)"))
    118          __szr_temp_details.Add(__lbl_temp_periph, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 10)
    119          __szr_temp_details.Add(self._TCTRL_temp_rect, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 3)
    120          __lbl_temp_rect = wx.StaticText(self, -1, _("(rectal)"))
    121          __szr_temp_details.Add(__lbl_temp_rect, 0, wx.ALIGN_CENTER_VERTICAL, 3)
    122          __szr_temp_details.Add((20, 20), 1, wx.EXPAND, 0)
    123          __szr_temp_details.Add(self._RBTN_centigrade, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 3)
    124          __szr_temp_details.Add(self._RBTN_fahrenheit, 0, wx.ALIGN_CENTER_VERTICAL, 3)
    125          __gzsr_main.Add(__szr_temp_details, 1, wx.EXPAND, 0)
    126          __gzsr_main.Add((20, 20), 0, wx.EXPAND, 0)
    127          __lbl_resp_rate = wx.StaticText(self, -1, _("Resp"))
    128          __gzsr_main.Add(__lbl_resp_rate, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 0)
    129          __szr_respiration.Add(self._TCTRL_respiration, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 3)
    130          __lbl_units_respiration = wx.StaticText(self, -1, _("/min"))
    131          __szr_respiration.Add(__lbl_units_respiration, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    132          __gzsr_main.Add(__szr_respiration, 1, wx.EXPAND, 0)
    133          __gzsr_main.Add((20, 20), 0, wx.EXPAND, 0)
    134          __gzsr_main.Add((20, 20), 0, wx.EXPAND, 0)
    135          __lbl_figure = wx.StaticText(self, -1, _("Figure"))
    136          __lbl_figure.SetForegroundColour(wx.Colour(95, 159, 159))
    137          __gzsr_main.Add(__lbl_figure, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 0)
    138          __gzsr_main.Add((20, 20), 0, wx.EXPAND, 0)
    139          __lbl_height = wx.StaticText(self, -1, _("Height"))
    140          __gzsr_main.Add(__lbl_height, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 0)
    141          __szr_height.Add(self._TCTRL_height, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 3)
    142          __lbl_unit_height = wx.StaticText(self, -1, _("cm"))
    143          __szr_height.Add(__lbl_unit_height, 0, wx.ALIGN_CENTER_VERTICAL, 10)
    144          __szr_height.Add((20, 20), 1, wx.EXPAND, 0)
    145          __szr_height.Add(self._LBL_last_height, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    146          __gzsr_main.Add(__szr_height, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
    147          __gzsr_main.Add(self._LNK_BMI, 0, wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 15)
    148          __lbl_weight = wx.StaticText(self, -1, _("Weight"))
    149          __gzsr_main.Add(__lbl_weight, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 3)
    150          __szr_weight.Add(self._TCTRL_weight, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 3)
    151          __lbl_unit_weight = wx.StaticText(self, -1, _("g or kg"))
    152          __szr_weight.Add(__lbl_unit_weight, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    153          __szr_weight.Add((20, 20), 1, wx.EXPAND, 0)
    154          __szr_weight.Add(self._LBL_last_weight, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    155          __gzsr_main.Add(__szr_weight, 1, wx.EXPAND, 0)
    156          __gzsr_main.Add(self._LBL_BMI_value, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 15)
    157          __lbl_waist = wx.StaticText(self, -1, _("Waist"))
    158          __gzsr_main.Add(__lbl_waist, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 0)
    159          __szr_waist.Add(self._TCTRL_waist, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 3)
    160          __lbl_unit_waist = wx.StaticText(self, -1, _("cm"))
    161          __szr_waist.Add(__lbl_unit_waist, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    162          __szr_waist.Add((20, 20), 1, wx.EXPAND, 0)
    163          __szr_waist.Add(self._LBL_last_waist, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    164          __gzsr_main.Add(__szr_waist, 1, wx.EXPAND, 0)
    165          __gzsr_main.Add((20, 20), 0, wx.EXPAND, 0)
    166          __gzsr_main.Add((20, 20), 0, wx.EXPAND, 0)
    167          __gzsr_main.Add(self._clock, 1, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 0)
    168          __gzsr_main.Add((20, 20), 0, wx.EXPAND, 0)
    169          __gzsr_main.AddGrowableCol(1)
    170          __szr_main.Add(__gzsr_main, 1, wx.EXPAND, 0)
    171          self.SetSizer(__szr_main)
    172          __szr_main.Fit(self)
    173          # end wxGlade
    174
    175  # end of class wxgPrimaryCareVitalsInputPnl
    176