Medicaid Hospital Inpatient Potentially Preventable Readmission Rates by Hospital API: Beginning 2011

This featured Application Programming Interface (API) page serves as a reference for developers who are building tools that interact with the data on Health Data NY. The page provides examples on how to retrieve data from each of the fields within the dataset. A description of each field is also provided. This specific API page is for the Medicaid Hospital Inpatient Potentially Preventable Readmisison (PPR) Rates by Hospital (SPARCS): Beginning 20011 dataset. The dataset contains Potentially Preventable Readmission observed, expected, and risk adjusted rates by hospital for Medicaid enrollees beginning in 2011. The Potentially Preventable Readmission (PPR) software created by 3M Health Information Systems, identifies hospital admissions clinically related to an initial admission within a specified time period. For this dataset, readmissions were evaluated within a 30-day time period from the discharge date of the initial hospital admission. A PPR may have resulted from a deficiency in the process of care and treatment at the initial hospitalization or lack of post discharge follow up. PPRs are not defined by unrelated events that occur post-discharge, such as admissions for trauma. For each hospital, the total number of at risk admissions, the total number of observed PPR chains, the observed PPR rate, the expected PPR rate, and risk adjusted PPR rate are presented by year. This data set is available at : https://health.data.ny.gov/Health/Medicaid-Hospital-Inpatient-Potentially-Preventabl/ckvf-rbyn. For more information about the dataset, go to the dataset and look in the "About" section.

Getting Started

All communication with the API is done through HTTPS, and errors are communicated through HTTP response codes. Available response types include JSON, XML, and CSV, which are selectable by the "extension" on API requests or by HTTP Accepts headers.

This documentation also includes inline, runable examples. Click on any link that contains a gear symbol next to it to run that example live against the Medicaid Hospital Inpatient Potentially Preventable Readmission Rates by Hospital API: Beginning 2011 API.

App Tokens

All requests should include an app token that identifies your application, and each application should have its own unique app token. A limited number of requests can be made without an app token, but they are subject to much lower throttling limits than request that do include one. If you don't have an app token yet, click the button to the right to sign up for one.

Once you have an app token, you can include it with your request either by using the X-App-Token HTTP header, or by passing it via the $app_token parameter on your URL.

Response Codes

One of the following response codes will be returned with every request:

  1. 200Successful request.
  2. 202Request processing. You can retry your request, and when it's complete, you'll get a 200 instead.
  3. 400Bad request
  4. 401Unauthorized. You're not authorized to access this resource.
  5. 404Not found. The resource requested doesn't exist.
  6. 429Too Many Requests. The client has made too many requests and is currently being rate limited.
  7. 500Server errors. Our bad!

Code Samples

#!/usr/bin/env ruby

require 'net/https'
uri = URI('https://health.data.ny.gov/resource/medicaid-hospital-inpatient-potentially-preventable-readmission-rates-by-hospital-beginning-2011.json?recall_id=94')

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_PEER

request = Net::HTTP::Get.new(uri.request_uri)
request.add_field('X-App-Token', ARGV[0])

response = http.request(request)
puts response.code
puts response.body
#!/usr/bin/env python

import sys
import requests

r = requests.get('https://health.data.ny.gov/resource/medicaid-hospital-inpatient-potentially-preventable-readmission-rates-by-hospital-beginning-2011.json?recall_id=94', headers={'X-App-Token': sys.argv[1]})
print r.status_code
print r.text
request = require 'request'
options = uri: 'https://health.data.ny.gov/resource/medicaid-hospital-inpatient-potentially-preventable-readmission-rates-by-hospital-beginning-2011.json?$$app_token=APP_TOKEN&recall_id=94'
request options, (err, response, body) ->  console.log body
#!/bin/sh 

curl --header "X-App-Token: $1" "https://health.data.ny.gov/resource/medicaid-hospital-inpatient-potentially-preventable-readmission-rates-by-hospital-beginning-2011.json?recall_id=94"

Fields

The following fields are available on the Medicaid Hospital Inpatient Potentially Preventable Readmission Rates by Hospital API: Beginning 2011 API.

