1
2
3
4
5 import wx
6
7
8
9
10
11
14
15 from Gnumed.wxpython import gmPhraseWheel
16 from Gnumed.wxpython import gmDateTimeInput
17 from Gnumed.wxpython import gmEMRStructWidgets
18 from Gnumed.wxpython.gmCodingWidgets import cGenericCodesPhraseWheel
19
20
21 kwds["style"] = wx.NO_BORDER|wx.TAB_TRAVERSAL
22 wx.ScrolledWindow.__init__(self, *args, **kwds)
23 self._PRW_condition = gmPhraseWheel.cPhraseWheel(self, -1, "", style=wx.NO_BORDER)
24 self._ChBOX_left = wx.CheckBox(self, -1, _("left"))
25 self._ChBOX_right = wx.CheckBox(self, -1, _("right"))
26 self._PRW_certainty = gmEMRStructWidgets.cDiagnosticCertaintyClassificationPhraseWheel(self, -1, "", style=wx.NO_BORDER)
27 self._PRW_grouping = gmPhraseWheel.cPhraseWheel(self, -1, "", style=wx.NO_BORDER)
28 self._PRW_age_noted = gmPhraseWheel.cPhraseWheel(self, -1, "", style=wx.NO_BORDER)
29 self._PRW_year_noted = gmDateTimeInput.cFuzzyTimestampInput(self, -1, "", style=wx.NO_BORDER)
30 self._TCTRL_status = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE|wx.TE_WORDWRAP|wx.NO_BORDER)
31 self._PRW_codes = cGenericCodesPhraseWheel(self, -1, "", style=wx.NO_BORDER)
32 self._TCTRL_code_details = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE|wx.TE_READONLY|wx.NO_BORDER)
33 self._ChBOX_active = wx.CheckBox(self, -1, _("Active"))
34 self._ChBOX_relevant = wx.CheckBox(self, -1, _("Relevant"))
35 self._ChBOX_confidential = wx.CheckBox(self, -1, _("Confidential"))
36 self._ChBOX_caused_death = wx.CheckBox(self, -1, _("Caused death"))
37
38 self.__set_properties()
39 self.__do_layout()
40
41
43
44 self.SetScrollRate(10, 10)
45 self._PRW_condition.SetToolTipString(_("Enter the condition (health issue/past history item) here. Keep it short but precise."))
46 self._PRW_grouping.SetToolTipString(_("Here you can add arbitrary text which will be used for sorting health issues in the tree."))
47 self._PRW_age_noted.SetToolTipString(_("Enter the age in years when this condition was diagnosed. Setting this will adjust the \"in the year\" field accordingly."))
48 self._PRW_year_noted.SetToolTipString(_("Enter the year when this condition was diagnosed. Setting this will adjust the \"at age\" field accordingly."))
49 self._TCTRL_status.SetToolTipString(_("The current status of the issue."))
50 self._TCTRL_code_details.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND))
51 self._ChBOX_active.SetToolTipString(_("Check if this is an active, ongoing problem."))
52 self._ChBOX_relevant.SetToolTipString(_("Check if this is a clinically relevant problem."))
53 self._ChBOX_relevant.SetValue(1)
54 self._ChBOX_confidential.SetToolTipString(_("Check if this condition is to be kept confidential and not disclosed to anyone else."))
55 self._ChBOX_caused_death.SetToolTipString(_("Check if this condition contributed to causing death of the patient."))
56
57
59
60 __gszr_main = wx.FlexGridSizer(7, 2, 3, 10)
61 __szr_options = wx.BoxSizer(wx.HORIZONTAL)
62 __szr_diagnosed = wx.BoxSizer(wx.HORIZONTAL)
63 __szr_certainty_grouping = wx.BoxSizer(wx.HORIZONTAL)
64 __szr_condition = wx.BoxSizer(wx.HORIZONTAL)
65 __lbl_condition = wx.StaticText(self, -1, _("Condition"))
66 __lbl_condition.SetForegroundColour(wx.Colour(255, 0, 0))
67 __gszr_main.Add(__lbl_condition, 0, wx.ALIGN_CENTER_VERTICAL, 0)
68 __szr_condition.Add(self._PRW_condition, 1, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 10)
69 __szr_condition.Add(self._ChBOX_left, 0, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5)
70 __szr_condition.Add(self._ChBOX_right, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5)
71 __gszr_main.Add(__szr_condition, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
72 __lbl_certainty = wx.StaticText(self, -1, _("Certainty"))
73 __gszr_main.Add(__lbl_certainty, 0, wx.ALIGN_CENTER_VERTICAL, 0)
74 __szr_certainty_grouping.Add(self._PRW_certainty, 1, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 10)
75 __lbl_group = wx.StaticText(self, -1, _("Grouping:"))
76 __szr_certainty_grouping.Add(__lbl_group, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5)
77 __szr_certainty_grouping.Add(self._PRW_grouping, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 10)
78 __gszr_main.Add(__szr_certainty_grouping, 1, wx.EXPAND, 0)
79 __lbl_noted = wx.StaticText(self, -1, _("When Noted"))
80 __gszr_main.Add(__lbl_noted, 0, wx.ALIGN_CENTER_VERTICAL, 0)
81 __lbl_age = wx.StaticText(self, -1, _("Age:"), style=wx.ALIGN_RIGHT)
82 __szr_diagnosed.Add(__lbl_age, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5)
83 __szr_diagnosed.Add(self._PRW_age_noted, 1, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5)
84 __lbl_year = wx.StaticText(self, -1, _("Or year:"), style=wx.ALIGN_RIGHT)
85 __szr_diagnosed.Add(__lbl_year, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5)
86 __szr_diagnosed.Add(self._PRW_year_noted, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
87 __gszr_main.Add(__szr_diagnosed, 1, wx.EXPAND, 0)
88 __lbl_status = wx.StaticText(self, -1, _("Current\nstatus"))
89 __gszr_main.Add(__lbl_status, 0, wx.ALIGN_CENTER_VERTICAL, 0)
90 __gszr_main.Add(self._TCTRL_status, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
91 __lbl_codes = wx.StaticText(self, -1, _("Codes"))
92 __gszr_main.Add(__lbl_codes, 0, wx.ALIGN_CENTER_VERTICAL, 0)
93 __gszr_main.Add(self._PRW_codes, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
94 __gszr_main.Add((20, 20), 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
95 __gszr_main.Add(self._TCTRL_code_details, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
96 __gszr_main.Add((1, 1), 0, wx.EXPAND, 0)
97 __szr_options.Add(self._ChBOX_active, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
98 __szr_options.Add(self._ChBOX_relevant, 0, wx.LEFT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5)
99 __szr_options.Add(self._ChBOX_confidential, 0, wx.LEFT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5)
100 __szr_options.Add(self._ChBOX_caused_death, 0, wx.LEFT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5)
101 __gszr_main.Add(__szr_options, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
102 self.SetSizer(__gszr_main)
103 __gszr_main.Fit(self)
104 __gszr_main.AddGrowableRow(3)
105 __gszr_main.AddGrowableRow(5)
106 __gszr_main.AddGrowableCol(1)
107
108
109
110