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

Source Code for Module Gnumed.wxGladeWidgets.wxgVaccinationEAPnl

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