# -*- coding: UTF-8 -*-
#
# generated by wxGlade
#

import wx

# begin wxGlade: dependencies
import gettext
# end wxGlade

# begin wxGlade: extracode
# end wxGlade


class wxgAllergyEditAreaPnl(wx.ScrolledWindow):
	def __init__(self, *args, **kwds):
		# begin wxGlade: wxgAllergyEditAreaPnl.__init__
		kwds["style"] = kwds.get("style", 0) | wx.BORDER_NONE | wx.TAB_TRAVERSAL
		wx.ScrolledWindow.__init__(self, *args, **kwds)
		from Gnumed.wxpython.gmDateTimeInput import cFuzzyTimestampInput
		self._DPRW_date_noted = cFuzzyTimestampInput(self, wx.ID_ANY, "")
		from Gnumed.wxpython.gmPhraseWheel import cPhraseWheel
		self._PRW_trigger = cPhraseWheel(self, wx.ID_ANY, "")
		self._TCTRL_product_name = wx.TextCtrl(self, wx.ID_ANY, "")
		self._TCTRL_generic = wx.TextCtrl(self, wx.ID_ANY, "")
		self._ChBOX_generic_specific = wx.CheckBox(self, wx.ID_ANY, _("&Tolerates others in class"))
		self._TCTRL_atc_classes = wx.TextCtrl(self, wx.ID_ANY, "")
		self._PRW_reaction = cPhraseWheel(self, wx.ID_ANY, "")
		self._RBTN_type_allergy = wx.RadioButton(self, wx.ID_ANY, _("&Allergy"), style=wx.RB_GROUP)
		self._RBTN_type_sensitivity = wx.RadioButton(self, wx.ID_ANY, _("&Sensitivity"))
		self._ChBOX_definite = wx.CheckBox(self, wx.ID_ANY, _("&Definite"))

		self.__set_properties()
		self.__do_layout()
		# end wxGlade

	def __set_properties(self):
		# begin wxGlade: wxgAllergyEditAreaPnl.__set_properties
		self.SetScrollRate(10, 10)
		self._DPRW_date_noted.SetToolTip(_("When did the patient notice onset of the reaction.\n\nIf unknown use the date when it was reported to you."))
		self._PRW_trigger.SetToolTip(_("What is reported to be the trigger for the reaction. Can be\n- a drug (product name, generic, constrast media, ...)\n- a chemical (household, job related)\n- an animal (cat fur, lice, ...)\n- a metal (CrNi, ...)\n- a foodstuff (lactose, ...)\n- a type of pollen (birch, ...)\n- ..."))
		self._TCTRL_product_name.SetToolTip(_("Product name if a drug is entered as the trigger."))
		self._TCTRL_product_name.Enable(False)
		self._TCTRL_generic.SetToolTip(_("Product name if a drug is entered as the trigger."))
		self._TCTRL_generic.Enable(False)
		self._ChBOX_generic_specific.SetToolTip(_("Check if this reaction applies to this drug/generic only, not the entire drug class."))
		self._TCTRL_atc_classes.SetToolTip(_("Displays drug classe(s) along with their ATC code."))
		self._TCTRL_atc_classes.Enable(False)
		self._PRW_reaction.SetToolTip(_("Document signs and symptoms. If reaction is to a drug also document time of onset after drug administration (<24h, 24-72h, >72h)."))
		self._RBTN_type_allergy.SetToolTip(_("Select this if the reaction is an allergy."))
		self._RBTN_type_allergy.SetValue(1)
		self._RBTN_type_sensitivity.SetToolTip(_("Select this if the reaction is a sensitivity."))
		self._ChBOX_definite.SetToolTip(_("Check this if this allergy/intolerance is known to exist for sure as opposed to suspected."))
		self._ChBOX_definite.SetValue(1)
		# end wxGlade

	def __do_layout(self):
		# begin wxGlade: wxgAllergyEditAreaPnl.__do_layout
		_gszr_main = wx.FlexGridSizer(7, 2, 1, 3)
		__szr_reaction_type = wx.BoxSizer(wx.HORIZONTAL)
		__szr_generic = wx.BoxSizer(wx.HORIZONTAL)
		__lbl_date_noted = wx.StaticText(self, wx.ID_ANY, _("Onset"))
		_gszr_main.Add(__lbl_date_noted, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		_gszr_main.Add(self._DPRW_date_noted, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
		__lbl_trigger = wx.StaticText(self, wx.ID_ANY, _("Trigger"))
		_gszr_main.Add(__lbl_trigger, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		_gszr_main.Add(self._PRW_trigger, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
		__lbl_product_name = wx.StaticText(self, wx.ID_ANY, _("Product Name"))
		_gszr_main.Add(__lbl_product_name, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		_gszr_main.Add(self._TCTRL_product_name, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
		__lbl_generic = wx.StaticText(self, wx.ID_ANY, _("Generics"))
		_gszr_main.Add(__lbl_generic, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		__szr_generic.Add(self._TCTRL_generic, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
		__szr_generic.Add(self._ChBOX_generic_specific, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
		_gszr_main.Add(__szr_generic, 1, wx.EXPAND, 0)
		__lbl_atc_classes = wx.StaticText(self, wx.ID_ANY, _("Drug Classes"))
		_gszr_main.Add(__lbl_atc_classes, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		_gszr_main.Add(self._TCTRL_atc_classes, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
		__lbl_reaction = wx.StaticText(self, wx.ID_ANY, _("Reaction"))
		__lbl_reaction.SetToolTip(_("Document signs and symptoms. If reaction is to a drug also document time of onset after drug administration (<24h, 24-72h, >72h)."))
		_gszr_main.Add(__lbl_reaction, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		_gszr_main.Add(self._PRW_reaction, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
		__lbl_reaction_type = wx.StaticText(self, wx.ID_ANY, _("Reaction Type"))
		_gszr_main.Add(__lbl_reaction_type, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		__szr_reaction_type.Add(self._RBTN_type_allergy, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
		__szr_reaction_type.Add(self._RBTN_type_sensitivity, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 15)
		__szr_reaction_type.Add(self._ChBOX_definite, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		_gszr_main.Add(__szr_reaction_type, 1, wx.EXPAND, 0)
		self.SetSizer(_gszr_main)
		_gszr_main.Fit(self)
		_gszr_main.AddGrowableCol(1)
		self.Layout()
		# end wxGlade

# end of class wxgAllergyEditAreaPnl
