#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# generated by wxGlade 0.6.7+
#

import wx

# begin wxGlade: dependencies
import gettext
# end wxGlade

# begin wxGlade: extracode
# end wxGlade


class wxgMeasurementEditAreaPnl(wx.Panel):
	def __init__(self, *args, **kwds):

		from Gnumed.wxpython.gmMeasurementWidgets import cMeasurementTypePhraseWheel
		from Gnumed.wxpython.gmMeasurementWidgets import cUnitPhraseWheel
		from Gnumed.wxpython.gmMeasurementWidgets import cTestResultIndicatorPhraseWheel
		from Gnumed.wxpython.gmEMRStructWidgets import cEpisodeSelectionPhraseWheel
		from Gnumed.wxpython.gmDateTimeInput import cFuzzyTimestampInput
		from Gnumed.wxpython.gmStaffWidgets import cProviderPhraseWheel

		# begin wxGlade: wxgMeasurementEditAreaPnl.__init__
		kwds["style"] = wx.NO_BORDER | wx.TAB_TRAVERSAL
		wx.Panel.__init__(self, *args, **kwds)
		self._PRW_test = cMeasurementTypePhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
		self._BTN_test_info = wx.Button(self, wx.ID_ANY, _("Info"), style=wx.BU_EXACTFIT)
		self._TCTRL_loinc = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_READONLY | wx.NO_BORDER)
		self._TCTRL_previous_value = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_READONLY | wx.NO_BORDER)
		self._TCTRL_result = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)
		self._PRW_units = cUnitPhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
		self._PRW_abnormality_indicator = cTestResultIndicatorPhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
		self._DPRW_evaluated = cFuzzyTimestampInput(self, wx.ID_ANY, "", style=wx.NO_BORDER)
		self._TCTRL_note_test_org = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)
		self._PRW_intended_reviewer = cProviderPhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
		self._PRW_problem = cEpisodeSelectionPhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
		self._TCTRL_narrative = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)
		self._CHBOX_review = wx.CheckBox(self, wx.ID_ANY, _("&Sign"))
		self._CHBOX_abnormal = wx.CheckBox(self, wx.ID_ANY, _("&Abnormal"))
		self._CHBOX_relevant = wx.CheckBox(self, wx.ID_ANY, _("&Relevant"))
		self._TCTRL_review_comment = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)
		self._TCTRL_normal_min = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)
		self._TCTRL_normal_max = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)
		self._TCTRL_normal_range = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)
		self._TCTRL_target_min = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)
		self._TCTRL_target_max = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)
		self._TCTRL_target_range = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)
		self._TCTRL_norm_ref_group = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)

		self.__set_properties()
		self.__do_layout()

		self.Bind(wx.EVT_BUTTON, self._on_test_info_button_pressed, self._BTN_test_info)
		self.Bind(wx.EVT_CHECKBOX, self._on_review_box_checked, self._CHBOX_review)
		# end wxGlade

	def __set_properties(self):
		# begin wxGlade: wxgMeasurementEditAreaPnl.__set_properties
		self.SetSize((638, 398))
		self._PRW_test.SetToolTipString(_("Select, or enter for creation, the type of test or measurement this result is about."))
		self._PRW_test.SetFocus()
		self._BTN_test_info.SetToolTipString(_("Show a web search on this test type."))
		self._TCTRL_loinc.Enable(False)
		self._TCTRL_previous_value.SetForegroundColour(wx.Colour(0, 0, 0))
		self._TCTRL_previous_value.Enable(False)
		self._TCTRL_result.SetToolTipString(_("The result of the measurement. Numeric and alphanumeric input is allowed."))
		self._PRW_units.SetToolTipString(_("The units this result comes in."))
		self._PRW_abnormality_indicator.SetToolTipString(_("Enter an indicator for the degree of abnormality.\nOften +, -, !, ?, () or any combination thereof."))
		self._DPRW_evaluated.SetToolTipString(_("When was this result actually obtained. Usually the same or between the time for \"sample taken\" and \"result reported\"."))
		self._TCTRL_note_test_org.SetToolTipString(_("A technical comment on the result.\nUsually by the entering Medical Technical Assistant."))
		self._PRW_intended_reviewer.SetToolTipString(_("The doctor in charge who will have to assess and sign off this result."))
		self._PRW_problem.SetToolTipString(_("The medical problem this test results pertains to."))
		self._TCTRL_narrative.SetToolTipString(_("A clinical assessment of the measurement.\nUsually by a doctor."))
		self._CHBOX_review.SetToolTipString(_("Check if you want to save a review."))
		self._CHBOX_abnormal.SetToolTipString(_("Check if this result is technically abnormal."))
		self._CHBOX_abnormal.Enable(False)
		self._CHBOX_relevant.SetToolTipString(_("Check if this result is clinically relevant."))
		self._CHBOX_relevant.Enable(False)
		self._TCTRL_review_comment.SetToolTipString(_("A comment on this review."))
		self._TCTRL_review_comment.Enable(False)
		self._TCTRL_normal_min.SetToolTipString(_("The lower bound of the range of technically normal values."))
		self._TCTRL_normal_max.SetToolTipString(_("The upper bound of the range of technically normal values."))
		self._TCTRL_normal_range.SetToolTipString(_("An alphanumeric range of technically normal values."))
		self._TCTRL_target_min.SetToolTipString(_("The lower bound of the target range for this test in this patient."))
		self._TCTRL_target_max.SetToolTipString(_("The lower bound of the target range for this test in this patient."))
		self._TCTRL_target_range.SetToolTipString(_("An alphanumeric target range for this test in this patient."))
		self._TCTRL_norm_ref_group.SetToolTipString(_("The reference groups (norms) the normal/target ranges for this value pertain to."))
		# end wxGlade

	def __do_layout(self):
		# begin wxGlade: wxgMeasurementEditAreaPnl.__do_layout
		_gszr_main = wx.FlexGridSizer(16, 2, 1, 3)
		__szr_range_target = wx.BoxSizer(wx.HORIZONTAL)
		__szr_range_normal = wx.BoxSizer(wx.HORIZONTAL)
		__szr_review = wx.BoxSizer(wx.HORIZONTAL)
		__szr_result = wx.BoxSizer(wx.HORIZONTAL)
		__szr_test = wx.BoxSizer(wx.HORIZONTAL)
		_gszr_main.Add((20, 20), 0, wx.EXPAND, 0)
		__lbl_result_details = wx.StaticText(self, wx.ID_ANY, _("Measurement details"))
		__lbl_result_details.SetForegroundColour(wx.Colour(95, 159, 159))
		_gszr_main.Add(__lbl_result_details, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		__lbl_test = wx.StaticText(self, wx.ID_ANY, _("Test"))
		__lbl_test.SetForegroundColour(wx.Colour(204, 50, 50))
		_gszr_main.Add(__lbl_test, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		__szr_test.Add(self._PRW_test, 1, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
		__szr_test.Add(self._BTN_test_info, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		_gszr_main.Add(__szr_test, 1, wx.EXPAND, 0)
		__lbl_loinc = wx.StaticText(self, wx.ID_ANY, _("LOINC"))
		_gszr_main.Add(__lbl_loinc, 0, wx.ALIGN_CENTER_VERTICAL, 3)
		_gszr_main.Add(self._TCTRL_loinc, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
		_gszr_main.Add((20, 20), 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
		_gszr_main.Add(self._TCTRL_previous_value, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
		__lbl_result = wx.StaticText(self, wx.ID_ANY, _("Value"))
		__lbl_result.SetForegroundColour(wx.Colour(204, 50, 50))
		_gszr_main.Add(__lbl_result, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		__szr_result.Add(self._TCTRL_result, 2, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
		__lbl_unit = wx.StaticText(self, wx.ID_ANY, _("Units"))
		__lbl_unit.SetForegroundColour(wx.Colour(204, 50, 50))
		__szr_result.Add(__lbl_unit, 0, wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 4)
		__szr_result.Add(self._PRW_units, 2, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
		__lbl_abnormality = wx.StaticText(self, wx.ID_ANY, _("Indicator"))
		__szr_result.Add(__lbl_abnormality, 0, wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 4)
		__szr_result.Add(self._PRW_abnormality_indicator, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
		_gszr_main.Add(__szr_result, 1, wx.EXPAND, 0)
		__lbl_evaluated = wx.StaticText(self, wx.ID_ANY, _("Date"))
		__lbl_evaluated.SetForegroundColour(wx.Colour(204, 50, 50))
		_gszr_main.Add(__lbl_evaluated, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		_gszr_main.Add(self._DPRW_evaluated, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
		__lbl_note_test_org = wx.StaticText(self, wx.ID_ANY, _("Context"))
		_gszr_main.Add(__lbl_note_test_org, 0, wx.ALIGN_CENTER_VERTICAL, 3)
		_gszr_main.Add(self._TCTRL_note_test_org, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
		_gszr_main.Add((20, 20), 0, wx.EXPAND, 0)
		__lbl_clinical_assessment = wx.StaticText(self, wx.ID_ANY, _("Clinical details"))
		__lbl_clinical_assessment.SetForegroundColour(wx.Colour(95, 159, 159))
		_gszr_main.Add(__lbl_clinical_assessment, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		__lbl_in_charge = wx.StaticText(self, wx.ID_ANY, _("In charge"))
		__lbl_in_charge.SetForegroundColour(wx.Colour(204, 50, 50))
		_gszr_main.Add(__lbl_in_charge, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		_gszr_main.Add(self._PRW_intended_reviewer, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
		__lbl_problem = wx.StaticText(self, wx.ID_ANY, _("Problem"))
		__lbl_problem.SetForegroundColour(wx.Colour(204, 50, 50))
		_gszr_main.Add(__lbl_problem, 0, wx.ALIGN_CENTER_VERTICAL, 3)
		_gszr_main.Add(self._PRW_problem, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
		__lbl_narrative = wx.StaticText(self, wx.ID_ANY, _("Comment"))
		_gszr_main.Add(__lbl_narrative, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		_gszr_main.Add(self._TCTRL_narrative, 2, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
		__lbl_review = wx.StaticText(self, wx.ID_ANY, _("Review"))
		_gszr_main.Add(__lbl_review, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		__szr_review.Add(self._CHBOX_review, 0, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
		_SLINE_review = wx.StaticLine(self, wx.ID_ANY, style=wx.LI_VERTICAL)
		__szr_review.Add(_SLINE_review, 0, wx.TOP | wx.BOTTOM | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 2)
		_LBL_mark_as = wx.StaticText(self, wx.ID_ANY, _("Mark as:"))
		__szr_review.Add(_LBL_mark_as, 0, wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
		__szr_review.Add(self._CHBOX_abnormal, 0, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
		__szr_review.Add(self._CHBOX_relevant, 0, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
		__szr_review.Add(self._TCTRL_review_comment, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
		_gszr_main.Add(__szr_review, 1, wx.EXPAND, 0)
		_gszr_main.Add((20, 20), 0, wx.EXPAND, 0)
		__lbl_reference = wx.StaticText(self, wx.ID_ANY, _("Reference information"))
		__lbl_reference.SetForegroundColour(wx.Colour(95, 159, 159))
		_gszr_main.Add(__lbl_reference, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		__lbl_range_normal = wx.StaticText(self, wx.ID_ANY, _("Normal"))
		_gszr_main.Add(__lbl_range_normal, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		__szr_range_normal.Add(self._TCTRL_normal_min, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
		__lbl_from_to = wx.StaticText(self, wx.ID_ANY, _("--"))
		__szr_range_normal.Add(__lbl_from_to, 0, wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
		__szr_range_normal.Add(self._TCTRL_normal_max, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
		__lbl_range_or_range = wx.StaticText(self, wx.ID_ANY, _("or"))
		__szr_range_normal.Add(__lbl_range_or_range, 0, wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 5)
		__szr_range_normal.Add(self._TCTRL_normal_range, 2, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
		_gszr_main.Add(__szr_range_normal, 1, wx.EXPAND, 0)
		__lbl_range_target = wx.StaticText(self, wx.ID_ANY, _("Target"))
		_gszr_main.Add(__lbl_range_target, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		__szr_range_target.Add(self._TCTRL_target_min, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
		__lbl_from_to_target = wx.StaticText(self, wx.ID_ANY, _("--"))
		__szr_range_target.Add(__lbl_from_to_target, 0, wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
		__szr_range_target.Add(self._TCTRL_target_max, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
		__lbl_range_or_range_target = wx.StaticText(self, wx.ID_ANY, _("or"))
		__szr_range_target.Add(__lbl_range_or_range_target, 0, wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 5)
		__szr_range_target.Add(self._TCTRL_target_range, 2, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
		_gszr_main.Add(__szr_range_target, 1, wx.EXPAND, 0)
		__lbl_ref_group = wx.StaticText(self, wx.ID_ANY, _("Norm"))
		_gszr_main.Add(__lbl_ref_group, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		_gszr_main.Add(self._TCTRL_norm_ref_group, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
		self.SetSizer(_gszr_main)
		_gszr_main.AddGrowableCol(1)
		# end wxGlade

	def _on_test_info_button_pressed(self, event):  # wxGlade: wxgMeasurementEditAreaPnl.<event_handler>
		print "Event handler '_on_test_info_button_pressed' not implemented!"
		event.Skip()

	def _on_review_box_checked(self, event):  # wxGlade: wxgMeasurementEditAreaPnl.<event_handler>
		print "Event handler '_on_review_box_checked' not implemented!"
		event.Skip()

# end of class wxgMeasurementEditAreaPnl
