Exploratory Data Analysis - 3

This is the third iteration of an exploratory data analysis - the following changes have been made to this analysis:

1. Added CPT codes 44141, 44144

2. Included acute diverticulitis as an indication.

Clinical question

Do patients with a BMI of 25-30 have better outcomes after outpatient sigmoid colectomy for diverticular disease than do patients with a BMI of 35-40?

Patient population

SQL Query

My queries will pull from NSQIP 2005-2019.

In order to generate the main dataframe, I have constructed a query to pull only those patients that have undergone one of the above four procedures without any concomitant procedures and only with a single CPT code (a few records had multiple of these four CPT codes):

I will build a companion dataframe for readmissions:

and for reoperations:

Excluding patients

We start with a total of 70256 patients.

cpt n
44140 12777
44141 1869
44143 7175
44144 1829
44145 4087
44146 1074
44204 27692
44206 1697
44207 10903
44208 1153

Indication

Now we can start culling away patients via exlusion criteria. The first will be indication - we only want patients with an indication of chronic diverticular disease or acute diverticulitis. I will rely strictly on the field col_indication. Additional fields that I may consider using would be col_indication_icd, podiag, or podiag10. But these are ICD codes; I think using the indication field from the colorectal subset is cleaner.

col_indication n
Colon cancer 26793
Other 10277
Chronic diverticular disease 9940
Acute diverticulitis 7346
Non-malignant polyp 6814
Colon cancer w/ obstruction 3281
Volvulus 3014
Chrohn’s disease 1538
Bleeding 552
Ulcerative colitis 398
Enterocolitis 194
NA 109

A total of 17286 patients have chronic diverticular disease or acute diverticulitis. This exclusion criteria eliminates 52970 patients.

Approach

The next exclusion criteria will be non-laparoscopic or robotic approach. This will rely on the variable col_approach. We can easily eliminate all records where col_approach is not equal to “Laparoscopic” or “Robotic”.

col_approach n
Laparoscopic 8685
Open 6392
Robotic 2103
SILS 54
Hybrid 21
Endoscopic 9
Other 9
Other MIS 8
NA 3
NOTES 2

A total of 10788 patients undergo laparoscopic or robotic surgery. This exclusion criteria eliminates 6498 patients.

Open assist

The next exclusion criteria will remove all patients with a documented open assist technique because there is no ability to document a conversion to open in NSQIP when open-assist is selected. This will use the col_open_assist variable.

col_open_assist n
FALSE 6905
TRUE 3883

A total of 6905 patients do not have an open assist documented. This exclusion criteria eliminates 3883 patients.

Discordance of approach

The next exclusion criteria will remove patients with some kind of discordance in their recorded approach.

