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

Source Code for Module Gnumed.wxGladeWidgets.wxgCardiacDevicePluginPnl

  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 wxgCardiacDevicePluginPnl(wx.ScrolledWindow):
17 - def __init__(self, *args, **kwds):
18 # begin wxGlade: wxgCardiacDevicePluginPnl.__init__ 19 kwds["style"] = kwds.get("style", 0) | wx.BORDER_NONE | wx.TAB_TRAVERSAL 20 wx.ScrolledWindow.__init__(self, *args, **kwds) 21 self._splitter_main = wx.SplitterWindow(self, wx.ID_ANY, style=wx.SP_3D | wx.SP_BORDER | wx.SP_PERMIT_UNSPLIT) 22 self.__splitter_main_left_pnl = wx.Panel(self._splitter_main, wx.ID_ANY, style=wx.BORDER_NONE | wx.FULL_REPAINT_ON_RESIZE) 23 self._splitter_left = wx.SplitterWindow(self.__splitter_main_left_pnl, wx.ID_ANY, style=wx.SP_3D | wx.SP_BORDER) 24 self.__splitter_left_top_pnl = wx.Panel(self._splitter_left, wx.ID_ANY) 25 self._TCTRL_current_status = wx.TextCtrl(self.__splitter_left_top_pnl, wx.ID_ANY, _("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) 26 self.__splitter_left_bottom_pnl = wx.Panel(self._splitter_left, wx.ID_ANY, style=wx.BORDER_NONE) 27 self._LCTRL_pevious_encounters = cReportListCtrl(self.__splitter_left_bottom_pnl, wx.ID_ANY, style=wx.BORDER_NONE | wx.FULL_REPAINT_ON_RESIZE | wx.LC_REPORT) 28 self.__splitter_main_right_pnl = wx.Panel(self._splitter_main, wx.ID_ANY, style=wx.BORDER_NONE) 29 self._splitter_right = wx.SplitterWindow(self.__splitter_main_right_pnl, wx.ID_ANY, style=wx.SP_3D | wx.SP_BORDER | wx.SP_PERMIT_UNSPLIT) 30 self.__splitter_right_top_pnl = wx.Panel(self._splitter_right, wx.ID_ANY, style=wx.BORDER_NONE) 31 self._PRW_encounter_type = cEncounterTypePhraseWheel(self.__splitter_right_top_pnl, wx.ID_ANY, "") 32 self._PRW_encounter_start = cFuzzyTimestampInput(self.__splitter_right_top_pnl, wx.ID_ANY, "") 33 self._PRW_encounter_end = cFuzzyTimestampInput(self.__splitter_right_top_pnl, wx.ID_ANY, "") 34 self._BTN_new_encounter = wx.Button(self.__splitter_right_top_pnl, wx.ID_ANY, _("New"), style=wx.BU_EXACTFIT) 35 self._TCTRL_rfe = wx.TextCtrl(self.__splitter_right_top_pnl, wx.ID_ANY, "") 36 self._NB_device_editors = cSoapNoteInputNotebook(self.__splitter_right_top_pnl, wx.ID_ANY, style=0) 37 self.notebook_1_pane_1 = wx.Panel(self._NB_device_editors, wx.ID_ANY) 38 self._TCTRL_aoe = wx.TextCtrl(self.__splitter_right_top_pnl, wx.ID_ANY, "") 39 self._TCTRL_ekg = wx.TextCtrl(self.__splitter_right_top_pnl, wx.ID_ANY, "") 40 self._BTN_save_all = wx.Button(self.__splitter_right_top_pnl, wx.ID_ANY, _("&All"), style=wx.BU_EXACTFIT) 41 self._BTN_save_encounter = wx.Button(self.__splitter_right_top_pnl, wx.ID_ANY, _("&Encounter"), style=wx.BU_EXACTFIT) 42 self._BTN_save_note = wx.Button(self.__splitter_right_top_pnl, wx.ID_ANY, _("&Note"), style=wx.BU_EXACTFIT) 43 self._BTN_new_editor = wx.Button(self.__splitter_right_top_pnl, wx.ID_ANY, _("&New"), style=wx.BU_EXACTFIT) 44 self._BTN_clear_editor = wx.Button(self.__splitter_right_top_pnl, wx.ID_ANY, _("&Clear"), style=wx.BU_EXACTFIT) 45 self._BTN_discard_editor = wx.Button(self.__splitter_right_top_pnl, wx.ID_ANY, _("&Discard"), style=wx.BU_EXACTFIT) 46 self.__splitter_right_bottom_pnl = wx.ScrolledWindow(self._splitter_right, wx.ID_ANY, style=wx.BORDER_NONE) 47 self._lbl_hints = wx.StaticText(self.__splitter_right_bottom_pnl, wx.ID_ANY, _("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.")) 48 49 self.__set_properties() 50 self.__do_layout() 51 52 self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self._on_problem_activated, self._LCTRL_pevious_encounters) 53 self.Bind(wx.EVT_BUTTON, self._on_new_encounter_button_pressed, self._BTN_new_encounter) 54 self.Bind(wx.EVT_BUTTON, self._on_save_all_button_pressed, self._BTN_save_all) 55 self.Bind(wx.EVT_BUTTON, self._on_save_encounter_button_pressed, self._BTN_save_encounter) 56 self.Bind(wx.EVT_BUTTON, self._on_save_note_button_pressed, self._BTN_save_note) 57 self.Bind(wx.EVT_BUTTON, self._on_new_editor_button_pressed, self._BTN_new_editor) 58 self.Bind(wx.EVT_BUTTON, self._on_clear_editor_button_pressed, self._BTN_clear_editor) 59 self.Bind(wx.EVT_BUTTON, self._on_discard_editor_button_pressed, self._BTN_discard_editor)
60 # end wxGlade 61
62 - def __set_properties(self):
63 # begin wxGlade: wxgCardiacDevicePluginPnl.__set_properties 64 self.SetScrollRate(10, 10) 65 self._TCTRL_current_status.Enable(False) 66 self._LCTRL_pevious_encounters.SetToolTip(_("This shows the list of previous encounters")) 67 self._splitter_left.SetMinimumPaneSize(20) 68 self._PRW_encounter_type.SetToolTip(_("Select the type of encounter.")) 69 self._PRW_encounter_start.SetToolTip(_("Date and time when the current (!) encounter started.")) 70 self._PRW_encounter_end.SetToolTip(_("Date and time when the current (!) encounter ends.")) 71 self._BTN_new_encounter.SetToolTip(_("Start a new encounter. If there are any changes to the current encounter you will be asked whether to save them.")) 72 self._TCTRL_rfe.SetToolTip(_("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).")) 73 self._TCTRL_aoe.SetToolTip(_("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.")) 74 self._TCTRL_ekg.SetToolTip(_("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.")) 75 self._BTN_save_all.SetToolTip(_("Save encounter details and all progress notes.")) 76 self._BTN_save_encounter.SetToolTip(_("Save the encounter details.")) 77 self._BTN_save_note.SetToolTip(_("Save the currently displayed progress note.")) 78 self._BTN_new_editor.SetToolTip(_("Open a new progress note editor.\n\nThere is a configuration item on whether to allow several new-episode editors at once.")) 79 self._BTN_clear_editor.SetToolTip(_("Clear the editor for the displayed progress note.")) 80 self._BTN_discard_editor.SetToolTip(_("Discard the editor for the displayed progress note.")) 81 self.__splitter_right_bottom_pnl.SetScrollRate(10, 10) 82 self._splitter_right.SetMinimumPaneSize(20) 83 self._splitter_main.SetMinimumPaneSize(20)
84 # end wxGlade 85
86 - def __do_layout(self):
87 # begin wxGlade: wxgCardiacDevicePluginPnl.__do_layout 88 __szr_main = wx.BoxSizer(wx.HORIZONTAL) 89 __szr_right = wx.BoxSizer(wx.VERTICAL) 90 __szr_lower_bottom_right = wx.StaticBoxSizer(wx.StaticBox(self.__splitter_right_bottom_pnl, wx.ID_ANY, _("Tips and Hints")), wx.VERTICAL) 91 __szr_top_right = wx.StaticBoxSizer(wx.StaticBox(self.__splitter_right_top_pnl, wx.ID_ANY, _("New notes in current encounter")), wx.VERTICAL) 92 __szr_buttons = wx.BoxSizer(wx.HORIZONTAL) 93 __szr_ekg = wx.BoxSizer(wx.HORIZONTAL) 94 __szr_aoe = wx.BoxSizer(wx.HORIZONTAL) 95 __gszr_encounter_details = wx.FlexGridSizer(2, 2, 2, 5) 96 __szr_encounter_details = wx.BoxSizer(wx.HORIZONTAL) 97 __szr_left = wx.BoxSizer(wx.VERTICAL) 98 __szr_bottom_left = wx.StaticBoxSizer(wx.StaticBox(self.__splitter_left_bottom_pnl, wx.ID_ANY, _("Previous Encounters")), wx.VERTICAL) 99 __szr_top_left = wx.StaticBoxSizer(wx.StaticBox(self.__splitter_left_top_pnl, wx.ID_ANY, _("Active Device Settings")), wx.VERTICAL) 100 __szr_top_left.Add(self._TCTRL_current_status, 1, wx.EXPAND, 0) 101 self.__splitter_left_top_pnl.SetSizer(__szr_top_left) 102 __szr_bottom_left.Add(self._LCTRL_pevious_encounters, 1, wx.EXPAND, 0) 103 self.__splitter_left_bottom_pnl.SetSizer(__szr_bottom_left) 104 self._splitter_left.SplitHorizontally(self.__splitter_left_top_pnl, self.__splitter_left_bottom_pnl) 105 __szr_left.Add(self._splitter_left, 1, wx.EXPAND, 0) 106 self.__splitter_main_left_pnl.SetSizer(__szr_left) 107 __lbl_encounter_details = wx.StaticText(self.__splitter_right_top_pnl, wx.ID_ANY, _("Encounter")) 108 __gszr_encounter_details.Add(__lbl_encounter_details, 0, wx.ALIGN_CENTER_VERTICAL, 0) 109 __szr_encounter_details.Add(self._PRW_encounter_type, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 10) 110 __szr_encounter_details.Add(self._PRW_encounter_start, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 5) 111 __lbl_until = wx.StaticText(self.__splitter_right_top_pnl, wx.ID_ANY, _("until")) 112 __szr_encounter_details.Add(__lbl_until, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5) 113 __szr_encounter_details.Add(self._PRW_encounter_end, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 5) 114 __szr_encounter_details.Add(self._BTN_new_encounter, 0, wx.EXPAND, 0) 115 __gszr_encounter_details.Add(__szr_encounter_details, 1, wx.EXPAND, 0) 116 __lbl_rfe = wx.StaticText(self.__splitter_right_top_pnl, wx.ID_ANY, _("Request")) 117 __gszr_encounter_details.Add(__lbl_rfe, 0, wx.ALIGN_CENTER_VERTICAL, 0) 118 __gszr_encounter_details.Add(self._TCTRL_rfe, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0) 119 __gszr_encounter_details.AddGrowableCol(1) 120 __szr_top_right.Add(__gszr_encounter_details, 0, wx.EXPAND | wx.RIGHT, 3) 121 self._NB_device_editors.AddPage(self.notebook_1_pane_1, _("device1")) 122 __szr_top_right.Add(self._NB_device_editors, 1, wx.EXPAND | wx.RIGHT | wx.TOP, 3) 123 __lbl_aoe = wx.StaticText(self.__splitter_right_top_pnl, wx.ID_ANY, _("Summary")) 124 __szr_aoe.Add(__lbl_aoe, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5) 125 __szr_aoe.Add(self._TCTRL_aoe, 1, wx.ALIGN_CENTER_VERTICAL | wx.BOTTOM | wx.EXPAND | wx.RIGHT | wx.TOP, 5) 126 __szr_top_right.Add(__szr_aoe, 0, wx.EXPAND | wx.RIGHT | wx.TOP, 3) 127 __lbl_ekg = wx.StaticText(self.__splitter_right_top_pnl, wx.ID_ANY, _("EKG")) 128 __szr_ekg.Add(__lbl_ekg, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5) 129 __szr_ekg.Add(self._TCTRL_ekg, 1, wx.ALIGN_CENTER_VERTICAL | wx.BOTTOM | wx.EXPAND | wx.RIGHT | wx.TOP, 5) 130 __szr_top_right.Add(__szr_ekg, 0, wx.EXPAND | wx.RIGHT | wx.TOP, 3) 131 __lbl_save = wx.StaticText(self.__splitter_right_top_pnl, wx.ID_ANY, _("Save:")) 132 __szr_buttons.Add(__lbl_save, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5) 133 __szr_buttons.Add(self._BTN_save_all, 0, wx.EXPAND | wx.RIGHT, 3) 134 __szr_buttons.Add(self._BTN_save_encounter, 0, wx.EXPAND | wx.RIGHT, 3) 135 __szr_buttons.Add(self._BTN_save_note, 0, wx.EXPAND, 0) 136 __szr_buttons.Add((1, 1), 1, 0, 0) 137 __lbl_editor = wx.StaticText(self.__splitter_right_top_pnl, wx.ID_ANY, _("Editor:")) 138 __szr_buttons.Add(__lbl_editor, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5) 139 __szr_buttons.Add(self._BTN_new_editor, 0, wx.EXPAND | wx.RIGHT, 3) 140 __szr_buttons.Add(self._BTN_clear_editor, 0, wx.EXPAND | wx.RIGHT, 3) 141 __szr_buttons.Add(self._BTN_discard_editor, 0, wx.EXPAND, 0) 142 __szr_buttons.Add((1, 1), 1, 0, 0) 143 __szr_top_right.Add(__szr_buttons, 0, wx.EXPAND | wx.RIGHT | wx.TOP, 3) 144 self.__splitter_right_top_pnl.SetSizer(__szr_top_right) 145 __szr_lower_bottom_right.Add(self._lbl_hints, 0, wx.EXPAND, 0) 146 self.__splitter_right_bottom_pnl.SetSizer(__szr_lower_bottom_right) 147 self._splitter_right.SplitHorizontally(self.__splitter_right_top_pnl, self.__splitter_right_bottom_pnl) 148 __szr_right.Add(self._splitter_right, 1, wx.EXPAND, 0) 149 self.__splitter_main_right_pnl.SetSizer(__szr_right) 150 self._splitter_main.SplitVertically(self.__splitter_main_left_pnl, self.__splitter_main_right_pnl) 151 __szr_main.Add(self._splitter_main, 1, wx.EXPAND, 0) 152 self.SetSizer(__szr_main) 153 __szr_main.Fit(self) 154 self.Layout()
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