By Anonymous - October 24, 2014

AHS2
> Baseline
> A2

Baseline Variable: TONSILSY

Description

Number of years since operated on for this condition: Tonsils and/or adenoids

Notes

* This variable will have a "0" level added as part of the never_had_updates
.

Data structure

Current

Levels Value
(empty string) Missing
0 Never Had (derived from on TONSILS
/SURGERY
variables)
1 Less than 1 year ago
2 1-4 years ago
3 5-9 years ago
4 10-19 years ago
5 20+ years ago

Original

Levels Value
(empty string) Missing
1 Less than 1 year ago
2 1-4 years ago
3 5-9 years ago
4 10-19 years ago
5 20+ years ago

* SURGERY
- "Have you ever had surgery for problems other than cancer" (should be 2 if TONSILSY
is greater than 0)
* TONSILS
- No/Yes variable for surgery on "Tonsils and/or adenoids" (should be 2 if TONSILSY
is greater than 0)

Location

Questionnaires

Questionnaire Version Labeled Page Physical Page TIFF Image Index Scan Path
1 A2 info
/image
5 02 ''R:\Tiff_Quest_V1''
2 A2 info
/image
5 45 ''R:\Tiff_Quest_V2''
3 A2 info
/image
5 45 ''R:\Tiff_Quest_V3''

Database Tables

Table Name Description
image.dbo.part1 modified version 1 part 1 data
image.dbo.part1_unmodified original/raw version 1 part 1 data

Modifications

"Never Had" Update

For details see: "Never Had" updates
. This is a never_had_updates#Type 2
variable.

SQL Code:

-- Version 1
update image.dbo.part1
set TONSILSY = 0
where TONSILSY = ''
and TONSILS = 1;

update image.dbo.part1
set TONSILSY = 0
where TONSILSY = ''
and TONSILS = ''
and SURGERY = 1;

-- Version 2/3
update image.dbo.v2part1
set TONSILSY = '0'
where TONSILSY = ''
and SURGERY = '1';

update image.dbo.v3part1
set TONSILSY = '0'
where TONSILSY = ''
and SURGERY = '1';

Before / After Counts

Version 1:

Before After
SURGERY TONSILS TONSILSY COUNT SURGERY TONSILS TONSILSY COUNT
60 60
3 1 3 1
4 1 4 1
5 5 5 5
1 19 1 0 19
1 5 1 1 5 1
2 6 2 6
1 771 1 0 771
1 4 1 1 4 1
1 5 3 1 5 3
1 1 63 1 1 0 63
2 780 2 780
2 5 93 2 5 93
2 1 998 2 1 0 998
2 1 5 5 2 1 5 5
2 2 52 2 2 52
2 2 1 2 2 2 1 2
2 2 2 4 2 2 2 4
2 2 3 39 2 2 3 39
2 2 4 28 2 2 4 28
2 2 5 2093 2 2 5 2093

Version 2:

Before After
SURGERY TONSILSY COUNT SURGERY TONSILSY COUNT
498 498
* 1 * 1
1 7148 1 0 7148
2 8340 2 8340
2 1 25 2 1 25
2 2 135 2 2 135
2 3 271 2 3 271
2 4 279 2 4 279
2 5 12593 2 5 12593

Version 3:

Before After
SURGERY TONSILSY COUNT SURGERY TONSILSY COUNT
1174 1174
* 5 * 5
* 4 1 * 4 1
* 5 1 * 5 1
1 21078 1 0 21078
2 19480 2 19480
2 * 9 2 * 9
2 1 54 2 1 54
2 2 230 2 2 230
2 3 355 2 3 355
2 4 596 2 4 596
2 5 19099 2 5 19099