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

import wx

# begin wxGlade: dependencies
import gettext
# end wxGlade

# begin wxGlade: extracode
# end wxGlade


class wxgFamilyHistoryEAPnl(wx.ScrolledWindow):
	def __init__(self, *args, **kwds):
		# begin wxGlade: wxgFamilyHistoryEAPnl.__init__
		kwds["style"] = kwds.get("style", 0) | wx.BORDER_NONE | wx.TAB_TRAVERSAL
		wx.ScrolledWindow.__init__(self, *args, **kwds)
		from Gnumed.wxpython.gmFamilyHistoryWidgets import cRelationshipTypePhraseWheel
		self._PRW_relationship = cRelationshipTypePhraseWheel(self, wx.ID_ANY, "")
		from Gnumed.wxpython.gmPhraseWheel import cPhraseWheel
		self._PRW_condition = cPhraseWheel(self, wx.ID_ANY, "")
		from Gnumed.wxpython.gmCodingWidgets import cGenericCodesPhraseWheel
		self._PRW_codes = cGenericCodesPhraseWheel(self, wx.ID_ANY, "")
		self._TCTRL_age_of_onset = wx.TextCtrl(self, wx.ID_ANY, "")
		from Gnumed.wxpython.gmGuiHelpers import cThreeValuedLogicPhraseWheel
		self._PRW_died_of_this = cThreeValuedLogicPhraseWheel(self, wx.ID_ANY, "")
		from Gnumed.wxpython.gmDateTimeInput import cIntervalPhraseWheel
		self._PRW_age_of_death = cIntervalPhraseWheel(self, wx.ID_ANY, "")
		from Gnumed.wxpython.gmEMRStructWidgets import cEpisodeSelectionPhraseWheel
		self._PRW_episode = cEpisodeSelectionPhraseWheel(self, wx.ID_ANY, "")
		self._TCTRL_name = wx.TextCtrl(self, wx.ID_ANY, "")
		from Gnumed.wxpython.gmDateTimeInput import cDateInputPhraseWheel
		self._PRW_dob = cDateInputPhraseWheel(self, wx.ID_ANY, "")
		self._TCTRL_comment = wx.TextCtrl(self, wx.ID_ANY, "")

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

	def __set_properties(self):
		# begin wxGlade: wxgFamilyHistoryEAPnl.__set_properties
		self.SetScrollRate(10, 10)
		self._PRW_relationship.SetToolTip(_("Required: Enter or select the type of relationship between the patient and this relative."))
		self._PRW_condition.SetToolTip(_("Required: Enter or select the name of the condition the relative suffered from."))
		self._PRW_codes.SetToolTip(_("Select codes relevant to this family history items."))
		self._TCTRL_age_of_onset.SetToolTip(_("Optional: Age of onset of the condition in the relative."))
		self._PRW_died_of_this.SetToolTip(_("Optional: Whether this condition contributed to the death of the patient."))
		self._PRW_age_of_death.SetToolTip(_("Optional: Enter the age of death of the relative."))
		self._PRW_episode.SetToolTip(_("Optional: The episode under which this family history item became known or to which it is relevant.\n\nIf blank: Will be added to an unattributed episode \"Family History\"."))
		self._TCTRL_name.SetToolTip(_("Optional: Enter the name of the relative."))
		self._PRW_dob.SetToolTip(_("Optional: Enter the date of birth of the relative."))
		self._TCTRL_comment.SetToolTip(_("Optional: A comment on this family history item."))
		# end wxGlade

	def __do_layout(self):
		# begin wxGlade: wxgFamilyHistoryEAPnl.__do_layout
		_gszr_main = wx.FlexGridSizer(8, 2, 1, 3)
		__szr_relation = wx.BoxSizer(wx.HORIZONTAL)
		__szr_death = wx.BoxSizer(wx.HORIZONTAL)
		__szr_condition_details = wx.BoxSizer(wx.HORIZONTAL)
		__lbl_relation = wx.StaticText(self, wx.ID_ANY, _("Relationship"))
		__lbl_relation.SetForegroundColour(wx.Colour(255, 0, 0))
		_gszr_main.Add(__lbl_relation, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		_gszr_main.Add(self._PRW_relationship, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 5)
		__lbl_condition = wx.StaticText(self, wx.ID_ANY, _("Condition"))
		__lbl_condition.SetForegroundColour(wx.Colour(255, 0, 0))
		_gszr_main.Add(__lbl_condition, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		_gszr_main.Add(self._PRW_condition, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
		__lbl_codes = wx.StaticText(self, wx.ID_ANY, _("Codes"))
		_gszr_main.Add(__lbl_codes, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		_gszr_main.Add(self._PRW_codes, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
		__lbl_condition_details = wx.StaticText(self, wx.ID_ANY, _("Age onset"))
		_gszr_main.Add(__lbl_condition_details, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		__szr_condition_details.Add(self._TCTRL_age_of_onset, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 5)
		_gszr_main.Add(__szr_condition_details, 1, wx.EXPAND, 0)
		__lbl_died_of_this = wx.StaticText(self, wx.ID_ANY, _("Caused death ?"))
		_gszr_main.Add(__lbl_died_of_this, 0, wx.ALIGN_CENTER_VERTICAL, 3)
		__szr_death.Add(self._PRW_died_of_this, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 5)
		__lbl_death = wx.StaticText(self, wx.ID_ANY, _("Age at death:"))
		__szr_death.Add(__lbl_death, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
		__szr_death.Add(self._PRW_age_of_death, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 5)
		_gszr_main.Add(__szr_death, 1, wx.EXPAND, 0)
		__lbl_episode = wx.StaticText(self, wx.ID_ANY, _("Episode"))
		__lbl_episode.SetForegroundColour(wx.Colour(255, 127, 0))
		_gszr_main.Add(__lbl_episode, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		_gszr_main.Add(self._PRW_episode, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
		__lbl_name = wx.StaticText(self, wx.ID_ANY, _("Person's name"))
		_gszr_main.Add(__lbl_name, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		__szr_relation.Add(self._TCTRL_name, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 5)
		__lbl_dob = wx.StaticText(self, wx.ID_ANY, _("Date of birth:"))
		__szr_relation.Add(__lbl_dob, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
		__szr_relation.Add(self._PRW_dob, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
		_gszr_main.Add(__szr_relation, 1, wx.EXPAND, 0)
		__lbl_comment = wx.StaticText(self, wx.ID_ANY, _("Comment"))
		_gszr_main.Add(__lbl_comment, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		_gszr_main.Add(self._TCTRL_comment, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
		self.SetSizer(_gszr_main)
		_gszr_main.Fit(self)
		_gszr_main.AddGrowableCol(1)
		self.Layout()
		# end wxGlade

# end of class wxgFamilyHistoryEAPnl
