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

# Source Code for Module Gnumed.wxGladeWidgets.wxgAllergyEditAreaPnl

     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  # end wxGlade
    14
    15
    16 -class wxgAllergyEditAreaPnl(wx.ScrolledWindow):
    17 -        def __init__(self, *args, **kwds):
    18                  # begin wxGlade: wxgAllergyEditAreaPnl.__init__
    19                  kwds["style"] = kwds.get("style", 0) | wx.BORDER_NONE | wx.TAB_TRAVERSAL
    20                  wx.ScrolledWindow.__init__(self, *args, **kwds)
    21                  from Gnumed.wxpython.gmDateTimeInput import cFuzzyTimestampInput
    22                  self._DPRW_date_noted = cFuzzyTimestampInput(self, wx.ID_ANY, "")
    23                  from Gnumed.wxpython.gmPhraseWheel import cPhraseWheel
    24                  self._PRW_trigger = cPhraseWheel(self, wx.ID_ANY, "")
    25                  self._TCTRL_product_name = wx.TextCtrl(self, wx.ID_ANY, "")
    26                  self._TCTRL_generic = wx.TextCtrl(self, wx.ID_ANY, "")
    27                  self._ChBOX_generic_specific = wx.CheckBox(self, wx.ID_ANY, _("&Tolerates others in class"))
    28                  self._TCTRL_atc_classes = wx.TextCtrl(self, wx.ID_ANY, "")
    29                  self._PRW_reaction = cPhraseWheel(self, wx.ID_ANY, "")
    30                  self._RBTN_type_allergy = wx.RadioButton(self, wx.ID_ANY, _("&Allergy"), style=wx.RB_GROUP)
    31                  self._RBTN_type_sensitivity = wx.RadioButton(self, wx.ID_ANY, _("&Sensitivity"))
    32                  self._ChBOX_definite = wx.CheckBox(self, wx.ID_ANY, _("&Definite"))
    33
    34                  self.__set_properties()
    35                  self.__do_layout()
    36                  # end wxGlade
    37
    38 -        def __set_properties(self):
    39                  # begin wxGlade: wxgAllergyEditAreaPnl.__set_properties
    40                  self.SetScrollRate(10, 10)
    41                  self._DPRW_date_noted.SetToolTip(_("When did the patient notice onset of the reaction.\n\nIf unknown use the date when it was reported to you."))
    42                  self._PRW_trigger.SetToolTip(_("What is reported to be the trigger for the reaction. Can be\n- a drug (product name, generic, constrast media, ...)\n- a chemical (household, job related)\n- an animal (cat fur, lice, ...)\n- a metal (CrNi, ...)\n- a foodstuff (lactose, ...)\n- a type of pollen (birch, ...)\n- ..."))
    43                  self._TCTRL_product_name.SetToolTip(_("Product name if a drug is entered as the trigger."))
    44                  self._TCTRL_product_name.Enable(False)
    45                  self._TCTRL_generic.SetToolTip(_("Product name if a drug is entered as the trigger."))
    46                  self._TCTRL_generic.Enable(False)
    47                  self._ChBOX_generic_specific.SetToolTip(_("Check if this reaction applies to this drug/generic only, not the entire drug class."))
    48                  self._TCTRL_atc_classes.SetToolTip(_("Displays drug classe(s) along with their ATC code."))
    49                  self._TCTRL_atc_classes.Enable(False)
    50                  self._PRW_reaction.SetToolTip(_("Document signs and symptoms. If reaction is to a drug also document time of onset after drug administration (<24h, 24-72h, >72h)."))
    51                  self._RBTN_type_allergy.SetToolTip(_("Select this if the reaction is an allergy."))
    52                  self._RBTN_type_allergy.SetValue(1)
    53                  self._RBTN_type_sensitivity.SetToolTip(_("Select this if the reaction is a sensitivity."))
    54                  self._ChBOX_definite.SetToolTip(_("Check this if this allergy/intolerance is known to exist for sure as opposed to suspected."))
    55                  self._ChBOX_definite.SetValue(1)
    56                  # end wxGlade
    57
    58 -        def __do_layout(self):
    59                  # begin wxGlade: wxgAllergyEditAreaPnl.__do_layout
    60                  _gszr_main = wx.FlexGridSizer(7, 2, 1, 3)
    61                  __szr_reaction_type = wx.BoxSizer(wx.HORIZONTAL)
    62                  __szr_generic = wx.BoxSizer(wx.HORIZONTAL)
    63                  __lbl_date_noted = wx.StaticText(self, wx.ID_ANY, _("Onset"))
    64                  _gszr_main.Add(__lbl_date_noted, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    65                  _gszr_main.Add(self._DPRW_date_noted, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    66                  __lbl_trigger = wx.StaticText(self, wx.ID_ANY, _("Trigger"))
    67                  _gszr_main.Add(__lbl_trigger, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    68                  _gszr_main.Add(self._PRW_trigger, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    69                  __lbl_product_name = wx.StaticText(self, wx.ID_ANY, _("Product Name"))
    70                  _gszr_main.Add(__lbl_product_name, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    71                  _gszr_main.Add(self._TCTRL_product_name, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    72                  __lbl_generic = wx.StaticText(self, wx.ID_ANY, _("Generics"))
    73                  _gszr_main.Add(__lbl_generic, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    74                  __szr_generic.Add(self._TCTRL_generic, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    75                  __szr_generic.Add(self._ChBOX_generic_specific, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    76                  _gszr_main.Add(__szr_generic, 1, wx.EXPAND, 0)
    77                  __lbl_atc_classes = wx.StaticText(self, wx.ID_ANY, _("Drug Classes"))
    78                  _gszr_main.Add(__lbl_atc_classes, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    79                  _gszr_main.Add(self._TCTRL_atc_classes, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    80                  __lbl_reaction = wx.StaticText(self, wx.ID_ANY, _("Reaction"))
    81                  __lbl_reaction.SetToolTip(_("Document signs and symptoms. If reaction is to a drug also document time of onset after drug administration (<24h, 24-72h, >72h)."))
    82                  _gszr_main.Add(__lbl_reaction, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    83                  _gszr_main.Add(self._PRW_reaction, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    84                  __lbl_reaction_type = wx.StaticText(self, wx.ID_ANY, _("Reaction Type"))
    85                  _gszr_main.Add(__lbl_reaction_type, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    86                  __szr_reaction_type.Add(self._RBTN_type_allergy, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
    87                  __szr_reaction_type.Add(self._RBTN_type_sensitivity, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 15)
    88                  __szr_reaction_type.Add(self._ChBOX_definite, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    89                  _gszr_main.Add(__szr_reaction_type, 1, wx.EXPAND, 0)
    90                  self.SetSizer(_gszr_main)
    91                  _gszr_main.Fit(self)
    92                  _gszr_main.AddGrowableCol(1)
    93                  self.Layout()
    94                  # end wxGlade
    95
    96  # end of class wxgAllergyEditAreaPnl
    97