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

# Source Code for Module Gnumed.wxGladeWidgets.wxgMeasurementsReviewDlg

      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 wxgMeasurementsReviewDlg(wx.Dialog):
     17 -        def __init__(self, *args, **kwds):
     18                  # begin wxGlade: wxgMeasurementsReviewDlg.__init__
     19                  kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE | wx.MAXIMIZE_BOX | wx.MINIMIZE_BOX | wx.RESIZE_BORDER | wx.STAY_ON_TOP
     20                  wx.Dialog.__init__(self, *args, **kwds)
     21                  self._LBL_tests = wx.StaticText(self, wx.ID_ANY, _("... test results listing goes here ..."))
     22                  self._RBTN_confirm_abnormal = wx.RadioButton(self, wx.ID_ANY, _("Leave as is"), style=wx.RB_GROUP)
     23                  self._RBTN_results_normal = wx.RadioButton(self, wx.ID_ANY, _("&Normal"))
     24                  self._RBTN_results_abnormal = wx.RadioButton(self, wx.ID_ANY, _("A&bnormal"))
     25                  self._RBTN_confirm_relevance = wx.RadioButton(self, wx.ID_ANY, _("Leave as is"), style=wx.RB_GROUP)
     26                  self._RBTN_results_not_relevant = wx.RadioButton(self, wx.ID_ANY, _("Not relevant"))
     27                  self._RBTN_results_relevant = wx.RadioButton(self, wx.ID_ANY, _("&Relevant"))
     28                  self._TCTRL_comment = wx.TextCtrl(self, wx.ID_ANY, "")
     29                  self._CHBOX_responsible = wx.CheckBox(self, wx.ID_ANY, _("&Take responsibility"))
     30                  self._BTN_sign_off = wx.Button(self, wx.ID_APPLY, "")
     31                  self._BTN_cancel = wx.Button(self, wx.ID_CANCEL, "")
     32
     33                  self.__set_properties()
     34                  self.__do_layout()
     35
     36                  self.Bind(wx.EVT_BUTTON, self._on_signoff_button_pressed, self._BTN_sign_off)
     37                  # end wxGlade
     38
     39 -        def __set_properties(self):
     40                  # begin wxGlade: wxgMeasurementsReviewDlg.__set_properties
     41                  self.SetTitle(_("Signing off test results"))
     42                  self._RBTN_confirm_abnormal.SetToolTip(_("Select this if you want to agree with the current decision on technical abnormality of the results."))
     43                  self._RBTN_confirm_abnormal.SetValue(1)
     44                  self._RBTN_results_normal.SetToolTip(_("Select this if you think the selected results are normal regardless of what the result provider said."))
     45                  self._RBTN_results_abnormal.SetToolTip(_("Select this if you think the selected results are technically abnormal - regardless of what the result provider said."))
     46                  self._RBTN_confirm_relevance.SetToolTip(_("Select this if you want to agree with the current decision on clinical relevance of the results."))
     47                  self._RBTN_confirm_relevance.SetValue(1)
     48                  self._RBTN_results_not_relevant.SetToolTip(_("Select this if you think the selected results are clinically not significant."))
     49                  self._RBTN_results_relevant.SetToolTip(_("Select this if you think the selected results are cliniccally significant."))
     50                  self._TCTRL_comment.SetToolTip(_("Enter a comment on this review. Only available if the review applies to a single result only."))
     51                  self._TCTRL_comment.Enable(False)
     52                  self._CHBOX_responsible.SetToolTip(_("Check this to take over responsibility for initiating action on these results."))
     53                  self._BTN_sign_off.SetToolTip(_("Sign off test results and save review status for all selected results."))
     54                  self._BTN_cancel.SetToolTip(_("Cancel and discard review, that is, do NOT sign off results."))
     55                  self._BTN_cancel.SetDefault()
     56                  # end wxGlade
     57
     58 -        def __do_layout(self):
     59                  # begin wxGlade: wxgMeasurementsReviewDlg.__do_layout
     60                  __szr_main = wx.BoxSizer(wx.VERTICAL)
     61                  __szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
     62                  __szr_comment = wx.BoxSizer(wx.HORIZONTAL)
     63                  __szr_review = wx.BoxSizer(wx.HORIZONTAL)
     64                  __szr_relevant = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, _("Clinically relevant")), wx.HORIZONTAL)
     65                  __szr_abnormal = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, _("Technically abnormal")), wx.HORIZONTAL)
     66                  __msg_top = wx.StaticText(self, wx.ID_ANY, _("This signing applies to ALL results currently selected in the viewer.\n\nIf you want to change the scope of the sign-off\nyou need to narrow or widen the selection of results."), style=wx.ALIGN_CENTER)
     67                  __szr_main.Add(__msg_top, 0, wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, 5)
     68                  __hline_atop_tests = wx.StaticLine(self, wx.ID_ANY)
     69                  __szr_main.Add(__hline_atop_tests, 0, wx.ALL | wx.EXPAND, 5)
     70                  __szr_main.Add(self._LBL_tests, 1, wx.EXPAND | wx.LEFT | wx.RIGHT, 5)
     71                  __szr_abnormal.Add(self._RBTN_confirm_abnormal, 0, wx.EXPAND, 3)
     72                  __szr_abnormal.Add(self._RBTN_results_normal, 0, wx.EXPAND | wx.LEFT | wx.RIGHT, 3)
     73                  __szr_abnormal.Add(self._RBTN_results_abnormal, 0, wx.EXPAND, 0)
     74                  __szr_review.Add(__szr_abnormal, 1, wx.EXPAND, 0)
     75                  __szr_relevant.Add(self._RBTN_confirm_relevance, 0, wx.EXPAND | wx.RIGHT, 3)
     76                  __szr_relevant.Add(self._RBTN_results_not_relevant, 0, wx.EXPAND | wx.LEFT | wx.RIGHT, 3)
     77                  __szr_relevant.Add(self._RBTN_results_relevant, 0, wx.EXPAND, 3)
     78                  __szr_review.Add(__szr_relevant, 1, wx.EXPAND, 0)
     79                  __szr_main.Add(__szr_review, 0, wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, 5)
     80                  __lbl_comment = wx.StaticText(self, wx.ID_ANY, _("Comment"))
     81                  __szr_comment.Add(__lbl_comment, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     82                  __szr_comment.Add(self._TCTRL_comment, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.LEFT | wx.RIGHT, 5)
     83                  __szr_comment.Add(self._CHBOX_responsible, 0, wx.EXPAND, 5)
     84                  __szr_main.Add(__szr_comment, 0, wx.ALL | wx.EXPAND, 5)
     85                  __szr_buttons.Add((20, 20), 2, wx.EXPAND, 5)
     86                  __szr_buttons.Add(self._BTN_sign_off, 0, wx.EXPAND, 0)
     87                  __szr_buttons.Add((20, 20), 1, wx.EXPAND, 5)
     88                  __szr_buttons.Add(self._BTN_cancel, 0, wx.EXPAND, 0)
     89                  __szr_buttons.Add((20, 20), 2, wx.EXPAND, 5)
     90                  __szr_main.Add(__szr_buttons, 0, wx.ALL | wx.EXPAND, 5)
     91                  self.SetSizer(__szr_main)
     92                  __szr_main.Fit(self)
     93                  self.Layout()
     94                  self.Centre()
     95                  # end wxGlade
     96
     97 -        def _on_signoff_button_pressed(self, event):  # wxGlade: wxgMeasurementsReviewDlg.<event_handler>
     98                  print("Event handler '_on_signoff_button_pressed' not implemented!")
     99                  event.Skip()
    100
    101  # end of class wxgMeasurementsReviewDlg
    102