Gnumed.wxpython.gui.gmMeasurementsGridPlugin

Package Gnumed :: Package wxpython :: Package gui :: Module gmMeasurementsGridPlugin |
[frames] | no frames]

# Source Code for Module Gnumed.wxpython.gui.gmMeasurementsGridPlugin

     1  #======================================================================
     2  # GNUmed patient measurements plugin
     3  #
     4  # @copyright: author
     5  #======================================================================
     6  __author__ = "Karsten Hilbert"
     7  __license__ = 'GPL v2 or later (details at http://www.gnu.org)'
     8
     9  import logging
    10
    11
    12  from Gnumed.wxpython import gmPlugin, gmMeasurementWidgets
    13  from Gnumed.pycommon import gmI18N
    14  from Gnumed.wxpython import gmAccessPermissionWidgets
    15
    16
    17  _log = logging.getLogger('gm.ui')
    18  #======================================================================
    19 -class gmMeasurementsGridPlugin(gmPlugin.cNotebookPlugin):
    20          """Plugin to encapsulate patient measurements."""
    21
    22          tab_name = _('Measurements')
    23          required_minimum_role = 'full clinical access'
    24
    25          @gmAccessPermissionWidgets.verify_minimum_required_role (
    26                  required_minimum_role,
    27                  activity = _('loading plugin <%s>') % tab_name,
    28                  return_value_on_failure = False,
    29                  fail_silently = False
    30          )
    31 -        def register(self):
    32                  gmPlugin.cNotebookPlugin.register(self)
    33          #-------------------------------------------------
    34 -        def name (self):
    35                  return gmMeasurementsGridPlugin.tab_name
    36
    37 -        def GetWidget (self, parent):
    38                  self._widget = gmMeasurementWidgets.cMeasurementsPnl(parent, -1)
    39                  return self._widget
    40
    41 -        def MenuInfo (self):
    42                  return ('emr', _('&Measurements'))
    43
    44 -        def can_receive_focus(self):
    45                  if not self._verify_patient_avail():
    46                          return None
    47                  return 1
    48  #======================================================================
    49  # main
    50  #----------------------------------------------------------------------
    51  if __name__ == "__main__":
    52          print "no test code"
    53
    54  #======================================================================
    55