1
2
3
4
5
6 import wx
7
8
9 import gettext
10
11
12
13
14
15
18
19 kwds["style"] = kwds.get("style", 0) | wx.TAB_TRAVERSAL
20 wx.Panel.__init__(self, *args, **kwds)
21 from Gnumed.wxpython.gmTextCtrl import cTextCtrl
22 self._TCTRL_rfe = cTextCtrl(self, wx.ID_ANY, "")
23 from Gnumed.wxpython.gmCodingWidgets import cGenericCodesPhraseWheel
24 self._PRW_rfe_codes = cGenericCodesPhraseWheel(self, wx.ID_ANY, "")
25 self._TCTRL_aoe = cTextCtrl(self, wx.ID_ANY, "")
26 self._PRW_aoe_codes = cGenericCodesPhraseWheel(self, wx.ID_ANY, "")
27 from Gnumed.wxpython.gmNarrativeWidgets import cSoapNoteInputNotebook
28 self._NB_soap_editors = cSoapNoteInputNotebook(self, wx.ID_ANY, style=0)
29 self.notebook_1_pane_1 = wx.Panel(self._NB_soap_editors, wx.ID_ANY)
30 self._BTN_new_editor = wx.Button(self, wx.ID_ANY, _("&New"), style=wx.BU_EXACTFIT)
31 self._BTN_clear_editor = wx.Button(self, wx.ID_ANY, _("&Clear"), style=wx.BU_EXACTFIT)
32 self._BTN_discard_editor = wx.Button(self, wx.ID_ANY, _("&Discard"), style=wx.BU_EXACTFIT)
33 self._BTN_save_note = wx.Button(self, wx.ID_ANY, _("&Save"), style=wx.BU_EXACTFIT)
34 self._BTN_save_note_under = wx.Button(self, wx.ID_ANY, _("Save &under"), style=wx.BU_EXACTFIT)
35 self._BTN_image = wx.Button(self, wx.ID_ANY, _("&Image"), style=wx.BU_EXACTFIT)
36 self._BTN_save_encounter = wx.Button(self, wx.ID_ANY, _("Save"), style=wx.BU_EXACTFIT)
37 self._BTN_save_all = wx.Button(self, wx.ID_ANY, _("Save &all"), style=wx.BU_EXACTFIT)
38
39 self.__set_properties()
40 self.__do_layout()
41
42 self.Bind(wx.EVT_BUTTON, self._on_new_editor_button_pressed, self._BTN_new_editor)
43 self.Bind(wx.EVT_BUTTON, self._on_clear_editor_button_pressed, self._BTN_clear_editor)
44 self.Bind(wx.EVT_BUTTON, self._on_discard_editor_button_pressed, self._BTN_discard_editor)
45 self.Bind(wx.EVT_BUTTON, self._on_save_note_button_pressed, self._BTN_save_note)
46 self.Bind(wx.EVT_BUTTON, self._on_save_note_under_button_pressed, self._BTN_save_note_under)
47 self.Bind(wx.EVT_BUTTON, self._on_image_button_pressed, self._BTN_image)
48 self.Bind(wx.EVT_BUTTON, self._on_save_encounter_button_pressed, self._BTN_save_encounter)
49 self.Bind(wx.EVT_BUTTON, self._on_save_all_button_pressed, self._BTN_save_all)
50
51
53
54 self._TCTRL_rfe.SetToolTip(_("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."))
55 self._PRW_rfe_codes.SetToolTip(_("Codes relevant to the Reason for Encounter\nseparated by \";\"."))
56 self._TCTRL_aoe.SetToolTip(_("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."))
57 self._PRW_aoe_codes.SetToolTip(_("Codes relevant to the Assessment of Encounter\nseparated by \";\"."))
58 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."))
59 self._BTN_clear_editor.SetToolTip(_("Clear the editor for the displayed progress note."))
60 self._BTN_discard_editor.SetToolTip(_("Discard the editor for the displayed progress note."))
61 self._BTN_save_note.SetToolTip(_("Save the currently displayed progress note under the current encounter."))
62 self._BTN_save_note_under.SetToolTip(_("Save the currently displayed note into an encounter selected from a list of encounters."))
63 self._BTN_image.SetToolTip(_("Add a visual progress note for this episode."))
64 self._BTN_save_encounter.SetToolTip(_("Save the encounter details."))
65 self._BTN_save_all.SetToolTip(_("Save encounter details and all progress notes."))
66
67
69
70 __szr_right = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, _("New notelets in current encounter")), wx.VERTICAL)
71 __szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
72 __gszr_encounter_details = wx.FlexGridSizer(2, 2, 2, 5)
73 __szr_aoe = wx.BoxSizer(wx.HORIZONTAL)
74 __szr_rfe_details = wx.BoxSizer(wx.HORIZONTAL)
75 __lbl_rfe = wx.StaticText(self, wx.ID_ANY, _("Purpose"))
76 __gszr_encounter_details.Add(__lbl_rfe, 0, wx.ALIGN_CENTER_VERTICAL, 0)
77 __szr_rfe_details.Add(self._TCTRL_rfe, 2, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 5)
78 __lbl_rfe_codes = wx.StaticText(self, wx.ID_ANY, _("Codes:"))
79 __szr_rfe_details.Add(__lbl_rfe_codes, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
80 __szr_rfe_details.Add(self._PRW_rfe_codes, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
81 __gszr_encounter_details.Add(__szr_rfe_details, 1, wx.EXPAND, 0)
82 __lbl_aoe = wx.StaticText(self, wx.ID_ANY, _("Summary"))
83 __gszr_encounter_details.Add(__lbl_aoe, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
84 __szr_aoe.Add(self._TCTRL_aoe, 2, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 5)
85 __lbl_aoe_codes = wx.StaticText(self, wx.ID_ANY, _("Codes:"))
86 __szr_aoe.Add(__lbl_aoe_codes, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
87 __szr_aoe.Add(self._PRW_aoe_codes, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
88 __gszr_encounter_details.Add(__szr_aoe, 0, wx.EXPAND, 3)
89 __gszr_encounter_details.AddGrowableCol(1)
90 __szr_right.Add(__gszr_encounter_details, 0, wx.BOTTOM | wx.EXPAND | wx.RIGHT | wx.TOP, 3)
91 self._NB_soap_editors.AddPage(self.notebook_1_pane_1, _("tab1"))
92 __szr_right.Add(self._NB_soap_editors, 4, wx.EXPAND, 3)
93 __lbl_editor = wx.StaticText(self, wx.ID_ANY, _("Notelet:"))
94 __szr_buttons.Add(__lbl_editor, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
95 __szr_buttons.Add(self._BTN_new_editor, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 3)
96 __szr_buttons.Add(self._BTN_clear_editor, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 3)
97 __szr_buttons.Add(self._BTN_discard_editor, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 3)
98 __szr_buttons.Add(self._BTN_save_note, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 3)
99 __szr_buttons.Add(self._BTN_save_note_under, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 3)
100 __szr_buttons.Add(self._BTN_image, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
101 __szr_buttons.Add((1, 1), 1, wx.EXPAND, 0)
102 __lbl_encounter = wx.StaticText(self, wx.ID_ANY, _("Encounter:"))
103 __szr_buttons.Add(__lbl_encounter, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
104 __szr_buttons.Add(self._BTN_save_encounter, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 3)
105 __szr_buttons.Add((1, 1), 1, wx.EXPAND, 0)
106 __szr_buttons.Add(self._BTN_save_all, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 5)
107 __szr_right.Add(__szr_buttons, 0, wx.EXPAND | wx.RIGHT | wx.TOP, 3)
108 self.SetSizer(__szr_right)
109 __szr_right.Fit(self)
110 self.Layout()
111
112
114 print("Event handler '_on_new_editor_button_pressed' not implemented!")
115 event.Skip()
116
118 print("Event handler '_on_clear_editor_button_pressed' not implemented!")
119 event.Skip()
120
122 print("Event handler '_on_discard_editor_button_pressed' not implemented!")
123 event.Skip()
124
126 print("Event handler '_on_save_note_button_pressed' not implemented!")
127 event.Skip()
128
130 print("Event handler '_on_save_note_under_button_pressed' not implemented!")
131 event.Skip()
132
134 print("Event handler '_on_image_button_pressed' not implemented!")
135 event.Skip()
136
138 print("Event handler '_on_save_encounter_button_pressed' not implemented!")
139 event.Skip()
140
142 print("Event handler '_on_save_all_button_pressed' not implemented!")
143 event.Skip()
144
145
146