View source: R/claims_condition.R
claims_condition | R Documentation |
claims_condition
builds a SQL query to return chronic health condition information.
claims_condition(
conn,
source = c("apcd", "mcaid", "mcaid_mcare", "mcare"),
condition = c("ccw_alzheimer", "ccw_alzheimer_related", "ccw_anemia",
"ccw_arthritis", "ccw_asthma", "ccw_atrial_fib", "ccw_bph", "ccw_cancer_breast",
"ccw_cancer_colorectal", "ccw_cancer_endometrial", "ccw_cancer_lung",
"ccw_cancer_prostate", "ccw_cataract", "ccw_chr_kidney_dis", "ccw_copd",
"ccw_depression", "ccw_diabetes", "ccw_glaucoma", "ccw_heart_failure",
"ccw_hip_fracture", "ccw_hyperlipid", "ccw_hypertension", "ccw_hypothyroid",
"ccw_ischemic_heart_dis", "ccw_mi", "ccw_osteoporosis", "ccw_stroke"),
from_date = Sys.Date() - months(18),
to_date = Sys.Date() - months(6),
id = NULL
)
conn |
SQL server connection created using |
source |
Which claims data source do you want to pull from? |
condition |
The chronic health condition requested from SQL Server. Can select multiple using format c("<condition1>", "<condition2>"). |
from_date |
Begin date for coverage period, "YYYY-MM-DD", defaults to 18 months prior to today's date. |
to_date |
End date for coverage period, "YYYY-MM-DD", defaults to 6 months prior to today's date. |
id |
List of IDs to look up. Use format c("<id1>", "<id2>") or point to a vector of IDs. Leave blank for all IDs in the specified date range. |
LARGELY FOR INTERNAL USE This function builds and sends a SQL query to return a Medicaid member cohort with a specified chronic health condition. If requested, the function will also join the returned data to a specified data frame in R, joining on Medicaid member ID. Users can specify the join type (left, right, inner). By default "ever" status is returned - for example a request for diabetic members will return members with any history of diabetes in the Medicaid claims database, using the Chronic Conditions Warehouse definition from CDC. If a date range is supplied, the function will only return members who were identified as having the condition during the date range (a function of both Medicaid coverage and health care diagnostic information).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.