Coverage for tasks/deakin_s1_healthreview.py: 93%

1"""

2 camcops_server/tasks/deakin_s1_healthreview.py

3

4===============================================================================

5

6 Copyright (C) 2012, University of Cambridge, Department of Psychiatry.

7 Created by Rudolf Cardinal (rnc1001@cam.ac.uk).

8

9 This file is part of CamCOPS.

10

11 CamCOPS is free software: you can redistribute it and/or modify

12 it under the terms of the GNU General Public License as published by

13 the Free Software Foundation, either version 3 of the License, or

14 (at your option) any later version.

15

16 CamCOPS is distributed in the hope that it will be useful,

17 but WITHOUT ANY WARRANTY; without even the implied warranty of

18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

19 GNU General Public License for more details.

20

21 You should have received a copy of the GNU General Public License

22 along with CamCOPS. If not, see <https://www.gnu.org/licenses/>.

23

24===============================================================================

25

26"""

27

28 from typing import Optional

29

30 from sqlalchemy.orm import Mapped, mapped_column

31 from sqlalchemy.sql.sqltypes import String, Text, UnicodeText

32

33 from camcops_server.cc_modules.cc_constants import CssClass

34 from camcops_server.cc_modules.cc_html import tr_qa

35 from camcops_server.cc_modules.cc_request import CamcopsRequest

36 from camcops_server.cc_modules.cc_sqla_coltypes import (

37 mapped_bool_column,

38 mapped_camcops_column,

39 MIN_ZERO_CHECKER,

40 PermittedValueChecker,

41 ZERO_TO_FOUR_CHECKER,

42)

43 from camcops_server.cc_modules.cc_task import Task, TaskHasPatientMixin

44

45

46# =============================================================================

47# DeakinS1HealthReview

48# =============================================================================

49

50 FREQUENCY_COMMENT = (

51 "Frequency (0 did not use, 1 occasionally, 2 monthly, 3 weekly, 4 daily)"

52)

53

54

55 class DeakinS1HealthReview(TaskHasPatientMixin, Task): # type: ignore[misc]

56 """

57 Server implementation of the DeakinS1HealthReview task.

58 """

59

60 __tablename__ = "deakin_1_healthreview" # historically fixed

61 shortname = "Deakin_S1_HealthReview"

62 info_filename_stem = "deakin_s1_healthreview"

63

64 ethnicity: Mapped[Optional[int]] = mapped_camcops_column(

65 permitted_value_checker=PermittedValueChecker(minimum=1, maximum=16),

66 comment="Ethnicity code, per GMC Patient Questionnaire (1-16)",

67 )

68 ethnicity_text: Mapped[Optional[str]] = mapped_camcops_column(

69 UnicodeText,

70 exempt_from_anonymisation=True,

71 comment="Ethnicity, description",

72 ) # Seems to be unused by the client!

73 ethnicity_other_details: Mapped[Optional[str]] = mapped_column(

74 UnicodeText,

75 comment="Ethnicity, other, details",

76 )

77

78 handedness: Mapped[Optional[str]] = mapped_camcops_column(

79 String(length=1), # was Text

80 permitted_value_checker=PermittedValueChecker(

81 permitted_values=["L", "R"]

82 ),

83 comment="Handedness (L, R)",

84 )

85 education: Mapped[Optional[str]] = mapped_camcops_column(

86 Text, exempt_from_anonymisation=True

87 )

88

89 allergies: Mapped[Optional[bool]] = mapped_bool_column("allergies")

90 allergy_asthma: Mapped[Optional[bool]] = mapped_bool_column(

91 "allergy_asthma"

92 )

93 allergy_pollen_dust: Mapped[Optional[bool]] = mapped_bool_column(

94 "allergy_pollen_dust"

95 )

96 allergy_dermatitis: Mapped[Optional[bool]] = mapped_bool_column(

97 "allergy_dermatitis"

98 )

