Cardiac Surgery and Percutaneous Coronary Interventions by Hospital API : Beginning 2008

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 featured API page is for the Cardiac Surgery and Percutaneous Coronary Interventions by Hospital API : Beginning 2008 dataset. That dataset contains the number of cases, number of in hospital/30 day deaths, observed, expected and risk- adjusted mortality rates for cardiac surgery and percutaneous coronary interventions (PCI) by hospital. Regions represent where the hospitals are located. The initial Health Data NY dataset includes patients discharged between January 1, 2008, and December 31, 2010. Analyses of risk-adjusted mortality rates and associated risk factors are provided for 2010 and for the three-year period from 2008 through 2010. For PCI, analyses of all cases, non-emergency cases (which represent the majority of procedures) and emergency cases are included. Subsequent year reports data will be appended to this dataset. The dataset is available at: https://health.data.ny.gov/Health/Cardiac-Surgery-and-Percutaneous-Coronary-Interven/jtip-2ccj. 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 Cardiac Surgery and Percutaneous Coronary Interventions by Hospital API : Beginning 2008 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/cardiac-surgery-and-percutaneous-coronary-interventions-by-hospital-beginning-2008.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/cardiac-surgery-and-percutaneous-coronary-interventions-by-hospital-beginning-2008.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/cardiac-surgery-and-percutaneous-coronary-interventions-by-hospital-beginning-2008.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/cardiac-surgery-and-percutaneous-coronary-interventions-by-hospital-beginning-2008.json?recall_id=94"

Fields

The following fields are available on the Cardiac Surgery and Percutaneous Coronary Interventions by Hospital API : Beginning 2008 API.

facility_id

Human Name: Facility ID
Type: text
New York State (NYS) Facility Identification Number. Facility ID ‘0000’ represents the sum (or average) of all the reported data in NYS

Examples

Retrieve all records with facility_id equal to 3058:

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

https://health.data.ny.gov/resource/cardiac-surgery-and-percutaneous-coronary-interventions-by-hospital-beginning-2008.json?$where=within_circle(facility_id, 47.598177,-122.33448, 1000)

hospital_name

Human Name: Hospital Name
Type: text
Hospital Name

Examples

Retrieve all records with hospital_name equal to Winthrop Univ. Hosp:

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

https://health.data.ny.gov/resource/cardiac-surgery-and-percutaneous-coronary-interventions-by-hospital-beginning-2008.json?$where=within_circle(hospital_name, 47.598177,-122.33448, 1000)

detailed_region

Human Name: Detailed Region
Type: text
Region of hospital performing the procedure

Examples

Retrieve all records with detailed_region equal to Western NY - Rochester:

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

https://health.data.ny.gov/resource/cardiac-surgery-and-percutaneous-coronary-interventions-by-hospital-beginning-2008.json?$where=within_circle(detailed_region, 47.598177,-122.33448, 1000)

region

Human Name: Region
Type: text

Examples

Retrieve all records with region equal to Western NY - Rochester:

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

https://health.data.ny.gov/resource/cardiac-surgery-and-percutaneous-coronary-interventions-by-hospital-beginning-2008.json?$where=within_circle(region, 47.598177,-122.33448, 1000)

procedure

Human Name: Procedure
Type: text
Type of procedure performed: All PCI, Non-Emergency PCI, Emergency PCI, CABG, or Valve Surgery. PCI stands for Percutaneous Coronary Intervention, sometimes also called coronary angioplasty or coronary stenting. CABG stands for Coronary Artery Bypass Graft surgery.

Examples

Retrieve all records with procedure equal to Valve or Valve/CABG:

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

https://health.data.ny.gov/resource/cardiac-surgery-and-percutaneous-coronary-interventions-by-hospital-beginning-2008.json?$where=within_circle(procedure, 47.598177,-122.33448, 1000)

year_of_hospital_discharge

Human Name: Year of Hospital Discharge
Type: text
Year or range of years included in analysis

Examples

Retrieve all records with year_of_hospital_discharge equal to 2011:

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

