Code Monkey home page Code Monkey logo

2020-04-cms-nursing-homes's Introduction

Nursing Home Inspections Analysis — Infection Control, Ulcer Care, and Medication Errors

This repository contains data and code supporting a BuzzFeed News article on nursing home facilities, published April 21, 2020. See below for details.

Data

All data analyzed here comes from the Centers for Medicare and Medicaid Services (CMS) Nursing Home Compare.

The following files are downloaded via the Socrata API and stored locally:

This following file was downloaded manually from the Nursing Home Compare open data portal:

Notebooks

The following Jupyter notebooks, written in Python, fetch and analyze the data described above:

Notes on deficiencies

The deficiencies dataset is organized as one deficiency per row. A facility may, and often does, incur more than one deficiency per inspection. A facility with no deficiencies will not appear in this dataset.

CMS-regulated nursing homes are inspected in 15-month "cycles." The time-based analyses in this repository divide facilities by cycle, rather than by year. To calculate the percent of facilities with certain deficiencies, we took as numerator all facilities inspected in a given inspection cycle. That number can be derived from the separate survey dataset.

"F tags"

Deficiencies are categorized by certain "F tags" which are defined in the supporting documents on data.medicare.gov. In 2017, a number of F tags for the same deficiency changed. CMS provides a crosswalk to link older tags with newer ones. To count deficiencies, we searched on both the old and the new F tags to capture a range of time. Infection control deficiencies were indicated with F tags 0880 and 0441. Serious medication errors were indicated with F tags 0686 and 0314. Pressure sore deficiencies were indicated with F tags 0686 and 0314.

Immediate jeopardy violations

CMS assigns a "scope and severity" level to violations. The most severe are labeled "immediate jeopardy" deficiencies. These are violations where one or more residents or employees are in immediate danger of being harmed, although a resident does not have to be harmed at the time for this violation to occur. According to the CMS Nursing Home Compare technical guide, there are three categories of immediate jeopardy violations which correspond to their scope: "immediate", "pattern" and "widespread". They are assigned letter codes I, J and K, respectively. These are available in the scope_severity_code column of health_deficiencies.csv.

Reproducibility

The analysis is written in Python 3, and requires the Python libraries specified in requirements.txt. To replicate the analysis, run make replicate from this repository's root directory.

Licensing

All code in this repository is available under the MIT License. Files in the output/ directory are available under the Creative Commons Attribution 4.0 International (CC BY 4.0) license.

Questions / Feedback

Contact Scott Pham at [email protected].

Looking for more from BuzzFeed News? Click here for a list of our open-sourced projects, data, and code.

2020-04-cms-nursing-homes's People

Contributors

scottpham avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.