Gnumed.wxGladeWidgets.wxgProcedureEAPnl

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

# Source Code for Module Gnumed.wxGladeWidgets.wxgProcedureEAPnl

      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 wxgProcedureEAPnl(wx.ScrolledWindow):
     17 -        def __init__(self, *args, **kwds):
     18                  # begin wxGlade: wxgProcedureEAPnl.__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_procedure = cPhraseWheel(self, wx.ID_ANY, "")
     23                  from Gnumed.wxpython.gmDateTimeInput import cFuzzyTimestampInput
     24                  self._DPRW_date = cFuzzyTimestampInput(self, wx.ID_ANY, "")
     25                  self._DPRW_end = cFuzzyTimestampInput(self, wx.ID_ANY, "")
     26                  self._CHBOX_ongoing = wx.CheckBox(self, wx.ID_ANY, _("Ongoing"))
     27                  self.static_line_1 = wx.StaticLine(self, wx.ID_ANY)
     28                  from Gnumed.wxpython.gmOrganizationWidgets import cOrgUnitPhraseWheel
     29                  self._PRW_location = cOrgUnitPhraseWheel(self, wx.ID_ANY, "")
     30                  self._BTN_add_location = wx.Button(self, wx.ID_ANY, _("+"), style=wx.BU_EXACTFIT)
     31                  from Gnumed.wxpython.gmEMRStructWidgets import cEpisodeSelectionPhraseWheel
     32                  self._PRW_episode = cEpisodeSelectionPhraseWheel(self, wx.ID_ANY, "")
     33                  self.static_line_2 = wx.StaticLine(self, wx.ID_ANY)
     34                  from Gnumed.wxpython.gmHospitalStayWidgets import cHospitalStayPhraseWheel
     35                  self._PRW_hospital_stay = cHospitalStayPhraseWheel(self, wx.ID_ANY, "")
     36                  self._BTN_add_stay = wx.Button(self, wx.ID_ANY, _("+"), style=wx.BU_EXACTFIT)
     37                  self._LBL_hospital_details = wx.StaticText(self, wx.ID_ANY, "")
     38                  from Gnumed.wxpython.gmTextCtrl import cTextCtrl
     39                  self._TCTRL_comment = cTextCtrl(self, wx.ID_ANY, "")
     40                  from Gnumed.wxpython.gmDocumentWidgets import cDocumentPhraseWheel
     41                  self._PRW_document = cDocumentPhraseWheel(self, wx.ID_ANY, "")
     42                  from Gnumed.wxpython.gmCodingWidgets import cGenericCodesPhraseWheel
     43                  self._PRW_codes = cGenericCodesPhraseWheel(self, wx.ID_ANY, "")
     44
     45                  self.__set_properties()
     46                  self.__do_layout()
     47
     48                  self.Bind(wx.EVT_CHECKBOX, self._on_ongoing_checkbox_checked, self._CHBOX_ongoing)
     49                  self.Bind(wx.EVT_BUTTON, self._on_add_location_button_pressed, self._BTN_add_location)
     50                  self.Bind(wx.EVT_BUTTON, self._on_add_hospital_stay_button_pressed, self._BTN_add_stay)
     51                  # end wxGlade
     52
     53 -        def __set_properties(self):
     54                  # begin wxGlade: wxgProcedureEAPnl.__set_properties
     55                  self.SetScrollRate(10, 10)
     56                  self._PRW_procedure.SetToolTip(_("The actual procedure performed on the patient."))
     57                  self._DPRW_date.SetToolTip(_("When did this procedure take place ?"))
     58                  self._DPRW_end.SetToolTip(_("When did this procedure end ?\n\nLeave empty for ongoing or \"one-off\" procedures without a significant duration."))
     59                  self._CHBOX_ongoing.SetToolTip(_("Select if procedure is ongoing (say, desensibilization)."))
     60                  self._PRW_location.SetToolTip(_("The location (praxis, clinic, ...) this procedure was performed at.\n\nMutually exclusive with \"Hospitalization\". Requires \"Episode\"."))
     61                  self._BTN_add_location.SetToolTip(_("Manage organizations and units."))
     62                  self._PRW_episode.SetToolTip(_("Select, or enter for creation, the episode to which this procedure will relate.\n\nMutually exclusive with \"Hospitalization\". Requires \"Location\"."))
     63                  self._PRW_hospital_stay.SetToolTip(_("During which hospitalization was this procedure performed."))
     64                  self._BTN_add_stay.SetToolTip(_("Add a hospitalization."))
     65                  self._TCTRL_comment.SetToolTip(_("A comment on the procedure (say, the relevant outcome)."))
     66                  self._PRW_document.SetToolTip(_("The document most relevant to this procedure (say, the most recent one)."))
     67                  self._PRW_codes.SetToolTip(_("Codes relevant to this procedure."))
     68                  # end wxGlade
     69
     70 -        def __do_layout(self):
     71                  # begin wxGlade: wxgProcedureEAPnl.__do_layout
     72                  _gszr_main = wx.FlexGridSizer(12, 2, 1, 3)
     73                  __szr_stay = wx.BoxSizer(wx.HORIZONTAL)
     74                  __szr_location = wx.BoxSizer(wx.HORIZONTAL)
     75                  __szr_end_details = wx.BoxSizer(wx.HORIZONTAL)
     76                  __lbl_procedure = wx.StaticText(self, wx.ID_ANY, _("Procedure"))
     77                  __lbl_procedure.SetForegroundColour(wx.Colour(255, 0, 0))
     78                  _gszr_main.Add(__lbl_procedure, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     79                  _gszr_main.Add(self._PRW_procedure, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
     80                  __lbl_date = wx.StaticText(self, wx.ID_ANY, _("Date"))
     81                  __lbl_date.SetForegroundColour(wx.Colour(255, 0, 0))
     82                  _gszr_main.Add(__lbl_date, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     83                  _gszr_main.Add(self._DPRW_date, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
     84                  __lbl_end = wx.StaticText(self, wx.ID_ANY, _("End"))
     85                  _gszr_main.Add(__lbl_end, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     86                  __szr_end_details.Add(self._DPRW_end, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 10)
     87                  __szr_end_details.Add(self._CHBOX_ongoing, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     88                  _gszr_main.Add(__szr_end_details, 1, wx.EXPAND, 0)
     89                  _gszr_main.Add((20, 20), 0, wx.EXPAND, 0)
     90                  _gszr_main.Add(self.static_line_1, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.LEFT | wx.RIGHT, 5)
     91                  __lbl_location = wx.StaticText(self, wx.ID_ANY, _("Location"))
     92                  __lbl_location.SetForegroundColour(wx.Colour(255, 127, 0))
     93                  _gszr_main.Add(__lbl_location, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     94                  __szr_location.Add(self._PRW_location, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 5)
     95                  __szr_location.Add(self._BTN_add_location, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     96                  _gszr_main.Add(__szr_location, 1, wx.EXPAND, 0)
     97                  __lbl_episode = wx.StaticText(self, wx.ID_ANY, _("and Episode"))
     98                  __lbl_episode.SetForegroundColour(wx.Colour(255, 127, 0))
     99                  _gszr_main.Add(__lbl_episode, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    100                  _gszr_main.Add(self._PRW_episode, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    101                  __lbl_or = wx.StaticText(self, wx.ID_ANY, _("... or ..."))
    102                  __lbl_or.SetForegroundColour(wx.Colour(255, 0, 0))
    103                  _gszr_main.Add(__lbl_or, 0, wx.ALIGN_CENTER, 0)
    104                  _gszr_main.Add(self.static_line_2, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.LEFT | wx.RIGHT, 20)
    105                  __lbl_stay = wx.StaticText(self, wx.ID_ANY, _("Hospitalization"))
    106                  __lbl_stay.SetForegroundColour(wx.Colour(255, 127, 0))
    107                  _gszr_main.Add(__lbl_stay, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    108                  __szr_stay.Add(self._PRW_hospital_stay, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 5)
    109                  __szr_stay.Add(self._BTN_add_stay, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    110                  _gszr_main.Add(__szr_stay, 1, wx.EXPAND, 0)
    111                  _gszr_main.Add((20, 20), 0, wx.EXPAND, 0)
    112                  _gszr_main.Add(self._LBL_hospital_details, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    113                  __lbl_comment = wx.StaticText(self, wx.ID_ANY, _("Comment"))
    114                  _gszr_main.Add(__lbl_comment, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    115                  _gszr_main.Add(self._TCTRL_comment, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    116                  __lbl_document = wx.StaticText(self, wx.ID_ANY, _("Document"))
    117                  _gszr_main.Add(__lbl_document, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    118                  _gszr_main.Add(self._PRW_document, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    119                  _lbl_codes = wx.StaticText(self, wx.ID_ANY, _("Codes"))
    120                  _gszr_main.Add(_lbl_codes, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    121                  _gszr_main.Add(self._PRW_codes, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    122                  self.SetSizer(_gszr_main)
    123                  _gszr_main.Fit(self)
    124                  _gszr_main.AddGrowableCol(1)
    125                  self.Layout()
    126                  # end wxGlade
    127
    128 -        def _on_ongoing_checkbox_checked(self, event):  # wxGlade: wxgProcedureEAPnl.<event_handler>
    129                  print("Event handler '_on_ongoing_checkbox_checked' not implemented!")
    130                  event.Skip()
    131
    132 -        def _on_add_location_button_pressed(self, event):  # wxGlade: wxgProcedureEAPnl.<event_handler>
    133                  print("Event handler '_on_add_location_button_pressed' not implemented!")
    134                  event.Skip()
    135
    136 -        def _on_add_hospital_stay_button_pressed(self, event):  # wxGlade: wxgProcedureEAPnl.<event_handler>
    137                  print("Event handler '_on_add_hospital_stay_button_pressed' not implemented!")
    138                  event.Skip()
    139
    140  # end of class wxgProcedureEAPnl
    141