https://health.data.ny.gov/resource/cardiac-surgery-and-percutaneous-coronary-interventions-by-hospital-beginning-2008.json?$where=within_circle(year_of_hospital_discharge, 47.598177,-122.33448, 1000)

number_of_cases

Human Name: Number of Cases
Type: number
Number of procedures performed

Examples

Retrieve all records with number_of_cases equal to 54035:

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

https://health.data.ny.gov/resource/cardiac-surgery-and-percutaneous-coronary-interventions-by-hospital-beginning-2008.json?$where=within_circle(number_of_cases, 47.598177,-122.33448, 1000)

number_of_deaths

Human Name: Number of Deaths
Type: number
Number of cases resulting in death during the hospitalization or after discharge but within 30-days

Examples

Retrieve all records with number_of_deaths equal to 1021:

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

https://health.data.ny.gov/resource/cardiac-surgery-and-percutaneous-coronary-interventions-by-hospital-beginning-2008.json?$where=within_circle(number_of_deaths, 47.598177,-122.33448, 1000)

observed_mortality_rate

Human Name: Observed Mortality Rate
Type: number
The observed number of deaths divided by the total number of cases

Examples

Retrieve all records with observed_mortality_rate equal to 11.76:

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

https://health.data.ny.gov/resource/cardiac-surgery-and-percutaneous-coronary-interventions-by-hospital-beginning-2008.json?$where=within_circle(observed_mortality_rate, 47.598177,-122.33448, 1000)

expected_mortality_rate

Human Name: Expected Mortality Rate
Type: number
The sum of the predicted probabilities of death for all patients divided by the total number of patients

Examples

Retrieve all records with expected_mortality_rate equal to 6.06:

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

https://health.data.ny.gov/resource/cardiac-surgery-and-percutaneous-coronary-interventions-by-hospital-beginning-2008.json?$where=within_circle(expected_mortality_rate, 47.598177,-122.33448, 1000)

risk_adjusted_mortality_rate

Human Name: Risk-Adjusted Mortality Rate
Type: number
The best estimate, based on the statistical model, of what the provider’s mortality rate would have been if the provider had a mix of patients similar to the statewide mix. It is obtained by first dividing the observed mortality rate by the expected mortality rate, and then multiplying that quotient by the statewide mortality rate

Examples

Retrieve all records with risk_adjusted_mortality_rate equal to 13.15:

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

https://health.data.ny.gov/resource/cardiac-surgery-and-percutaneous-coronary-interventions-by-hospital-beginning-2008.json?$where=within_circle(risk_adjusted_mortality_rate, 47.598177,-122.33448, 1000)

lower_limit_of_confidence_interval

Human Name: Lower Limit of Confidence Interval
Type: number
Lower 95% confidence limit for risk adjusted mortality rate

Examples

Retrieve all records with lower_limit_of_confidence_interval equal to 5.47:

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

https://health.data.ny.gov/resource/cardiac-surgery-and-percutaneous-coronary-interventions-by-hospital-beginning-2008.json?$where=within_circle(lower_limit_of_confidence_interval, 47.598177,-122.33448, 1000)

upper_limit_of_confidence_interval

Human Name: Upper Limit of Confidence Interval
Type: number
Upper 95% confidence limit for risk adjusted mortality rate

Examples

Retrieve all records with upper_limit_of_confidence_interval equal to 140.57:

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

https://health.data.ny.gov/resource/cardiac-surgery-and-percutaneous-coronary-interventions-by-hospital-beginning-2008.json?$where=within_circle(upper_limit_of_confidence_interval, 47.598177,-122.33448, 1000)

comparison_results

Human Name: Comparison Results
Type: text
A statistical test was performed to determine if each hospital performed significantly better or worse than average for the given year. Result may be: Significantly higher than statewide rate, Significantly lower than statewide rate, Not different than the statewide rate

Examples

Retrieve all records with comparison_results equal to Statewide Rate:

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

https://health.data.ny.gov/resource/cardiac-surgery-and-percutaneous-coronary-interventions-by-hospital-beginning-2008.json?$where=within_circle(comparison_results, 47.598177,-122.33448, 1000)