Package Gnumed :: Package wxGladeWidgets :: Module wxgMeasurementEditAreaPnl |
[frames] | no frames]

# Source Code for Module Gnumed.wxGladeWidgets.wxgMeasurementEditAreaPnl

      1  #!/usr/bin/env python
      2  # -*- coding: utf-8 -*-
      3  # generated by wxGlade 0.6.3 from "/home/ncq/Projekte/gm-git/gnumed/gnumed/client/wxg/wxgMeasurementEditAreaPnl.wxg"
      4
      5  import wx
      6
      7  # begin wxGlade: extracode
      8  # end wxGlade
      9
     10
     11
     12 -class wxgMeasurementEditAreaPnl(wx.Panel):
     13 -    def __init__(self, *args, **kwds):
     14
     15          from Gnumed.wxpython import gmDateTimeInput, gmMeasurementWidgets, gmStaffWidgets, gmEMRStructWidgets
     16
     17          # begin wxGlade: wxgMeasurementEditAreaPnl.__init__
     18          kwds["style"] = wx.NO_BORDER | wx.TAB_TRAVERSAL
     19          wx.Panel.__init__(self, *args, **kwds)
     20          self._PRW_test = gmMeasurementWidgets.cMeasurementTypePhraseWheel(self, -1, "", style=wx.NO_BORDER)
     21          self._BTN_test_info = wx.Button(self, -1, _("Info"), style=wx.BU_EXACTFIT)
     22          self._TCTRL_loinc = wx.TextCtrl(self, -1, "", style=wx.TE_READONLY | wx.NO_BORDER)
     23          self._TCTRL_previous_value = wx.TextCtrl(self, -1, "", style=wx.TE_READONLY | wx.NO_BORDER)
     24          self._TCTRL_result = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     25          self._PRW_units = gmMeasurementWidgets.cUnitPhraseWheel(self, -1, "", style=wx.NO_BORDER)
     26          self._PRW_abnormality_indicator = gmMeasurementWidgets.cTestResultIndicatorPhraseWheel(self, -1, "", style=wx.NO_BORDER)
     27          self._DPRW_evaluated = gmDateTimeInput.cFuzzyTimestampInput(self, -1, "", style=wx.NO_BORDER)
     28          self._TCTRL_note_test_org = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     29          self._PRW_intended_reviewer = gmStaffWidgets.cProviderPhraseWheel(self, -1, "", style=wx.NO_BORDER)
     30          self._PRW_problem = gmEMRStructWidgets.cEpisodeSelectionPhraseWheel(self, -1, "", style=wx.NO_BORDER)
     31          self._TCTRL_narrative = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     32          self._CHBOX_review = wx.CheckBox(self, -1, _("&Sign as:"))
     33          self._CHBOX_abnormal = wx.CheckBox(self, -1, _("&Abnormal"))
     34          self._CHBOX_relevant = wx.CheckBox(self, -1, _("&Relevant"))
     35          self._TCTRL_review_comment = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     36          self._TCTRL_normal_min = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     37          self._TCTRL_normal_max = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     38          self._TCTRL_normal_range = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     39          self._TCTRL_target_min = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     40          self._TCTRL_target_max = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     41          self._TCTRL_target_range = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     42          self._TCTRL_norm_ref_group = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     43
     44          self.__set_properties()
     45          self.__do_layout()
     46
     47          self.Bind(wx.EVT_BUTTON, self._on_test_info_button_pressed, self._BTN_test_info)
     48          self.Bind(wx.EVT_CHECKBOX, self._on_review_box_checked, self._CHBOX_review)
     49          # end wxGlade
     50
     51 -    def __set_properties(self):
     52          # begin wxGlade: wxgMeasurementEditAreaPnl.__set_properties
     53          self.SetSize((628, 388))
     54          self._PRW_test.SetToolTipString(_("The type of measurement or test this result is about."))
     55          self._PRW_test.SetFocus()
     56          self._BTN_test_info.SetToolTipString(_("Show a web search on this test type."))
     57          self._TCTRL_loinc.Enable(False)
     58          self._TCTRL_previous_value.SetForegroundColour(wx.Colour(0, 0, 0))
     59          self._TCTRL_previous_value.Enable(False)
     60          self._TCTRL_result.SetToolTipString(_("The result of the measurement. Numeric and alphanumeric input is allowed."))
     61          self._PRW_units.SetToolTipString(_("The units this result comes in."))
     62          self._PRW_abnormality_indicator.SetToolTipString(_("Enter an indicator for the degree of abnormality.\nOften +, -, !, ?, () or any combination thereof."))
     63          self._DPRW_evaluated.SetToolTipString(_("When was this result actually obtained. Usually the same or between the time for \"sample taken\" and \"result reported\"."))
     64          self._TCTRL_note_test_org.SetToolTipString(_("A technical comment on the result.\nUsually by the entering Medical Technical Assistant."))
     65          self._PRW_intended_reviewer.SetToolTipString(_("The doctor in charge who will have to assess and sign off this result."))
     66          self._PRW_problem.SetToolTipString(_("The medical problem this test results pertains to."))
     67          self._TCTRL_narrative.SetToolTipString(_("A clinical assessment of the measurement.\nUsually by a doctor."))
     68          self._CHBOX_review.SetToolTipString(_("Check if you want to save a review."))
     69          self._CHBOX_abnormal.SetToolTipString(_("Check if this result is technically abnormal."))
     70          self._CHBOX_abnormal.Enable(False)
     71          self._CHBOX_relevant.SetToolTipString(_("Check if this result is clinically relevant."))
     72          self._CHBOX_relevant.Enable(False)
     73          self._TCTRL_review_comment.SetToolTipString(_("A comment on this review."))
     74          self._TCTRL_review_comment.Enable(False)
     75          self._TCTRL_normal_min.SetToolTipString(_("The lower bound of the range of technically normal values."))
     76          self._TCTRL_normal_max.SetToolTipString(_("The upper bound of the range of technically normal values."))
     77          self._TCTRL_normal_range.SetToolTipString(_("An alphanumeric range of technically normal values."))
     78          self._TCTRL_target_min.SetToolTipString(_("The lower bound of the target range for this test in this patient."))
     79          self._TCTRL_target_max.SetToolTipString(_("The lower bound of the target range for this test in this patient."))
     80          self._TCTRL_target_range.SetToolTipString(_("An alphanumeric target range for this test in this patient."))
     81          self._TCTRL_norm_ref_group.SetToolTipString(_("The reference group the normal range for this value pertains to."))
     82          # end wxGlade
     83
     84 -    def __do_layout(self):
     85          # begin wxGlade: wxgMeasurementEditAreaPnl.__do_layout
     86          _gszr_main = wx.FlexGridSizer(16, 2, 1, 3)
     87          __szr_range_target = wx.BoxSizer(wx.HORIZONTAL)
     88          __szr_range_normal = wx.BoxSizer(wx.HORIZONTAL)
     89          __szr_review = wx.BoxSizer(wx.HORIZONTAL)
     90          __szr_result = wx.BoxSizer(wx.HORIZONTAL)
     91          __szr_test = wx.BoxSizer(wx.HORIZONTAL)
     92          _gszr_main.Add((20, 20), 0, wx.EXPAND, 0)
     93          __lbl_result_details = wx.StaticText(self, -1, _("Measurement details"))
     94          __lbl_result_details.SetForegroundColour(wx.Colour(95, 159, 159))
     95          _gszr_main.Add(__lbl_result_details, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     96          __lbl_test = wx.StaticText(self, -1, _("Test"))
     97          __lbl_test.SetForegroundColour(wx.Colour(204, 50, 50))
     98          _gszr_main.Add(__lbl_test, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     99          __szr_test.Add(self._PRW_test, 1, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
    100          __szr_test.Add(self._BTN_test_info, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    101          _gszr_main.Add(__szr_test, 1, wx.EXPAND, 0)
    102          __lbl_loinc = wx.StaticText(self, -1, _("LOINC"))
    103          _gszr_main.Add(__lbl_loinc, 0, wx.ALIGN_CENTER_VERTICAL, 3)
    104          _gszr_main.Add(self._TCTRL_loinc, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    105          _gszr_main.Add((20, 20), 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    106          _gszr_main.Add(self._TCTRL_previous_value, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    107          __lbl_result = wx.StaticText(self, -1, _("Value"))
    108          __lbl_result.SetForegroundColour(wx.Colour(204, 50, 50))
    109          _gszr_main.Add(__lbl_result, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    110          __szr_result.Add(self._TCTRL_result, 2, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
    111          __lbl_unit = wx.StaticText(self, -1, _("Units"))
    112          __lbl_unit.SetForegroundColour(wx.Colour(204, 50, 50))
    113          __szr_result.Add(__lbl_unit, 0, wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 4)
    114          __szr_result.Add(self._PRW_units, 2, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
    115          __lbl_abnormality = wx.StaticText(self, -1, _("Indicator"))
    116          __szr_result.Add(__lbl_abnormality, 0, wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 4)
    117          __szr_result.Add(self._PRW_abnormality_indicator, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    118          _gszr_main.Add(__szr_result, 1, wx.EXPAND, 0)
    119          __lbl_evaluated = wx.StaticText(self, -1, _("Date"))
    120          __lbl_evaluated.SetForegroundColour(wx.Colour(204, 50, 50))
    121          _gszr_main.Add(__lbl_evaluated, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    122          _gszr_main.Add(self._DPRW_evaluated, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    123          __lbl_note_test_org = wx.StaticText(self, -1, _("Context"))
    124          _gszr_main.Add(__lbl_note_test_org, 0, wx.ALIGN_CENTER_VERTICAL, 3)
    125          _gszr_main.Add(self._TCTRL_note_test_org, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    126          _gszr_main.Add((20, 20), 0, wx.EXPAND, 0)
    127          __lbl_clinical_assessment = wx.StaticText(self, -1, _("Clinical details"))
    128          __lbl_clinical_assessment.SetForegroundColour(wx.Colour(95, 159, 159))
    129          _gszr_main.Add(__lbl_clinical_assessment, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    130          __lbl_in_charge = wx.StaticText(self, -1, _("In charge"))
    131          __lbl_in_charge.SetForegroundColour(wx.Colour(204, 50, 50))
    132          _gszr_main.Add(__lbl_in_charge, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    133          _gszr_main.Add(self._PRW_intended_reviewer, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    134          __lbl_problem = wx.StaticText(self, -1, _("Problem"))
    135          __lbl_problem.SetForegroundColour(wx.Colour(204, 50, 50))
    136          _gszr_main.Add(__lbl_problem, 0, wx.ALIGN_CENTER_VERTICAL, 3)
    137          _gszr_main.Add(self._PRW_problem, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
    138          __lbl_narrative = wx.StaticText(self, -1, _("Comment"))
    139          _gszr_main.Add(__lbl_narrative, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    140          _gszr_main.Add(self._TCTRL_narrative, 2, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    141          __lbl_review = wx.StaticText(self, -1, _("Review"))
    142          _gszr_main.Add(__lbl_review, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    143          __szr_review.Add(self._CHBOX_review, 0, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 10)
    144          __szr_review.Add(self._CHBOX_abnormal, 0, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
    145          __szr_review.Add(self._CHBOX_relevant, 0, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
    146          __szr_review.Add(self._TCTRL_review_comment, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    147          _gszr_main.Add(__szr_review, 1, wx.EXPAND, 0)
    148          _gszr_main.Add((20, 20), 0, wx.EXPAND, 0)
    149          __lbl_reference = wx.StaticText(self, -1, _("Reference information"))
    150          __lbl_reference.SetForegroundColour(wx.Colour(95, 159, 159))
    151          _gszr_main.Add(__lbl_reference, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    152          __lbl_range_normal = wx.StaticText(self, -1, _("Normal"))
    153          _gszr_main.Add(__lbl_range_normal, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    154          __szr_range_normal.Add(self._TCTRL_normal_min, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    155          __lbl_from_to = wx.StaticText(self, -1, _("--"))
    156          __szr_range_normal.Add(__lbl_from_to, 0, wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
    157          __szr_range_normal.Add(self._TCTRL_normal_max, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    158          __lbl_range_or_range = wx.StaticText(self, -1, _("or"))
    159          __szr_range_normal.Add(__lbl_range_or_range, 0, wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 5)
    160          __szr_range_normal.Add(self._TCTRL_normal_range, 2, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
    161          _gszr_main.Add(__szr_range_normal, 1, wx.EXPAND, 0)
    162          __lbl_range_target = wx.StaticText(self, -1, _("Target"))
    163          _gszr_main.Add(__lbl_range_target, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    164          __szr_range_target.Add(self._TCTRL_target_min, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    165          __lbl_from_to_target = wx.StaticText(self, -1, _("--"))
    166          __szr_range_target.Add(__lbl_from_to_target, 0, wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
    167          __szr_range_target.Add(self._TCTRL_target_max, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    168          __lbl_range_or_range_target = wx.StaticText(self, -1, _("or"))
    169          __szr_range_target.Add(__lbl_range_or_range_target, 0, wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 5)
    170          __szr_range_target.Add(self._TCTRL_target_range, 2, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
    171          _gszr_main.Add(__szr_range_target, 1, wx.EXPAND, 0)
    172          __lbl_ref_group = wx.StaticText(self, -1, _("Group"))
    173          _gszr_main.Add(__lbl_ref_group, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    174          _gszr_main.Add(self._TCTRL_norm_ref_group, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    175          self.SetSizer(_gszr_main)
    176          _gszr_main.AddGrowableCol(1)
    177          # end wxGlade
    178
    179 -    def _on_test_info_button_pressed(self, event): # wxGlade: wxgMeasurementEditAreaPnl.<event_handler>
    180          print "Event handler `_on_test_info_button_pressed' not implemented!"
    181          event.Skip()
    182
    183 -    def _on_review_box_checked(self, event): # wxGlade: wxgMeasurementEditAreaPnl.<event_handler>
    184          print "Event handler `_on_review_box_checked' not implemented!"
    185          event.Skip()
    186
    187  # end of class wxgMeasurementEditAreaPnl
    188