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

# Source Code for Module Gnumed.wxGladeWidgets.wxgEpisodeEditAreaPnl

     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 wxgEpisodeEditAreaPnl(wx.ScrolledWindow):
    17 -        def __init__(self, *args, **kwds):
    18                  # begin wxGlade: wxgEpisodeEditAreaPnl.__init__
    19                  kwds["style"] = kwds.get("style", 0) | wx.BORDER_NONE | wx.TAB_TRAVERSAL
    20                  wx.ScrolledWindow.__init__(self, *args, **kwds)
    21                  self._TCTRL_patient = wx.TextCtrl(self, wx.ID_ANY, "")
    22                  from Gnumed.wxpython.gmEMRStructWidgets import cIssueSelectionPhraseWheel
    23                  self._PRW_issue = cIssueSelectionPhraseWheel(self, wx.ID_ANY, "")
    24                  from Gnumed.wxpython.gmEMRStructWidgets import cEpisodeDescriptionPhraseWheel
    25                  self._PRW_description = cEpisodeDescriptionPhraseWheel(self, wx.ID_ANY, "")
    26                  from Gnumed.wxpython.gmEMRStructWidgets import cDiagnosticCertaintyClassificationPhraseWheel
    27                  self._PRW_certainty = cDiagnosticCertaintyClassificationPhraseWheel(self, wx.ID_ANY, "")
    28                  self._CHBOX_closed = wx.CheckBox(self, wx.ID_ANY, _("Closed"))
    29                  self._TCTRL_status = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_MULTILINE)
    30                  from Gnumed.wxpython.gmCodingWidgets import cGenericCodesPhraseWheel
    31                  self._PRW_codes = cGenericCodesPhraseWheel(self, wx.ID_ANY, "")
    32
    33                  self.__set_properties()
    34                  self.__do_layout()
    35                  # end wxGlade
    36
    37 -        def __set_properties(self):
    38                  # begin wxGlade: wxgEpisodeEditAreaPnl.__set_properties
    39                  self.SetScrollRate(10, 10)
    40                  self._TCTRL_patient.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BACKGROUND))
    41                  self._PRW_issue.SetToolTip(_("Select the health issue this episode belongs to.\n\nEpisode remains unassociated if this field is left blank."))
    42                  self._PRW_description.SetToolTip(_("Type or select the description for this episode. It should be a summary for the episode of illness."))
    43                  self._PRW_certainty.SetToolTip(_("The diagnostic classification or grading of this episode.\n\nThis documents how certain one is about this episode being a true diagnosis."))
    44                  self._CHBOX_closed.SetToolTip(_("If this box is checked the episode is over. If not it is currently ongoing."))
    45                  self._TCTRL_status.SetToolTip(_("A summary of the state of this episode."))
    46                  self._PRW_codes.SetToolTip(_("Codes relevant to this episode\nseparated by \";\"."))
    47                  # end wxGlade
    48
    49 -        def __do_layout(self):
    50                  # begin wxGlade: wxgEpisodeEditAreaPnl.__do_layout
    51                  __szr_main = wx.BoxSizer(wx.VERTICAL)
    52                  __gzsr_details = wx.FlexGridSizer(6, 2, 3, 5)
    53                  __szr_status = wx.BoxSizer(wx.HORIZONTAL)
    54                  __lbl_patient = wx.StaticText(self, wx.ID_ANY, _("Patient"))
    55                  __gzsr_details.Add(__lbl_patient, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    56                  __gzsr_details.Add(self._TCTRL_patient, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    57                  __lbl_issue = wx.StaticText(self, wx.ID_ANY, _("Nest under"))
    58                  __gzsr_details.Add(__lbl_issue, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    59                  __gzsr_details.Add(self._PRW_issue, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    60                  __lbl_description = wx.StaticText(self, wx.ID_ANY, _("Description"))
    61                  __lbl_description.SetForegroundColour(wx.Colour(255, 0, 0))
    62                  __gzsr_details.Add(__lbl_description, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    63                  __gzsr_details.Add(self._PRW_description, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    64                  __lbl_certainty = wx.StaticText(self, wx.ID_ANY, _("Certainty"))
    65                  __gzsr_details.Add(__lbl_certainty, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    66                  __szr_status.Add(self._PRW_certainty, 1, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 15)
    67                  __szr_status.Add(self._CHBOX_closed, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    68                  __gzsr_details.Add(__szr_status, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    69                  __lbl_status = wx.StaticText(self, wx.ID_ANY, _("Synopsis"))
    70                  __gzsr_details.Add(__lbl_status, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    71                  __gzsr_details.Add(self._TCTRL_status, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    72                  __lbl_codes = wx.StaticText(self, wx.ID_ANY, _("Codes"))
    73                  __gzsr_details.Add(__lbl_codes, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    74                  __gzsr_details.Add(self._PRW_codes, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    75                  __gzsr_details.AddGrowableCol(1)
    76                  __szr_main.Add(__gzsr_details, 1, wx.EXPAND, 0)
    77                  self.SetSizer(__szr_main)
    78                  __szr_main.Fit(self)
    79                  self.Layout()
    80                  # end wxGlade
    81
    82  # end of class wxgEpisodeEditAreaPnl
    83