99 allergy_food: Mapped[Optional[bool]] = mapped_bool_column("allergy_food")

100 allergy_dander: Mapped[Optional[bool]] = mapped_bool_column(

101 "allergy_dander"

102 )

103 allergy_other: Mapped[Optional[bool]] = mapped_bool_column("allergy_other")

104 allergy_details: Mapped[Optional[str]] = mapped_column(Text)

105

106 vaccinations_last3months: Mapped[Optional[bool]] = mapped_bool_column(

107 "vaccinations_last3months"

108 )

109 vaccination_details: Mapped[Optional[str]] = mapped_column(Text)

110

111 infections_last3months: Mapped[Optional[bool]] = mapped_bool_column(

112 "infections_last3months"

113 )

114 infection_recent_respiratory: Mapped[Optional[bool]] = mapped_bool_column(

115 "infection_recent_respiratory"

116 )

117 infection_recent_gastroenteritis: Mapped[Optional[bool]] = (

118 mapped_bool_column(

119 "infection_recent_gastroenteritis",

120 constraint_name="ck_deakin_1_healthreview_inf_recent_gastro",

121 )

122 )

123 infection_recent_urinary: Mapped[Optional[bool]] = mapped_bool_column(

124 "infection_recent_urinary"

125 )

126 infection_recent_sexual: Mapped[Optional[bool]] = mapped_bool_column(

127 "infection_recent_sexual"

128 )

129 infection_recent_hepatitis: Mapped[Optional[bool]] = mapped_bool_column(

130 "infection_recent_hepatitis"

131 )

132 infection_recent_other: Mapped[Optional[bool]] = mapped_bool_column(

133 "infection_recent_other"

134 )

135 infection_recent_details: Mapped[Optional[str]] = mapped_column(Text)

136

137 infections_chronic: Mapped[Optional[bool]] = mapped_bool_column(

138 "infections_chronic"

139 )

140 infection_chronic_respiratory: Mapped[Optional[bool]] = mapped_bool_column(

141 "infection_chronic_respiratory"

142 )

143 infection_chronic_gastroenteritis: Mapped[Optional[bool]] = (

144 mapped_bool_column(

145 "infection_chronic_gastroenteritis",

146 constraint_name="ck_deakin_1_healthreview_inf_chronic_gastro",

147 )

148 )

149 infection_chronic_urinary: Mapped[Optional[bool]] = mapped_bool_column(

150 "infection_chronic_urinary"

151 )

152 infection_chronic_sexual: Mapped[Optional[bool]] = mapped_bool_column(

153 "infection_chronic_sexual"

154 )

155 infection_chronic_hepatitis: Mapped[Optional[bool]] = mapped_bool_column(

156 "infection_chronic_hepatitis"

157 )

158 infection_chronic_other: Mapped[Optional[bool]] = mapped_bool_column(

159 "infection_chronic_other"

160 )

161 infection_chronic_details: Mapped[Optional[str]] = mapped_column(Text)

162

163 immune_disorders: Mapped[Optional[bool]] = mapped_bool_column(

164 "immune_disorders"

165 )

166 immunity_ms: Mapped[Optional[bool]] = mapped_bool_column("immunity_ms")

167 immunity_sle: Mapped[Optional[bool]] = mapped_bool_column("immunity_sle")

168 immunity_arthritis: Mapped[Optional[bool]] = mapped_bool_column(

169 "immunity_arthritis"

170 )

171 immunity_hiv: Mapped[Optional[bool]] = mapped_bool_column("immunity_hiv")

172 immunity_graves: Mapped[Optional[bool]] = mapped_bool_column(

173 "immunity_graves"

174 )

175 immunity_diabetes: Mapped[Optional[bool]] = mapped_bool_column(

176 "immunity_diabetes"

177 )

178 immunity_other: Mapped[Optional[bool]] = mapped_bool_column(

179 "immunity_other"

180 )

