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

Source Code for Module Gnumed.wxGladeWidgets.wxgFamilyHistoryEAPnl

  1  #!/usr/bin/env python 
  2  # -*- coding: utf8 -*- 
  3  # generated by wxGlade 0.6.3 from "/home/ncq/Projekte/gm-git/gnumed/gnumed/client/wxg/wxgFamilyHistoryEAPnl" 
  4   
  5  import wx 
  6   
  7  # begin wxGlade: extracode 
  8  # end wxGlade 
  9   
 10   
 11   
12 -class wxgFamilyHistoryEAPnl(wx.ScrolledWindow):
13 - def __init__(self, *args, **kwds):
14 15 #from Gnumed.wxpython.gmFamilyHistoryWidgets import cFamilyHistoryRelationType 16 from Gnumed.wxpython.gmEMRStructWidgets import cEpisodeSelectionPhraseWheel 17 from Gnumed.wxpython.gmDateTimeInput import cIntervalPhraseWheel 18 from Gnumed.wxpython.gmDateTimeInput import cDateInputPhraseWheel 19 from Gnumed.wxpython.gmGuiHelpers import cThreeValuedLogicPhraseWheel 20 from Gnumed.wxpython.gmPhraseWheel import cPhraseWheel 21 from Gnumed.wxpython.gmFamilyHistoryWidgets import cRelationshipTypePhraseWheel 22 from Gnumed.wxpython.gmCodingWidgets import cGenericCodesPhraseWheel 23 24 # begin wxGlade: wxgFamilyHistoryEAPnl.__init__ 25 kwds["style"] = wx.NO_BORDER|wx.TAB_TRAVERSAL 26 wx.ScrolledWindow.__init__(self, *args, **kwds) 27 self._PRW_relationship = cRelationshipTypePhraseWheel(self, -1, "", style=wx.NO_BORDER) 28 self._PRW_condition = cPhraseWheel(self, -1, "", style=wx.NO_BORDER) 29 self._PRW_codes = cGenericCodesPhraseWheel(self, -1, "", style=wx.NO_BORDER) 30 self._TCTRL_age_of_onset = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER) 31 self._PRW_died_of_this = cThreeValuedLogicPhraseWheel(self, -1, "", style=wx.NO_BORDER) 32 self._PRW_age_of_death = cIntervalPhraseWheel(self, -1, "", style=wx.NO_BORDER) 33 self._PRW_episode = cEpisodeSelectionPhraseWheel(self, -1, "", style=wx.NO_BORDER) 34 self._TCTRL_name = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER) 35 self._PRW_dob = cDateInputPhraseWheel(self, -1, "", style=wx.NO_BORDER) 36 self._TCTRL_comment = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER) 37 38 self.__set_properties() 39 self.__do_layout()
40 # end wxGlade 41
42 - def __set_properties(self):
43 # begin wxGlade: wxgFamilyHistoryEAPnl.__set_properties 44 self.SetScrollRate(10, 10) 45 self._PRW_relationship.SetToolTipString(_("Required: Enter or select the type of relationship between the patient and this relative.")) 46 self._PRW_condition.SetToolTipString(_("Required: Enter or select the name of the condition the relative suffered from.")) 47 self._PRW_codes.SetToolTipString(_("Select codes relevant to this family history items.")) 48 self._TCTRL_age_of_onset.SetToolTipString(_("Optional: Age of onset of the condition in the relative.")) 49 self._PRW_died_of_this.SetToolTipString(_("Optional: Whether this condition contributed to the death of the patient.")) 50 self._PRW_age_of_death.SetToolTipString(_("Optional: Enter the age of death of the relative.")) 51 self._PRW_episode.SetToolTipString(_("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\".")) 52 self._TCTRL_name.SetToolTipString(_("Optional: Enter the name of the relative.")) 53 self._PRW_dob.SetToolTipString(_("Optional: Enter the date of birth of the relative.")) 54 self._TCTRL_comment.SetToolTipString(_("Optional: A comment on this family history item."))
55 # end wxGlade 56
57 - def __do_layout(self):
58 # begin wxGlade: wxgFamilyHistoryEAPnl.__do_layout 59 _gszr_main = wx.FlexGridSizer(8, 2, 1, 3) 60 __szr_relation = wx.BoxSizer(wx.HORIZONTAL) 61 __szr_death = wx.BoxSizer(wx.HORIZONTAL) 62 __szr_condition_details = wx.BoxSizer(wx.HORIZONTAL) 63 __lbl_relation = wx.StaticText(self, -1, _("Relationship")) 64 __lbl_relation.SetForegroundColour(wx.Colour(255, 0, 0)) 65 _gszr_main.Add(__lbl_relation, 0, wx.ALIGN_CENTER_VERTICAL, 0) 66 _gszr_main.Add(self._PRW_relationship, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5) 67 __lbl_condition = wx.StaticText(self, -1, _("Condition")) 68 __lbl_condition.SetForegroundColour(wx.Colour(255, 0, 0)) 69 _gszr_main.Add(__lbl_condition, 0, wx.ALIGN_CENTER_VERTICAL, 0) 70 _gszr_main.Add(self._PRW_condition, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 71 __lbl_codes = wx.StaticText(self, -1, _("Codes")) 72 _gszr_main.Add(__lbl_codes, 0, wx.ALIGN_CENTER_VERTICAL, 0) 73 _gszr_main.Add(self._PRW_codes, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 74 __lbl_condition_details = wx.StaticText(self, -1, _("Age onset")) 75 _gszr_main.Add(__lbl_condition_details, 0, wx.ALIGN_CENTER_VERTICAL, 0) 76 __szr_condition_details.Add(self._TCTRL_age_of_onset, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5) 77 _gszr_main.Add(__szr_condition_details, 1, wx.EXPAND, 0) 78 __lbl_died_of_this = wx.StaticText(self, -1, _("Caused death ?")) 79 _gszr_main.Add(__lbl_died_of_this, 0, wx.ALIGN_CENTER_VERTICAL, 3) 80 __szr_death.Add(self._PRW_died_of_this, 0, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5) 81 __lbl_death = wx.StaticText(self, -1, _("Age at death:")) 82 __szr_death.Add(__lbl_death, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 3) 83 __szr_death.Add(self._PRW_age_of_death, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5) 84 _gszr_main.Add(__szr_death, 1, wx.EXPAND, 0) 85 __lbl_episode = wx.StaticText(self, -1, _("Episode")) 86 __lbl_episode.SetForegroundColour(wx.Colour(255, 127, 0)) 87 _gszr_main.Add(__lbl_episode, 0, wx.ALIGN_CENTER_VERTICAL, 0) 88 _gszr_main.Add(self._PRW_episode, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 89 __lbl_name = wx.StaticText(self, -1, _("Person's name")) 90 _gszr_main.Add(__lbl_name, 0, wx.ALIGN_CENTER_VERTICAL, 0) 91 __szr_relation.Add(self._TCTRL_name, 1, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5) 92 __lbl_dob = wx.StaticText(self, -1, _("Date of birth:")) 93 __szr_relation.Add(__lbl_dob, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 3) 94 __szr_relation.Add(self._PRW_dob, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 95 _gszr_main.Add(__szr_relation, 1, wx.EXPAND, 0) 96 __lbl_comment = wx.StaticText(self, -1, _("Comment")) 97 _gszr_main.Add(__lbl_comment, 0, wx.ALIGN_CENTER_VERTICAL, 0) 98 _gszr_main.Add(self._TCTRL_comment, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 99 self.SetSizer(_gszr_main) 100 _gszr_main.Fit(self) 101 _gszr_main.AddGrowableCol(1)
102 # end wxGlade 103 104 # end of class wxgFamilyHistoryEAPnl 105