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

# Source Code for Module Gnumed.wxGladeWidgets.wxgMeasurementEditAreaPnl

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