-- DBMS: bigquery
CREATE TABLE `bigquery-public-data.cms_medicare.nursing_facilities_2014`
(
  provider_id STRING OPTIONS(description="The 6-digit identification number for the skilled nursing facility on the claim."),
  facility_name STRING OPTIONS(description="The skilled nursing facility name, as reported in the POS file."),
  street_address STRING OPTIONS(description="The skilled nursing facility address, as reported in the POS file."),
  city STRING OPTIONS(description="The city where the skilled nursing facility is located, as reported in the POS file."),
  state STRING OPTIONS(description="The state where the skilled nursing facility is located, as reported in POS file. The fifty U.S. states and the District of Columbia are reported by the state postal abbreviation."),
  zip_code INT64 OPTIONS(description="The skilled nursing facility’s zip code, as reported in the POS file."),
  total_stays INT64 OPTIONS(description="Total number of skilled nursing facility stays."),
  distinct_beneficiaries_per_provider INT64 OPTIONS(description="Number of distinct Medicare beneficiaries with at least one skilled nursing facility day per provider. A beneficiary will only be counted once per provider, but may be double-counted across providers."),
  average_length_of_stays_days FLOAT64 OPTIONS(description="Average lenth of stay, in days, for all Medicare beneficiaries with at least one stay in the skilled nursing facility in the year."),
  total_snf_charge_amount INT64 OPTIONS(description="Total of the charges that the skilled nursing facility submitted for all Medicare stays in the year."),
  total_snf_medicare_allowed_amount INT64 OPTIONS(description="Total Medicare allowed amount for all Medicare stays in the year. This figure is the sum of the amount Medicare pays, the deductible and coinsurance amounts that the beneficiary is responsible for paying, and any amounts that a third party is responsible for paying."),
  total_snf_medicare_payment_amount INT64 OPTIONS(description="Total amount that Medicare paid for all Medicare stays in the year after deductible and coinsurance amounts have been deducted."),
  total_snf_medicare_standard_payment_amount INT64 OPTIONS(description="Total amount that Medicare paid for all Medicare stays in the year after deductible and coinsurance amounts have been deducted, adjusted for geographic differences in payment rates."),
  average_age INT64 OPTIONS(description="Average age of beneficiaries. Beneficiary age is calculated at the end of the calendar year or at the time of death."),
  male_beneficiaries INT64 OPTIONS(description="Number of male beneficiaries."),
  female_beneficiaries INT64 OPTIONS(description="Number of female beneficiaries."),
  nondual_beneficiaries INT64 OPTIONS(description="Number of Medicare beneficiaries qualified to receive Medicare only benefits. Beneficiaries are classified as Medicare only entitlement if they received zero months of any Medicaid benefits (full or partial) in the given calendar year."),
  dual_beneficiaries INT64 OPTIONS(description="Number of Medicare beneficiaries qualified to receive Medicare and Medicaid benefits. Beneficiaries are classified as Medicare and Medicaid entitlement if in any month in the given calendar year they were receiving full or partial Medicaid benefits."),
  white_beneficiaries INT64 OPTIONS(description="Number of non-Hispanic white beneficiaries."),
  black_beneficiaries INT64 OPTIONS(description="Number of non-Hispanic black or African American beneficiaries."),
  asian_pacific_islander_beneficiaries INT64 OPTIONS(description="Number of Asian Pacific Islander beneficiaries."),
  hispanic_beneficiaries INT64 OPTIONS(description="Number of Hispanic beneficiaries."),
  american_indian_or_alaska_native_beneficiaries INT64 OPTIONS(description="Number of American Indian or Alaska Native beneficiaries."),
  other_unknown_beneficiaries INT64 OPTIONS(description="Number of beneficiaries with race not elsewhere classified."),
  average_hcc_score FLOAT64 OPTIONS(description="Average Hierarchical Condition Category (HCC) risk score of beneficiaries. Please refer to the “Additional Information” section of the Methodology document for more details on HCC risk scores."),
  percent_of_beneficiaries_with_atrial_fibrillation INT64 OPTIONS(description="Percent of beneficiaries meeting the CCW chronic condition algorithm for atrial fibrillation."),
  percent_of_beneficiaries_with_alzheimers INT64 OPTIONS(description="Percent of beneficiaries meeting the CCW chronic condition algorithm for Alzheimer’s, related disorders, or dementia."),
  percent_of_beneficiaries_with_asthma INT64 OPTIONS(description="Percent of beneficiaries meeting the CCW chronic condition algorithm for Asthma."),
  percent_of_beneficiaries_with_cancer INT64 OPTIONS(description="Percent of beneficiaries meeting the CCW chronic condition algorithms for cancer. Includes breast cancer, colorectal cancer, lung cancer and prostate cancer."),
  percent_of_beneficiaries_with_chf INT64 OPTIONS(description="Percent of beneficiaries meeting the CCW chronic condition algorithm for heart failure."),
  percent_of_beneficiaries_with_chronic_kidney_disease INT64 OPTIONS(description="Percent of beneficiaries meeting the CCW chronic condition algorithm for chronic kidney disease."),
  percent_of_beneficiaries_with_copd INT64 OPTIONS(description="Percent of beneficiaries meeting the CCW chronic condition algorithm for chronic obstructive pulmonary disease."),
  percent_of_beneficiaries_with_depression INT64 OPTIONS(description="Percent of beneficiaries meeting the CCW chronic condition algorithm for depression."),
  percent_of_beneficiaries_with_diabetes INT64 OPTIONS(description="Percent of beneficiaries meeting the CCW chronic condition algorithm for diabetes."),
  percent_of_beneficiaries_with_hyperlipidemia INT64 OPTIONS(description="Percent of beneficiaries meeting the CCW chronic condition algorithm for hyperlipidemia."),
  percent_of_beneficiaries_with_hypertension INT64 OPTIONS(description="Percent of beneficiaries meeting the CCW chronic condition algorithm for hypertension."),
  percent_of_beneficiaries_with_ihd INT64 OPTIONS(description="Percent of beneficiaries meeting the CCW chronic condition algorithm for ischemic heart disease."),
  percent_of_beneficiaries_with_osteoporosis INT64 OPTIONS(description="Percent of beneficiaries meeting the CCW chronic condition algorithm for osteoporosis."),
  percent_of_beneficiaries_with_ra_oa INT64 OPTIONS(description="Percent of beneficiaries meeting the CCW chronic condition algorithm for rheumatoid arthritis/osteoarthritis."),
  percent_of_beneficiaries_with_schizophrenia INT64 OPTIONS(description="Percent of beneficiaries meeting the CCW chronic condition algorithm for schizophrenia and other psychotic disorders."),
  percent_of_beneficiaries_with_stroke INT64 OPTIONS(description="Percent of beneficiaries meeting the CCW chronic condition algorithm for stroke.")
);

