Gnumed.wxGladeWidgets.wxgNewPatientEAPnl

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

# Source Code for Module Gnumed.wxGladeWidgets.wxgNewPatientEAPnl

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