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

# Source Code for Module Gnumed.wxGladeWidgets.wxgVaccinationEAPnl

      1  #!/usr/bin/env python
      2  # -*- coding: utf8 -*-
      3  # generated by wxGlade 0.6.3 from "/home/ncq/Projekte/gm-git/gnumed/gnumed/client/wxg/wxgVaccinationEAPnl.wxg"
      4
      5  import wx
      6
      7  # begin wxGlade: extracode
      8  # end wxGlade
      9
     10
     11
     12 -class wxgVaccinationEAPnl(wx.ScrolledWindow):
     13 -    def __init__(self, *args, **kwds):
     14
     15          from Gnumed.wxpython import gmDateTimeInput
     16          from Gnumed.wxpython import gmPhraseWheel
     17          from Gnumed.wxpython import gmVaccWidgets
     18          from Gnumed.wxpython import gmEMRStructWidgets
     19          from Gnumed.wxpython import gmProviderInboxWidgets
     20
     21          # begin wxGlade: wxgVaccinationEAPnl.__init__
     22          kwds["style"] = wx.NO_BORDER | wx.TAB_TRAVERSAL
     23          wx.ScrolledWindow.__init__(self, *args, **kwds)
     24          self._PRW_date_given = gmDateTimeInput.cDateInputPhraseWheel(self, -1, "", style=wx.NO_BORDER)
     25          self._CHBOX_anamnestic = wx.CheckBox(self, -1, _("Anamnestic"))
     26          self._PRW_vaccine = gmVaccWidgets.cVaccinePhraseWheel(self, -1, "", style=wx.NO_BORDER)
     27          self._BTN_add_vaccine = wx.Button(self, -1, _(" + "), style=wx.BU_EXACTFIT)
     28          self._TCTRL_indications = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE | wx.TE_READONLY | wx.NO_BORDER)
     29          self._BTN_select_indications = wx.Button(self, -1, _("Select"), style=wx.BU_EXACTFIT)
     30          self._PRW_batch = gmVaccWidgets.cBatchNoPhraseWheel(self, -1, "", style=wx.NO_BORDER)
     31          self._PRW_episode = gmEMRStructWidgets.cEpisodeSelectionPhraseWheel(self, -1, "", style=wx.NO_BORDER)
     32          self._PRW_site = gmPhraseWheel.cPhraseWheel(self, -1, "", style=wx.NO_BORDER)
     33          self._PRW_provider = gmProviderInboxWidgets.cProviderPhraseWheel(self, -1, "", style=wx.NO_BORDER)
     34          self._PRW_reaction = gmPhraseWheel.cPhraseWheel(self, -1, "", style=wx.NO_BORDER)
     35          self._BTN_report = wx.Button(self, -1, _("ADR"), style=wx.BU_EXACTFIT)
     36          self._TCTRL_comment = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
     37
     38          self.__set_properties()
     39          self.__do_layout()
     40
     41          self.Bind(wx.EVT_BUTTON, self._on_add_vaccine_button_pressed, self._BTN_add_vaccine)
     42          self.Bind(wx.EVT_BUTTON, self._on_select_indications_button_pressed, self._BTN_select_indications)
     43          self.Bind(wx.EVT_BUTTON, self._on_report_button_pressed, self._BTN_report)
     44          # end wxGlade
     45
     46 -    def __set_properties(self):
     47          # begin wxGlade: wxgVaccinationEAPnl.__set_properties
     48          self.SetMinSize((650,420))
     49          self.SetScrollRate(10, 10)
     50          self._PRW_date_given.SetToolTipString(_("Mandatory: When was the vaccination given to the patient ?"))
     51          self._CHBOX_anamnestic.SetToolTipString(_("Check this if - within the SOAP classification - you want to mark the entry as Subjective rather than Plan."))
     52          self._PRW_vaccine.SetToolTipString(_("The vaccine used, if known.\n\nIf unknown check off the indications which were vaccinated against."))
     53          self._BTN_add_vaccine.SetToolTipString(_("Add a vaccine to GNUmed."))
     54          self._TCTRL_indications.Enable(False)
     55          self._BTN_select_indications.SetToolTipString(_("Select the indications this vaccination was given against."))
     56          self._PRW_batch.SetToolTipString(_("The batch number of the vaccine."))
     57          self._PRW_episode.SetToolTipString(_("Select an episode to file this vaccination under.\n\nIf you do not select one it will be filed under \"prevention\".\n\nAlternatively, type the name for a new episode."))
     58          self._PRW_site.SetToolTipString(_("The injection site, if known."))
     59          self._PRW_provider.SetToolTipString(_("The provider who administered the vaccine, if known."))
     60          self._PRW_reaction.SetToolTipString(_("Record any adverse reactions to this vaccine."))
     61          self._BTN_report.SetToolTipString(_("Report this event as an adverse drug reaction."))
     62          self._BTN_report.Enable(False)
     63          self._TCTRL_comment.SetToolTipString(_("Any comment you may wish to relate to this vaccination."))
     64          # end wxGlade
     65
     66 -    def __do_layout(self):
     67          # begin wxGlade: wxgVaccinationEAPnl.__do_layout
     68          _gszr_main = wx.FlexGridSizer(10, 2, 1, 3)
     69          sizer_1 = wx.BoxSizer(wx.HORIZONTAL)
     70          __szr_manage_button = wx.BoxSizer(wx.HORIZONTAL)
     71          _SZR_indications = wx.BoxSizer(wx.VERTICAL)
     72          __szr_vaccine_details = wx.BoxSizer(wx.HORIZONTAL)
     73          __szr_date_details = wx.BoxSizer(wx.HORIZONTAL)
     74          __lbl_date_given = wx.StaticText(self, -1, _("Date given"))
     75          __lbl_date_given.SetForegroundColour(wx.Colour(255, 0, 0))
     76          _gszr_main.Add(__lbl_date_given, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     77          __szr_date_details.Add(self._PRW_date_given, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
     78          __szr_date_details.Add(self._CHBOX_anamnestic, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     79          _gszr_main.Add(__szr_date_details, 1, wx.EXPAND, 0)
     80          __lbl_vaccine = wx.StaticText(self, -1, _("Vaccine ..."))
     81          __lbl_vaccine.SetForegroundColour(wx.Colour(255, 127, 0))
     82          _gszr_main.Add(__lbl_vaccine, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     83          __szr_vaccine_details.Add(self._PRW_vaccine, 1, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
     84          __szr_vaccine_details.Add(self._BTN_add_vaccine, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     85          _gszr_main.Add(__szr_vaccine_details, 1, wx.EXPAND, 0)
     86          __lbl_indications = wx.StaticText(self, -1, _("... or ...\n\nvaccinated\nagainst"))
     87          __lbl_indications.SetForegroundColour(wx.Colour(255, 127, 0))
     88          _gszr_main.Add(__lbl_indications, 0, 0, 0)
     89          _SZR_indications.Add(self._TCTRL_indications, 1, wx.EXPAND, 0)
     90          _gszr_main.Add(_SZR_indications, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
     91          _gszr_main.Add((20, 20), 0, wx.EXPAND, 0)
     92          __szr_manage_button.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL, 0)
     93          __szr_manage_button.Add(self._BTN_select_indications, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     94          __szr_manage_button.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL, 0)
     95          _gszr_main.Add(__szr_manage_button, 1, wx.EXPAND, 0)
     96          __lbl_batch = wx.StaticText(self, -1, _(u"Batch №"))
     97          __lbl_batch.SetForegroundColour(wx.Colour(255, 0, 0))
     98          _gszr_main.Add(__lbl_batch, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     99          _gszr_main.Add(self._PRW_batch, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 10)
    100          __lbl_episode = wx.StaticText(self, -1, _("Episode"))
    101          __lbl_episode.SetForegroundColour(wx.Colour(255, 127, 0))
    102          _gszr_main.Add(__lbl_episode, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    103          _gszr_main.Add(self._PRW_episode, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    104          __lbl_site = wx.StaticText(self, -1, _("Site"))
    105          _gszr_main.Add(__lbl_site, 0, wx.ALIGN_CENTER_VERTICAL, 5)
    106          _gszr_main.Add(self._PRW_site, 2, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 10)
    107          __lbl_provider = wx.StaticText(self, -1, _("Given by"))
    108          _gszr_main.Add(__lbl_provider, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    109          _gszr_main.Add(self._PRW_provider, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    110          __lbl_reaction = wx.StaticText(self, -1, _("Reaction"))
    111          _gszr_main.Add(__lbl_reaction, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    112          sizer_1.Add(self._PRW_reaction, 1, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
    113          sizer_1.Add(self._BTN_report, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    114          _gszr_main.Add(sizer_1, 1, wx.EXPAND, 0)
    115          __lbl_comment = wx.StaticText(self, -1, _("Comment"))
    116          _gszr_main.Add(__lbl_comment, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    117          _gszr_main.Add(self._TCTRL_comment, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    118          self.SetSizer(_gszr_main)
    119          _gszr_main.Fit(self)
    120          _gszr_main.AddGrowableRow(2)
    121          _gszr_main.AddGrowableCol(1)
    122          # end wxGlade
    123
    124 -    def _on_add_vaccine_button_pressed(self, event): # wxGlade: wxgVaccinationEAPnl.<event_handler>
    125          print "Event handler `_on_add_vaccine_button_pressed' not implemented!"
    126          event.Skip()
    127
    128 -    def _on_report_button_pressed(self, event): # wxGlade: wxgVaccinationEAPnl.<event_handler>
    129          print "Event handler `_on_report_button_pressed' not implemented"
    130          event.Skip()
    131
    132 -    def _on_select_indications_button_pressed(self, event):  # wxGlade: wxgVaccinationEAPnl.<event_handler>
    133          print "Event handler `_on_select_indications_button_pressed' not implemented"
    134          event.Skip()
    135
    136  # end of class wxgVaccinationEAPnl
    137