Building SQL Query

library(nsqipColonICG)

CPT codes

What are our primary procedures?

44160 - Colectomy, partial, with removal of terminal ileum with ileocolostomy (open)

44145 - Colectomy, partial; with coloproctostomy (low pelvic anastomosis) (open)

44140 - Colectomy, partial; with anastomosis (open)

44204 - Laparoscopy, surgical; colectomy, partial, with anastomosis

44205 - Laparoscopy, surgical; colectomy, partial, with removal of terminal ileum with ileocolostomy

44207 - Laparoscopy, surgical; colectomy, partial, with anastomosis, with coloproctostomy (low pelvic anastomosis)

What is the CPT code for ICG?

15860 - Intravenous injection of agent (eg, fluorescein) to test vascular flow in flap or graft

Sample population

Patients undergoing laparoscopic or open partial colectomy/ileocolectomy with anastomosis (ileocolostomy, colocolostomy, coloproctostomy), using or not using IV fluorescein (or other) injection to evaluate anastomotic vascular supply.

Do you care about the indication?

Outcomes

Do you mean specifically deep infections; deep infections and organ-space infections; or just organ-space infections?

Is this a composite outcome or are these both primary outcomes? Is the composite rate a primary outcome and maybe the two outcomes are secondary endpoint analyses?

Presumably a conditional odds ratio of ICG vs. no ICG in regards to anastomotic leak and rates of deep space infection.

Question

Does the use of intraoperative ICG during colonic anastomosis reconstruction result in lower composite rates of deep space infection and anastomotic leak?

\(H_0\): There is no significant difference in the composite rate of deep space infection and anastomosis leak when ICG is used for intraoperative assessment of a colonic anastomosis.

Required variables

Required tables

puf

col

puf_cpt

Build the SQL query

Find patients where primary procedure is a requested CPT code

Assumptions

  • As long as primary procedure is one of the requested CPT codes, the presence of other procedures is irrelevant.
  • Only if the procedure is performed by the primary surgical team is it included.

Determine if ICG was used for any of these patients

Assumptions

  • As long as primary procedure is one of the requested CPT codes, the presence of other procedures is irrelevant.
  • Only if the procedure is performed by the primary surgical team is it included.
  • There is no way to tell conclusively that the intravenous contrast was used for the purposes of testing the colonic anastomosis. If the code is present, the patient receives a value of TRUE for icg.

Join to main PUF and colon-specific tables

Cleaning up outcomes

We will simply exclude patients with missing outcome data (rather than imputing it):

dplyr::filter(!is.na(col_anastomotic),
             !is.na(orgspcssi),
             !is.na(wndinfd))