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