181 immunity_details: Mapped[Optional[str]] = mapped_column(Text)

182

183 family_history: Mapped[Optional[bool]] = mapped_bool_column(

184 "family_history"

185 )

186 familyhistory_ms: Mapped[Optional[bool]] = mapped_bool_column(

187 "familyhistory_ms"

188 )

189 familyhistory_sle: Mapped[Optional[bool]] = mapped_bool_column(

190 "familyhistory_sle"

191 )

192 familyhistory_arthritis: Mapped[Optional[bool]] = mapped_bool_column(

193 "familyhistory_arthritis"

194 )

195 familyhistory_graves: Mapped[Optional[bool]] = mapped_bool_column(

196 "familyhistory_graves"

197 )

198 familyhistory_diabetes: Mapped[Optional[bool]] = mapped_bool_column(

199 "familyhistory_diabetes"

200 )

201 familyhistory_psychosis_sz: Mapped[Optional[bool]] = mapped_bool_column(

202 "familyhistory_psychosis_sz"

203 )

204 familyhistory_bipolar: Mapped[Optional[bool]] = mapped_bool_column(

205 "familyhistory_bipolar"

206 )

207 familyhistory_details: Mapped[Optional[str]] = mapped_column(Text)

208

209 health_anything_else: Mapped[Optional[bool]] = mapped_bool_column(

210 "health_anything_else"

211 )

212 health_anything_else_details: Mapped[Optional[str]] = mapped_column(

213 UnicodeText

214 )

215

216 drug_history: Mapped[Optional[str]] = mapped_column(UnicodeText)

217 first_antipsychotic_medication: Mapped[Optional[str]] = mapped_column(

218 UnicodeText

219 )

220

221 recreational_drug_in_last_3_months: Mapped[Optional[bool]] = (

222 mapped_bool_column(

223 "recreational_drug_in_last_3_months",

224 constraint_name="ck_deakin_1_healthreview_recdruglast3mo",

225 )

226 )

227

228 recdrug_tobacco_frequency: Mapped[Optional[int]] = mapped_camcops_column(

229 permitted_value_checker=ZERO_TO_FOUR_CHECKER,

230 comment=FREQUENCY_COMMENT,

231 )

232 recdrug_tobacco_cigsperweek: Mapped[Optional[int]] = mapped_camcops_column(

233 permitted_value_checker=MIN_ZERO_CHECKER,

234 comment="Tobacco: cigarettes per week",

235 )

236 recdrug_tobacco_prevheavy: Mapped[Optional[bool]] = mapped_bool_column(

237 "recdrug_tobacco_prevheavy"

238 )

239

240 recdrug_cannabis_frequency: Mapped[Optional[int]] = mapped_camcops_column(

241 permitted_value_checker=ZERO_TO_FOUR_CHECKER,

242 comment=FREQUENCY_COMMENT,

243 )

244 recdrug_cannabis_jointsperweek: Mapped[Optional[int]] = (

245 mapped_camcops_column(

246 permitted_value_checker=MIN_ZERO_CHECKER,

247 comment="Cannabis: joints per week",

248 )

249 )

250 recdrug_cannabis_prevheavy: Mapped[Optional[bool]] = mapped_bool_column(

251 "recdrug_cannabis_prevheavy"

252 )

253

254 recdrug_alcohol_frequency: Mapped[Optional[int]] = mapped_camcops_column(

255 permitted_value_checker=ZERO_TO_FOUR_CHECKER,

256 comment=FREQUENCY_COMMENT,

257 )

258 recdrug_alcohol_unitsperweek: Mapped[Optional[int]] = (

259 mapped_camcops_column(

260 permitted_value_checker=MIN_ZERO_CHECKER,

261 comment="Alcohol: units per week",

262 )

263 )

264 recdrug_alcohol_prevheavy: Mapped[Optional[bool]] = mapped_bool_column(

265 "recdrug_alcohol_prevheavy"

266 )