discharge_year

Human Name: Discharge Year
Type: number
Indicates the year of the discharge

Examples

Retrieve all records with discharge_year equal to 2013:

Retrieve all records where discharge_year is within 1 kilometer of Seattle, WA (47.598177,-122.33448):

https://health.data.ny.gov/resource/medicaid-hospital-inpatient-potentially-preventable-readmission-rates-by-hospital-beginning-2011.json?$where=within_circle(discharge_year, 47.598177,-122.33448, 1000)

facility_name

Human Name: Facility Name
Type: text
The name of the hospital in which the initial discharge took place

Examples

Retrieve all records with facility_name equal to WYOMING COMMUNITY HOSP CO:

Retrieve all records where facility_name is within 1 kilometer of Seattle, WA (47.598177,-122.33448):

https://health.data.ny.gov/resource/medicaid-hospital-inpatient-potentially-preventable-readmission-rates-by-hospital-beginning-2011.json?$where=within_circle(facility_name, 47.598177,-122.33448, 1000)

at_risk_admissions

Human Name: At Risk Admissions
Type: number
Total number of admissions at that hospital that could be followed by a readmission.

Examples

Retrieve all records with at_risk_admissions equal to 733308:

Retrieve all records where at_risk_admissions is within 1 kilometer of Seattle, WA (47.598177,-122.33448):

https://health.data.ny.gov/resource/medicaid-hospital-inpatient-potentially-preventable-readmission-rates-by-hospital-beginning-2011.json?$where=within_circle(at_risk_admissions, 47.598177,-122.33448, 1000)

observed_ppr_chains

Human Name: Observed PPR Chains
Type: number
Total number of admissions at that hospital that were followed by a readmission.

Examples

Retrieve all records with observed_ppr_chains equal to 44541:

Retrieve all records where observed_ppr_chains is within 1 kilometer of Seattle, WA (47.598177,-122.33448):

https://health.data.ny.gov/resource/medicaid-hospital-inpatient-potentially-preventable-readmission-rates-by-hospital-beginning-2011.json?$where=within_circle(observed_ppr_chains, 47.598177,-122.33448, 1000)

observed_ppr_rate

Human Name: Observed PPR Rate
Type: number
The number of observed PPR chains divided by the number of at risk admissions, multiplied by 100.

Examples

Retrieve all records with observed_ppr_rate equal to 100.00:

Retrieve all records where observed_ppr_rate is within 1 kilometer of Seattle, WA (47.598177,-122.33448):

https://health.data.ny.gov/resource/medicaid-hospital-inpatient-potentially-preventable-readmission-rates-by-hospital-beginning-2011.json?$where=within_circle(observed_ppr_rate, 47.598177,-122.33448, 1000)

expected_ppr_rate

Human Name: Expected PPR Rate
Type: number
The number of expected PPR chains divided by the number of at risk admissions, multiplied by 100.

Examples

Retrieve all records with expected_ppr_rate equal to 20.34:

Retrieve all records where expected_ppr_rate is within 1 kilometer of Seattle, WA (47.598177,-122.33448):

https://health.data.ny.gov/resource/medicaid-hospital-inpatient-potentially-preventable-readmission-rates-by-hospital-beginning-2011.json?$where=within_circle(expected_ppr_rate, 47.598177,-122.33448, 1000)

risk_adjusted_ppr_rate

Human Name: Risk Adjusted PPR Rate
Type: number
The observed PPR rate divided by the expected PPR rate, multiplied by the statewide PPR rate.

Examples

Retrieve all records with risk_adjusted_ppr_rate equal to 116.70:

Retrieve all records where risk_adjusted_ppr_rate is within 1 kilometer of Seattle, WA (47.598177,-122.33448):

https://health.data.ny.gov/resource/medicaid-hospital-inpatient-potentially-preventable-readmission-rates-by-hospital-beginning-2011.json?$where=within_circle(risk_adjusted_ppr_rate, 47.598177,-122.33448, 1000)