By Anonymous - October 27, 2014

AHS2
> Baseline
> A2

Baseline Variable: BYPASSY

Description

Number of years since operated on for this condition: Coronary bypass

Notes

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

Data Values

Current

Levels Value
(empty string) Missing
0 Never Had (derived from on BYPASS
/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 BYPASSY
is greater than 0)
* BYPASS
- No/Yes variable for surgery for "Coronary bypass" (should be 2 if BYPASSY
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 BYPASSY = '0'
where BYPASSY = ''
and BYPASS = '1';

update image.dbo.part1
set BYPASSY = '0'
where BYPASSY = ''
and BYPASS = ''
and SURGERY = '1';

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

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

Before / After counts

Version 1

Before After
SURGERY BYPASS BYPASSY COUNT SURGERY BYPASS BYPASSY COUNT
69 69
1 24 1 0 24
1 773 1 0 773
1 1 65 1 1 0 65
2 1457 2 1457
2 3 2 2 3 2
2 4 1 2 4 1
2 1 2501 2 1 0 2501
2 2 7 2 2 7
2 2 1 10 2 2 1 10
2 2 2 34 2 2 2 34
2 2 3 30 2 2 3 30
2 2 4 39 2 2 4 39
2 2 5 13 2 2 5 13

Version 2

Before After
SURGERY BYPASSY COUNT SURGERY BYPASSY COUNT
498 498
* 1 * 1
1 7148 1 0 7148
2 20923 2 20923
2 * 1 2 * 1
2 1 57 2 1 57
2 2 220 2 2 220
2 3 194 2 3 194
2 4 189 2 4 189
2 5 59 2 5 59

Version 3

Before After
SURGERY BYPASSY COUNT SURGERY BYPASSY COUNT
1174 1174
* 7 * 7
1 21078 1 0 21078
2 38747 2 38747
2 * 12 2 * 12
2 1 104 2 1 104
2 2 331 2 2 331
2 3 282 2 3 282
2 4 271 2 4 271
2 5 76 2 5 76