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