Gnumed.wxpython.gui.gmCurrentSubstancesPlugin

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

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

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