Gnumed.wxGladeWidgets.wxgCardiacDevicePluginPnl

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

# Source Code for Module Gnumed.wxGladeWidgets.wxgCardiacDevicePluginPnl

      1  #!/usr/bin/env python
      2  # -*- coding: utf8 -*-
      3  # generated by wxGlade HG on Thu Apr  9 10:01:05 2009
      4
      5  import wx
      6
      7  # begin wxGlade: extracode
      8  # end wxGlade
      9
     10 -class wxgCardiacDevicePluginPnl(wx.ScrolledWindow):
     11 -    def __init__(self, *args, **kwds):
     12
     13          from Gnumed.wxpython.gmNarrativeWidgets import cSoapNoteInputNotebook
     14          from Gnumed.wxpython.gmDateTimeInput import cFuzzyTimestampInput
     15          from Gnumed.wxpython.gmEncounterWidgets import cEncounterTypePhraseWheel
     16          from Gnumed.wxpython import gmListWidgets
     17
     18          # begin wxGlade: wxgCardiacDevicePluginPnl.__init__
     19          kwds["style"] = wx.NO_BORDER|wx.TAB_TRAVERSAL
     20          wx.ScrolledWindow.__init__(self, *args, **kwds)
     21          self._splitter_main = wx.SplitterWindow(self, -1, style=wx.SP_3D|wx.SP_BORDER|wx.SP_PERMIT_UNSPLIT)
     22          self.__splitter_main_right_pnl = wx.Panel(self._splitter_main, -1, style=wx.NO_BORDER)
     23          self._splitter_right = wx.SplitterWindow(self.__splitter_main_right_pnl, -1, style=wx.SP_3D|wx.SP_BORDER|wx.SP_PERMIT_UNSPLIT)
     24          self.__splitter_right_bottom_pnl = wx.ScrolledWindow(self._splitter_right, -1, style=wx.NO_BORDER)
     25          self.__splitter_right_top_pnl = wx.Panel(self._splitter_right, -1, style=wx.NO_BORDER)
     26          self._NB_device_editors = cSoapNoteInputNotebook(self.__splitter_right_top_pnl, -1, style=0)
     27          self.__splitter_main_left_pnl = wx.Panel(self._splitter_main, -1, style=wx.NO_BORDER|wx.FULL_REPAINT_ON_RESIZE)
     28          self._splitter_left = wx.SplitterWindow(self.__splitter_main_left_pnl, -1, style=wx.SP_3D|wx.SP_BORDER)
     29          self.__splitter_left_bottom_pnl = wx.Panel(self._splitter_left, -1, style=wx.NO_BORDER)
     30          self.__splitter_left_top_pnl = wx.Panel(self._splitter_left, -1)
     31          self.__szr_bottom_left_staticbox = wx.StaticBox(self.__splitter_left_bottom_pnl, -1, _("Previous Encounters"))
     32          self.__szr_top_right_staticbox = wx.StaticBox(self.__splitter_right_top_pnl, -1, _("New notes in current encounter"))
     33          self.__szr_lower_bottom_right_staticbox = wx.StaticBox(self.__splitter_right_bottom_pnl, -1, _("Tips and Hints"))
     34          self.__szr_top_left_staticbox = wx.StaticBox(self.__splitter_left_top_pnl, -1, _("Active Device Settings"))
     35          self._TCTRL_current_status = wx.TextCtrl(self.__splitter_left_top_pnl, -1, _("In this area GNUmed will place the status of all cardiac devices and device parts. There can be more than one device at a time\n\nIt potentially looks like this\n----------------------------------------------------------------------------------------------------------------\nDevice: SJM Atlas DR (active)     Battery: 2.4V (MOL)      Implanted:  Feb 09 2008\n\nRA: Medtronic Sprint fidelis (active, flaky, replacement)             Implanted: Feb 09 2008\nSensing: 2 (1.5) mV    Threshold: 0.7/0.5 (1/0.4) V/ms       Impedance: 800 (900) Ohm\n\nRV: Medtronic Sprint fidelis (active, flaky, replacement)             Implanted: Feb 09 2008\nSensing: 7 (15) mV    Threshold: 0.7/0.5 (1/0.4) V/ms       Impedance: 800 (900) Ohm\n\nLV: Medtronic Sprint fidelis (active, flaky, Y-connector)             Implanted: Feb 09 2008\nSensing: 7 ( ?) mV    Threshold: 1/1.5 (1/1) V/ms       Impedance: 800 (900) Ohm\n----------------------------------------------------------------------------------------------------------------\nDevice: Medtronic Relia SR (inactive)     Batttery 2.1V (EOL)   Implanted: Jan 23 2000\n\nDevice: Medtronic Kappa SR (explanted)     Batttery 2.1V (EOL)   Explanted: Jan 23 2000 (Jan 23 1995)\n-----------------------------------------------------------------------------------------------------------------\nRA Lead: Medtronic ? (inactive, capped)             Implanted: Jan 23 2000\nRV Lead: Medtronic ? (explanted)                        Explanted: Feb 09 2008"), style=wx.TE_MULTILINE|wx.TE_READONLY|wx.TE_WORDWRAP|wx.NO_BORDER)
     36          self._LCTRL_pevious_encounters = gmListWidgets.cReportListCtrl(self.__splitter_left_bottom_pnl, -1, style=wx.LC_REPORT|wx.NO_BORDER|wx.FULL_REPAINT_ON_RESIZE)
     37          self._PRW_encounter_type = cEncounterTypePhraseWheel(self.__splitter_right_top_pnl, -1, "", style=wx.NO_BORDER)
     38          self._PRW_encounter_start = cFuzzyTimestampInput(self.__splitter_right_top_pnl, -1, "", style=wx.NO_BORDER)
     39          self._PRW_encounter_end = cFuzzyTimestampInput(self.__splitter_right_top_pnl, -1, "", style=wx.NO_BORDER)
     40          self._BTN_new_encounter = wx.Button(self.__splitter_right_top_pnl, -1, _("New"), style=wx.BU_EXACTFIT)
     41          self._TCTRL_rfe = wx.TextCtrl(self.__splitter_right_top_pnl, -1, "", style=wx.NO_BORDER)
     42          self.notebook_1_pane_1 = wx.Panel(self._NB_device_editors, -1)
     43          self._TCTRL_aoe = wx.TextCtrl(self.__splitter_right_top_pnl, -1, "", style=wx.NO_BORDER)
     44          self._TCTRL_ekg = wx.TextCtrl(self.__splitter_right_top_pnl, -1, "", style=wx.NO_BORDER)
     45          self._BTN_save_all = wx.Button(self.__splitter_right_top_pnl, -1, _("&All"), style=wx.BU_EXACTFIT)
     46          self._BTN_save_encounter = wx.Button(self.__splitter_right_top_pnl, -1, _("&Encounter"), style=wx.BU_EXACTFIT)
     47          self._BTN_save_note = wx.Button(self.__splitter_right_top_pnl, -1, _("&Note"), style=wx.BU_EXACTFIT)
     48          self._BTN_new_editor = wx.Button(self.__splitter_right_top_pnl, -1, _("&New"), style=wx.BU_EXACTFIT)
     49          self._BTN_clear_editor = wx.Button(self.__splitter_right_top_pnl, -1, _("&Clear"), style=wx.BU_EXACTFIT)
     50          self._BTN_discard_editor = wx.Button(self.__splitter_right_top_pnl, -1, _("&Discard"), style=wx.BU_EXACTFIT)
     51          self._lbl_hints = wx.StaticText(self.__splitter_right_bottom_pnl, -1, _("In this area GNUmed will place hints and tips\nrelated to the current interrogation note and patient.\n\nThose hints will be derived from a variety of\nsources such as classifications (ICD, ...), \nsafety warnings, online resources (Google\nand friends), device databases, etc.\n\nEventually, those hints will be active in that you\ncan click on them and be taken to the relevant\ninformation/an appropriate action be performed."))
     52
     53          self.__set_properties()
     54          self.__do_layout()
     55
     56          self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self._on_problem_activated, self._LCTRL_pevious_encounters)
     57          self.Bind(wx.EVT_BUTTON, self._on_new_encounter_button_pressed, self._BTN_new_encounter)
     58          self.Bind(wx.EVT_BUTTON, self._on_save_all_button_pressed, self._BTN_save_all)
     59          self.Bind(wx.EVT_BUTTON, self._on_save_encounter_button_pressed, self._BTN_save_encounter)
     60          self.Bind(wx.EVT_BUTTON, self._on_save_note_button_pressed, self._BTN_save_note)
     61          self.Bind(wx.EVT_BUTTON, self._on_new_editor_button_pressed, self._BTN_new_editor)
     62          self.Bind(wx.EVT_BUTTON, self._on_clear_editor_button_pressed, self._BTN_clear_editor)
     63          self.Bind(wx.EVT_BUTTON, self._on_discard_editor_button_pressed, self._BTN_discard_editor)
     64          # end wxGlade
     65
     66 -    def __set_properties(self):
     67          # begin wxGlade: wxgCardiacDevicePluginPnl.__set_properties
     68          self.SetScrollRate(10, 10)
     69          self._TCTRL_current_status.Enable(False)
     70          self._LCTRL_pevious_encounters.SetToolTipString(_("This shows the list of previous encounters"))
     71          self._PRW_encounter_type.SetToolTipString(_("Select the type of encounter."))
     72          self._PRW_encounter_start.SetToolTipString(_("Date and time when the current (!) encounter started."))
     73          self._PRW_encounter_end.SetToolTipString(_("Date and time when the current (!) encounter ends."))
     74          self._BTN_new_encounter.SetToolTipString(_("Start a new encounter. If there are any changes to the current encounter you will be asked whether to save them."))
     75          self._TCTRL_rfe.SetToolTipString(_("This documents why the encounter takes place.\n\nIt may be due to a patient request or it may be prompted by other reasons. Often initially collected at the front desk and put into a waiting list comment. May turn out to just be a proxy request for why the patient really is here.\n\nAlso known as the Reason For Encounter/Visit (RFE)."))
     76          self._TCTRL_aoe.SetToolTipString(_("This summarizes the outcome/assessment of the consultation from the doctors point of view. Note that this summary spans all the problems discussed during this encounter."))
     77          self._TCTRL_ekg.SetToolTipString(_("This summarizes the outcome/assessment of the consultation from the doctors point of view. Note that this summary spans all the problems discussed during this encounter."))
     78          self._BTN_save_all.SetToolTipString(_("Save encounter details and all progress notes."))
     79          self._BTN_save_encounter.SetToolTipString(_("Save the encounter details."))
     80          self._BTN_save_note.SetToolTipString(_("Save the currently displayed progress note."))
     81          self._BTN_new_editor.SetToolTipString(_("Open a new progress note editor.\n\nThere is a configuration item on whether to allow several new-episode editors at once."))
     82          self._BTN_clear_editor.SetToolTipString(_("Clear the editor for the displayed progress note."))
     83          self._BTN_discard_editor.SetToolTipString(_("Discard the editor for the displayed progress note."))
     84          self.__splitter_right_bottom_pnl.SetScrollRate(10, 10)
     85          # end wxGlade
     86
     87 -    def __do_layout(self):
     88          # begin wxGlade: wxgCardiacDevicePluginPnl.__do_layout
     89          __szr_main = wx.BoxSizer(wx.HORIZONTAL)
     90          __szr_right = wx.BoxSizer(wx.VERTICAL)
     91          __szr_lower_bottom_right = wx.StaticBoxSizer(self.__szr_lower_bottom_right_staticbox, wx.VERTICAL)
     92          __szr_top_right = wx.StaticBoxSizer(self.__szr_top_right_staticbox, wx.VERTICAL)
     93          __szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
     94          __szr_ekg = wx.BoxSizer(wx.HORIZONTAL)
     95          __szr_aoe = wx.BoxSizer(wx.HORIZONTAL)
     96          __gszr_encounter_details = wx.FlexGridSizer(2, 2, 2, 5)
     97          __szr_encounter_details = wx.BoxSizer(wx.HORIZONTAL)
     98          __szr_left = wx.BoxSizer(wx.VERTICAL)
     99          __szr_bottom_left = wx.StaticBoxSizer(self.__szr_bottom_left_staticbox, wx.VERTICAL)
    100          __szr_top_left = wx.StaticBoxSizer(self.__szr_top_left_staticbox, wx.VERTICAL)
    101          __szr_top_left.Add(self._TCTRL_current_status, 1, wx.EXPAND, 0)
    102          self.__splitter_left_top_pnl.SetSizer(__szr_top_left)
    103          __szr_bottom_left.Add(self._LCTRL_pevious_encounters, 1, wx.EXPAND, 0)
    104          self.__splitter_left_bottom_pnl.SetSizer(__szr_bottom_left)
    105          self._splitter_left.SplitHorizontally(self.__splitter_left_top_pnl, self.__splitter_left_bottom_pnl)
    106          __szr_left.Add(self._splitter_left, 1, wx.EXPAND, 0)
    107          self.__splitter_main_left_pnl.SetSizer(__szr_left)
    108          __lbl_encounter_details = wx.StaticText(self.__splitter_right_top_pnl, -1, _("Encounter"))
    109          __gszr_encounter_details.Add(__lbl_encounter_details, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    110          __szr_encounter_details.Add(self._PRW_encounter_type, 1, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 10)
    111          __szr_encounter_details.Add(self._PRW_encounter_start, 1, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5)
    112          __lbl_until = wx.StaticText(self.__splitter_right_top_pnl, -1, _("until"))
    113          __szr_encounter_details.Add(__lbl_until, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5)
    114          __szr_encounter_details.Add(self._PRW_encounter_end, 1, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5)
    115          __szr_encounter_details.Add(self._BTN_new_encounter, 0, wx.EXPAND, 0)
    116          __gszr_encounter_details.Add(__szr_encounter_details, 1, wx.EXPAND, 0)
    117          __lbl_rfe = wx.StaticText(self.__splitter_right_top_pnl, -1, _("Request"))
    118          __gszr_encounter_details.Add(__lbl_rfe, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    119          __gszr_encounter_details.Add(self._TCTRL_rfe, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
    120          __gszr_encounter_details.AddGrowableCol(1)
    121          __szr_top_right.Add(__gszr_encounter_details, 0, wx.RIGHT|wx.EXPAND, 3)
    122          self._NB_device_editors.AddPage(self.notebook_1_pane_1, _("device1"))
    123          __szr_top_right.Add(self._NB_device_editors, 1, wx.RIGHT|wx.TOP|wx.EXPAND, 3)
    124          __lbl_aoe = wx.StaticText(self.__splitter_right_top_pnl, -1, _("Summary"))
    125          __szr_aoe.Add(__lbl_aoe, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5)
    126          __szr_aoe.Add(self._TCTRL_aoe, 1, wx.RIGHT|wx.TOP|wx.BOTTOM|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5)
    127          __szr_top_right.Add(__szr_aoe, 0, wx.RIGHT|wx.TOP|wx.EXPAND, 3)
    128          __lbl_ekg = wx.StaticText(self.__splitter_right_top_pnl, -1, _("EKG"))
    129          __szr_ekg.Add(__lbl_ekg, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5)
    130          __szr_ekg.Add(self._TCTRL_ekg, 1, wx.RIGHT|wx.TOP|wx.BOTTOM|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5)
    131          __szr_top_right.Add(__szr_ekg, 0, wx.RIGHT|wx.TOP|wx.EXPAND, 3)
    132          __lbl_save = wx.StaticText(self.__splitter_right_top_pnl, -1, _("Save:"))
    133          __szr_buttons.Add(__lbl_save, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5)
    134          __szr_buttons.Add(self._BTN_save_all, 0, wx.RIGHT|wx.EXPAND, 3)
    135          __szr_buttons.Add(self._BTN_save_encounter, 0, wx.RIGHT|wx.EXPAND, 3)
    136          __szr_buttons.Add(self._BTN_save_note, 0, wx.EXPAND, 0)
    137          __szr_buttons.Add((1, 1), 1, 0, 0)
    138          __lbl_editor = wx.StaticText(self.__splitter_right_top_pnl, -1, _("Editor:"))
    139          __szr_buttons.Add(__lbl_editor, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5)
    140          __szr_buttons.Add(self._BTN_new_editor, 0, wx.RIGHT|wx.EXPAND, 3)
    141          __szr_buttons.Add(self._BTN_clear_editor, 0, wx.RIGHT|wx.EXPAND, 3)
    142          __szr_buttons.Add(self._BTN_discard_editor, 0, wx.EXPAND, 0)
    143          __szr_buttons.Add((1, 1), 1, 0, 0)
    144          __szr_top_right.Add(__szr_buttons, 0, wx.RIGHT|wx.TOP|wx.EXPAND, 3)
    145          self.__splitter_right_top_pnl.SetSizer(__szr_top_right)
    146          __szr_lower_bottom_right.Add(self._lbl_hints, 0, wx.EXPAND, 0)
    147          self.__splitter_right_bottom_pnl.SetSizer(__szr_lower_bottom_right)
    148          self._splitter_right.SplitHorizontally(self.__splitter_right_top_pnl, self.__splitter_right_bottom_pnl)
    149          __szr_right.Add(self._splitter_right, 1, wx.EXPAND, 0)
    150          self.__splitter_main_right_pnl.SetSizer(__szr_right)
    151          self._splitter_main.SplitVertically(self.__splitter_main_left_pnl, self.__splitter_main_right_pnl)
    152          __szr_main.Add(self._splitter_main, 1, wx.EXPAND, 0)
    153          self.SetSizer(__szr_main)
    154          __szr_main.Fit(self)
    155          # end wxGlade
    156
    157 -    def _on_problem_activated(self, event): # wxGlade: wxgCardiacDevicePluginPnl.<event_handler>
    158          print "Event handler `_on_problem_activated' not implemented!"
    159          event.Skip()
    160
    161 -    def _on_new_encounter_button_pressed(self, event): # wxGlade: wxgCardiacDevicePluginPnl.<event_handler>
    162          print "Event handler `_on_new_encounter_button_pressed' not implemented!"
    163          event.Skip()
    164
    165 -    def _on_save_all_button_pressed(self, event): # wxGlade: wxgCardiacDevicePluginPnl.<event_handler>
    166          print "Event handler `_on_save_all_button_pressed' not implemented!"
    167          event.Skip()
    168
    169 -    def _on_save_encounter_button_pressed(self, event): # wxGlade: wxgCardiacDevicePluginPnl.<event_handler>
    170          print "Event handler `_on_save_encounter_button_pressed' not implemented!"
    171          event.Skip()
    172
    173 -    def _on_save_note_button_pressed(self, event): # wxGlade: wxgCardiacDevicePluginPnl.<event_handler>
    174          print "Event handler `_on_save_note_button_pressed' not implemented!"
    175          event.Skip()
    176
    177 -    def _on_new_editor_button_pressed(self, event): # wxGlade: wxgCardiacDevicePluginPnl.<event_handler>
    178          print "Event handler `_on_new_editor_button_pressed' not implemented!"
    179          event.Skip()
    180
    181 -    def _on_clear_editor_button_pressed(self, event): # wxGlade: wxgCardiacDevicePluginPnl.<event_handler>
    182          print "Event handler `_on_clear_editor_button_pressed' not implemented!"
    183          event.Skip()
    184
    185 -    def _on_discard_editor_button_pressed(self, event): # wxGlade: wxgCardiacDevicePluginPnl.<event_handler>
    186          print "Event handler `_on_discard_editor_button_pressed' not implemented!"
    187          event.Skip()
    188
    189  # end of class wxgCardiacDevicePluginPnl
    190