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

# Source Code for Module Gnumed.wxGladeWidgets.wxgHealthIssueEditAreaPnl

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