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