Gnumed.wxGladeWidgets.wxgReviewDocPartDlg

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

# Source Code for Module Gnumed.wxGladeWidgets.wxgReviewDocPartDlg

      1  #!/usr/bin/env python
      2  # -*- coding: ISO-8859-15 -*-
      3  # generated by wxGlade 0.4cvs on Wed Jul  5 00:30:46 2006
      4
      5  import wx
      6
      7 -class wxgReviewDocPartDlg(wx.Dialog):
      8 -    def __init__(self, *args, **kwds):
      9
     10          from Gnumed.wxpython import gmEMRStructWidgets, gmDateTimeInput, gmDocumentWidgets
     11
     12          # begin wxGlade: wxgReviewDocPartDlg.__init__
     13          kwds["style"] = wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX|wx.MINIMIZE_BOX|wx.THICK_FRAME
     14          wx.Dialog.__init__(self, *args, **kwds)
     15          self.__szr_box_review_staticbox = wx.StaticBox(self, -1, _("Your review"))
     16          self.__szr_reviews_staticbox = wx.StaticBox(self, -1, _("Reviews by others"))
     17          self._PhWheel_episode = gmEMRStructWidgets.cEpisodeSelectionPhraseWheel(self, -1, style=wx.NO_BORDER)
     18          self._PhWheel_doc_type = gmDocumentWidgets.cDocumentTypeSelectionPhraseWheel(self, -1, style=wx.NO_BORDER)
     19          self._PRW_doc_comment = gmDocumentWidgets.cDocumentCommentPhraseWheel(self, -1, "", style=wx.NO_BORDER)
     20          self._PhWheel_doc_date = gmDateTimeInput.cFuzzyTimestampInput(self, -1, style=wx.NO_BORDER)
     21          self._TCTRL_reference = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     22          self._TCTRL_filename = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     23          self._SPINCTRL_seq_idx = wx.SpinCtrl(self, -1, "", min=0, max=10000, style=wx.SP_ARROW_KEYS|wx.SP_WRAP|wx.TE_AUTO_URL|wx.TE_NOHIDESEL|wx.NO_BORDER)
     24          self._LCTRL_existing_reviews = wx.ListCtrl(self, -1, style=wx.LC_REPORT|wx.LC_ALIGN_LEFT|wx.LC_SINGLE_SEL|wx.LC_HRULES|wx.LC_VRULES|wx.NO_BORDER)
     25          self._TCTRL_responsible = wx.TextCtrl(self, -1, _("(you are/are not the primary reviewer)"), style=wx.TE_READONLY|wx.NO_BORDER)
     26          self._ChBOX_review = wx.CheckBox(self, -1, _("review document"))
     27          self._ChBOX_abnormal = wx.CheckBox(self, -1, _("technically abnormal"))
     28          self._ChBOX_responsible = wx.CheckBox(self, -1, _("take over responsibility"))
     29          self._ChBOX_relevant = wx.CheckBox(self, -1, _("clinically relevant"))
     30          self._ChBOX_sign_all_pages = wx.CheckBox(self, -1, _("sign all pages"))
     31          self._BTN_save = wx.Button(self, wx.ID_OK, _("Save"))
     32          self._BTN_cancel = wx.Button(self, wx.ID_CANCEL, _("Cancel"))
     33
     34          self.__set_properties()
     35          self.__do_layout()
     36
     37          self.Bind(wx.EVT_CHECKBOX, self._on_reviewed_box_checked, self._ChBOX_review)
     38          self.Bind(wx.EVT_BUTTON, self._on_save_button_pressed, id=wx.ID_OK)
     39          # end wxGlade
     40
     41 -    def __set_properties(self):
     42          # begin wxGlade: wxgReviewDocPartDlg.__set_properties
     43          self.SetTitle(_("Edit document properties"))
     44          self._PhWheel_episode.SetToolTipString(_("Shows the episode associated with this document. Select another one or type in a new episode name to associate a different one."))
     45          self._PhWheel_doc_date.SetToolTipString(_("Enter the date of creation of the document."))
     46          self._TCTRL_reference.SetToolTipString(_("Enter the ID by which this document is referenced externally."))
     47          self._TCTRL_filename.SetToolTipString(_("An example file name for this document type.\n\nMainly used to derive a file name extension during export for operating systems which need that to guesstimate the viewer."))
     48          self._SPINCTRL_seq_idx.SetToolTipString(_("The sequence index or page number. If invoked from a document instead of a page always applies to the first page."))
     49          self._LCTRL_existing_reviews.SetToolTipString(_("Lists previous reviews for this document part.\n\nThe first line (marked with an icon) will show your previous review if there is one.\nThe second line (marked with a blue bar) will display the review of the responsible provider if there is such a review.\n\n You can edit your review below."))
     50          self._LCTRL_existing_reviews.Enable(False)
     51          self._TCTRL_responsible.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND))
     52          self._ChBOX_review.SetToolTipString(_("Check this if you want to edit your review."))
     53          self._ChBOX_abnormal.SetToolTipString(_("Does this document inform on a state of the patient's health that is technically abnormal ?"))
     54          self._ChBOX_abnormal.Enable(False)
     55          self._ChBOX_responsible.SetToolTipString(_("Check this if you intend to take over responsibility for this document and not just review it."))
     56          self._ChBOX_responsible.Enable(False)
     57          self._ChBOX_relevant.SetToolTipString(_("Is this document clinically relevant."))
     58          self._ChBOX_relevant.Enable(False)
     59          self._ChBOX_sign_all_pages.SetToolTipString(_("Apply review to entire document rather than just this part or page."))
     60          self._ChBOX_sign_all_pages.Enable(False)
     61          self._ChBOX_sign_all_pages.SetValue(1)
     62          self._BTN_save.SetToolTipString(_("Save your review."))
     63          self._BTN_cancel.SetToolTipString(_("Cancel this review."))
     64          self._BTN_cancel.SetFocus()
     65          self._BTN_cancel.SetDefault()
     66          # end wxGlade
     67
     68 -    def __do_layout(self):
     69          # begin wxGlade: wxgReviewDocPartDlg.__do_layout
     70          __szr_main = wx.BoxSizer(wx.VERTICAL)
     71          __szr_bottom = wx.BoxSizer(wx.HORIZONTAL)
     72          __szr_box_review = wx.StaticBoxSizer(self.__szr_box_review_staticbox, wx.VERTICAL)
     73          __szr_grid_review = wx.FlexGridSizer(4, 2, 0, 0)
     74          __szr_reviews = wx.StaticBoxSizer(self.__szr_reviews_staticbox, wx.HORIZONTAL)
     75          __szr_grid_properties = wx.FlexGridSizer(7, 2, 2, 3)
     76          __lbl_episode_picker = wx.StaticText(self, -1, _("Episode"))
     77          __szr_grid_properties.Add(__lbl_episode_picker, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     78          __szr_grid_properties.Add(self._PhWheel_episode, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
     79          __lbl_type = wx.StaticText(self, -1, _("Type"))
     80          __szr_grid_properties.Add(__lbl_type, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     81          __szr_grid_properties.Add(self._PhWheel_doc_type, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
     82          __lbl_comment = wx.StaticText(self, -1, _("Comment"))
     83          __szr_grid_properties.Add(__lbl_comment, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     84          __szr_grid_properties.Add(self._PRW_doc_comment, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
     85          __lbl_doc_date = wx.StaticText(self, -1, _("Date"))
     86          __szr_grid_properties.Add(__lbl_doc_date, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     87          __szr_grid_properties.Add(self._PhWheel_doc_date, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
     88          __lbl_reference = wx.StaticText(self, -1, _("Reference"))
     89          __szr_grid_properties.Add(__lbl_reference, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     90          __szr_grid_properties.Add(self._TCTRL_reference, 0, wx.EXPAND, 0)
     91          __lbl_filename = wx.StaticText(self, -1, _("Filename"))
     92          __lbl_filename.SetToolTipString(_("The original filename (if any). Only editable if invoked from a single part of the document."))
     93          __szr_grid_properties.Add(__lbl_filename, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     94          __szr_grid_properties.Add(self._TCTRL_filename, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
     95          __lbl_seq_idx = wx.StaticText(self, -1, _("Seq #"))
     96          __lbl_seq_idx.SetToolTipString(_("The sequence index or page number. If invoked from a document instead of a page always applies to the first page."))
     97          __szr_grid_properties.Add(__lbl_seq_idx, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     98          __szr_grid_properties.Add(self._SPINCTRL_seq_idx, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     99          __szr_grid_properties.AddGrowableCol(1)
    100          __szr_main.Add(__szr_grid_properties, 0, wx.ALL|wx.EXPAND, 5)
    101          __szr_reviews.Add(self._LCTRL_existing_reviews, 1, wx.EXPAND, 0)
    102          __szr_main.Add(__szr_reviews, 1, wx.EXPAND, 0)
    103          __szr_box_review.Add(self._TCTRL_responsible, 0, wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 0)
    104          __szr_grid_review.Add(self._ChBOX_review, 0, 0, 0)
    105          __szr_grid_review.Add((5, 5), 1, wx.EXPAND, 0)
    106          __szr_grid_review.Add(self._ChBOX_abnormal, 0, wx.LEFT, 10)
    107          __szr_grid_review.Add(self._ChBOX_responsible, 0, wx.LEFT, 10)
    108          __szr_grid_review.Add(self._ChBOX_relevant, 0, wx.LEFT, 10)
    109          __szr_grid_review.Add(self._ChBOX_sign_all_pages, 0, wx.LEFT, 10)
    110          __szr_box_review.Add(__szr_grid_review, 1, wx.EXPAND, 0)
    111          __szr_main.Add(__szr_box_review, 1, wx.EXPAND, 0)
    112          __szr_bottom.Add(self._BTN_save, 0, 0, 0)
    113          __szr_bottom.Add(self._BTN_cancel, 0, 0, 0)
    114          __szr_main.Add(__szr_bottom, 0, wx.EXPAND, 0)
    115          self.SetSizer(__szr_main)
    116          __szr_main.Fit(self)
    117          self.Layout()
    118          self.Centre()
    119          # end wxGlade
    120
    121 -    def _on_reviewed_box_checked(self, event): # wxGlade: wxgReviewDocPartDlg.<event_handler>
    122          print "Event handler `_on_reviewed_box_checked' not implemented!"
    123          event.Skip()
    124
    125 -    def _on_save_button_pressed(self, event): # wxGlade: wxgReviewDocPartDlg.<event_handler>
    126          print "Event handler `_on_save_button_pressed' not implemented!"
    127          event.Skip()
    128
    129  # end of class wxgReviewDocPartDlg
    130