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

# Source Code for Module Gnumed.wxGladeWidgets.wxgProcedureEAPnl

      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/wxgProcedureEAPnl.wxg"
      4
      5  import wx
      6
      7  # begin wxGlade: extracode
      8  # end wxGlade
      9
     10
     11
     12 -class wxgProcedureEAPnl(wx.ScrolledWindow):
     13 -    def __init__(self, *args, **kwds):
     14
     15          from Gnumed.wxpython import gmPhraseWheel
     16          from Gnumed.wxpython import gmEMRStructWidgets
     17          from Gnumed.wxpython import gmDateTimeInput
     18          from Gnumed.wxpython.gmCodingWidgets import cGenericCodesPhraseWheel
     19
     20          # begin wxGlade: wxgProcedureEAPnl.__init__
     21          kwds["style"] = wx.NO_BORDER|wx.TAB_TRAVERSAL
     22          wx.ScrolledWindow.__init__(self, *args, **kwds)
     23          self._PRW_procedure = gmPhraseWheel.cPhraseWheel(self, -1, "", style=wx.NO_BORDER)
     24          self._DPRW_date = gmDateTimeInput.cFuzzyTimestampInput(self, -1, "", style=wx.NO_BORDER)
     25          self._DPRW_end = gmDateTimeInput.cFuzzyTimestampInput(self, -1, "", style=wx.NO_BORDER)
     26          self._CHBOX_ongoing = wx.CheckBox(self, -1, _("Ongoing"))
     27          self.static_line_1 = wx.StaticLine(self, -1)
     28          self._PRW_location = gmPhraseWheel.cPhraseWheel(self, -1, "", style=wx.NO_BORDER)
     29          self._PRW_episode = gmEMRStructWidgets.cEpisodeSelectionPhraseWheel(self, -1, "", style=wx.NO_BORDER)
     30          self.static_line_2 = wx.StaticLine(self, -1)
     31          self._PRW_hospital_stay = gmEMRStructWidgets.cHospitalStayPhraseWheel(self, -1, "", style=wx.NO_BORDER)
     32          self._BTN_add_stay = wx.Button(self, -1, _("+"), style=wx.BU_EXACTFIT)
     33          self._LBL_hospital_details = wx.StaticText(self, -1, "")
     34          self._PRW_codes = cGenericCodesPhraseWheel(self, -1, "", style=wx.NO_BORDER)
     35
     36          self.__set_properties()
     37          self.__do_layout()
     38
     39          self.Bind(wx.EVT_CHECKBOX, self._on_ongoing_checkbox_checked, self._CHBOX_ongoing)
     40          self.Bind(wx.EVT_BUTTON, self._on_add_hospital_stay_button_pressed, self._BTN_add_stay)
     41          # end wxGlade
     42
     43 -    def __set_properties(self):
     44          # begin wxGlade: wxgProcedureEAPnl.__set_properties
     45          self.SetScrollRate(10, 10)
     46          self._PRW_procedure.SetToolTipString(_("The actual procedure performed on the patient."))
     47          self._DPRW_date.SetToolTipString(_("When did this procedure take place ?"))
     48          self._DPRW_end.SetToolTipString(_("When did this procedure end ?\n\nLeave empty for ongoing or \"one-off\" procedures without a significant duration."))
     49          self._CHBOX_ongoing.SetToolTipString(_("Select if procedure is ongoing (say, desensibilization)."))
     50          self._PRW_location.SetToolTipString(_("The location (praxis, clinic, ...) this procedure was performed at.\n\nMutually exclusive with \"Hospital stay\". Requires \"Episode\"."))
     51          self._PRW_episode.SetToolTipString(_("The episode this procedure was performed under.\n\nMutually exclusive with \"Hospital stay\". Requires \"Location\"."))
     52          self._PRW_hospital_stay.SetToolTipString(_("During which hospital stay was this procedure performed."))
     53          self._BTN_add_stay.SetToolTipString(_("Add a hospital stay."))
     54          self._PRW_codes.SetToolTipString(_("Codes relevant to this procedure."))
     55          # end wxGlade
     56
     57 -    def __do_layout(self):
     58          # begin wxGlade: wxgProcedureEAPnl.__do_layout
     59          _gszr_main = wx.FlexGridSizer(10, 2, 1, 3)
     60          __szr_stay = wx.BoxSizer(wx.HORIZONTAL)
     61          __szr_end_details = wx.BoxSizer(wx.HORIZONTAL)
     62          __lbl_procedure = wx.StaticText(self, -1, _("Procedure"))
     63          __lbl_procedure.SetForegroundColour(wx.Colour(255, 0, 0))
     64          _gszr_main.Add(__lbl_procedure, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     65          _gszr_main.Add(self._PRW_procedure, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
     66          __lbl_date = wx.StaticText(self, -1, _("Date"))
     67          __lbl_date.SetForegroundColour(wx.Colour(255, 0, 0))
     68          _gszr_main.Add(__lbl_date, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     69          _gszr_main.Add(self._DPRW_date, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
     70          __lbl_end = wx.StaticText(self, -1, _("End"))
     71          _gszr_main.Add(__lbl_end, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     72          __szr_end_details.Add(self._DPRW_end, 1, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 10)
     73          __szr_end_details.Add(self._CHBOX_ongoing, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     74          _gszr_main.Add(__szr_end_details, 1, wx.EXPAND, 0)
     75          _gszr_main.Add((20, 20), 0, wx.EXPAND, 0)
     76          _gszr_main.Add(self.static_line_1, 0, wx.LEFT|wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5)
     77          __lbl_location = wx.StaticText(self, -1, _("Location"))
     78          __lbl_location.SetForegroundColour(wx.Colour(255, 127, 0))
     79          _gszr_main.Add(__lbl_location, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     80          _gszr_main.Add(self._PRW_location, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
     81          __lbl_episode = wx.StaticText(self, -1, _("and Episode"))
     82          __lbl_episode.SetForegroundColour(wx.Colour(255, 127, 0))
     83          _gszr_main.Add(__lbl_episode, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     84          _gszr_main.Add(self._PRW_episode, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
     85          __lbl_or = wx.StaticText(self, -1, _("... or ..."))
     86          _gszr_main.Add(__lbl_or, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 0)
     87          _gszr_main.Add(self.static_line_2, 0, wx.LEFT|wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 20)
     88          __lbl_stay = wx.StaticText(self, -1, _("Hospital stay"))
     89          __lbl_stay.SetForegroundColour(wx.Colour(255, 127, 0))
     90          _gszr_main.Add(__lbl_stay, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     91          __szr_stay.Add(self._PRW_hospital_stay, 1, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5)
     92          __szr_stay.Add(self._BTN_add_stay, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     93          _gszr_main.Add(__szr_stay, 1, wx.EXPAND, 0)
     94          _gszr_main.Add((20, 20), 0, wx.EXPAND, 0)
     95          _gszr_main.Add(self._LBL_hospital_details, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
     96          _lbl_codes = wx.StaticText(self, -1, _("Codes"))
     97          _gszr_main.Add(_lbl_codes, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     98          _gszr_main.Add(self._PRW_codes, 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 -    def _on_add_hospital_stay_button_pressed(self, event): # wxGlade: wxgProcedureEAPnl.<event_handler>
    105          print "Event handler `_on_add_hospital_stay_button_pressed' not implemented!"
    106          event.Skip()
    107
    108 -    def _on_ongoing_checkbox_checked(self, event): # wxGlade: wxgProcedureEAPnl.<event_handler>
    109          print "Event handler `_on_ongoing_checkbox_checked' not implemented"
    110          event.Skip()
    111
    112  # end of class wxgProcedureEAPnl
    113