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 gmMeasurementWidgets
17
18
19 kwds["style"] = wx.NO_BORDER | wx.TAB_TRAVERSAL
20 wx.ScrolledWindow.__init__(self, *args, **kwds)
21 self._PRW_name = gmPhraseWheel.cPhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
22 self._PRW_abbrev = gmPhraseWheel.cPhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
23 self._PRW_conversion_unit = gmMeasurementWidgets.cUnitPhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
24 self._PRW_loinc = gmPhraseWheel.cPhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
25 self._TCTRL_loinc_info = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_READONLY | wx.NO_BORDER)
26 self._TCTRL_comment_type = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)
27 self._PRW_test_org = gmMeasurementWidgets.cMeasurementOrgPhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
28 self._TCTRL_comment_org = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)
29 self._PRW_meta_type = gmMeasurementWidgets.cMetaTestTypePRW(self, wx.ID_ANY, "", style=wx.NO_BORDER)
30
31 self.__set_properties()
32 self.__do_layout()
33
34
36
37 self.SetScrollRate(10, 10)
38 self._PRW_name.SetToolTipString(_("A descriptive name for this test type."))
39 self._PRW_name.SetFocus()
40 self._PRW_abbrev.SetToolTipString(_("An abbreviation for the name of this test type."))
41 self._PRW_conversion_unit.SetToolTipString(_("The base unit to convert results from different labs into when comparing time series."))
42 self._PRW_loinc.SetToolTipString(_("The LOINC code corresponding to this test type."))
43 self._TCTRL_loinc_info.Enable(False)
44 self._TCTRL_comment_type.SetToolTipString(_("A comment on this test type, e.g. pertaining to typical context information."))
45 self._PRW_test_org.SetToolTipString(_("The path lab/diagnostic organisation reporting on this test."))
46 self._TCTRL_comment_org.SetToolTipString(_("A comment on the organisation performing this measurement."))
47 self._PRW_meta_type.SetToolTipString(_("Select the meta type as which to aggregate for display results with this test type."))
48
49
51
52 _gszr_main = wx.FlexGridSizer(8, 2, 1, 3)
53 __szr_loinc = wx.BoxSizer(wx.HORIZONTAL)
54 __szr_abbrev_unit = wx.BoxSizer(wx.HORIZONTAL)
55 __lbl_name = wx.StaticText(self, wx.ID_ANY, _("Name"))
56 __lbl_name.SetForegroundColour(wx.Colour(255, 0, 0))
57 _gszr_main.Add(__lbl_name, 0, wx.ALIGN_CENTER_VERTICAL, 0)
58 _gszr_main.Add(self._PRW_name, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
59 __lbl_abbrev = wx.StaticText(self, wx.ID_ANY, _("Abbreviation"))
60 __lbl_abbrev.SetForegroundColour(wx.Colour(255, 0, 0))
61 _gszr_main.Add(__lbl_abbrev, 0, wx.ALIGN_CENTER_VERTICAL, 0)
62 __szr_abbrev_unit.Add(self._PRW_abbrev, 1, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 10)
63 __lbl_unit = wx.StaticText(self, wx.ID_ANY, _("Unit"))
64 __lbl_unit.SetForegroundColour(wx.Colour(255, 0, 0))
65 __szr_abbrev_unit.Add(__lbl_unit, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 5)
66 __szr_abbrev_unit.Add(self._PRW_conversion_unit, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
67 _gszr_main.Add(__szr_abbrev_unit, 1, wx.EXPAND, 0)
68 __lbl_loinc = wx.StaticText(self, wx.ID_ANY, _("LOINC"))
69 _gszr_main.Add(__lbl_loinc, 0, wx.ALIGN_CENTER_VERTICAL, 0)
70 __szr_loinc.Add(self._PRW_loinc, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 10)
71 _gszr_main.Add(__szr_loinc, 1, wx.EXPAND, 0)
72 _gszr_main.Add((20, 20), 0, wx.EXPAND, 0)
73 _gszr_main.Add(self._TCTRL_loinc_info, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
74 __lbl_comment_type = wx.StaticText(self, wx.ID_ANY, _("Test comment"))
75 _gszr_main.Add(__lbl_comment_type, 0, wx.ALIGN_CENTER_VERTICAL, 0)
76 _gszr_main.Add(self._TCTRL_comment_type, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
77 __lbl_test_org = wx.StaticText(self, wx.ID_ANY, _("Lab"))
78 _gszr_main.Add(__lbl_test_org, 0, wx.ALIGN_CENTER_VERTICAL, 0)
79 _gszr_main.Add(self._PRW_test_org, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 10)
80 __lbl_comment_org = wx.StaticText(self, wx.ID_ANY, _("Lab comment"))
81 _gszr_main.Add(__lbl_comment_org, 0, wx.ALIGN_CENTER_VERTICAL, 0)
82 _gszr_main.Add(self._TCTRL_comment_org, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
83 __lbl_meta_type = wx.StaticText(self, wx.ID_ANY, _("Meta type"))
84 _gszr_main.Add(__lbl_meta_type, 0, wx.ALIGN_CENTER_VERTICAL, 0)
85 _gszr_main.Add(self._PRW_meta_type, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
86 self.SetSizer(_gszr_main)
87 _gszr_main.Fit(self)
88 _gszr_main.AddGrowableCol(1)
89
90
91
92