267

268 recdrug_mdma_frequency: Mapped[Optional[int]] = mapped_camcops_column(

269 permitted_value_checker=ZERO_TO_FOUR_CHECKER,

270 comment=FREQUENCY_COMMENT,

271 )

272 recdrug_mdma_prevheavy: Mapped[Optional[bool]] = mapped_bool_column(

273 "recdrug_mdma_prevheavy"

274 )

275

276 recdrug_cocaine_frequency: Mapped[Optional[int]] = mapped_camcops_column(

277 permitted_value_checker=ZERO_TO_FOUR_CHECKER,

278 comment=FREQUENCY_COMMENT,

279 )

280 recdrug_cocaine_prevheavy: Mapped[Optional[bool]] = mapped_bool_column(

281 "recdrug_cocaine_prevheavy"

282 )

283

284 recdrug_crack_frequency: Mapped[Optional[int]] = mapped_camcops_column(

285 permitted_value_checker=ZERO_TO_FOUR_CHECKER,

286 comment=FREQUENCY_COMMENT,

287 )

288 recdrug_crack_prevheavy: Mapped[Optional[bool]] = mapped_bool_column(

289 "recdrug_crack_prevheavy"

290 )

291

292 recdrug_heroin_frequency: Mapped[Optional[int]] = mapped_camcops_column(

293 permitted_value_checker=ZERO_TO_FOUR_CHECKER,

294 comment=FREQUENCY_COMMENT,

295 )

296 recdrug_heroin_prevheavy: Mapped[Optional[bool]] = mapped_bool_column(

297 "recdrug_heroin_prevheavy"

298 )

299

300 recdrug_methadone_frequency: Mapped[Optional[int]] = mapped_camcops_column(

301 permitted_value_checker=ZERO_TO_FOUR_CHECKER,

302 comment=FREQUENCY_COMMENT,

303 )

304 recdrug_methadone_prevheavy: Mapped[Optional[bool]] = mapped_bool_column(

305 "recdrug_methadone_prevheavy"

306 )

307

308 recdrug_amphetamines_frequency: Mapped[Optional[int]] = (

309 mapped_camcops_column(

310 permitted_value_checker=ZERO_TO_FOUR_CHECKER,

311 comment=FREQUENCY_COMMENT,

312 )

313 )

314 recdrug_amphetamines_prevheavy: Mapped[Optional[bool]] = (

315 mapped_bool_column(

316 "recdrug_amphetamines_prevheavy",

317 constraint_name="ck_deakin_1_healthreview_amphetprevheavy",

318 )

319 )

320

321 recdrug_benzodiazepines_frequency: Mapped[Optional[int]] = (

322 mapped_camcops_column(

323 permitted_value_checker=ZERO_TO_FOUR_CHECKER,

324 comment=FREQUENCY_COMMENT,

325 )

326 )

327 recdrug_benzodiazepines_prevheavy: Mapped[Optional[bool]] = (

328 mapped_bool_column(

329 "recdrug_benzodiazepines_prevheavy",

330 constraint_name="ck_deakin_1_healthreview_benzoprevheavy",

331 )

332 )

333

334 recdrug_ketamine_frequency: Mapped[Optional[int]] = mapped_camcops_column(

335 permitted_value_checker=ZERO_TO_FOUR_CHECKER,

336 comment=FREQUENCY_COMMENT,

337 )

338 recdrug_ketamine_prevheavy: Mapped[Optional[bool]] = mapped_bool_column(

339 "recdrug_ketamine_prevheavy"

340 )

341

342 recdrug_legalhighs_frequency: Mapped[Optional[int]] = (

343 mapped_camcops_column(

344 permitted_value_checker=ZERO_TO_FOUR_CHECKER,

345 comment=FREQUENCY_COMMENT,

346 )

347 )

