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