claims_elig | R Documentation |
claims_elig
returns member eligibility and demographics.
claims_elig(
conn,
source = c("apcd", "mcaid", "mcaid_mcare", "mcare", "mcaid_mcare_pha"),
from_date = Sys.Date() - months(18),
to_date = Sys.Date() - months(6),
cov_min = 0,
covgap_max = NULL,
mcaid_min = NULL,
mcaid_max = NULL,
mcare_min = NULL,
mcare_max = NULL,
dual_min = NULL,
dual_max = NULL,
pha_min = NULL,
pha_max = NULL,
med_covgrp = NULL,
pharm_covgrp = NULL,
tpl_max = NULL,
bsp_group_cid = NULL,
full_benefit_min = NULL,
cov_type = NULL,
mco_id = NULL,
part_a_min = NULL,
part_a_max = NULL,
part_b_min = NULL,
part_b_max = NULL,
part_c_min = NULL,
part_c_max = NULL,
buy_in_min = NULL,
buy_in_max = NULL,
pha_agency = NULL,
pha_subsidy = NULL,
pha_voucher = NULL,
pha_operator = NULL,
pha_portfolio = NULL,
id = NULL,
age_min = NULL,
age_max = NULL,
female = NULL,
male = NULL,
gender_me = NULL,
gender_recent = NULL,
race_aian = NULL,
race_asian = NULL,
race_asian_pi = NULL,
race_black = NULL,
race_nhpi = NULL,
race_latino = NULL,
race_white = NULL,
race_unk = NULL,
race_me = NULL,
race_eth_me = NULL,
race_recent = NULL,
race_eth_recent = NULL,
lang_amharic = NULL,
lang_arabic = NULL,
lang_chinese = NULL,
lang_english = NULL,
lang_korean = NULL,
lang_russian = NULL,
lang_somali = NULL,
lang_spanish = NULL,
lang_ukrainian = NULL,
lang_vietnamese = NULL,
lang_me = NULL,
geo_zip = NULL,
geo_hra_code = NULL,
geo_school_code = NULL,
geo_region = NULL,
geo_county_code = NULL,
geo_ach_code = NULL,
geo_kc_ever = NULL,
geo_kc_min = NULL,
timevar_denom = c("duration", "cov_days"),
show_query = T
)
conn |
SQL server connection created using |
source |
Which claims data source do you want to pull from? |
from_date |
Begin date for coverage period, "YYYY-MM-DD", defaults to 18 months prior to today's date (A) |
to_date |
End date for coverage period, "YYYY-MM-DD", defaults to 6 months prior to today's date (A) |
cov_min |
Minimum coverage required during requested date range (percent scale), defaults to 0 (A) |
covgap_max |
Maximum gap in continuous coverage allowed during requested date range (days) (A) |
mcaid_min |
Minimum Medicaid coverage allowed during requested date range (percent scale) (MD/ME) |
mcaid_max |
Maximum Medicaid coverage allowed during requested date range (percent scale) (MD/ME) |
mcare_min |
Minimum Medicare coverage allowed during requested date range (percent scale) (MD/ME) |
mcare_max |
Maximum Medicare coverage allowed during requested date range (percent scale) (MD/ME) |
dual_min |
Minimum Medicare-Medicaid dual eligibility coverage allowed during requested date range (percent scale) (A) |
dual_max |
Maximum Medicare-Medicaid dual eligibility coverage allowed during requested date range (percent scale) (A) |
pha_min |
Minimum Medicare-Medicaid pha eligibility coverage allowed during requested date range (percent scale) (PHA) |
pha_max |
Maximum Medicare-Medicaid pha eligibility coverage allowed during requested date range (percent scale) (PHA) |
med_covgrp |
Medical coverage group type in APCD data (AP) |
pharm_covgrp |
Pharmacy coverage group type in APCD data (AP) |
tpl_max |
Maximum time with third-party liability during the requested time period (percent scale) (MD) |
bsp_group_cid |
Most frequently reported BSP group during requested date range, case insensitive, can take multiple values (MD) |
full_benefit_min |
Minimum time with full benefits during the requested time period (percent scale) (MD) |
cov_type |
Medicaid coverage type (FFS or MC) (MD) |
mco_id |
Managed care organization ID (MD) |
part_a_min |
Maximum time enrolled in Part A of Medicare during the requested time period (percent scale) (ME) |
part_b_min |
Maximum time enrolled in Part B of Medicare during the requested time period (percent scale) (ME) |
part_c_min |
Maximum time enrolled in Part C of Medicare during the requested time period (percent scale) (ME) |
buy_in_min |
Minimum time with state buy in during the requested time period (percent scale) (ME) |
buy_in_max |
Maximum time with state buy in during the requested time period (percent scale) (ME) |
pha_agency |
Most frequently reported housing agency name (PHA) during the dates requested |
pha_subsidy |
Most frequently reported housing subsidy type (hard vs soft) during the requested date range (PHA) |
pha_voucher |
Most frequently reported housing voucher type during the requested date range (PHA) |
pha_operator |
Most frequently reported housing operator type during the requested date range (PHA) |
pha_portfolio |
Most frequently reported housing portfolio type during the requested date range (PHA) |
id |
Restrict to these specific APCD/Medicaid/Medicare/Housing IDs (A) |
age_min |
Minimum age for cohort (integer), age is calculated as of last day of requested date range, defaults to 0 (A) |
age_max |
Maximum age for cohort (integer), age is calculated as of last day of requested date range, defaults to 200 (A) |
female |
Alone or in combination female gender over entire member history (A) |
male |
Alone or in combination female gender over entire member history (A) |
gender_me |
Most commonly reported gender, by time enrolled, case insensitive, can take multiple values (e.g., c("female", "multiple")) (A) |
gender_recent |
Most recently reported gender, , case insensitive, can take multiple values (e.g., c("female", "multiple")) (AP/MD) |
race_aian |
Alone or in combination American Indian/Alaska Native race over entire member history (MD/ME) |
race_asian |
Alone or in combination Asian race over entire member history (MD/ME) |
race_asian_pi |
Alone or in combination Asian/Pacific Islanfer race over entire member history (ME) |
race_black |
Alone or in combination Black race over entire member history (MD/ME) |
race_nhpi |
Alone or in combination Native Hawaiian/Pacific Islander race over entire member history (MD/ME) |
race_latino |
Alone or in combination Latino race over entire member history (MD/ME) |
race_white |
Alone or in combination white race over entire member history (MD/ME) |
race_unk |
No recorded race over entire member history (MD/ME) |
race_me |
Most frequently recorded race (excluding Latino) over entire member history, case insensitive, can take multiple values (e.g., c("aian", "black")) (MD/ME) |
race_eth_me |
Most frequently recorded race (including Latino) over entire member history, case insensitive, can take multiple values (e.g., c("latino", "black")) (MD/ME) |
race_recent |
Most recently recorded race (excluding Latino), case insensitive, can take multiple values (e.g., c("aian", "black")) (MD/ME) |
race_eth_recent |
Most recently recorded race (including Latino), case insensitive, can take multiple values (e.g., c("latino", "black")) (MD/ME) |
lang_amharic |
Alone or in combination Amharic written or spoken language over entire member history (MD) |
lang_arabic |
Alone or in combination Arabic written or spoken language over entire member history (MD) |
lang_chinese |
Alone or in combination Chinese written or spoken language over entire member history (MD) |
lang_english |
Alone or in combination English written or spoken language over entire member history (MD) |
lang_korean |
Alone or in combination Korean written or spoken language over entire member history (MD) |
lang_russian |
Alone or in combination Russian written or spoken language over entire member history (MD) |
lang_somali |
Alone or in combination Somali written or spoken language over entire member history (MD) |
lang_spanish |
Alone or in combination Spanish written or spoken language over entire member history (MD) |
lang_ukrainian |
Alone or in combination Ukrainian written or spoken language over entire member history (MD) |
lang_vietnamese |
Alone or in combination Vietnamese written or spoken language over entire member history (MD) |
lang_me |
Most frequently recorded spoken/written language over entire member history, case insensitive, can take multiple values (e.g., c("chinese", "english")) (MD) |
geo_zip |
Most frequently reported ZIP code during requested date range, can take multiple values (e.g., c("98104", "98105")) (A) |
geo_hra_code |
Most frequently reported health reporting area code during requested date range, can take multiple values (e.g., c("2100", "9000")) (MD) |
geo_school_code |
Most frequently reported school district code during requested date range, can take multiple values (e.g., c("5307710", "5303540")) (MD) |
geo_region |
Most frequently mapped HRA-based region during requested date range, (choose from east, north, seattle, south), case insensitive, can take multiple values (MD) |
geo_county_code |
Most frequently reported county during requested date range (use FIPS codes), can take multiple values (AP/MD) |
geo_ach_code |
Most recently reported accountable community of health during requested data range (use ACH codes), can take multiple values (AP) |
geo_kc_ever |
Ever resided in King County (ME) |
geo_kc_min |
Minimum amount of requested date range a person needs to have resided in King County to be included (AP/ME) |
timevar_denom |
Which denominator is used to calculate the percentages for time-varying parameters (e.g., dual_min, geo_kc_min). Choose from duration (number of days in selected period, i.e., between from_date and to_date) or cov_days (the number of days within selected period the person was actually enrolled). Default is duration. |
show_query |
Print the SQL query that is being run. Useful for debugging. Default is TRUE |
LARGELY FOR INTERNAL USE This function builds and sends a SQL query to return a member cohort with specified parameters, including coverage time period, coverage characteristics (e.g., Medicare dual eligibility), and member demographics. Can be used on five data sources: APCD, Medicaid, and Medicare Medicaid/Medicare combined, & Medicaid/Medicare/Housing combined. Parameters below have the following key to indicate which data source they can be used against: A = All sources, AP = APCD, MD = Medicaid, ME = Medicare, PHA = Housing. Most parameters default to NULL, which means that all values are included for that field. NB: For time-varying variables, the value with the maximum time is returned for each variable independently. Therefore, incongruent combinations may arise (e.g., having a bsp_group that does not confer full Medicaid benefits but the full_benefits flag set to 1, pha_agency returns 'Non-PHA' but pha_subsidy returns 'HARD UNIT').
## Not run:
claims_elig(conn = db.claims51, source = "apcd",
from_date = "2017-01-01", to_date = "2017-06-30")
claims_elig(conn = db.claims51, source = "mcaid",
from_date = "2017-01-01", to_date = "2017-06-30", age_min = 18,
age_max = 64, lang_me = c("ARABIC", "SOMALI"), zip = c("98103", "98105"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.