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

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

     1  #=====================================================
     2  # GNUmed scan and index plugin
     3  #=====================================================
     4  __version__ = "$Revision: 1.8 $"
     5  __author__ = "Sebastian Hilbert <Sebastian.Hilbert@gmx.net>\
     6                Karsten Hilbert <Karsten.Hilbert@gmx.net>"
     7  __license__ = "GPL"
     8
     9  from Gnumed.wxpython import gmPlugin, gmDocumentWidgets
    10  from Gnumed.wxpython import gmAccessPermissionWidgets
    11
    12  #====================================
    13 -class gmScanIdxMedDocsPlugin(gmPlugin.cNotebookPlugin):
    14          """Plugin to encapsulate patient scan index documents window."""
    15
    16          tab_name = _('Attach documents')
    17          required_minimum_role = 'non-clinical access'
    18
    19          @gmAccessPermissionWidgets.verify_minimum_required_role (
    20                  required_minimum_role,
    21                  activity = _('loading plugin <%s>') % tab_name,
    22                  return_value_on_failure = False,
    23                  fail_silently = False
    24          )
    25 -        def register(self):
    26                  gmPlugin.cNotebookPlugin.register(self)
    27          #-------------------------------------------------
    28
    29 -        def name(self):
    30                  return gmScanIdxMedDocsPlugin.tab_name
    31
    32 -        def GetWidget(self, parent):
    33                  self._widget = gmDocumentWidgets.cScanIdxDocsPnl(parent, -1)
    34                  return self._widget
    35
    36 -        def MenuInfo(self):
    37                  return ('emr', _('&Attach documents'))
    38
    39 -        def can_receive_focus(self):
    40                  # need patient
    41                  if not self._verify_patient_avail():
    42                          return None
    43                  return 1
    44  #======================================================================
    45