Gnumed.wxGladeWidgets.wxgNewPatientEAPnl

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

# Source Code for Module Gnumed.wxGladeWidgets.wxgNewPatientEAPnl

      1  #!/usr/bin/env python
      2  # -*- coding: UTF-8 -*-
      3  #
      4  # generated by wxGlade HG
      5  #
      6
      7  import wx
      8
      9  # begin wxGlade: dependencies
     10  import gettext
     11  # end wxGlade
     12
     13  # begin wxGlade: extracode
     14  from Gnumed.wxpython.gmDemographicsWidgets import cLastnamePhraseWheel
     15  from Gnumed.wxpython.gmDemographicsWidgets import cFirstnamePhraseWheel
     16  from Gnumed.wxpython.gmDemographicsWidgets import cGenderSelectionPhraseWheel
     17  from Gnumed.wxpython.gmDemographicsWidgets import cNicknamePhraseWheel
     18  from Gnumed.wxpython.gmDemographicsWidgets import cTitlePhraseWheel
     19  from Gnumed.wxpython.gmDemographicsWidgets import cExternalIDTypePhraseWheel
     20  from Gnumed.wxpython.gmDemographicsWidgets import cOccupationPhraseWheel
     21  from Gnumed.wxpython.gmAddressWidgets import cAddressPhraseWheel
     22  from Gnumed.wxpython.gmAddressWidgets import cZipcodePhraseWheel
     23  from Gnumed.wxpython.gmAddressWidgets import cStreetPhraseWheel
     24  from Gnumed.wxpython.gmAddressWidgets import cUrbPhraseWheel
     25  from Gnumed.wxpython.gmAddressWidgets import cStateSelectionPhraseWheel
     26  from Gnumed.wxpython.gmAddressWidgets import cCountryPhraseWheel
     27  from Gnumed.wxpython.gmAddressWidgets import cAddressTypePhraseWheel
     28  from Gnumed.wxpython.gmContactWidgets import cCommChannelTypePhraseWheel
     29  from Gnumed.wxpython.gmDateTimeInput import cDateInputPhraseWheel
     30  from Gnumed.wxpython.gmStaffWidgets import cProviderPhraseWheel
     31  from Gnumed.wxpython.gmTextCtrl import cTextCtrl
     32  # end wxGlade
     33
     34
     35 -class wxgNewPatientEAPnl(wx.Panel):
     36 -        def __init__(self, *args, **kwds):
     37                  # begin wxGlade: wxgNewPatientEAPnl.__init__
     38                  kwds["style"] = wx.NO_BORDER | wx.TAB_TRAVERSAL
     39                  wx.Panel.__init__(self, *args, **kwds)
     40                  self._PRW_lastname = cLastnamePhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
     41                  self._PRW_firstnames = cFirstnamePhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
     42                  self._PRW_dob = cDateInputPhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
     43                  self._CHBOX_estimated_dob = wx.CheckBox(self, wx.ID_ANY, _("Estimated"))
     44                  self._TCTRL_tob = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)
     45                  self._LBL_person_exists = wx.StaticText(self, wx.ID_ANY, "")
     46                  self._PRW_gender = cGenderSelectionPhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
     47                  self._PRW_nickname = cNicknamePhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
     48                  self._PRW_title = cTitlePhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
     49                  self._PRW_address_searcher = cAddressPhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
     50                  self._PRW_zip = cZipcodePhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
     51                  self._PRW_street = cStreetPhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
     52                  self._TCTRL_number = cTextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)
     53                  self._TCTRL_unit = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)
     54                  self._PRW_urb = cUrbPhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
     55                  self._PRW_region = cStateSelectionPhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
     56                  self._PRW_country = cCountryPhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
     57                  self._PRW_type = cAddressTypePhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
     58                  self._PRW_channel_type = cCommChannelTypePhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
     59                  self._TCTRL_phone = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)
     60                  self._PRW_primary_provider = cProviderPhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
     61                  self._PRW_external_id_type = cExternalIDTypePhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
     62                  self._TCTRL_external_id_value = cTextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)
     63                  self._LBL_id_exists = wx.StaticText(self, wx.ID_ANY, "")
     64                  self._PRW_occupation = cOccupationPhraseWheel(self, wx.ID_ANY, "", style=wx.NO_BORDER)
     65                  self._TCTRL_comment = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.NO_BORDER)
     66
     67                  self.__set_properties()
     68                  self.__do_layout()
     69                  # end wxGlade
     70
     71 -        def __set_properties(self):
     72                  # begin wxGlade: wxgNewPatientEAPnl.__set_properties
     73                  self._PRW_lastname.SetToolTipString(_("Required: lastname (family name)"))
     74                  self._PRW_lastname.SetFocus()
     75                  self._PRW_firstnames.SetToolTipString(_("Required: first name/given name"))
     76                  self._PRW_dob.SetToolTipString(_("Recommended: Date of birth. Your current time zone applies."))
     77                  self._CHBOX_estimated_dob.SetToolTipString(_("Check if the DOB is estimated rather than known precisely."))
     78                  self._TCTRL_tob.SetToolTipString(_("Optional: the time of birth if known"))
     79                  self._LBL_person_exists.SetForegroundColour(wx.Colour(255, 0, 0))
     80                  self._PRW_gender.SetToolTipString(_("Required: gender"))
     81                  self._PRW_nickname.SetToolTipString(_("Optional: nickname (alias, preferred name, call name, warrior name, artist name, pseudonym)"))
     82                  self._PRW_title.SetToolTipString(_("Optional: title (academic or honorary). Note that a title applies to a person, not to a particular name of that person (it will be kept even if the name changes)."))
     83                  self._PRW_address_searcher.SetToolTipString(_("Optional address search: enter a postal code or street name to select a pre-existing address to auto-fill the fields below.\n\nBy editing the fields you can create a new address as needed."))
     84                  self._PRW_zip.SetToolTipString(_("Primary address: zip/postal code\n\nUse '?' if unknown."))
     85                  self._PRW_street.SetToolTipString(_("Primary address: name of street"))
     86                  self._TCTRL_number.SetToolTipString(_("Primary address: number"))
     87                  self._TCTRL_unit.SetToolTipString(_("Primary address: unit within the number (appt. / room / etc)."))
     88                  self._PRW_urb.SetToolTipString(_("Primary address: city/town/village/dwelling/..."))
     89                  self._PRW_region.SetToolTipString(_("Primary address: state/province/county/..."))
     90                  self._PRW_country.SetToolTipString(_("Primary address: country of residence"))
     91                  self._PRW_type.SetToolTipString(_("The category under which to store this address."))
     92                  self._PRW_channel_type.SetToolTipString(_("The type of the primary communication channel."))
     93                  self._TCTRL_phone.SetToolTipString(_("Primary communication channel."))
     94                  self._PRW_primary_provider.SetToolTipString(_("Choose the provider the patient considers his or her primary provider in this praxis."))
     95                  self._PRW_external_id_type.SetToolTipString(_("The type of the external ID (selection only)."))
     96                  self._TCTRL_external_id_value.SetToolTipString(_("The value of the external ID."))
     97                  self._LBL_id_exists.SetForegroundColour(wx.Colour(255, 0, 0))
     98                  self._PRW_occupation.SetToolTipString(_("The current occupation."))
     99                  self._TCTRL_comment.SetToolTipString(_("A comment on this person."))
    100                  # end wxGlade
    101
    102 -        def __do_layout(self):
    103                  # begin wxGlade: wxgNewPatientEAPnl.__do_layout
    104                  __szr_main = wx.BoxSizer(wx.VERTICAL)
    105                  __fgsizer_details = wx.FlexGridSizer(23, 2, 3, 5)
    106                  __szr_external_id_details = wx.BoxSizer(wx.HORIZONTAL)
    107                  __szr_other = wx.BoxSizer(wx.HORIZONTAL)
    108                  __szr_primary_contact_details = wx.BoxSizer(wx.HORIZONTAL)
    109                  __szr_number_details = wx.BoxSizer(wx.HORIZONTAL)
    110                  __szr_address = wx.BoxSizer(wx.HORIZONTAL)
    111                  __szr_dob = wx.BoxSizer(wx.HORIZONTAL)
    112                  __szr_identity = wx.BoxSizer(wx.HORIZONTAL)
    113                  __fgsizer_details.Add((20, 20), 0, wx.EXPAND, 0)
    114                  __szr_identity.Add((20, 20), 1, wx.EXPAND, 0)
    115                  __lbl_identity = wx.StaticText(self, wx.ID_ANY, _("Identity"), style=wx.ALIGN_CENTRE)
    116                  __lbl_identity.SetForegroundColour(wx.Colour(95, 159, 159))
    117                  __szr_identity.Add(__lbl_identity, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    118                  __szr_identity.Add((20, 20), 1, wx.EXPAND, 0)
    119                  __fgsizer_details.Add(__szr_identity, 1, wx.EXPAND, 0)
    120                  __lbl_lastname = wx.StaticText(self, wx.ID_ANY, _("Last name"))
    121                  __lbl_lastname.SetForegroundColour(wx.Colour(255, 0, 0))
    122                  __fgsizer_details.Add(__lbl_lastname, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    123                  __fgsizer_details.Add(self._PRW_lastname, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    124                  __lbl_firstnames = wx.StaticText(self, wx.ID_ANY, _("First name(s)"))
    125                  __lbl_firstnames.SetForegroundColour(wx.Colour(255, 0, 0))
    126                  __fgsizer_details.Add(__lbl_firstnames, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    127                  __fgsizer_details.Add(self._PRW_firstnames, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    128                  __lbl_dob = wx.StaticText(self, wx.ID_ANY, _("Date of birth"))
    129                  __lbl_dob.SetForegroundColour(wx.Colour(255, 127, 0))
    130                  __fgsizer_details.Add(__lbl_dob, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    131                  __szr_dob.Add(self._PRW_dob, 1, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 3)
    132                  __szr_dob.Add(self._CHBOX_estimated_dob, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 10)
    133                  __vline_dob_sizer = wx.StaticLine(self, wx.ID_ANY, style=wx.LI_VERTICAL)
    134                  __szr_dob.Add(__vline_dob_sizer, 0, wx.RIGHT | wx.EXPAND, 3)
    135                  __lbl_tob = wx.StaticText(self, wx.ID_ANY, _("Time:"))
    136                  __szr_dob.Add(__lbl_tob, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
    137                  __szr_dob.Add(self._TCTRL_tob, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    138                  __fgsizer_details.Add(__szr_dob, 1, wx.EXPAND, 0)
    139                  __fgsizer_details.Add((20, 20), 0, wx.EXPAND, 0)
    140                  __fgsizer_details.Add(self._LBL_person_exists, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    141                  __lbl_gender = wx.StaticText(self, wx.ID_ANY, _("Gender"))
    142                  __lbl_gender.SetForegroundColour(wx.Colour(255, 0, 0))
    143                  __fgsizer_details.Add(__lbl_gender, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    144                  __fgsizer_details.Add(self._PRW_gender, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    145                  __lbl_nick_name = wx.StaticText(self, wx.ID_ANY, _("Nick name"))
    146                  __fgsizer_details.Add(__lbl_nick_name, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    147                  __fgsizer_details.Add(self._PRW_nickname, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    148                  __lbl_title = wx.StaticText(self, wx.ID_ANY, _("Title"))
    149                  __fgsizer_details.Add(__lbl_title, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    150                  __fgsizer_details.Add(self._PRW_title, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    151                  __fgsizer_details.Add((20, 20), 0, wx.EXPAND, 0)
    152                  __szr_address.Add((20, 20), 1, wx.EXPAND, 0)
    153                  __lbl_address_heading = wx.StaticText(self, wx.ID_ANY, _("Primary address and contact"), style=wx.ALIGN_CENTRE)
    154                  __lbl_address_heading.SetForegroundColour(wx.Colour(95, 159, 159))
    155                  __szr_address.Add(__lbl_address_heading, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    156                  __szr_address.Add((20, 20), 1, wx.EXPAND, 0)
    157                  __fgsizer_details.Add(__szr_address, 1, wx.EXPAND, 0)
    158                  __lbl_address = wx.StaticText(self, wx.ID_ANY, _("Search existing"))
    159                  __fgsizer_details.Add(__lbl_address, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    160                  __fgsizer_details.Add(self._PRW_address_searcher, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    161                  __lbl_zip = wx.StaticText(self, wx.ID_ANY, _("Postal code"))
    162                  __lbl_zip.SetForegroundColour(wx.Colour(255, 127, 0))
    163                  __fgsizer_details.Add(__lbl_zip, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    164                  __fgsizer_details.Add(self._PRW_zip, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    165                  __lbl_street = wx.StaticText(self, wx.ID_ANY, _("Street"))
    166                  __lbl_street.SetForegroundColour(wx.Colour(255, 127, 0))
    167                  __fgsizer_details.Add(__lbl_street, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    168                  __fgsizer_details.Add(self._PRW_street, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    169                  __lbl_number = wx.StaticText(self, wx.ID_ANY, _("Number"))
    170                  __lbl_number.SetForegroundColour(wx.Colour(255, 127, 0))
    171                  __fgsizer_details.Add(__lbl_number, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    172                  __szr_number_details.Add(self._TCTRL_number, 1, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
    173                  __lbl_unit = wx.StaticText(self, wx.ID_ANY, _("Unit:"))
    174                  __szr_number_details.Add(__lbl_unit, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
    175                  __szr_number_details.Add(self._TCTRL_unit, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    176                  __fgsizer_details.Add(__szr_number_details, 1, wx.EXPAND, 0)
    177                  __lbl_urb = wx.StaticText(self, wx.ID_ANY, _("Community"))
    178                  __lbl_urb.SetForegroundColour(wx.Colour(255, 127, 0))
    179                  __fgsizer_details.Add(__lbl_urb, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    180                  __fgsizer_details.Add(self._PRW_urb, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    181                  __lbl_region = wx.StaticText(self, wx.ID_ANY, _("Region"))
    182                  __lbl_region.SetForegroundColour(wx.Colour(255, 127, 0))
    183                  __fgsizer_details.Add(__lbl_region, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    184                  __fgsizer_details.Add(self._PRW_region, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    185                  __lbl_zip_copy = wx.StaticText(self, wx.ID_ANY, _("Country"))
    186                  __lbl_zip_copy.SetForegroundColour(wx.Colour(255, 127, 0))
    187                  __fgsizer_details.Add(__lbl_zip_copy, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    188                  __fgsizer_details.Add(self._PRW_country, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    189                  __lbl_address_type = wx.StaticText(self, wx.ID_ANY, _("Type"))
    190                  __lbl_address_type.SetForegroundColour(wx.Colour(255, 127, 0))
    191                  __fgsizer_details.Add(__lbl_address_type, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    192                  __fgsizer_details.Add(self._PRW_type, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    193                  __lbl_primary_contact = wx.StaticText(self, wx.ID_ANY, _("Contact"))
    194                  __fgsizer_details.Add(__lbl_primary_contact, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    195                  __szr_primary_contact_details.Add(self._PRW_channel_type, 1, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
    196                  __szr_primary_contact_details.Add(self._TCTRL_phone, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    197                  __fgsizer_details.Add(__szr_primary_contact_details, 1, wx.EXPAND, 0)
    198                  __fgsizer_details.Add((20, 20), 0, wx.EXPAND, 0)
    199                  __szr_other.Add((20, 20), 1, wx.EXPAND, 0)
    200                  __lbl_other = wx.StaticText(self, wx.ID_ANY, _("Other"), style=wx.ALIGN_CENTRE)
    201                  __lbl_other.SetForegroundColour(wx.Colour(95, 159, 159))
    202                  __szr_other.Add(__lbl_other, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    203                  __szr_other.Add((20, 20), 1, wx.EXPAND, 0)
    204                  __fgsizer_details.Add(__szr_other, 1, wx.EXPAND, 0)
    205                  __lbl_primary_provider = wx.StaticText(self, wx.ID_ANY, _("In-praxis primary"))
    206                  __fgsizer_details.Add(__lbl_primary_provider, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    207                  __fgsizer_details.Add(self._PRW_primary_provider, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    208                  __lbl_ext_id = wx.StaticText(self, wx.ID_ANY, _("External ID"))
    209                  __fgsizer_details.Add(__lbl_ext_id, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    210                  __szr_external_id_details.Add(self._PRW_external_id_type, 2, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
    211                  __szr_external_id_details.Add(self._TCTRL_external_id_value, 2, wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 5)
    212                  __szr_external_id_details.Add(self._LBL_id_exists, 1, wx.ALIGN_CENTER_VERTICAL, 0)
    213                  __fgsizer_details.Add(__szr_external_id_details, 1, wx.EXPAND, 0)
    214                  __lbl_occupation = wx.StaticText(self, wx.ID_ANY, _("Occupation"))
    215                  __fgsizer_details.Add(__lbl_occupation, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    216                  __fgsizer_details.Add(self._PRW_occupation, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    217                  __lbl_comment = wx.StaticText(self, wx.ID_ANY, _("Comment"))
    218                  __fgsizer_details.Add(__lbl_comment, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    219                  __fgsizer_details.Add(self._TCTRL_comment, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
    220                  __fgsizer_details.AddGrowableCol(1)
    221                  __szr_main.Add(__fgsizer_details, 1, wx.EXPAND, 0)
    222                  __HLINE_bottom = wx.StaticLine(self, wx.ID_ANY)
    223                  __szr_main.Add(__HLINE_bottom, 0, wx.LEFT | wx.RIGHT | wx.TOP | wx.EXPAND, 3)
    224                  self.SetSizer(__szr_main)
    225                  __szr_main.Fit(self)
    226                  # end wxGlade
    227
    228  # end of class wxgNewPatientEAPnl
    229