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

Source Code for Module Gnumed.wxGladeWidgets.wxgCurrentMedicationEAPnl

  1  #!/usr/bin/env python 
  2  # -*- coding: utf8 -*- 
  3  # generated by wxGlade 0.6.3 from "/home/ncq/Projekte/gm-cvs/branches/HEAD/gnumed/gnumed/client/wxg/wxgCurrentMedicationEAPnl.wxg" 
  4   
  5  import wx 
  6   
  7  # begin wxGlade: extracode 
  8  # end wxGlade 
  9   
 10   
 11   
12 -class wxgCurrentMedicationEAPnl(wx.ScrolledWindow):
13 - def __init__(self, *args, **kwds):
14 15 from Gnumed.wxpython import gmPhraseWheel 16 from Gnumed.wxpython import gmEMRStructWidgets 17 from Gnumed.wxpython import gmMedicationWidgets 18 from Gnumed.wxpython import gmDateTimeInput 19 20 # begin wxGlade: wxgCurrentMedicationEAPnl.__init__ 21 kwds["style"] = wx.NO_BORDER|wx.TAB_TRAVERSAL 22 wx.ScrolledWindow.__init__(self, *args, **kwds) 23 self._LBL_allergies = wx.StaticText(self, -1, "") 24 self._PRW_substance = gmMedicationWidgets.cSubstancePhraseWheel(self, -1, "", style=wx.NO_BORDER) 25 self._BTN_database_substance = wx.Button(self, -1, _("+"), style=wx.BU_EXACTFIT) 26 self._PRW_strength = gmPhraseWheel.cPhraseWheel(self, -1, "", style=wx.NO_BORDER) 27 self._PRW_preparation = gmMedicationWidgets.cSubstancePreparationPhraseWheel(self, -1, "", style=wx.NO_BORDER) 28 self._CHBOX_approved = wx.CheckBox(self, -1, _("Approved of")) 29 self._PRW_brand = gmMedicationWidgets.cBrandedDrugPhraseWheel(self, -1, "", style=wx.NO_BORDER) 30 self._BTN_database_brand = wx.Button(self, -1, _("+"), style=wx.BU_EXACTFIT) 31 self._TCTRL_brand_ingredients = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER) 32 self._DP_started = gmDateTimeInput.cDateInputCtrl(self, -1, style=wx.DP_SHOWCENTURY) 33 self._DP_discontinued = gmDateTimeInput.cDateInputCtrl(self, -1, style=wx.DP_ALLOWNONE|wx.DP_SHOWCENTURY) 34 self._BTN_discontinued_as_planned = wx.Button(self, -1, _("Per plan"), style=wx.BU_EXACTFIT) 35 self._PRW_discontinue_reason = gmPhraseWheel.cPhraseWheel(self, -1, "", style=wx.NO_BORDER) 36 self._CHBOX_is_allergy = wx.CheckBox(self, -1, _("Allergy")) 37 self._PRW_schedule = gmMedicationWidgets.cSubstanceSchedulePhraseWheel(self, -1, "", style=wx.NO_BORDER) 38 self._PRW_duration = gmPhraseWheel.cPhraseWheel(self, -1, "", style=wx.NO_BORDER) 39 self._CHBOX_long_term = wx.CheckBox(self, -1, _("Long-term")) 40 self._PRW_aim = gmPhraseWheel.cPhraseWheel(self, -1, "", style=wx.NO_BORDER) 41 self._PRW_episode = gmEMRStructWidgets.cEpisodeSelectionPhraseWheel(self, -1, "", style=wx.NO_BORDER) 42 self._PRW_notes = gmPhraseWheel.cPhraseWheel(self, -1, "", style=wx.NO_BORDER) 43 44 self.__set_properties() 45 self.__do_layout() 46 47 self.Bind(wx.EVT_BUTTON, self._on_get_substance_button_pressed, self._BTN_database_substance) 48 self.Bind(wx.EVT_BUTTON, self._on_get_brand_button_pressed, self._BTN_database_brand) 49 self.Bind(wx.EVT_DATE_CHANGED, self._on_discontinued_date_changed, self._DP_discontinued) 50 self.Bind(wx.EVT_BUTTON, self._on_discontinued_as_planned_button_pressed, self._BTN_discontinued_as_planned) 51 self.Bind(wx.EVT_CHECKBOX, self._on_chbox_is_allergy_checked, self._CHBOX_is_allergy) 52 self.Bind(wx.EVT_CHECKBOX, self._on_chbox_long_term_checked, self._CHBOX_long_term)
53 # end wxGlade 54
55 - def __set_properties(self):
56 # begin wxGlade: wxgCurrentMedicationEAPnl.__set_properties 57 self.SetMinSize((610, 475)) 58 self.SetScrollRate(10, 10) 59 self._BTN_database_substance.SetToolTipString(_("Get substances from an external drug database.\n\nNote that if you select more than one substance only the first one will be available for further editing right away.")) 60 self._PRW_strength.SetToolTipString(_("The amount of substance per dose.")) 61 self._PRW_preparation.SetToolTipString(_("The preparation the substance comes in.")) 62 self._CHBOX_approved.SetToolTipString(_("Whether this substance is taken by advice.")) 63 self._CHBOX_approved.SetValue(1) 64 self._PRW_brand.SetToolTipString(_("The brand name of the drug the patient is taking.")) 65 self._BTN_database_brand.SetToolTipString(_("Get brand(s) from an external drug database.\n\nNote that if you select more than one only the first will be available for further editing right away.")) 66 self._TCTRL_brand_ingredients.SetToolTipString(_("The active ingredients of this brand.")) 67 self._TCTRL_brand_ingredients.Enable(False) 68 self._DP_started.SetToolTipString(_("When was this substance started to be consumed.")) 69 self._DP_discontinued.SetToolTipString(_("When was intake of this substance discontinued ?")) 70 self._BTN_discontinued_as_planned.SetToolTipString(_("Press if discontinuation was as planned.")) 71 self._PRW_discontinue_reason.SetToolTipString(_("Reason for discontinuation.")) 72 self._PRW_discontinue_reason.Enable(False) 73 self._CHBOX_is_allergy.SetToolTipString(_("Discontinuation due to allergy/intolerance ?")) 74 self._CHBOX_is_allergy.Enable(False) 75 self._PRW_schedule.SetToolTipString(_("The schedule for taking this substance.")) 76 self._PRW_duration.SetToolTipString(_("How long is this substance supposed to be taken.")) 77 self._CHBOX_long_term.SetToolTipString(_("Whether this substance is to be taken for the rest of the patient's life.")) 78 self._PRW_aim.SetToolTipString(_("The aim of consuming this substance.")) 79 self._PRW_episode.SetToolTipString(_("The episode this substance is taken under.")) 80 self._PRW_notes.SetToolTipString(_("Any clinical notes, comments, or instructions on this substance intake."))
81 # end wxGlade 82
83 - def __do_layout(self):
84 # begin wxGlade: wxgCurrentMedicationEAPnl.__do_layout 85 __szr_main = wx.BoxSizer(wx.VERTICAL) 86 _gszr_main = wx.FlexGridSizer(11, 2, 1, 3) 87 __szr_duration = wx.BoxSizer(wx.HORIZONTAL) 88 __szr_discontinued = wx.BoxSizer(wx.HORIZONTAL) 89 __szr_started = wx.BoxSizer(wx.HORIZONTAL) 90 __szr_brand = wx.BoxSizer(wx.HORIZONTAL) 91 __szr_specs = wx.BoxSizer(wx.HORIZONTAL) 92 __szr_substance = wx.BoxSizer(wx.HORIZONTAL) 93 __szr_main.Add(self._LBL_allergies, 0, wx.BOTTOM|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 2) 94 __sline_top = wx.StaticLine(self, -1) 95 __szr_main.Add(__sline_top, 0, wx.BOTTOM|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 3) 96 __lbl_substance = wx.StaticText(self, -1, _("Substance")) 97 _gszr_main.Add(__lbl_substance, 0, wx.ALIGN_CENTER_VERTICAL, 0) 98 __szr_substance.Add(self._PRW_substance, 1, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5) 99 __szr_substance.Add(self._BTN_database_substance, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 0) 100 _gszr_main.Add(__szr_substance, 1, wx.EXPAND, 0) 101 __lbl_specs = wx.StaticText(self, -1, _("Strength")) 102 _gszr_main.Add(__lbl_specs, 0, wx.ALIGN_CENTER_VERTICAL, 0) 103 __szr_specs.Add(self._PRW_strength, 1, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 10) 104 __lbl_prep = wx.StaticText(self, -1, _("Preparation")) 105 __szr_specs.Add(__lbl_prep, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5) 106 __szr_specs.Add(self._PRW_preparation, 1, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 10) 107 __szr_specs.Add(self._CHBOX_approved, 0, wx.ALIGN_CENTER_VERTICAL, 0) 108 _gszr_main.Add(__szr_specs, 1, wx.EXPAND, 0) 109 __lbl_brand = wx.StaticText(self, -1, _("Brand")) 110 _gszr_main.Add(__lbl_brand, 0, wx.ALIGN_CENTER_VERTICAL, 0) 111 __szr_brand.Add(self._PRW_brand, 1, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5) 112 __szr_brand.Add(self._BTN_database_brand, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 0) 113 _gszr_main.Add(__szr_brand, 1, wx.EXPAND, 0) 114 _gszr_main.Add((20, 20), 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 115 _gszr_main.Add(self._TCTRL_brand_ingredients, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 116 __lbl_started = wx.StaticText(self, -1, _("Started")) 117 _gszr_main.Add(__lbl_started, 0, wx.ALIGN_CENTER_VERTICAL, 0) 118 __szr_started.Add(self._DP_started, 1, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 10) 119 __lbl_discontinued = wx.StaticText(self, -1, _("Discontinued")) 120 __szr_started.Add(__lbl_discontinued, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5) 121 __szr_started.Add(self._DP_discontinued, 1, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5) 122 __szr_started.Add(self._BTN_discontinued_as_planned, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5) 123 _gszr_main.Add(__szr_started, 1, wx.EXPAND, 0) 124 __lbl_reason = wx.StaticText(self, -1, _("Reason")) 125 _gszr_main.Add(__lbl_reason, 0, wx.ALIGN_CENTER_VERTICAL, 5) 126 __szr_discontinued.Add(self._PRW_discontinue_reason, 1, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5) 127 __szr_discontinued.Add(self._CHBOX_is_allergy, 0, wx.ALIGN_CENTER_VERTICAL, 0) 128 _gszr_main.Add(__szr_discontinued, 1, wx.EXPAND, 0) 129 __lbl_schedule = wx.StaticText(self, -1, _("Schedule")) 130 _gszr_main.Add(__lbl_schedule, 0, wx.ALIGN_CENTER_VERTICAL, 0) 131 _gszr_main.Add(self._PRW_schedule, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 132 __lbl_duration = wx.StaticText(self, -1, _("Duration")) 133 _gszr_main.Add(__lbl_duration, 0, wx.ALIGN_CENTER_VERTICAL, 0) 134 __szr_duration.Add(self._PRW_duration, 1, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 10) 135 __szr_duration.Add(self._CHBOX_long_term, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 2) 136 _gszr_main.Add(__szr_duration, 1, wx.EXPAND, 0) 137 __lbl_aim = wx.StaticText(self, -1, _("Aim")) 138 _gszr_main.Add(__lbl_aim, 0, wx.ALIGN_CENTER_VERTICAL, 0) 139 _gszr_main.Add(self._PRW_aim, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 140 __lbl_episode = wx.StaticText(self, -1, _("Episode")) 141 _gszr_main.Add(__lbl_episode, 0, wx.ALIGN_CENTER_VERTICAL, 0) 142 _gszr_main.Add(self._PRW_episode, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 143 __lbl_notes = wx.StaticText(self, -1, _("Advice")) 144 _gszr_main.Add(__lbl_notes, 0, wx.ALIGN_CENTER_VERTICAL, 0) 145 _gszr_main.Add(self._PRW_notes, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 146 _gszr_main.AddGrowableCol(1) 147 __szr_main.Add(_gszr_main, 1, wx.EXPAND, 0) 148 self.SetSizer(__szr_main) 149 __szr_main.Fit(self)
150 # end wxGlade 151
152 - def _on_chbox_long_term_checked(self, event): # wxGlade: wxgCurrentMedicationEAPnl.<event_handler>
153 print "Event handler `_on_chbox_long_term_checked' not implemented" 154 event.Skip()
155
156 - def _on_get_brand_button_pressed(self, event): # wxGlade: wxgCurrentMedicationEAPnl.<event_handler>
157 print "Event handler `_on_get_brand_button_pressed' not implemented" 158 event.Skip() 159
160 - def _on_get_substance_button_pressed(self, event): # wxGlade: wxgCurrentMedicationEAPnl.<event_handler>
161 print "Event handler `_on_get_substance_button_pressed' not implemented" 162 event.Skip() 163
164 - def _on_discontinued_as_planned_button_pressed(self, event): # wxGlade: wxgCurrentMedicationEAPnl.<event_handler>
165 print "Event handler `_on_discontinued_as_planned_button_pressed' not implemented" 166 event.Skip() 167
168 - def _on_chbox_is_allergy_checked(self, event): # wxGlade: wxgCurrentMedicationEAPnl.<event_handler>
169 print "Event handler `_on_chbox_is_allergy_checked' not implemented" 170 event.Skip() 171
172 - def _on_discontinued_date_changed(self, event): # wxGlade: wxgCurrentMedicationEAPnl.<event_handler>
173 print "Event handler `_on_discontinued_date_changed' not implemented" 174 event.Skip() 175 176 # end of class wxgCurrentMedicationEAPnl 177