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

Source Code for Module Gnumed.wxGladeWidgets.wxgSoapPluginPnl

  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/wxgSoapPluginPnl.wxg" 
  4   
  5  import wx 
  6   
  7  # begin wxGlade: extracode 
  8  # end wxGlade 
  9   
 10   
 11   
12 -class wxgSoapPluginPnl(wx.ScrolledWindow):
13 - def __init__(self, *args, **kwds):
14 15 from Gnumed.wxpython.gmNarrativeWidgets import cSoapNoteInputNotebook 16 from Gnumed.wxpython.gmNarrativeWidgets import cVisualSoapPnl 17 from Gnumed.wxpython.gmDateTimeInput import cFuzzyTimestampInput 18 from Gnumed.wxpython.gmEMRStructWidgets import cEncounterTypePhraseWheel 19 from Gnumed.wxpython import gmListWidgets 20 21 # begin wxGlade: wxgSoapPluginPnl.__init__ 22 kwds["style"] = wx.NO_BORDER|wx.TAB_TRAVERSAL 23 wx.Panel.__init__(self, *args, **kwds) 24 self._splitter_main = wx.SplitterWindow(self, -1, style=wx.SP_3D|wx.SP_BORDER|wx.SP_PERMIT_UNSPLIT) 25 self.__splitter_main_right_pnl = wx.Panel(self._splitter_main, -1, style=wx.NO_BORDER) 26 self._splitter_right = wx.SplitterWindow(self.__splitter_main_right_pnl, -1, style=wx.SP_3D|wx.SP_BORDER|wx.SP_PERMIT_UNSPLIT) 27 self.__splitter_right_bottom_pnl = wx.Panel(self._splitter_right, -1, style=wx.NO_BORDER) 28 self.__splitter_right_top_pnl = wx.Panel(self._splitter_right, -1, style=wx.NO_BORDER) 29 self._splitter_soap = wx.SplitterWindow(self.__splitter_right_top_pnl, -1, style=wx.SP_3D|wx.SP_BORDER|wx.SP_PERMIT_UNSPLIT) 30 self.__splitter_soap_img_pnl = wx.ScrolledWindow(self._splitter_soap, -1, style=wx.TAB_TRAVERSAL) 31 self.__splitter_soap_nb_pnl = wx.Panel(self._splitter_soap, -1, style=wx.NO_BORDER|wx.TAB_TRAVERSAL) 32 self._NB_soap_editors = cSoapNoteInputNotebook(self.__splitter_soap_nb_pnl, -1, style=0) 33 self.__splitter_main_left_pnl = wx.Panel(self._splitter_main, -1, style=wx.NO_BORDER) 34 self._splitter_left = wx.SplitterWindow(self.__splitter_main_left_pnl, -1, style=wx.SP_3D|wx.SP_BORDER|wx.SP_PERMIT_UNSPLIT) 35 self.__splitter_left_bottom_pnl = wx.Panel(self._splitter_left, -1, style=wx.NO_BORDER) 36 self.__splitter_left_top_pnl = wx.Panel(self._splitter_left, -1, style=wx.NO_BORDER) 37 self._SZR_recent_notes_staticbox = wx.StaticBox(self.__splitter_left_bottom_pnl, -1, _("Most recent notes on above problem")) 38 self.__szr_top_right_staticbox = wx.StaticBox(self.__splitter_right_top_pnl, -1, _("New notelets in current encounter")) 39 self.__szr_bottom_right_staticbox = wx.StaticBox(self.__splitter_right_bottom_pnl, -1, _("Tips and hints")) 40 self._SZR_problem_list_staticbox = wx.StaticBox(self.__splitter_left_top_pnl, -1, _("Active problems")) 41 self._CHBOX_show_closed_episodes = wx.CheckBox(self.__splitter_left_top_pnl, -1, _("Closed episodes")) 42 self._CHBOX_irrelevant_issues = wx.CheckBox(self.__splitter_left_top_pnl, -1, _("Non-relevant issues")) 43 self._LCTRL_active_problems = gmListWidgets.cReportListCtrl(self.__splitter_left_top_pnl, -1, style=wx.LC_REPORT|wx.NO_BORDER) 44 self._TCTRL_recent_notes = wx.TextCtrl(self.__splitter_left_bottom_pnl, -1, _("In this area GNUmed will place the notes of the\nprevious encounter as well as notes by other\nstaff for the current encounter.\n\nNote that this may change depending on which\nactive problem is selected in the editor below."), style=wx.TE_MULTILINE|wx.TE_READONLY|wx.TE_WORDWRAP|wx.NO_BORDER) 45 self._PRW_encounter_type = cEncounterTypePhraseWheel(self.__splitter_right_top_pnl, -1, "", style=wx.NO_BORDER) 46 self._PRW_encounter_start = cFuzzyTimestampInput(self.__splitter_right_top_pnl, -1, "", style=wx.NO_BORDER) 47 self._PRW_encounter_end = cFuzzyTimestampInput(self.__splitter_right_top_pnl, -1, "", style=wx.NO_BORDER) 48 self._TCTRL_rfe = wx.TextCtrl(self.__splitter_right_top_pnl, -1, "", style=wx.NO_BORDER) 49 self.notebook_1_pane_1 = wx.Panel(self._NB_soap_editors, -1) 50 self._PNL_visual_soap = cVisualSoapPnl(self.__splitter_soap_img_pnl, -1, style=wx.NO_BORDER|wx.TAB_TRAVERSAL) 51 self._TCTRL_aoe = wx.TextCtrl(self.__splitter_right_top_pnl, -1, "", style=wx.NO_BORDER) 52 self._BTN_new_editor = wx.Button(self.__splitter_right_top_pnl, -1, _("&New"), style=wx.BU_EXACTFIT) 53 self._BTN_clear_editor = wx.Button(self.__splitter_right_top_pnl, -1, _("&Clear"), style=wx.BU_EXACTFIT) 54 self._BTN_discard_editor = wx.Button(self.__splitter_right_top_pnl, -1, _("&Discard"), style=wx.BU_EXACTFIT) 55 self._BTN_save_note = wx.Button(self.__splitter_right_top_pnl, -1, _("&Save"), style=wx.BU_EXACTFIT) 56 self._BTN_new_encounter = wx.Button(self.__splitter_right_top_pnl, -1, _("New"), style=wx.BU_EXACTFIT) 57 self._BTN_save_encounter = wx.Button(self.__splitter_right_top_pnl, -1, _("Save"), style=wx.BU_EXACTFIT) 58 self._BTN_save_all = wx.Button(self.__splitter_right_top_pnl, -1, _("Save &all"), style=wx.BU_EXACTFIT) 59 self._lbl_hints = wx.StaticText(self.__splitter_right_bottom_pnl, -1, _("In this area GNUmed will place hints and tips\nrelated to the current progress note and patient.\n\nThose hints will be derived from a variety of\nsources such as classifications (ICD, ...), expert\nsystems (EGADDS), online resources (Google\nand friends), drug 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.")) 60 61 self.__set_properties() 62 self.__do_layout() 63 64 self.Bind(wx.EVT_CHECKBOX, self._on_show_closed_episodes_checked, self._CHBOX_show_closed_episodes) 65 self.Bind(wx.EVT_CHECKBOX, self._on_irrelevant_issues_checked, self._CHBOX_irrelevant_issues) 66 self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_problem_selected, self._LCTRL_active_problems) 67 self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self._on_problem_activated, self._LCTRL_active_problems) 68 self.Bind(wx.EVT_LIST_ITEM_FOCUSED, self._on_problem_focused, self._LCTRL_active_problems) 69 self.Bind(wx.EVT_BUTTON, self._on_new_editor_button_pressed, self._BTN_new_editor) 70 self.Bind(wx.EVT_BUTTON, self._on_clear_editor_button_pressed, self._BTN_clear_editor) 71 self.Bind(wx.EVT_BUTTON, self._on_discard_editor_button_pressed, self._BTN_discard_editor) 72 self.Bind(wx.EVT_BUTTON, self._on_save_note_button_pressed, self._BTN_save_note) 73 self.Bind(wx.EVT_BUTTON, self._on_new_encounter_button_pressed, self._BTN_new_encounter) 74 self.Bind(wx.EVT_BUTTON, self._on_save_encounter_button_pressed, self._BTN_save_encounter) 75 self.Bind(wx.EVT_BUTTON, self._on_save_all_button_pressed, self._BTN_save_all)
76 # end wxGlade 77
78 - def __set_properties(self):
79 # begin wxGlade: wxgSoapPluginPnl.__set_properties 80 self._CHBOX_show_closed_episodes.SetToolTipString(_("Show closed episodes as pseudo-problems ?")) 81 self._CHBOX_irrelevant_issues.SetToolTipString(_("Show issues marked clinically NOT relevant.")) 82 self._LCTRL_active_problems.SetToolTipString(_("This shows the list of active problems, They include open episodes as well as active health issues.")) 83 self._TCTRL_recent_notes.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_3DFACE)) 84 self._PRW_encounter_type.SetToolTipString(_("Select the type of encounter.")) 85 self._PRW_encounter_start.SetToolTipString(_("Date and time when the current (!) encounter started.")) 86 self._PRW_encounter_end.SetToolTipString(_("Date and time when the current (!) encounter ends.")) 87 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).")) 88 self.__splitter_soap_img_pnl.SetScrollRate(10, 10) 89 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.")) 90 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.")) 91 self._BTN_clear_editor.SetToolTipString(_("Clear the editor for the displayed progress note.")) 92 self._BTN_discard_editor.SetToolTipString(_("Discard the editor for the displayed progress note.")) 93 self._BTN_save_note.SetToolTipString(_("Save the currently displayed progress note.")) 94 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.")) 95 self._BTN_save_encounter.SetToolTipString(_("Save the encounter details.")) 96 self._BTN_save_all.SetToolTipString(_("Save encounter details and all progress notes."))
97 # end wxGlade 98
99 - def __do_layout(self):
100 # begin wxGlade: wxgSoapPluginPnl.__do_layout 101 __szr_main = wx.BoxSizer(wx.HORIZONTAL) 102 __szr_right = wx.BoxSizer(wx.VERTICAL) 103 __szr_bottom_right = wx.StaticBoxSizer(self.__szr_bottom_right_staticbox, wx.VERTICAL) 104 __szr_top_right = wx.StaticBoxSizer(self.__szr_top_right_staticbox, wx.VERTICAL) 105 __szr_buttons = wx.BoxSizer(wx.HORIZONTAL) 106 __szr_aoe = wx.BoxSizer(wx.HORIZONTAL) 107 __szr_soap_img = wx.BoxSizer(wx.VERTICAL) 108 __szr_soap_nb = wx.BoxSizer(wx.HORIZONTAL) 109 __gszr_encounter_details = wx.FlexGridSizer(2, 2, 2, 5) 110 __szr_encounter_details = wx.BoxSizer(wx.HORIZONTAL) 111 __szr_left = wx.BoxSizer(wx.HORIZONTAL) 112 _SZR_recent_notes = wx.StaticBoxSizer(self._SZR_recent_notes_staticbox, wx.VERTICAL) 113 _SZR_problem_list = wx.StaticBoxSizer(self._SZR_problem_list_staticbox, wx.VERTICAL) 114 __szr_problem_filter = wx.BoxSizer(wx.HORIZONTAL) 115 __lbl_problem_filter = wx.StaticText(self.__splitter_left_top_pnl, -1, _("Include:")) 116 __szr_problem_filter.Add(__lbl_problem_filter, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 10) 117 __szr_problem_filter.Add(self._CHBOX_show_closed_episodes, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5) 118 __szr_problem_filter.Add(self._CHBOX_irrelevant_issues, 0, wx.ALIGN_CENTER_VERTICAL, 0) 119 __szr_problem_filter.Add((20, 20), 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 120 _SZR_problem_list.Add(__szr_problem_filter, 0, wx.EXPAND, 0) 121 _SZR_problem_list.Add(self._LCTRL_active_problems, 1, wx.EXPAND, 0) 122 self.__splitter_left_top_pnl.SetSizer(_SZR_problem_list) 123 _SZR_recent_notes.Add(self._TCTRL_recent_notes, 1, wx.EXPAND, 0) 124 self.__splitter_left_bottom_pnl.SetSizer(_SZR_recent_notes) 125 self._splitter_left.SplitHorizontally(self.__splitter_left_top_pnl, self.__splitter_left_bottom_pnl) 126 __szr_left.Add(self._splitter_left, 1, wx.EXPAND, 0) 127 self.__splitter_main_left_pnl.SetSizer(__szr_left) 128 __lbl_encounter_details = wx.StaticText(self.__splitter_right_top_pnl, -1, _("Encounter")) 129 __gszr_encounter_details.Add(__lbl_encounter_details, 0, wx.ALIGN_CENTER_VERTICAL, 0) 130 __szr_encounter_details.Add(self._PRW_encounter_type, 1, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 10) 131 __szr_encounter_details.Add(self._PRW_encounter_start, 1, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5) 132 __lbl_until = wx.StaticText(self.__splitter_right_top_pnl, -1, _("until")) 133 __szr_encounter_details.Add(__lbl_until, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5) 134 __szr_encounter_details.Add(self._PRW_encounter_end, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5) 135 __gszr_encounter_details.Add(__szr_encounter_details, 1, wx.EXPAND, 0) 136 __lbl_rfe = wx.StaticText(self.__splitter_right_top_pnl, -1, _("Purpose ...")) 137 __gszr_encounter_details.Add(__lbl_rfe, 0, wx.ALIGN_CENTER_VERTICAL, 0) 138 __gszr_encounter_details.Add(self._TCTRL_rfe, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 139 __gszr_encounter_details.AddGrowableCol(1) 140 __szr_top_right.Add(__gszr_encounter_details, 0, wx.RIGHT|wx.TOP|wx.EXPAND, 3) 141 self._NB_soap_editors.AddPage(self.notebook_1_pane_1, _("tab1")) 142 __szr_soap_nb.Add(self._NB_soap_editors, 3, wx.EXPAND, 3) 143 self.__splitter_soap_nb_pnl.SetSizer(__szr_soap_nb) 144 __szr_soap_img.Add(self._PNL_visual_soap, 1, wx.EXPAND, 0) 145 self.__splitter_soap_img_pnl.SetSizer(__szr_soap_img) 146 self._splitter_soap.SplitVertically(self.__splitter_soap_nb_pnl, self.__splitter_soap_img_pnl) 147 __szr_top_right.Add(self._splitter_soap, 1, wx.RIGHT|wx.TOP|wx.EXPAND, 3) 148 __lbl_aoe = wx.StaticText(self.__splitter_right_top_pnl, -1, _("... summary")) 149 __szr_aoe.Add(__lbl_aoe, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5) 150 __szr_aoe.Add(self._TCTRL_aoe, 1, wx.TOP|wx.BOTTOM|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5) 151 __szr_top_right.Add(__szr_aoe, 0, wx.RIGHT|wx.TOP|wx.EXPAND, 3) 152 __lbl_editor = wx.StaticText(self.__splitter_right_top_pnl, -1, _("Notelet:")) 153 __szr_buttons.Add(__lbl_editor, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5) 154 __szr_buttons.Add(self._BTN_new_editor, 0, wx.RIGHT|wx.EXPAND, 3) 155 __szr_buttons.Add(self._BTN_clear_editor, 0, wx.RIGHT|wx.EXPAND, 3) 156 __szr_buttons.Add(self._BTN_discard_editor, 0, wx.RIGHT|wx.EXPAND, 3) 157 __szr_buttons.Add(self._BTN_save_note, 0, wx.EXPAND, 3) 158 __szr_buttons.Add((1, 1), 1, wx.EXPAND, 0) 159 __lbl_encounter = wx.StaticText(self.__splitter_right_top_pnl, -1, _("Encounter:")) 160 __szr_buttons.Add(__lbl_encounter, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5) 161 __szr_buttons.Add(self._BTN_new_encounter, 0, wx.RIGHT|wx.EXPAND, 3) 162 __szr_buttons.Add(self._BTN_save_encounter, 0, wx.EXPAND, 3) 163 __szr_buttons.Add((1, 1), 1, wx.EXPAND, 0) 164 __szr_buttons.Add(self._BTN_save_all, 0, wx.EXPAND, 5) 165 __szr_top_right.Add(__szr_buttons, 0, wx.RIGHT|wx.TOP|wx.EXPAND, 3) 166 self.__splitter_right_top_pnl.SetSizer(__szr_top_right) 167 __szr_bottom_right.Add(self._lbl_hints, 0, wx.EXPAND, 0) 168 self.__splitter_right_bottom_pnl.SetSizer(__szr_bottom_right) 169 self._splitter_right.SplitHorizontally(self.__splitter_right_top_pnl, self.__splitter_right_bottom_pnl) 170 __szr_right.Add(self._splitter_right, 1, wx.EXPAND, 0) 171 self.__splitter_main_right_pnl.SetSizer(__szr_right) 172 self._splitter_main.SplitVertically(self.__splitter_main_left_pnl, self.__splitter_main_right_pnl) 173 __szr_main.Add(self._splitter_main, 1, wx.EXPAND, 0) 174 self.SetSizer(__szr_main) 175 __szr_main.Fit(self)
176 # end wxGlade 177
178 - def _on_save_all_button_pressed(self, event): # wxGlade: wxgSoapPluginPnl.<event_handler>
179 print "Event handler `_on_save_all_button_pressed' not implemented!" 180 event.Skip()
181
182 - def _on_save_encounter_button_pressed(self, event): # wxGlade: wxgSoapPluginPnl.<event_handler>
183 print "Event handler `_on_save_encounter_button_pressed' not implemented!" 184 event.Skip() 185
186 - def _on_save_note_button_pressed(self, event): # wxGlade: wxgSoapPluginPnl.<event_handler>
187 print "Event handler `_on_save_note_button_pressed' not implemented!" 188 event.Skip() 189
190 - def _on_new_editor_button_pressed(self, event): # wxGlade: wxgSoapPluginPnl.<event_handler>
191 print "Event handler `_on_new_editor_button_pressed' not implemented!" 192 event.Skip() 193
194 - def _on_clear_editor_button_pressed(self, event): # wxGlade: wxgSoapPluginPnl.<event_handler>
195 print "Event handler `_on_clear_editor_button_pressed' not implemented!" 196 event.Skip() 197
198 - def _on_discard_editor_button_pressed(self, event): # wxGlade: wxgSoapPluginPnl.<event_handler>
199 print "Event handler `_on_discard_editor_button_pressed' not implemented!" 200 event.Skip() 201
202 - def _on_problem_activated(self, event): # wxGlade: wxgSoapPluginPnl.<event_handler>
203 print "Event handler `_on_problem_activated' not implemented" 204 event.Skip() 205
206 - def _on_new_encounter_button_pressed(self, event): # wxGlade: wxgSoapPluginPnl.<event_handler>
207 print "Event handler `_on_new_encounter_button_pressed' not implemented" 208 event.Skip() 209
210 - def _on_problem_selected(self, event): # wxGlade: wxgSoapPluginPnl.<event_handler>
211 print "Event handler `_on_problem_selected' not implemented" 212 event.Skip() 213
214 - def _on_problem_focused(self, event): # wxGlade: wxgSoapPluginPnl.<event_handler>
215 print "Event handler `_on_problem_focused' not implemented" 216 event.Skip() 217
218 - def _on_show_closed_episodes_checked(self, event): # wxGlade: wxgSoapPluginPnl.<event_handler>
219 print "Event handler `_on_show_closed_episodes_checked' not implemented" 220 event.Skip() 221
222 - def _on_irrelevant_issues_checked(self, event): # wxGlade: wxgSoapPluginPnl.<event_handler>
223 print "Event handler `_on_irrelevant_issues_checked' not implemented" 224 event.Skip() 225 226 # end of class wxgSoapPluginPnl 227