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

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

     1  # -*- coding: utf-8 -*-
     2  #======================================================================
     3  # GNUmed immunisation/vaccination patient plugin
     4  # ----------------------------------------------
     5  #
     6  # this plugin holds the immunisation details
     7  #
     8  # @copyright: author
     9  #======================================================================
    10  __author__ = "R.Terry, S.J.Tan, K.Hilbert"
    11  __license__ = 'GPL v2 or later (details at http://www.gnu.org)'
    12
    13  import wx
    14
    15  # panel class holding editing prompts and text boxes
    16  from Gnumed.wxpython import gmPlugin, gmVaccWidgets
    17
    18  _log = gmLog.gmDefLog
    19
    20  #======================================================================
    21 -class gmVaccinationsPlugin(gmPlugin.cNotebookPlugin):
    22          """Plugin to encapsulate the immunisation window."""
    23
    24          __icons = {
    25  """icon_syringe""": 'x\xdam\xd0\xb1\n\x80 \x10\x06\xe0\xbd\xa7\xf8\xa1\xc1\xa6\x9f$\xe8\x01\x1a\
    26  \x1a[Z\\#\x9a\x8a\xea\xfd\xa7N3\xf4\xb0C\x90\xff\xf3\x0e\xd4\xe6\xb8m5\x1b\
    27  \xdbCV\x07k\xaae6\xc4\x8a\xe1X\xd6=$H\x9a\xaes\x0b\xc1I\xa8G\xa9\xb6\x8d\x87\
    28  \xa9H\xa0@\xafe\xa7\xa8Bi\xa2\xdfs$\x19,G:\x175\xa1\x98W\x85\xc1\x9c\x1e\xcf\
    29  Mc4\x85\x9f%\xfc\xae\x93!\xd5K_\xd4\x86\xf8\xa1?\x88\x12\xf9\x00 =F\x87'
    30  }
    31
    32          tab_name = _('Vaccinations')
    33
    34 -        def name (self):
    35                  return gmVaccinationsPlugin.tab_name
    36
    37 -        def GetWidget (self, parent):
    38                  self._widget = gmVaccWidgets.cImmunisationsPanel(parent, -1)
    39                  return self._widget
    40
    41 -        def MenuInfo (self):
    42                  return ('view', _('&Vaccinations'))
    43
    44 -        def can_receive_focus(self):
    45                  # need patient
    46                  if not self._verify_patient_avail():
    47                          return None
    48                  return 1
    49  #======================================================================
    50  # main
    51  #----------------------------------------------------------------------
    52  if __name__ == "__main__":
    53          _log.SetAllLogLevels(gmLog.lData)
    54          app = wxPyWidgetTester(size = (600, 600))
    55          app.SetWidget(gmVaccWidgets.cImmunisationsPanel, -1)
    56          app.MainLoop()
    57  #======================================================================
    58