348 recdrug_legalhighs_prevheavy: Mapped[Optional[bool]] = mapped_bool_column(

349 "recdrug_legalhighs_prevheavy"

350 )

351

352 recdrug_inhalants_frequency: Mapped[Optional[int]] = mapped_camcops_column(

353 permitted_value_checker=ZERO_TO_FOUR_CHECKER,

354 comment=FREQUENCY_COMMENT,

355 )

356 recdrug_inhalants_prevheavy: Mapped[Optional[bool]] = mapped_bool_column(

357 "recdrug_inhalants_prevheavy"

358 )

359

360 recdrug_hallucinogens_frequency: Mapped[Optional[int]] = (

361 mapped_camcops_column(

362 permitted_value_checker=ZERO_TO_FOUR_CHECKER,

363 comment=FREQUENCY_COMMENT,

364 )

365 )

366 recdrug_hallucinogens_prevheavy: Mapped[Optional[bool]] = (

367 mapped_bool_column(

368 "recdrug_hallucinogens_prevheavy",

369 constraint_name="ck_deakin_1_healthreview_hallucinogenprevheavy",

370 )

371 )

372

373 recdrug_details: Mapped[Optional[str]] = mapped_column(UnicodeText)

374

375 recdrug_prevheavy: Mapped[Optional[bool]] = mapped_bool_column(

376 "recdrug_prevheavy"

377 )

378 recdrug_prevheavy_details: Mapped[Optional[str]] = mapped_column(

379 UnicodeText

380 )

381

382 mri_claustrophobic: Mapped[Optional[bool]] = mapped_bool_column(

383 "mri_claustrophobic"

384 )

385 mri_difficulty_lying_1_hour: Mapped[Optional[bool]] = mapped_bool_column(

386 "mri_difficulty_lying_1_hour"

387 )

388 mri_nonremovable_metal: Mapped[Optional[bool]] = mapped_bool_column(

389 "mri_nonremovable_metal"

390 )

391 mri_metal_from_operations: Mapped[Optional[bool]] = mapped_bool_column(

392 "mri_metal_from_operations"

393 )

394 mri_tattoos_nicotine_patches: Mapped[Optional[bool]] = mapped_bool_column(

395 "mri_tattoos_nicotine_patches"

396 )

397 mri_worked_with_metal: Mapped[Optional[bool]] = mapped_bool_column(

398 "mri_worked_with_metal"

399 )

400 mri_previous_brain_scan: Mapped[Optional[bool]] = mapped_bool_column(

401 "mri_previous_brain_scan"

402 )

403 mri_previous_brain_scan_details: Mapped[Optional[str]] = mapped_column(

404 UnicodeText

405 )

406 other_relevant_things: Mapped[Optional[bool]] = mapped_bool_column(

407 "other_relevant_things"

408 )

409 other_relevant_things_details: Mapped[Optional[str]] = mapped_column(

410 UnicodeText

411 )

412

413 willing_to_participate_in_further_studies: Mapped[Optional[bool]] = (

414 mapped_bool_column(

415 "willing_to_participate_in_further_studies",

416 constraint_name="ck_deakin_1_healthreview_wtpifs",

417 )

418 )

419

420 @staticmethod

421 def longname(req: "CamcopsRequest") -> str:

422 _ = req.gettext

423 return _(

424 "Deakin JB — Antibody-mediated psychosis study — health review"

425 )

426

427 def is_complete(self) -> bool:

428 return (

429 self.all_fields_not_none(

430 [

431 "ethnicity",

432 "handedness",

433 "education",

434 "allergies",

435 "vaccinations_last3months",

436 "infections_last3months",

437 "infections_chronic",

438 "immune_disorders",

439 "health_anything_else",

440 "recreational_drug_in_last_3_months",

441 "recdrug_prevheavy",

442 "mri_claustrophobic",

443 "mri_difficulty_lying_1_hour",

444 "mri_nonremovable_metal",

445 "mri_metal_from_operations",

446 "mri_tattoos_nicotine_patches",

447 "mri_worked_with_metal",

448 "mri_previous_brain_scan",

449 "other_relevant_things",

450 "willing_to_participate_in_further_studies",

451 ]

452 )

453 and self.field_contents_valid()

454 )

