Coder Social home page Coder Social logo

nsqipr's Introduction

nsqipr

R build status Github All Releases

What would you like to see implemented in nsqipr? Open an issue! Are you interested in using or helping develop nsqipr? Send me an email!

See the companion book for a more detailed guide!

About ACS NSQIP©

Welcome to nsqipr! If you’re reading this, you are likely already familiar with the American College of Surgeons National Surgical Quality Improvement Program (ACS NSQIP©). If not, you can read about it here. The ACS NSQIP © is a nationally validated, risk-adjusted, outcomes-based program to measure and improve the quality of surgical care.

As of 13 May, 2022, there are currently 699 hospitals that participate in and contribute to the program. The entire database contains more than 8 million cases for data analysis.

Inclusion and Exclusion Criteria

ACS NSQIP© captures and reports 30-day morbidity and mortality outcomes for all major inpatient and outpatient surgical procedures as determined by Current Procedural Terminology (CPT©) code. This list is updated annually as new codes become available. Excluded cases are:

  • Patients under the age of 18 years.
  • >3 inguinal herniorrhaphies in an 8-day period.
  • >3 breast lumpectomies in an 8-day period.
  • >3 laparoscopic cholecystectomies in an 8-day period.
  • >3 TURPs and/or TURBTs in an 8-day period.

Publications

The data from ACS NSQIP© is used to produce an exponentially increasing number of publications per year. As of 13 May, 2022, there are currently 3311 PubMed search results for the search term “NSQIP”.

These papers are often published in high quality journals. The following graph shows the top 10 most common journals in which the above search results were published.

About nsqipr

Purpose

ACS NSQIP© requires that members request specific datasets for use in research. The files are then delivered as .exe executable files available for download for a limited duration of time. The archived files can be unzipped and contain a .txt tab-delimited file. Some will also contain a PDF version of the Participant Use File (PUF); these define the variables in the dataset. The .txt tab-delimited file must be read into R as a data frame and meticulously cleaned prior to being used for data analysis. Researchers often want to combine data across multiple years. This complicates data preparation as variables are removed or added every year and sometimes the same variable may have differently worded outcomes between years.

race (2005-2006) race_new (2019)
American Indian or Alaska Native American Indian or Alaska Native
Asian or Pacific Islander Asian
Black, Not of Hispanic Origin Black or African American
Hispanic, Black Native Hawaiian or Pacific Islander
Hispanic, Color Unknown Unknown/Not Reported
Hispanic, White White
Unknown
White, Not of Hispanic Origin

The purpose of nsqipr is to streamline this process. This package is geared towards those surgical interns, residents, and attendings who have limited experience with R, SQL, or “big data” analysis. It is also designed to be a useful tool for that experienced researcher or computer scientist making frequent use of ACS NSQIP© PUFs.

For a detailed dive into nsqipr, please refer to the companion book or the documentation:

help("nsqipr")

Installation

You can install or upgrade nsqipr with:

devtools::install_github("dylanrussellmd/nsqipr")

We are not (yet) available on CRAN.

Use

  1. Execute all .exe executable files from ACS NSQIP© in a single directory (dir) (do not change the default file names).
  2. Now simply run nsqip(dir).

nsqipr will take care of the rest. You’re now ready to use the ACS NSQIP© data for data analysis!

Progress

Track progress on how the various data sets are being incorporated into nsqipr here.

  • Main PUF - Done, Documented, Tested
  • Vascular - In progress, use with caution
    • Abdominal Aortic Aneurysm - In progress, use with caution
    • Aortoiliac Endovascular - In progress, use with caution
    • Aortoiliac Open - In progress, use with caution
    • Carotid Artery Stenting - Not started
    • Carotid Endarterectomy - Not started
    • Endovascular Aneurysm Repair - Not started
    • Lower Extremity Endovascular - Not started
    • Lower Extremity Open - Not started
  • Colectomy - Done, Documented, Tested
  • Pancreatectomy - In progress, use with caution
  • Proctectomy - Not started
  • Hepatectomy - In progress, use with caution
  • Thyroidectomy - Not started
  • Esophagectomy - Not started
  • Appendectomy - Done, Documented, Tested
  • Gynecology - Not started
  • Hysterectomy - Not started
  • Hip Fracture - Not started
  • Cystectomy - Not started
  • Nephrectomy - Not started
  • Prostatectomy - Not started

Check back often for updates!

nsqipr's People

Contributors

dylanrussellmd avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

nsqipr's Issues

Issues reading in data from ACS_NSQIP_PUF_05_06_vr1 and acs_nsqip_puf19

Hello!

Running the nsqip() function with a directory of txt files does not read in ACS_NSQIP_PUF_05_06_vr1 for some reason (i.e. starts with the next file in the directory). Also, when the function gets to cleaning acs_nsqip_puf19, it stops and throws an error (copied below):

Error in if (unique(df[["pufyear"]]) > 2010) { :
missing value where TRUE/FALSE needed

Not sure where and why exactly this is occurring in the code.

Thank you for your help!

NSQIP 21 transt, electsurg, dischdest missing data

Firstly, thank you for making this package!! so helpful!!
Looking through the cleaned R file for PUF21... Transt and dischdest columns are mostly NA when in the original file there are values like "home/permanent residence" for TRANST or "Other Facility" for DISCHDEST which I cannot find in the clean file. Please advise!
thank you!

Upload with `DBI::appendTable()` is too slow.

Using DBI::appendTable() is too slow.

Data should be read into the Google Cloud PostgreSQL database faster. The following method may be useful.

data.table::fwrite(z1000, "mt.csv")
URI <- sprintf("postgresql://%s:%s@%s:%s", "postgres", "mysecretpassword", "127.0.0.1", "35432")
system(
    sprintf("psql.exe -U postgres -c \"\\copy %s (%s) from %s (FORMAT CSV, HEADER)\" %s",
            "mt", paste(colnames(z1000), collapse = ","),
            sQuote("mt.csv"), URI)

See this StackOverflow for additional information.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.