easyNIS: Tidy Workflows for the National Inpatient Sample
Source:R/easyNIS-package.R
easyNIS-package.RdPipe-friendly tools for opening annual Healthcare Cost and Utilization Project National Inpatient Sample Parquet files, flagging diagnosis and procedure codes, applying HCUP 'CCSR' mappings, adding experimental comorbidity indicators and indices, preparing designs and weights with the 'survey' package, applying supported HCUP labels, adjusting charges and costs, and reviewing disclosure risks. The Agency for Healthcare Research and Quality provides information on the NIS and how to obtain it at https://hcup-us.ahrq.gov/nisoverview.jsp. Experimental methods and annual-layout assumptions are not independently verified or scientifically approved.
Details
Use nis_open() to open annual National Inpatient Sample (NIS) data as a
lazy DuckDB table, nis_flag_dx() or nis_flag_pr() to define a cohort,
and nis_design() to prepare a survey design. Use nis_suppress() to
review tables for disclosure risk before sharing.
Start with the simulated files from nis_example() and the
Getting started guide.
For licensed data, see the
AHRQ HCUP NIS overview for
documentation and access.
Author
Maintainer: Muhammad Saad msaadasif.md@gmail.com (ORCID)
Authors:
Muhammad Saad msaadasif.md@gmail.com (ORCID)
Ali Salman (ORCID) (project_role: co-maintainer)
Examples
nis_open(nis_example(2020)) |>
dplyr::count(YEAR) |>
dplyr::collect()
#> # A tibble: 1 × 2
#> YEAR n
#> <int> <dbl>
#> 1 2020 96