from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range, ) author = 'Your name here' doc = """ Your app description """ class Constants(BaseConstants): name_in_url = 'online_questionnaire' players_per_group = None num_rounds = 1 initial_earning = 40 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): risk = models.IntegerField( label='', widget=widgets.Slider(attrs={'step': '1.00', 'min':'0','max':'10'}) ) loss_aversion = models.IntegerField( label='', widget=widgets.Slider(attrs={'step': '1.00', 'min': '0', 'max': '10'}) ) altruism = models.IntegerField( label='', widget=widgets.Slider(attrs={'step': '1.00', 'min': '0', 'max': '10'}) ) gender = models.IntegerField( label='Please choose your gender', choices=[(0,'Male'), (1,'Female')], widget=widgets.RadioSelectHorizontal ) age = models.IntegerField( label='How old are you?', min=18 ) ethnicity = models.IntegerField( label='What is your ethnicity?', choices=[(1,'American Indian or Native Alaskan'), (2, 'Black or African American'), (3, 'East Asian (Chinese, Korean, etc)'), (4, 'Hispanic or Latino'), (5, 'Middle Eastern'), (6, 'Pacificer Islander or Hawaiian'), (7, 'South Asian (India, Pakistan, etc)'), (8, 'White'), (9, 'Other') ] ) # specialty = models.IntegerField( # label = 'What is your medical specialty?', # choices = [ # (1, 'Aesthetic Medicine'), # (2, 'Allergy and Immunology'), # (3, 'Anesthesiology'), # (4, 'Family practice/ General practice'), # (5, 'General surgery'), # (6, 'Hematology/ Oncology'), # (7, 'Internal medicine'), # (8, 'Neonatology'), # (9, 'Neurology/ Neurosurgery'), # (10, 'Obstetrics/ Gynecology'), # (11, 'Otorhinolaryngology'), # (12, 'Opthalmology'), # (13, 'Orthopedic/ Surgery'), # (14, ''), # (15, ), # (16, ), # (17, ), # (18, ), # (19, ), # # # ] # ) experience = models.IntegerField( label = 'How many years have you been practicing medicine (post-internship)?', choices = [ (1, '<5'), (2, '5-9'), (3, '10-14'), (4, '15-19'), (5, '20 or more') ], widget=widgets.RadioSelect ) practice = models.IntegerField( label = 'Is your practice:', choices = [ (1, 'Hospital based'), (2, 'Individual based'), (3, 'Small group practice (5 or fewer physicians)'), (4, 'Large group practice (6 or more physicians)'), (5, 'Other') ], widget=widgets.RadioSelect ) exit_detail = models.StringField()