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

Source Code for Module Gnumed.wxGladeWidgets.wxgFamilyHistoryEAPnl

  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 wxgFamilyHistoryEAPnl(wx.ScrolledWindow):
17 - def __init__(self, *args, **kwds):
18 # begin wxGlade: wxgFamilyHistoryEAPnl.__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.gmFamilyHistoryWidgets import cRelationshipTypePhraseWheel 22 self._PRW_relationship = cRelationshipTypePhraseWheel(self, wx.ID_ANY, "") 23 from Gnumed.wxpython.gmPhraseWheel import cPhraseWheel 24 self._PRW_condition = cPhraseWheel(self, wx.ID_ANY, "") 25 from Gnumed.wxpython.gmCodingWidgets import cGenericCodesPhraseWheel 26 self._PRW_codes = cGenericCodesPhraseWheel(self, wx.ID_ANY, "") 27 self._TCTRL_age_of_onset = wx.TextCtrl(self, wx.ID_ANY, "") 28 from Gnumed.wxpython.gmGuiHelpers import cThreeValuedLogicPhraseWheel 29 self._PRW_died_of_this = cThreeValuedLogicPhraseWheel(self, wx.ID_ANY, "") 30 from Gnumed.wxpython.gmDateTimeInput import cIntervalPhraseWheel 31 self._PRW_age_of_death = cIntervalPhraseWheel(self, wx.ID_ANY, "") 32 from Gnumed.wxpython.gmEMRStructWidgets import cEpisodeSelectionPhraseWheel 33 self._PRW_episode = cEpisodeSelectionPhraseWheel(self, wx.ID_ANY, "") 34 self._TCTRL_name = wx.TextCtrl(self, wx.ID_ANY, "") 35 from Gnumed.wxpython.gmDateTimeInput import cDateInputPhraseWheel 36 self._PRW_dob = cDateInputPhraseWheel(self, wx.ID_ANY, "") 37 self._TCTRL_comment = wx.TextCtrl(self, wx.ID_ANY, "") 38 39 self.__set_properties() 40 self.__do_layout()
41 # end wxGlade 42
43 - def __set_properties(self):
44 # begin wxGlade: wxgFamilyHistoryEAPnl.__set_properties 45 self.SetScrollRate(10, 10) 46 self._PRW_relationship.SetToolTip(_("Required: Enter or select the type of relationship between the patient and this relative.")) 47 self._PRW_condition.SetToolTip(_("Required: Enter or select the name of the condition the relative suffered from.")) 48 self._PRW_codes.SetToolTip(_("Select codes relevant to this family history items.")) 49 self._TCTRL_age_of_onset.SetToolTip(_("Optional: Age of onset of the condition in the relative.")) 50 self._PRW_died_of_this.SetToolTip(_("Optional: Whether this condition contributed to the death of the patient.")) 51 self._PRW_age_of_death.SetToolTip(_("Optional: Enter the age of death of the relative.")) 52 self._PRW_episode.SetToolTip(_("Optional: The episode under which this family history item became known or to which it is relevant.\n\nIf blank: Will be added to an unattributed episode \"Family History\".")) 53 self._TCTRL_name.SetToolTip(_("Optional: Enter the name of the relative.")) 54 self._PRW_dob.SetToolTip(_("Optional: Enter the date of birth of the relative.")) 55 self._TCTRL_comment.SetToolTip(_("Optional: A comment on this family history item."))
56 # end wxGlade 57
58 - def __do_layout(self):
59 # begin wxGlade: wxgFamilyHistoryEAPnl.__do_layout 60 _gszr_main = wx.FlexGridSizer(8, 2, 1, 3) 61 __szr_relation = wx.BoxSizer(wx.HORIZONTAL) 62 __szr_death = wx.BoxSizer(wx.HORIZONTAL) 63 __szr_condition_details = wx.BoxSizer(wx.HORIZONTAL) 64 __lbl_relation = wx.StaticText(self, wx.ID_ANY, _("Relationship")) 65 __lbl_relation.SetForegroundColour(wx.Colour(255, 0, 0)) 66 _gszr_main.Add(__lbl_relation, 0, wx.ALIGN_CENTER_VERTICAL, 0) 67 _gszr_main.Add(self._PRW_relationship, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 5) 68 __lbl_condition = wx.StaticText(self, wx.ID_ANY, _("Condition")) 69 __lbl_condition.SetForegroundColour(wx.Colour(255, 0, 0)) 70 _gszr_main.Add(__lbl_condition, 0, wx.ALIGN_CENTER_VERTICAL, 0) 71 _gszr_main.Add(self._PRW_condition, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 72 __lbl_codes = wx.StaticText(self, wx.ID_ANY, _("Codes")) 73 _gszr_main.Add(__lbl_codes, 0, wx.ALIGN_CENTER_VERTICAL, 0) 74 _gszr_main.Add(self._PRW_codes, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 75 __lbl_condition_details = wx.StaticText(self, wx.ID_ANY, _("Age onset")) 76 _gszr_main.Add(__lbl_condition_details, 0, wx.ALIGN_CENTER_VERTICAL, 0) 77 __szr_condition_details.Add(self._TCTRL_age_of_onset, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 5) 78 _gszr_main.Add(__szr_condition_details, 1, wx.EXPAND, 0) 79 __lbl_died_of_this = wx.StaticText(self, wx.ID_ANY, _("Caused death ?")) 80 _gszr_main.Add(__lbl_died_of_this, 0, wx.ALIGN_CENTER_VERTICAL, 3) 81 __szr_death.Add(self._PRW_died_of_this, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 5) 82 __lbl_death = wx.StaticText(self, wx.ID_ANY, _("Age at death:")) 83 __szr_death.Add(__lbl_death, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3) 84 __szr_death.Add(self._PRW_age_of_death, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 5) 85 _gszr_main.Add(__szr_death, 1, wx.EXPAND, 0) 86 __lbl_episode = wx.StaticText(self, wx.ID_ANY, _("Episode")) 87 __lbl_episode.SetForegroundColour(wx.Colour(255, 127, 0)) 88 _gszr_main.Add(__lbl_episode, 0, wx.ALIGN_CENTER_VERTICAL, 0) 89 _gszr_main.Add(self._PRW_episode, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 90 __lbl_name = wx.StaticText(self, wx.ID_ANY, _("Person's name")) 91 _gszr_main.Add(__lbl_name, 0, wx.ALIGN_CENTER_VERTICAL, 0) 92 __szr_relation.Add(self._TCTRL_name, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 5) 93 __lbl_dob = wx.StaticText(self, wx.ID_ANY, _("Date of birth:")) 94 __szr_relation.Add(__lbl_dob, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3) 95 __szr_relation.Add(self._PRW_dob, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 96 _gszr_main.Add(__szr_relation, 1, wx.EXPAND, 0) 97 __lbl_comment = wx.StaticText(self, wx.ID_ANY, _("Comment")) 98 _gszr_main.Add(__lbl_comment, 0, wx.ALIGN_CENTER_VERTICAL, 0) 99 _gszr_main.Add(self._TCTRL_comment, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 100 self.SetSizer(_gszr_main) 101 _gszr_main.Fit(self) 102 _gszr_main.AddGrowableCol(1) 103 self.Layout()
104 # end wxGlade 105 106 # end of class wxgFamilyHistoryEAPnl 107