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

# Source Code for Module Gnumed.wxGladeWidgets.wxgHealthIssueEditAreaPnl

      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 wxgHealthIssueEditAreaPnl(wx.ScrolledWindow):
     17 -        def __init__(self, *args, **kwds):
     18                  # begin wxGlade: wxgHealthIssueEditAreaPnl.__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.gmPhraseWheel import cPhraseWheel
     22                  self._PRW_condition = cPhraseWheel(self, wx.ID_ANY, "")
     23                  self._ChBOX_left = wx.CheckBox(self, wx.ID_ANY, _("left"))
     24                  self._ChBOX_right = wx.CheckBox(self, wx.ID_ANY, _("right"))
     25                  from Gnumed.wxpython.gmEMRStructWidgets import cDiagnosticCertaintyClassificationPhraseWheel
     26                  self._PRW_certainty = cDiagnosticCertaintyClassificationPhraseWheel(self, wx.ID_ANY, "")
     27                  self._PRW_grouping = cPhraseWheel(self, wx.ID_ANY, "")
     28                  self._PRW_age_noted = cPhraseWheel(self, wx.ID_ANY, "")
     29                  from Gnumed.wxpython.gmDateTimeInput import cFuzzyTimestampInput
     30                  self._PRW_year_noted = cFuzzyTimestampInput(self, wx.ID_ANY, "")
     31                  self._TCTRL_status = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_WORDWRAP)
     32                  self._ChBOX_active = wx.CheckBox(self, wx.ID_ANY, _("Active"))
     33                  self._ChBOX_relevant = wx.CheckBox(self, wx.ID_ANY, _("Relevant"))
     34                  self._ChBOX_confidential = wx.CheckBox(self, wx.ID_ANY, _("Confidential"))
     35                  self._ChBOX_caused_death = wx.CheckBox(self, wx.ID_ANY, _("Caused death"))
     36                  from Gnumed.wxpython.gmCodingWidgets import cGenericCodesPhraseWheel
     37                  self._PRW_codes = cGenericCodesPhraseWheel(self, wx.ID_ANY, "")
     38                  self._TCTRL_code_details = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_READONLY)
     39
     40                  self.__set_properties()
     41                  self.__do_layout()
     42                  # end wxGlade
     43
     44 -        def __set_properties(self):
     45                  # begin wxGlade: wxgHealthIssueEditAreaPnl.__set_properties
     46                  self.SetScrollRate(10, 10)
     47                  self._PRW_condition.SetToolTip(_("Enter the condition (health issue/past history item) here. Keep it short but precise."))
     48                  self._PRW_grouping.SetToolTip(_("Here you can add arbitrary text which will be used for sorting health issues in the tree."))
     49                  self._PRW_age_noted.SetToolTip(_("Enter the age in years when this condition was diagnosed. Setting this will adjust the \"in the year\" field accordingly."))
     50                  self._PRW_year_noted.SetToolTip(_("Enter the year when this condition was diagnosed. Setting this will adjust the \"at age\" field accordingly."))
     51                  self._TCTRL_status.SetToolTip(_("A summary of the state of this issue."))
     52                  self._ChBOX_active.SetToolTip(_("Check if this is an active, ongoing problem."))
     53                  self._ChBOX_active.SetValue(1)
     54                  self._ChBOX_relevant.SetToolTip(_("Check if this is a clinically relevant problem."))
     55                  self._ChBOX_relevant.SetValue(1)
     56                  self._ChBOX_confidential.SetToolTip(_("Check if this condition is to be kept confidential and not disclosed to anyone else."))
     57                  self._ChBOX_caused_death.SetToolTip(_("Check if this condition contributed to causing death of the patient."))
     58                  self._PRW_codes.SetToolTip(_("Codes relevant to this health issue\nseparated by \";\"."))
     59                  self._TCTRL_code_details.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BACKGROUND))
     60                  # end wxGlade
     61
     62 -        def __do_layout(self):
     63                  # begin wxGlade: wxgHealthIssueEditAreaPnl.__do_layout
     64                  __gszr_main = wx.FlexGridSizer(7, 2, 3, 10)
     65                  __szr_options = wx.BoxSizer(wx.HORIZONTAL)
     66                  __szr_diagnosed = wx.BoxSizer(wx.HORIZONTAL)
     67                  __szr_certainty_grouping = wx.BoxSizer(wx.HORIZONTAL)
     68                  __szr_condition = wx.BoxSizer(wx.HORIZONTAL)
     69                  __lbl_condition = wx.StaticText(self, wx.ID_ANY, _("Condition"))
     70                  __lbl_condition.SetForegroundColour(wx.Colour(255, 0, 0))
     71                  __gszr_main.Add(__lbl_condition, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     72                  __szr_condition.Add(self._PRW_condition, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 10)
     73                  __szr_condition.Add(self._ChBOX_left, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 5)
     74                  __szr_condition.Add(self._ChBOX_right, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 5)
     75                  __gszr_main.Add(__szr_condition, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
     76                  __lbl_certainty = wx.StaticText(self, wx.ID_ANY, _("Certainty"))
     77                  __gszr_main.Add(__lbl_certainty, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     78                  __szr_certainty_grouping.Add(self._PRW_certainty, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 10)
     79                  __lbl_group = wx.StaticText(self, wx.ID_ANY, _("Grouping:"))
     80                  __szr_certainty_grouping.Add(__lbl_group, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
     81                  __szr_certainty_grouping.Add(self._PRW_grouping, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 10)
     82                  __gszr_main.Add(__szr_certainty_grouping, 1, wx.EXPAND, 0)
     83                  __lbl_noted = wx.StaticText(self, wx.ID_ANY, _("When Noted"))
     84                  __gszr_main.Add(__lbl_noted, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     85                  __lbl_age = wx.StaticText(self, wx.ID_ANY, _("Age:"), style=wx.ALIGN_RIGHT)
     86                  __szr_diagnosed.Add(__lbl_age, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
     87                  __szr_diagnosed.Add(self._PRW_age_noted, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 5)
     88                  __lbl_year = wx.StaticText(self, wx.ID_ANY, _("Or year:"), style=wx.ALIGN_RIGHT)
     89                  __szr_diagnosed.Add(__lbl_year, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
     90                  __szr_diagnosed.Add(self._PRW_year_noted, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
     91                  __gszr_main.Add(__szr_diagnosed, 1, wx.EXPAND, 0)
     92                  __lbl_status = wx.StaticText(self, wx.ID_ANY, _("Synopsis"))
     93                  __gszr_main.Add(__lbl_status, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     94                  __gszr_main.Add(self._TCTRL_status, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
     95                  __gszr_main.Add((1, 1), 0, wx.EXPAND, 0)
     96                  __szr_options.Add(self._ChBOX_active, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
     97                  __szr_options.Add(self._ChBOX_relevant, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.LEFT, 5)
     98                  __szr_options.Add(self._ChBOX_confidential, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.LEFT, 5)
     99                  __szr_options.Add(self._ChBOX_caused_death, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.LEFT, 5)
    100                  __gszr_main.Add(__szr_options, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    101                  __lbl_codes = wx.StaticText(self, wx.ID_ANY, _("Codes"))
    102                  __gszr_main.Add(__lbl_codes, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    103                  __gszr_main.Add(self._PRW_codes, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    104                  __gszr_main.Add((20, 20), 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    105                  __gszr_main.Add(self._TCTRL_code_details, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    106                  self.SetSizer(__gszr_main)
    107                  __gszr_main.Fit(self)
    108                  __gszr_main.AddGrowableRow(3)
    109                  __gszr_main.AddGrowableRow(6)
    110                  __gszr_main.AddGrowableCol(1)
    111                  self.Layout()
    112                  # end wxGlade
    113
    114  # end of class wxgHealthIssueEditAreaPnl
    115