def configure_fallback_primary_provider(parent=None): if parent is None: parent = wx.GetApp().GetTopWindow() staff = gmStaff.get_staff_list() choices = [[ s[u'short_alias'], u'%s%s %s' % (gmTools.coalesce( s['title'], u'', u'%s '), s['firstnames'], s['lastnames']), s['l10n_role'], gmTools.coalesce(s['comment'], u'') ] for s in staff if s['is_active'] is True] data = [s['pk_staff'] for s in staff if s['is_active'] is True] gmCfgWidgets.configure_string_from_list_option( parent=parent, message=_('\n' 'Please select the provider to fall back to in case\n' 'no primary provider is configured for a patient.\n'), option='patient.fallback_primary_provider', bias='user', default_value=None, choices=choices, columns=[_('Alias'), _('Provider'), _('Role'), _('Comment')], data=data, caption=_('Configuring fallback primary provider'))
def configure_default_country(parent=None): if parent is None: parent = wx.GetApp().GetTopWindow() countries = gmDemographicRecord.get_countries() gmCfgWidgets.configure_string_from_list_option( parent=parent, message=_('Select the default country for new persons.\n'), option='person.create.default_country', bias='user', choices=[(c['l10n_country'], c['code']) for c in countries], columns=[_('Country'), _('Code')], data=[c['code'] for c in countries])
def configure_default_country(parent=None): if parent is None: parent = wx.GetApp().GetTopWindow() countries = gmDemographicRecord.get_countries() gmCfgWidgets.configure_string_from_list_option ( parent = parent, message = _('Select the default country for new persons.\n'), option = 'person.create.default_country', bias = 'user', choices = [ (c['l10n_country'], c['code']) for c in countries ], columns = [_('Country'), _('Code')], data = [ c['code'] for c in countries ] )
def configure_default_region(parent=None): if parent is None: parent = wx.GetApp().GetTopWindow() regs = gmDemographicRecord.get_regions() gmCfgWidgets.configure_string_from_list_option ( parent = parent, message = _('Select the default region (state/province/county/territory/arrondissement/prefecture/department/kanton/...) for new persons.\n'), option = 'person.create.default_region', bias = 'user', choices = [ (r['l10n_country'], r['l10n_region'], r['code_region']) for r in regs ], columns = [_('Country'), _('Region'), _('Code')], data = [ r['region'] for r in regs ] )
def configure_default_region(parent=None): if parent is None: parent = wx.GetApp().GetTopWindow() regs = gmDemographicRecord.get_regions() gmCfgWidgets.configure_string_from_list_option ( parent = parent, message = _('Select the default region (state/province/county/territory/arrondissement/prefecture/department/kanton/...) for new persons.\n'), option = 'person.create.default_region', bias = 'user', choices = [ (r['l10n_country'], r['l10n_region'], r['code_region']) for r in regs ], columns = [_('Country'), _('Region'), _('Code')], data = [ r['region'] for r in regs ] )
def configure_fallback_primary_provider(parent=None): if parent is None: parent = wx.GetApp().GetTopWindow() staff = gmStaff.get_staff_list() choices = [ [ s[u'short_alias'], u'%s%s %s' % ( gmTools.coalesce(s['title'], u'', u'%s '), s['firstnames'], s['lastnames'] ), s['l10n_role'], gmTools.coalesce(s['comment'], u'') ] for s in staff if s['is_active'] is True ] data = [ s['pk_staff'] for s in staff if s['is_active'] is True ] gmCfgWidgets.configure_string_from_list_option ( parent = parent, message = _( '\n' 'Please select the provider to fall back to in case\n' 'no primary provider is configured for a patient.\n' ), option = 'patient.fallback_primary_provider', bias = 'user', default_value = None, choices = choices, columns = [_('Alias'), _('Provider'), _('Role'), _('Comment')], data = data, caption = _('Configuring fallback primary provider') )