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.gmDateTimeInput import cFuzzyTimestampInput 17 from Gnumed.wxpython.gmEMRStructWidgets import cEncounterTypePhraseWheel 18 from Gnumed.wxpython.gmCodingWidgets import cGenericCodesPhraseWheel 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|wx.TAB_TRAVERSAL) 26 self._NB_soap_editors = cSoapNoteInputNotebook(self.__splitter_main_right_pnl, -1, style=0) 27 self.__splitter_main_left_pnl = wx.Panel(self._splitter_main, -1, style=wx.NO_BORDER) 28 self._splitter_left = wx.SplitterWindow(self.__splitter_main_left_pnl, -1, style=wx.SP_3D|wx.SP_BORDER|wx.SP_PERMIT_UNSPLIT) 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, style=wx.NO_BORDER) 31 self._SZR_recent_notes_staticbox = wx.StaticBox(self.__splitter_left_bottom_pnl, -1, _("Most recent notes on above problem")) 32 self.__szr_right_staticbox = wx.StaticBox(self.__splitter_main_right_pnl, -1, _("New notelets in current encounter")) 33 self._SZR_problem_list_staticbox = wx.StaticBox(self.__splitter_left_top_pnl, -1, _("Active problems")) 34 self._CHBOX_show_closed_episodes = wx.CheckBox(self.__splitter_left_top_pnl, -1, _("Closed episodes")) 35 self._CHBOX_irrelevant_issues = wx.CheckBox(self.__splitter_left_top_pnl, -1, _("Non-relevant issues")) 36 self._LCTRL_active_problems = gmListWidgets.cReportListCtrl(self.__splitter_left_top_pnl, -1, style=wx.LC_REPORT|wx.NO_BORDER) 37 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) 38 self._TCTRL_rfe = wx.TextCtrl(self.__splitter_main_right_pnl, -1, "", style=wx.NO_BORDER) 39 self._PRW_rfe_codes = cGenericCodesPhraseWheel(self.__splitter_main_right_pnl, -1, "", style=wx.NO_BORDER) 40 self._TCTRL_aoe = wx.TextCtrl(self.__splitter_main_right_pnl, -1, "", style=wx.NO_BORDER) 41 self._PRW_aoe_codes = cGenericCodesPhraseWheel(self.__splitter_main_right_pnl, -1, "", style=wx.NO_BORDER) 42 self.notebook_1_pane_1 = wx.Panel(self._NB_soap_editors, -1) 43 self._BTN_new_editor = wx.Button(self.__splitter_main_right_pnl, -1, _("&New"), style=wx.BU_EXACTFIT) 44 self._BTN_clear_editor = wx.Button(self.__splitter_main_right_pnl, -1, _("&Clear"), style=wx.BU_EXACTFIT) 45 self._BTN_discard_editor = wx.Button(self.__splitter_main_right_pnl, -1, _("&Discard"), style=wx.BU_EXACTFIT) 46 self._BTN_save_note = wx.Button(self.__splitter_main_right_pnl, -1, _("&Save"), style=wx.BU_EXACTFIT) 47 self._BTN_save_note_under = wx.Button(self.__splitter_main_right_pnl, -1, _("Save &under"), style=wx.BU_EXACTFIT) 48 self._BTN_image = wx.Button(self.__splitter_main_right_pnl, -1, _("&Image"), style=wx.BU_EXACTFIT) 49 self._BTN_save_encounter = wx.Button(self.__splitter_main_right_pnl, -1, _("Save"), style=wx.BU_EXACTFIT) 50 self._BTN_save_all = wx.Button(self.__splitter_main_right_pnl, -1, _("Save &all"), style=wx.BU_EXACTFIT) 51 52 self.__set_properties() 53 self.__do_layout() 54 55 self.Bind(wx.EVT_CHECKBOX, self._on_show_closed_episodes_checked, self._CHBOX_show_closed_episodes) 56 self.Bind(wx.EVT_CHECKBOX, self._on_irrelevant_issues_checked, self._CHBOX_irrelevant_issues) 57 self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_problem_selected, self._LCTRL_active_problems) 58 self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self._on_problem_activated, self._LCTRL_active_problems) 59 self.Bind(wx.EVT_LIST_ITEM_FOCUSED, self._on_problem_focused, self._LCTRL_active_problems) 60 self.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self._on_problem_rclick, self._LCTRL_active_problems) 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 self.Bind(wx.EVT_BUTTON, self._on_save_note_button_pressed, self._BTN_save_note) 65 self.Bind(wx.EVT_BUTTON, self._on_save_note_under_button_pressed, self._BTN_save_note_under) 66 self.Bind(wx.EVT_BUTTON, self._on_image_button_pressed, self._BTN_image) 67 self.Bind(wx.EVT_BUTTON, self._on_save_encounter_button_pressed, self._BTN_save_encounter) 68 self.Bind(wx.EVT_BUTTON, self._on_save_all_button_pressed, self._BTN_save_all)
69 # end wxGlade 70
71 - def __set_properties(self):
72 # begin wxGlade: wxgSoapPluginPnl.__set_properties 73 self._CHBOX_show_closed_episodes.SetToolTipString(_("Show closed episodes as pseudo-problems ?")) 74 self._CHBOX_irrelevant_issues.SetToolTipString(_("Show issues marked clinically NOT relevant.")) 75 self._LCTRL_active_problems.SetToolTipString(_("This shows the list of active problems, They include open episodes as well as active health issues.")) 76 self._TCTRL_recent_notes.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_3DFACE)) 77 self._TCTRL_rfe.SetToolTipString(_("Also known as the Reason For Encounter/Visit (RFE).\n\nOptionally captures why the consultation 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.")) 78 self._PRW_rfe_codes.SetToolTipString(_("Codes relevant to the Reason for Encounter\nseparated by \";\".")) 79 self._TCTRL_aoe.SetToolTipString(_("Also known as the Assessment of Encounter/Visit (AOE)\n\nOptionally summarizes the outcome/assessment of the consultation from the doctors point of view.\n\nNote that this summary spans all the problems discussed during this encounter.")) 80 self._PRW_aoe_codes.SetToolTipString(_("Codes relevant to the Assessment of Encounter\nseparated by \";\".")) 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._BTN_save_note.SetToolTipString(_("Save the currently displayed progress note under the current encounter.")) 85 self._BTN_save_note_under.SetToolTipString(_("Save the currently displayed note into an encounter selected from a list of encounters.")) 86 self._BTN_image.SetToolTipString(_("Add a visual progress note for this episode.")) 87 self._BTN_save_encounter.SetToolTipString(_("Save the encounter details.")) 88 self._BTN_save_all.SetToolTipString(_("Save encounter details and all progress notes."))
89 # end wxGlade 90
91 - def __do_layout(self):
92 # begin wxGlade: wxgSoapPluginPnl.__do_layout 93 __szr_main = wx.BoxSizer(wx.HORIZONTAL) 94 __szr_right = wx.StaticBoxSizer(self.__szr_right_staticbox, wx.VERTICAL) 95 __szr_buttons = wx.BoxSizer(wx.HORIZONTAL) 96 __gszr_encounter_details = wx.FlexGridSizer(2, 2, 2, 5) 97 __szr_aoe = wx.BoxSizer(wx.HORIZONTAL) 98 __szr_rfe_details = wx.BoxSizer(wx.HORIZONTAL) 99 __szr_left = wx.BoxSizer(wx.HORIZONTAL) 100 _SZR_recent_notes = wx.StaticBoxSizer(self._SZR_recent_notes_staticbox, wx.VERTICAL) 101 _SZR_problem_list = wx.StaticBoxSizer(self._SZR_problem_list_staticbox, wx.VERTICAL) 102 __szr_problem_filter = wx.BoxSizer(wx.HORIZONTAL) 103 __lbl_problem_filter = wx.StaticText(self.__splitter_left_top_pnl, -1, _("Include:")) 104 __szr_problem_filter.Add(__lbl_problem_filter, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 10) 105 __szr_problem_filter.Add(self._CHBOX_show_closed_episodes, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5) 106 __szr_problem_filter.Add(self._CHBOX_irrelevant_issues, 0, wx.ALIGN_CENTER_VERTICAL, 0) 107 __szr_problem_filter.Add((20, 20), 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 108 _SZR_problem_list.Add(__szr_problem_filter, 0, wx.EXPAND, 0) 109 _SZR_problem_list.Add(self._LCTRL_active_problems, 1, wx.EXPAND, 0) 110 self.__splitter_left_top_pnl.SetSizer(_SZR_problem_list) 111 _SZR_recent_notes.Add(self._TCTRL_recent_notes, 1, wx.EXPAND, 0) 112 self.__splitter_left_bottom_pnl.SetSizer(_SZR_recent_notes) 113 self._splitter_left.SplitHorizontally(self.__splitter_left_top_pnl, self.__splitter_left_bottom_pnl) 114 __szr_left.Add(self._splitter_left, 1, wx.EXPAND, 0) 115 self.__splitter_main_left_pnl.SetSizer(__szr_left) 116 __lbl_rfe = wx.StaticText(self.__splitter_main_right_pnl, -1, _("Purpose")) 117 __gszr_encounter_details.Add(__lbl_rfe, 0, wx.ALIGN_CENTER_VERTICAL, 0) 118 __szr_rfe_details.Add(self._TCTRL_rfe, 2, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5) 119 __lbl_rfe_codes = wx.StaticText(self.__splitter_main_right_pnl, -1, _("Codes:")) 120 __szr_rfe_details.Add(__lbl_rfe_codes, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5) 121 __szr_rfe_details.Add(self._PRW_rfe_codes, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 122 __gszr_encounter_details.Add(__szr_rfe_details, 1, wx.EXPAND, 0) 123 __lbl_aoe = wx.StaticText(self.__splitter_main_right_pnl, -1, _("Summary")) 124 __gszr_encounter_details.Add(__lbl_aoe, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5) 125 __szr_aoe.Add(self._TCTRL_aoe, 2, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5) 126 __lbl_aoe_codes = wx.StaticText(self.__splitter_main_right_pnl, -1, _("Codes:")) 127 __szr_aoe.Add(__lbl_aoe_codes, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5) 128 __szr_aoe.Add(self._PRW_aoe_codes, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 129 __gszr_encounter_details.Add(__szr_aoe, 0, wx.EXPAND, 3) 130 __gszr_encounter_details.AddGrowableCol(1) 131 __szr_right.Add(__gszr_encounter_details, 0, wx.RIGHT|wx.TOP|wx.BOTTOM|wx.EXPAND, 3) 132 self._NB_soap_editors.AddPage(self.notebook_1_pane_1, _("tab1")) 133 __szr_right.Add(self._NB_soap_editors, 4, wx.EXPAND, 3) 134 __lbl_editor = wx.StaticText(self.__splitter_main_right_pnl, -1, _("Notelet:")) 135 __szr_buttons.Add(__lbl_editor, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5) 136 __szr_buttons.Add(self._BTN_new_editor, 0, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 3) 137 __szr_buttons.Add(self._BTN_clear_editor, 0, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 3) 138 __szr_buttons.Add(self._BTN_discard_editor, 0, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 3) 139 __szr_buttons.Add(self._BTN_save_note, 0, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 3) 140 __szr_buttons.Add(self._BTN_save_note_under, 0, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 3) 141 __szr_buttons.Add(self._BTN_image, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 142 __szr_buttons.Add((1, 1), 1, wx.EXPAND, 0) 143 __lbl_encounter = wx.StaticText(self.__splitter_main_right_pnl, -1, _("Encounter:")) 144 __szr_buttons.Add(__lbl_encounter, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5) 145 __szr_buttons.Add(self._BTN_save_encounter, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 3) 146 __szr_buttons.Add((1, 1), 1, wx.EXPAND, 0) 147 __szr_buttons.Add(self._BTN_save_all, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5) 148 __szr_right.Add(__szr_buttons, 0, wx.RIGHT|wx.TOP|wx.EXPAND, 3) 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 # end wxGlade 155
156 - def _on_save_all_button_pressed(self, event): # wxGlade: wxgSoapPluginPnl.<event_handler>
157 print "Event handler `_on_save_all_button_pressed' not implemented!" 158 event.Skip()
159
160 - def _on_save_encounter_button_pressed(self, event): # wxGlade: wxgSoapPluginPnl.<event_handler>
161 print "Event handler `_on_save_encounter_button_pressed' not implemented!" 162 event.Skip() 163
164 - def _on_save_note_button_pressed(self, event): # wxGlade: wxgSoapPluginPnl.<event_handler>
165 print "Event handler `_on_save_note_button_pressed' not implemented!" 166 event.Skip() 167
168 - def _on_new_editor_button_pressed(self, event): # wxGlade: wxgSoapPluginPnl.<event_handler>
169 print "Event handler `_on_new_editor_button_pressed' not implemented!" 170 event.Skip() 171
172 - def _on_clear_editor_button_pressed(self, event): # wxGlade: wxgSoapPluginPnl.<event_handler>
173 print "Event handler `_on_clear_editor_button_pressed' not implemented!" 174 event.Skip() 175
176 - def _on_discard_editor_button_pressed(self, event): # wxGlade: wxgSoapPluginPnl.<event_handler>
177 print "Event handler `_on_discard_editor_button_pressed' not implemented!" 178 event.Skip() 179
180 - def _on_problem_activated(self, event): # wxGlade: wxgSoapPluginPnl.<event_handler>
181 print "Event handler `_on_problem_activated' not implemented" 182 event.Skip() 183
184 - def _on_problem_selected(self, event): # wxGlade: wxgSoapPluginPnl.<event_handler>
185 print "Event handler `_on_problem_selected' not implemented" 186 event.Skip() 187
188 - def _on_problem_focused(self, event): # wxGlade: wxgSoapPluginPnl.<event_handler>
189 print "Event handler `_on_problem_focused' not implemented" 190 event.Skip() 191
192 - def _on_show_closed_episodes_checked(self, event): # wxGlade: wxgSoapPluginPnl.<event_handler>
193 print "Event handler `_on_show_closed_episodes_checked' not implemented" 194 event.Skip() 195
196 - def _on_irrelevant_issues_checked(self, event): # wxGlade: wxgSoapPluginPnl.<event_handler>
197 print "Event handler `_on_irrelevant_issues_checked' not implemented" 198 event.Skip() 199
200 - def _on_image_button_pressed(self, event): # wxGlade: wxgSoapPluginPnl.<event_handler>
201 print "Event handler `_on_image_button_pressed' not implemented" 202 event.Skip() 203
204 - def _on_save_note_under_button_pressed(self, event): # wxGlade: wxgSoapPluginPnl.<event_handler>
205 print "Event handler `_on_save_note_under_button_pressed' not implemented" 206 event.Skip() 207
208 - def _on_problem_rclick(self, event): # wxGlade: wxgSoapPluginPnl.<event_handler>
209 print "Event handler `_on_problem_rclick' not implemented" 210 event.Skip() 211 212 # end of class wxgSoapPluginPnl 213