Gnumed.wxGladeWidgets.wxgPrimaryCareVitalsInputPnl

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

# Source Code for Module Gnumed.wxGladeWidgets.wxgPrimaryCareVitalsInputPnl

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