455

456 def get_drug_frequency_row(self, fieldname: str) -> str:

457 drug_frequency_dict = {

458 0: "Did not use",

459 1: "Occasionally",

460 2: "Monthly",

461 3: "Weekly",

462 4: "Daily",

463 }

464 frequency = drug_frequency_dict.get(getattr(self, fieldname), None)

465 return tr_qa(fieldname, frequency)

466

467 def get_task_html(self, req: CamcopsRequest) -> str:

468 def twocol_bool_row(fieldname: str) -> str:

469 return self.get_twocol_bool_row(req, fieldname)

470

471 return f"""

472 <div class="{CssClass.SUMMARY}">

473 <table class="{CssClass.SUMMARY}">

474 {self.get_is_complete_tr(req)}

475 </table>

476 </div>

477 <table class="{CssClass.TASKDETAIL}">

478 <tr>

479 <th width="50%">Question</th>

480 <th width="50%">Answer</th>

481 </tr>

482 """ + (

483 self.get_twocol_val_row("ethnicity")

484 +

485 # UNUSED BY CLIENT! # self.get_twocol_string_row("ethnicity_text") + # noqa: E501

486 self.get_twocol_string_row("ethnicity_other_details")

487 + self.get_twocol_string_row("handedness")

488 + self.get_twocol_string_row("education")

489 + twocol_bool_row("allergies")

490 + twocol_bool_row("allergy_asthma")

491 + twocol_bool_row("allergy_pollen_dust")

492 + twocol_bool_row("allergy_dermatitis")

493 + twocol_bool_row("allergy_food")

494 + twocol_bool_row("allergy_dander")

495 + twocol_bool_row("allergy_other")

496 + self.get_twocol_string_row("allergy_details")

497 + twocol_bool_row("vaccinations_last3months")

498 + self.get_twocol_string_row("vaccination_details")

499 + twocol_bool_row("infections_last3months")

500 + twocol_bool_row("infection_recent_respiratory")

501 + twocol_bool_row("infection_recent_gastroenteritis")

502 + twocol_bool_row("infection_recent_urinary")

503 + twocol_bool_row("infection_recent_sexual")

504 + twocol_bool_row("infection_recent_hepatitis")

505 + twocol_bool_row("infection_recent_other")

506 + self.get_twocol_string_row("infection_recent_details")

507 + twocol_bool_row("infections_chronic")

508 + twocol_bool_row("infection_chronic_respiratory")

509 + twocol_bool_row("infection_chronic_gastroenteritis")

510 + twocol_bool_row("infection_chronic_urinary")

511 + twocol_bool_row("infection_chronic_sexual")

512 + twocol_bool_row("infection_chronic_hepatitis")

513 + twocol_bool_row("infection_chronic_other")

514 + self.get_twocol_string_row("infection_chronic_details")

515 + twocol_bool_row("immune_disorders")

516 + twocol_bool_row("immunity_ms")

517 + twocol_bool_row("immunity_sle")

518 + twocol_bool_row("immunity_arthritis")

519 + twocol_bool_row("immunity_hiv")

520 + twocol_bool_row("immunity_graves")

521 + twocol_bool_row("immunity_diabetes")

522 + twocol_bool_row("immunity_other")

523 + self.get_twocol_string_row("immunity_details")

524 + twocol_bool_row("family_history")

525 + twocol_bool_row("familyhistory_ms")

526 + twocol_bool_row("familyhistory_sle")

527 + twocol_bool_row("familyhistory_arthritis")

528 + twocol_bool_row("familyhistory_graves")

529 + twocol_bool_row("familyhistory_diabetes")

530 + twocol_bool_row("familyhistory_psychosis_sz")

531 + twocol_bool_row("familyhistory_bipolar")

532 + self.get_twocol_string_row("familyhistory_details")

533 + twocol_bool_row("health_anything_else")

534 + self.get_twocol_string_row("health_anything_else_details")

535 + self.get_twocol_string_row("drug_history")

536 + self.get_twocol_string_row("first_antipsychotic_medication")

537 + twocol_bool_row("recreational_drug_in_last_3_months")

538 + self.get_drug_frequency_row("recdrug_tobacco_frequency")

539 + self.get_twocol_val_row("recdrug_tobacco_cigsperweek")

540 + twocol_bool_row("recdrug_tobacco_prevheavy")

541 + self.get_drug_frequency_row("recdrug_cannabis_frequency")

542 + self.get_twocol_val_row("recdrug_cannabis_jointsperweek")

543 + twocol_bool_row("recdrug_cannabis_prevheavy")

544 + self.get_drug_frequency_row("recdrug_alcohol_frequency")

545 + self.get_twocol_val_row("recdrug_alcohol_unitsperweek")

546 + twocol_bool_row("recdrug_alcohol_prevheavy")

547 + self.get_drug_frequency_row("recdrug_mdma_frequency")

548 + twocol_bool_row("recdrug_mdma_prevheavy")

549 + self.get_drug_frequency_row("recdrug_cocaine_frequency")

550 + twocol_bool_row("recdrug_cocaine_prevheavy")

551 + self.get_drug_frequency_row("recdrug_crack_frequency")

552 + twocol_bool_row("recdrug_crack_prevheavy")

553 + self.get_drug_frequency_row("recdrug_heroin_frequency")

554 + twocol_bool_row("recdrug_heroin_prevheavy")

555 + self.get_drug_frequency_row("recdrug_methadone_frequency")

556 + twocol_bool_row("recdrug_methadone_prevheavy")

557 + self.get_drug_frequency_row("recdrug_amphetamines_frequency")

558 + twocol_bool_row("recdrug_amphetamines_prevheavy")

559 + self.get_drug_frequency_row("recdrug_benzodiazepines_frequency")

560 + twocol_bool_row("recdrug_benzodiazepines_prevheavy")

561 + self.get_drug_frequency_row("recdrug_ketamine_frequency")

562 + twocol_bool_row("recdrug_ketamine_prevheavy")

563 + self.get_drug_frequency_row("recdrug_legalhighs_frequency")

564 + twocol_bool_row("recdrug_legalhighs_prevheavy")

565 + self.get_drug_frequency_row("recdrug_inhalants_frequency")

566 + twocol_bool_row("recdrug_inhalants_prevheavy")

567 + self.get_drug_frequency_row("recdrug_hallucinogens_frequency")

568 + twocol_bool_row("recdrug_hallucinogens_prevheavy")

569 + self.get_twocol_string_row("recdrug_details")

570 + twocol_bool_row("recdrug_prevheavy")

571 + self.get_twocol_string_row("recdrug_prevheavy_details")

572 + twocol_bool_row("mri_claustrophobic")

573 + twocol_bool_row("mri_difficulty_lying_1_hour")

574 + twocol_bool_row("mri_nonremovable_metal")

575 + twocol_bool_row("mri_metal_from_operations")

576 + twocol_bool_row("mri_tattoos_nicotine_patches")

577 + twocol_bool_row("mri_worked_with_metal")

578 + twocol_bool_row("mri_previous_brain_scan")

579 + self.get_twocol_string_row("mri_previous_brain_scan_details")

580 + twocol_bool_row("other_relevant_things")

581 + self.get_twocol_string_row("other_relevant_things_details")

582 + twocol_bool_row("willing_to_participate_in_further_studies")

583 + "</table>"

584 )