We are including CPT codes for open approaches with the assumption that if the col_approach is laparoscopic, this should indicate a conversion to open. This assumption will be easy to validate with the col_unplanned_conversion variable`.

cpt col_unplanned_conversion n
44140 FALSE 211
44141 FALSE 27
44143 FALSE 72
44144 FALSE 8
44145 FALSE 84
44146 FALSE 12
44140 TRUE 266
44141 TRUE 35
44143 TRUE 192
44144 TRUE 19
44145 TRUE 257
44146 TRUE 31

A total of 800 patients have an open CPT with a laparoscopic or robotic approach and a conversion to open documented. A discordant documented approach eliminates 414 patients.

Elective surgery

The next exclusion criteria will be non-elective surgery. There are multiple fields that contain relevant data - electsurg, emergncy, and col_emergent. I will utilize all of these fields to exclude patients. I will require that electsurg is TRUE while emergncy is FALSE. col_emergent is a factor - I will require that it is equal to NA. Lets take a look at a breakdown of all three variables:

electsurg n
FALSE 925
TRUE 5563
NA 3
emergncy n
FALSE 6100
TRUE 391
col_emergent n
Bleeding 5
Obstruction 33
Other 35
Perforation 311
Toxic colitis 2
NA 6105

It helps to look at all combinations of these three variables to see why we need to consider all three in our determination of what is non-elective surgery.

electsurg emergncy col_emergent n
TRUE FALSE FALSE 5555
FALSE FALSE FALSE 543
FALSE TRUE TRUE 377
TRUE TRUE TRUE 8
FALSE TRUE FALSE 5
NA FALSE FALSE 2
NA TRUE TRUE 1

A total of NA patients undergo elective surgery. This exclusion criteria eliminates NA patients.

Outpatient

The next exclusion criteria will be inpatient surgery. Only a single variable is relevant to this criteria - inout.

inout n
FALSE 41
TRUE 5514

As the table makes clear, only 41 patients undergo outpatient surgery. Therefore, we can not use this exclusion critiera.

Admitted from home

The next exclusion criteria will be not admitted from home. Only a single variable is relevant to this criteria - transt.

transt n
Admitted from home 5529
Acute care hospital 9
Other 5
Chronic care facility 4
Outside emergency department 4
NA 4

A total of 5529 patients are admitted from home. This exclusion criteria eliminates 26 patients.

General Surgery

The next exclusion criteria will be surgical specialty other than general surgery. Only a single variable is relevant - surgspec.

surgspec n
General surgery 5506
Vascular 21
Orthopedics 1
Urology 1

A total of 5506 patients are operated on by a general surgeon. This exclusion criteria eliminates 23 patients.

Co-morbidities

There are various co-morbidities and pre-operative conditions that we will also use to exclude patients. These are:

#>   diabetes        ventilat        ascites          hxchf        
#>  Mode :logical   Mode :logical   Mode :logical   Mode :logical  
#>  FALSE:4951      FALSE:5506      FALSE:5506      FALSE:5495     
#>  TRUE :555                                       TRUE :11       
#>     hxmi          hypermed        discancr       type_prsepis 
#>  Mode :logical   Mode :logical   Mode :logical   Sepsis:  17  
#>  FALSE:2         FALSE:3207      FALSE:5488      SIRS  :  33  
#>  NA's :5504      TRUE :2299      TRUE :18        NA's  :5456

A total of 3049 patients do not have any of these excluding co-morbid conditions. This exclusion criteria eliminates 2457 patients.

#>   diabetes        ventilat        ascites          hxchf           hxmi        
#>  Mode :logical   Mode :logical   Mode :logical   Mode :logical   Mode:logical  
#>  FALSE:3049      FALSE:3049      FALSE:3049      FALSE:3049      NA's:3049     
#>   hypermed        discancr       type_prsepis
#>  Mode :logical   Mode :logical   SIRS:  14   
#>  FALSE:3049      FALSE:3049      NA's:3035

Incomplete data

We need to exclude patients that are missing required data:

Height missing n
FALSE 3039
TRUE 10
Weight missing n
FALSE 3042
TRUE 7

A total of 3039 patients do not have incomplete data. This exclusion criteria eliminates 10 patients.

BMI

We must now eliminate patients with BMIs outside of the desired ranges (25-30, 35-40). This will use the variable bmi.

In range n
FALSE 1681
TRUE 1358

A total of 1358 patients are within the desired BMI range. This exclusion criteria eliminates 1681 patients.

Remaining patients

We can now look at how many patients we have in each arm of the study:

group n
BMI 25-30 1095
BMI 35-40 263
group cpt n
BMI 25-30 44140 44
BMI 25-30 44143 4
BMI 25-30 44144 3
BMI 25-30 44145 26
BMI 25-30 44146 2
BMI 25-30 44204 550
BMI 25-30 44206 8
BMI 25-30 44207 450
BMI 25-30 44208 8
BMI 35-40 44140 7
BMI 35-40 44145 15
BMI 35-40 44146 2
BMI 35-40 44204 140
BMI 35-40 44206 3
BMI 35-40 44207 93
BMI 35-40 44208 3