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.BORDER_NONE | wx.TAB_TRAVERSAL
20 wx.Panel.__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)
23 self._splitter_left = wx.SplitterWindow(self.__splitter_main_left_pnl, wx.ID_ANY, style=wx.SP_3D | wx.SP_BORDER | wx.SP_PERMIT_UNSPLIT)
24 self.__splitter_left_top_pnl = wx.Panel(self._splitter_left, wx.ID_ANY, style=wx.BORDER_NONE)
25 self._CHBOX_show_closed_episodes = wx.CheckBox(self.__splitter_left_top_pnl, wx.ID_ANY, _("Closed episodes"))
26 self._CHBOX_irrelevant_issues = wx.CheckBox(self.__splitter_left_top_pnl, wx.ID_ANY, _("Non-relevant issues"))
27 from Gnumed.wxpython.gmListWidgets import cReportListCtrl
28 self._LCTRL_active_problems = cReportListCtrl(self.__splitter_left_top_pnl, wx.ID_ANY, style=wx.BORDER_NONE | wx.LC_REPORT)
29 self.__splitter_left_bottom_pnl = wx.Panel(self._splitter_left, wx.ID_ANY, style=wx.BORDER_NONE)
30 self._RBTN_notes_only = wx.RadioButton(self.__splitter_left_bottom_pnl, wx.ID_ANY, _("Notes only"))
31 self._RBTN_full_encounter = wx.RadioButton(self.__splitter_left_bottom_pnl, wx.ID_ANY, _("Everything"))
32 self._TCTRL_recent_notes = wx.TextCtrl(self.__splitter_left_bottom_pnl, wx.ID_ANY, _("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)
33 from Gnumed.wxpython.gmNarrativeWidgets import cFancySoapEditorPnl
34 self._PNL_editors = cFancySoapEditorPnl(self._splitter_main, wx.ID_ANY, style=wx.BORDER_NONE | wx.TAB_TRAVERSAL)
35
36 self.__set_properties()
37 self.__do_layout()
38
39 self.Bind(wx.EVT_CHECKBOX, self._on_show_closed_episodes_checked, self._CHBOX_show_closed_episodes)
40 self.Bind(wx.EVT_CHECKBOX, self._on_irrelevant_issues_checked, self._CHBOX_irrelevant_issues)
41 self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self._on_problem_activated, self._LCTRL_active_problems)
42 self.Bind(wx.EVT_LIST_ITEM_FOCUSED, self._on_problem_focused, self._LCTRL_active_problems)
43 self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_problem_selected, self._LCTRL_active_problems)
44 self.Bind(wx.EVT_RADIOBUTTON, self._on_notes_only_selected, self._RBTN_notes_only)
45 self.Bind(wx.EVT_RADIOBUTTON, self._on_full_encounter_selected, self._RBTN_full_encounter)
46
47
49
50 self._CHBOX_show_closed_episodes.SetToolTip(_("Show closed episodes as pseudo-problems ?"))
51 self._CHBOX_irrelevant_issues.SetToolTip(_("Show issues marked clinically NOT relevant."))
52 self._LCTRL_active_problems.SetToolTip(_("This shows the list of active problems, They include open episodes as well as active health issues."))
53 self._RBTN_notes_only.SetToolTip(_("Show notes only (regarding the above problem)"))
54 self._RBTN_notes_only.SetValue(1)
55 self._RBTN_full_encounter.SetToolTip(_("Show full information (regarding above problem)"))
56 self._TCTRL_recent_notes.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_3DFACE))
57 self._splitter_left.SetMinimumPaneSize(20)
58 self._splitter_main.SetMinimumPaneSize(20)
59
60
62
63 __szr_main = wx.BoxSizer(wx.HORIZONTAL)
64 __szr_left = wx.BoxSizer(wx.HORIZONTAL)
65 self._SZR_recent_notes = wx.StaticBoxSizer(wx.StaticBox(self.__splitter_left_bottom_pnl, wx.ID_ANY, _("Most recent info on above problem")), wx.VERTICAL)
66 __szr_most_recent_info_options = wx.BoxSizer(wx.HORIZONTAL)
67 self._SZR_problem_list = wx.StaticBoxSizer(wx.StaticBox(self.__splitter_left_top_pnl, wx.ID_ANY, _("Active problems")), wx.VERTICAL)
68 __szr_problem_filter = wx.BoxSizer(wx.HORIZONTAL)
69 __lbl_problem_filter = wx.StaticText(self.__splitter_left_top_pnl, wx.ID_ANY, _("Include:"))
70 __szr_problem_filter.Add(__lbl_problem_filter, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 10)
71 __szr_problem_filter.Add(self._CHBOX_show_closed_episodes, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
72 __szr_problem_filter.Add(self._CHBOX_irrelevant_issues, 0, wx.ALIGN_CENTER_VERTICAL, 0)
73 __szr_problem_filter.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
74 self._SZR_problem_list.Add(__szr_problem_filter, 0, wx.EXPAND, 0)
75 self._SZR_problem_list.Add(self._LCTRL_active_problems, 1, wx.EXPAND, 0)
76 self.__splitter_left_top_pnl.SetSizer(self._SZR_problem_list)
77 __szr_most_recent_info_options.Add(self._RBTN_notes_only, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
78 __szr_most_recent_info_options.Add(self._RBTN_full_encounter, 0, wx.ALIGN_CENTER_VERTICAL, 0)
79 self._SZR_recent_notes.Add(__szr_most_recent_info_options, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
80 self._SZR_recent_notes.Add(self._TCTRL_recent_notes, 1, wx.EXPAND | wx.TOP, 2)
81 self.__splitter_left_bottom_pnl.SetSizer(self._SZR_recent_notes)
82 self._splitter_left.SplitHorizontally(self.__splitter_left_top_pnl, self.__splitter_left_bottom_pnl)
83 __szr_left.Add(self._splitter_left, 1, wx.EXPAND, 0)
84 self.__splitter_main_left_pnl.SetSizer(__szr_left)
85 self._splitter_main.SplitVertically(self.__splitter_main_left_pnl, self._PNL_editors)
86 __szr_main.Add(self._splitter_main, 1, wx.EXPAND, 0)
87 self.SetSizer(__szr_main)
88 __szr_main.Fit(self)
89 self.Layout()
90
91
93 print("Event handler '_on_show_closed_episodes_checked' not implemented!")
94 event.Skip()
95
97 print("Event handler '_on_irrelevant_issues_checked' not implemented!")
98 event.Skip()
99
101 print("Event handler '_on_problem_activated' not implemented!")
102 event.Skip()
103
105 print("Event handler '_on_problem_focused' not implemented!")
106 event.Skip()
107
109 print("Event handler '_on_problem_selected' not implemented!")
110 event.Skip()
111
113 print("Event handler '_on_notes_only_selected' not implemented!")
114 event.Skip()
115
117 print("Event handler '_on_full_encounter_selected' not implemented!")
118 event.Skip()
119
120
121