get_data_chars: Get CHARS (Comprehensive Hospital Abstract Reporting System)...

View source: R/get_data.R

get_data_charsR Documentation

Get CHARS (Comprehensive Hospital Abstract Reporting System) microdata from storage.

Description

Get CHARS (Comprehensive Hospital Abstract Reporting System) microdata from storage.

Usage

get_data_chars(
  cols = NA,
  year = NA,
  kingco = T,
  version = "final",
  wastate = T,
  inpatient = T,
  deaths = T,
  topcode = T,
  mykey = "hhsaw"
)

Arguments

cols

Character vector of length >=1. Identifies which columns should be returned. NA returns all columns in the analytic dataset. See list_dataset_columns for more information on which columns are considered default by dataset.

Default = NA

year

Numeric vector. Identifies which years of data should be pulled. Defaults to the most recent year.

Default = most recent year only

kingco

logical OR 'zip'.

When kingco = T, returns dataset where the patient county is King County – based on country code.

When kingco = 'zip', returns a dataset where the patient county is King County – based on zip code.

Default = T

version

Character vector of length 1. Either 'final' or 'stage'.

Default = 'final'

wastate

logical. Return dataset for Washington State CHARS data only. When FALSE includes Oregon.

Default = T

inpatient

logical. Return dataset for inpatients only. When FALSE includes observation patients.

Default = T

deaths

logical. Return dataset with or without patients who died in the hospital. When TRUE the dataset includes those who died.

Default = T

topcode

logical. Do you want to top code chi_age at 100 to match population data?

Default = T

mykey

Character vector of length 1. Identifies the keyring:: 'service' name that can be used to access the Health & Human Services Analytic Workspace (HHSAW).

Default == 'hhsaw'

Value

a single data.table

Examples



 test <- get_data_chars(
          cols = c('seq_no', 'chi_age'),
          year = c(2020),
          kingco = TRUE,
          wastate = TRUE,
          version = 'final',
          inpatient = TRUE,
          deaths = FALSE,
          topcode = FALSE,
          mykey = 'hhsaw')

 head(test)


PHSKC-APDE/rads documentation built on April 14, 2025, 10:47 a.m.