emvecchi commited on
Commit
8db4ccb
·
verified ·
1 Parent(s): 0200bc4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -4
app.py CHANGED
@@ -63,6 +63,14 @@ function_choices = ['Broadening Discussion',
63
  'Social Functions',
64
  'None',
65
  'Other']
 
 
 
 
 
 
 
 
66
 
67
  default_choices = function_choices
68
 
@@ -116,13 +124,13 @@ fields: List[Field] = [
116
  Field(name="to_moderate", type="y_n_radio",
117
  title="Explicit mention of clinical diagnosis?", mandatory=True),
118
  Field(name="priority_level", type="likert_radio",
119
- title="Emotional State", other_params={'labels': priority_labels}, mandatory=True),
120
  ]),
121
 
122
  Field(type="container", title="**Rupture-Specific Properties**", children=[
123
  Field(name="mod_function", type="multiselect",
124
  title="What type of rupture markers are found? *(Multiple selection possible)*",
125
- mandatory=False, following_mandatory_values=['Other (please specify)']),
126
  Field(name="mod_function_other", type="text", title="*If Other, please specify:*", mandatory=False),
127
  Field(name="rupture_line", type="text", title="What lines demonstrate the rupture markers you notice?", mandatory=False),
128
  ]),
@@ -617,10 +625,10 @@ elif st.session_state.current_index < len(st.session_state.data):
617
  elif st.session_state.current_index == len(st.session_state.data):
618
  st.write(f"**Thank you for taking part in this study!** \n ")
619
  if st.button("Previous"):
620
- navigate(-1)
621
 
622
  # Navigation buttons
623
- if -4 < st.session_state.current_index < len(st.session_state.data):
624
  if st.button("Previous"):
625
  navigate(-1)
626
 
 
63
  'Social Functions',
64
  'None',
65
  'Other']
66
+
67
+ rupture_choices = ['Shutting down',
68
+ 'Avoiding',
69
+ 'Masking aspects of one's experience',
70
+ 'Complaining/critisizing',
71
+ 'Pushing back',
72
+ 'Controlling/pressuring',
73
+ 'Other']
74
 
75
  default_choices = function_choices
76
 
 
124
  Field(name="to_moderate", type="y_n_radio",
125
  title="Explicit mention of clinical diagnosis?", mandatory=True),
126
  Field(name="priority_level", type="likert_radio",
127
+ title="Level of priority", other_params={'labels': priority_labels}, mandatory=True),
128
  ]),
129
 
130
  Field(type="container", title="**Rupture-Specific Properties**", children=[
131
  Field(name="mod_function", type="multiselect",
132
  title="What type of rupture markers are found? *(Multiple selection possible)*",
133
+ other_params={'choices': rupture_choices}, mandatory=False, following_mandatory_values=['Other (please specify)']),
134
  Field(name="mod_function_other", type="text", title="*If Other, please specify:*", mandatory=False),
135
  Field(name="rupture_line", type="text", title="What lines demonstrate the rupture markers you notice?", mandatory=False),
136
  ]),
 
625
  elif st.session_state.current_index == len(st.session_state.data):
626
  st.write(f"**Thank you for taking part in this study!** \n ")
627
  if st.button("Previous"):
628
+ navigate(-2)
629
 
630
  # Navigation buttons
631
+ if -2 < st.session_state.current_index < len(st.session_state.data):
632
  if st.button("Previous"):
633
  navigate(-1)
634