INSERT INTO `bigquery-public-data.cms_medicare.nursing_facilities_2014` (provider_id, facility_name, street_address, city, state, zip_code, total_stays, distinct_beneficiaries_per_provider, average_length_of_stays_days, total_snf_charge_amount, total_snf_medicare_allowed_amount, total_snf_medicare_payment_amount, total_snf_medicare_standard_payment_amount, average_age, male_beneficiaries, female_beneficiaries, nondual_beneficiaries, dual_beneficiaries, white_beneficiaries, black_beneficiaries, asian_pacific_islander_beneficiaries, hispanic_beneficiaries, american_indian_or_alaska_native_beneficiaries, other_unknown_beneficiaries, average_hcc_score, percent_of_beneficiaries_with_atrial_fibrillation, percent_of_beneficiaries_with_alzheimers, percent_of_beneficiaries_with_asthma, percent_of_beneficiaries_with_cancer, percent_of_beneficiaries_with_chf, percent_of_beneficiaries_with_chronic_kidney_disease, percent_of_beneficiaries_with_copd, percent_of_beneficiaries_with_depression, percent_of_beneficiaries_with_diabetes, percent_of_beneficiaries_with_hyperlipidemia, percent_of_beneficiaries_with_hypertension, percent_of_beneficiaries_with_ihd, percent_of_beneficiaries_with_osteoporosis, percent_of_beneficiaries_with_ra_oa, percent_of_beneficiaries_with_schizophrenia, percent_of_beneficiaries_with_stroke) VALUES ('235618', 'HEARTLAND HEALTH CARE CENTER-CANTON', '7025 LILLEY ROAD', 'CANTON', 'MI', 48187, 1104, 829, 25.1, 19747896, 13480549, 11306649, 12346740, 79, 280, 549, 694, 135, 707, 88, 13, NULL, NULL, 11, 2.29, 28, 41, 15, 19, 54, 59, 40, 51, 47, 70, NULL, 68, 20, 69, 10, 17), ('495217', 'MANORCARE HEALTH SERVICES-FAIR OAKS', '12475 LEE JACKSON MEMORIAL HIGHWAY', 'FAIRFAX', 'VA', 22033, 436, 350, 26.3, 7541494, 5744025, 4764609, 4668290, 79, 146, 204, 261, 89, 245, 45, 41, NULL, NULL, 11, 2.22, 31, 42, 17, 20, 43, 62, 29, 43, 46, 72, NULL, 54, 17, 53, 11, 19), ('495121', 'CHERRYDALE HEALTH AND REHABILITATION CENTER', '3710 LEE HIGHWAY', 'ARLINGTON', 'VA', 22207, 353, 289, 23.1, 5630761, 3728371, 3081887, 3011132, 76, 136, 153, 185, 104, 200, 49, 20, NULL, NULL, 12, 2.33, 29, 57, 19, 23, 52, 62, 34, 49, 49, 67, NULL, 50, 14, 47, 24, 19), ('225554', 'COOLIDGE HOUSE', '30 WEBSTER STREET', 'BROOKLINE', 'MA', 2446, 368, 297, 19.5, 5878484, 3953630, 3429534, 2909340, 75, 115, 182, 158, 139, 208, 54, 12, NULL, NULL, 13, 2.38, 22, 31, 19, 17, 40, 50, 16, 55, 46, 68, NULL, 45, 25, 65, 15, 12), ('235663', 'NOTTING HILL OF WEST BLOOMFIELD', '6535 DRAKE ROAD', 'W BLOOMFIELD', 'MI', 48322, 871, 697, 27.2, 15794026, 11167017, 9214425, 9958648, 81, 253, 444, 596, 101, 586, 77, 16, NULL, NULL, 13, 2.31, 28, 40, 14, 20, 51, 54, 29, 50, 49, 74, NULL, 67, 23, 70, 10, 17);