-
Notifications
You must be signed in to change notification settings - Fork 0
/
free-cog-bc.sh
188 lines (187 loc) · 4.98 KB
/
free-cog-bc.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
#/!/bin/bash
echo "This is Free-Cog Cognitive Examination"
echo "======================================"
echo "Can you tell me anything that's in the news recently? [0-1]"
while :; do
read C01
if [[ -z $C01 ]]; then
echo "Entry cannot be empty"
elif [[ $C01 -ge 0 && $C01 -le 1 ]]; then
break
else
echo "Value is out of range. Please, enter a valid number"
fi
done
echo "What day of the week is it today; what month, year? [0-3]"
while :; do
read C02
if [[ -z $C02 ]]; then
echo "Entry cannot be empty"
elif [[ $C02 -ge 0 && $C02 -le 3 ]]; then
break
else
echo "Value is out of range. Please, enter a valid number"
fi
done
echo "Where are we? [0-3]"
while :; do
read C03
if [[ -z $C03 ]]; then
echo "Entry cannot be empty"
elif [[ $C03 -ge 0 && $C03 -le 3 ]]; then
break
else
echo "Value is out of range. Please, enter a valid number"
fi
done
echo "Repeat 5 words (watch, car, scarf, pen, house) (no score) [0]"
echo " "
echo "Take 6 away from 70 and keep subtracting until I say stop [0-3]"
while :; do
read C04
if [[ -z $C04 ]]; then
echo "Entry cannot be empty"
elif [[ $C04 -ge 0 && $C04 -le 3 ]]; then
break
else
echo "Value is out of range. Please, enter a valid number"
fi
done
echo "Spell 'plate' backwards [0-2]"
while :; do
read C05
if [[ -z $C05 ]]; then
echo "Entry cannot be empty"
elif [[ $C05 -ge 0 && $C05 -le 2 ]]; then
break
else
echo "Value is out of range. Please, enter a valid number"
fi
done
echo "Repeat 5 words [0-5]"
while :; do
read C06
if [[ -z $C06 ]]; then
echo "Entry cannot be empty"
elif [[ $C06 -ge 0 && $C06 -le 5 ]]; then
break
else
echo "Value is out of range. Please, enter a valid number"
fi
done
echo "In this circle draw a clock face with numbers and with hands set to ten past eleven [0-3]"
while :; do
read C07
if [[ -z $C07 ]]; then
echo "Entry cannot be empty"
elif [[ $C07 -ge 0 && $C07 -le 3 ]]; then
break
else
echo "Value is out of range. Please, enter a valid number"
fi
done
echo "Name (ear and fingernail) [0-2]"
while :; do
read C08
if [[ -z $C08 ]]; then
echo "Entry cannot be empty"
elif [[ $C08 -ge 0 && $C08 -le 2 ]]; then
break
else
echo "Value is out of range. Please, enter a valid number"
fi
done
echo "Name as many different animals as you can in 1 minute [0-1]"
while :; do
read C09
if [[ -z $C09 ]]; then
echo "Entry cannot be empty"
elif [[ $C09 -ge 0 && $C09 -le 1 ]]; then
break
else
echo "Value is out of range. Please, enter a valid number"
fi
done
echo "Repeat this sentence 'Don't beat about the bush' [0-1]"
while :; do
read C10
if [[ -z $C10 ]]; then
echo "Entry cannot be empty"
elif [[ $C10 -ge 0 && $C10 -le 1 ]]; then
break
else
echo "Value is out of range. Please, enter a valid number"
fi
done
echo "Write a sentence [0-1]"
while :; do
read C11
if [[ -z $C11 ]]; then
echo "Entry cannot be empty"
elif [[ $C11 -ge 0 && $C11 -le 1 ]]; then
break
else
echo "Value is out of range. Please, enter a valid number"
fi
done
echo "You have bought a birthday card and want to send it by post - tell me how you would do it? [0-1]"
while :; do
read E01
if [[ -z $E01 ]]; then
echo "Entry cannot be empty"
elif [[ $E01 -ge 0 && $E01 -le 1 ]]; then
break
else
echo "Value is out of range. Please, enter a valid number"
fi
done
echo "If you were going to take a bus (or train) what yould you need? [0-1]"
while :; do
read E02
if [[ -z $E02 ]]; then
echo "Entry cannot be empty"
elif [[ $E02 -ge 0 && $E02 -le 1 ]]; then
break
else
echo "Value is out of range. Please, enter a valid number"
fi
done
echo "Could you tell me how you would make a cup of tea or coffee for yourself? [0-1]"
while :; do
read E03
if [[ -z $E03 ]]; then
echo "Entry cannot be empty"
elif [[ $E03 -ge 0 && $E03 -le 1 ]]; then
break
else
echo "Value is out of range. Please, enter a valid number"
fi
done
echo "If you discovered a fire at home, what would you do? [0-1]"
while :; do
read E04
if [[ -z $E04 ]]; then
echo "Entry cannot be empty"
elif [[ $E04 -ge 0 && $E04 -le 1 ]]; then
break
else
echo "Value is out of range. Please, enter a valid number"
fi
done
echo "Could tell me the steps you took in order to get dressed as you are today? [0-1]"
while :; do
read E05
if [[ -z $E05 ]]; then
echo "Entry cannot be empty"
elif [[ $E05 -ge 0 && $E05 -le 1 ]]; then
break
else
echo "Value is out of range. Please, enter a valid number"
fi
done
freecog=$(echo $C01 + $C02 + $C03 + $C04 + $C05 + $C06 + $C07 + $C08 + $C09 + $C10 + $C11 + $E01 + $E02 + $E03 + $E04 + $E05 | bc)
echo "The Total Free-Cog Score is" $freecog "/30"
cognitive=$(echo $C01 + $C02 + $C03 + $C04 + $C05 + $C06 + $C07 + $C08 + $C09 + $C10 + $C11 | bc)
echo "The Cognitive subscore is" $cognitive "/25"
executive=$(echo $E01 + $E02 + $E03 + $E04 + $E05 | bc)
echo "The Executive function subscore is" $executive "/5"