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._DP_date_given = gmDateTimeInput.cDateInputCtrl(self, -1, style=wx.DP_DROPDOWN|wx.DP_ALLOWNONE|wx.DP_SHOWCENTURY) 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._PNL_indications = gmVaccWidgets.cVaccinationIndicationsPnl(self, -1, style=wx.NO_BORDER|wx.TAB_TRAVERSAL) 29 self._PRW_batch = gmVaccWidgets.cBatchNoPhraseWheel(self, -1, "", style=wx.NO_BORDER) 30 self._PRW_episode = gmEMRStructWidgets.cEpisodeSelectionPhraseWheel(self, -1, "", style=wx.NO_BORDER) 31 self._PRW_site = gmPhraseWheel.cPhraseWheel(self, -1, "", style=wx.NO_BORDER) 32 self._PRW_provider = gmProviderInboxWidgets.cProviderPhraseWheel(self, -1, "", style=wx.NO_BORDER) 33 self._PRW_reaction = gmPhraseWheel.cPhraseWheel(self, -1, "", style=wx.NO_BORDER) 34 self._BTN_report = wx.Button(self, -1, _("ADR"), style=wx.BU_EXACTFIT) 35 self._TCTRL_comment = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER) 36 37 self.__set_properties() 38 self.__do_layout() 39 40 self.Bind(wx.EVT_BUTTON, self._on_add_vaccine_button_pressed, self._BTN_add_vaccine) 41 self.Bind(wx.EVT_BUTTON, self._on_report_button_pressed, self._BTN_report)
42 # end wxGlade 43
44 - def __set_properties(self):
45 # begin wxGlade: wxgVaccinationEAPnl.__set_properties 46 self.SetScrollRate(10, 10) 47 self._CHBOX_anamnestic.SetToolTipString(_("Check this if - within the SOAP classification - you want to mark the entry as Subjective rather than Plan.")) 48 self._PRW_vaccine.SetToolTipString(_("The vaccine used, if known.\n\nIf unknown check off the indications which were vaccinated against.")) 49 self._BTN_add_vaccine.SetToolTipString(_("Add a vaccine to GNUmed.")) 50 self._PRW_batch.SetToolTipString(_("The batch number of the vaccine.")) 51 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.")) 52 self._PRW_site.SetToolTipString(_("The injection site, if known.")) 53 self._PRW_provider.SetToolTipString(_("The provider who administered the vaccine, if known.")) 54 self._PRW_reaction.SetToolTipString(_("Record any adverse reactions to this vaccine.")) 55 self._BTN_report.SetToolTipString(_("Report this event as an adverse drug reaction.")) 56 self._BTN_report.Enable(False) 57 self._TCTRL_comment.SetToolTipString(_("Any comment you may wish to relate to this vaccination."))
58 # end wxGlade 59
60 - def __do_layout(self):
61 # begin wxGlade: wxgVaccinationEAPnl.__do_layout 62 _gszr_main = wx.FlexGridSizer(9, 2, 1, 3) 63 sizer_1 = wx.BoxSizer(wx.HORIZONTAL) 64 _SZR_indications = wx.BoxSizer(wx.VERTICAL) 65 __szr_vaccine_details = wx.BoxSizer(wx.HORIZONTAL) 66 __szr_date_details = wx.BoxSizer(wx.HORIZONTAL) 67 __lbl_date_given = wx.StaticText(self, -1, _("Date given")) 68 __lbl_date_given.SetForegroundColour(wx.Colour(255, 0, 0)) 69 _gszr_main.Add(__lbl_date_given, 0, wx.ALIGN_CENTER_VERTICAL, 0) 70 __szr_date_details.Add(self._DP_date_given, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 71 __szr_date_details.Add(self._CHBOX_anamnestic, 0, wx.ALIGN_CENTER_VERTICAL, 0) 72 _gszr_main.Add(__szr_date_details, 1, wx.EXPAND, 0) 73 __lbl_vaccine = wx.StaticText(self, -1, _("Vaccine ...")) 74 __lbl_vaccine.SetForegroundColour(wx.Colour(255, 127, 0)) 75 _gszr_main.Add(__lbl_vaccine, 0, wx.ALIGN_CENTER_VERTICAL, 0) 76 __szr_vaccine_details.Add(self._PRW_vaccine, 1, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5) 77 __szr_vaccine_details.Add(self._BTN_add_vaccine, 0, wx.ALIGN_CENTER_VERTICAL, 0) 78 _gszr_main.Add(__szr_vaccine_details, 1, wx.EXPAND, 0) 79 __lbl_indications = wx.StaticText(self, -1, _("... or ...\n\nvaccinated\nagainst")) 80 __lbl_indications.SetForegroundColour(wx.Colour(255, 127, 0)) 81 _gszr_main.Add(__lbl_indications, 0, wx.ALIGN_CENTER_VERTICAL, 0) 82 _SZR_indications.Add(self._PNL_indications, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 83 _gszr_main.Add(_SZR_indications, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 84 __lbl_batch = wx.StaticText(self, -1, _(u"Batch №")) 85 __lbl_batch.SetForegroundColour(wx.Colour(255, 0, 0)) 86 _gszr_main.Add(__lbl_batch, 0, wx.ALIGN_CENTER_VERTICAL, 0) 87 _gszr_main.Add(self._PRW_batch, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 10) 88 __lbl_episode = wx.StaticText(self, -1, _("Episode")) 89 __lbl_episode.SetForegroundColour(wx.Colour(255, 127, 0)) 90 _gszr_main.Add(__lbl_episode, 0, wx.ALIGN_CENTER_VERTICAL, 0) 91 _gszr_main.Add(self._PRW_episode, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 92 __lbl_site = wx.StaticText(self, -1, _("Site")) 93 _gszr_main.Add(__lbl_site, 0, wx.ALIGN_CENTER_VERTICAL, 5) 94 _gszr_main.Add(self._PRW_site, 2, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 10) 95 __lbl_provider = wx.StaticText(self, -1, _("Given by")) 96 _gszr_main.Add(__lbl_provider, 0, wx.ALIGN_CENTER_VERTICAL, 0) 97 _gszr_main.Add(self._PRW_provider, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 98 __lbl_reaction = wx.StaticText(self, -1, _("Reaction")) 99 _gszr_main.Add(__lbl_reaction, 0, wx.ALIGN_CENTER_VERTICAL, 0) 100 sizer_1.Add(self._PRW_reaction, 1, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5) 101 sizer_1.Add(self._BTN_report, 0, wx.ALIGN_CENTER_VERTICAL, 0) 102 _gszr_main.Add(sizer_1, 1, wx.EXPAND, 0) 103 __lbl_comment = wx.StaticText(self, -1, _("Comment")) 104 _gszr_main.Add(__lbl_comment, 0, wx.ALIGN_CENTER_VERTICAL, 0) 105 _gszr_main.Add(self._TCTRL_comment, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 106 self.SetSizer(_gszr_main) 107 _gszr_main.Fit(self) 108 _gszr_main.AddGrowableCol(1)
109 # end wxGlade 110
111 - def _on_add_vaccine_button_pressed(self, event): # wxGlade: wxgVaccinationEAPnl.<event_handler>
112 print "Event handler `_on_add_vaccine_button_pressed' not implemented!" 113 event.Skip()
114
115 - def _on_report_button_pressed(self, event): # wxGlade: wxgVaccinationEAPnl.<event_handler>
116 print "Event handler `_on_report_button_pressed' not implemented" 117 event.Skip() 118 119 # end of class wxgVaccinationEAPnl 120