Healthcare Common Procedure Coding System (HCPCS) Level II

How to query public data sets using BigQuery

BigQuery is a fully managed data warehouse and analytics platform. Public datasets are available for you to analyze using SQL queries. You can access BigQuery public data sets using the web UI the command-line tool, or by making calls to the BigQuery REST API using a variety of client libraries such as Java, .NET, or Python.

To get started using a BigQuery public dataset, create or select a project. The first terabyte of data processed per month is free, so you can start querying public datasets without enabling billing. If you intend to go beyond the free tier, you should also enable billing.

  1. Sign in to your Google account.

    If you don't already have one, sign up for a new account.

  2. Select or create a Cloud Platform project.

    Go to the Manage resources page

  3. Enable billing for your project.

    Enable billing

  4. BigQuery is automatically enabled in new projects. To activate BigQuery in a pre-existing project, Enable the BigQuery API.

    Enable the API

Dataset overview

Classification of procedures performed for patients is important for billing and reimbursement in healthcare. The primary classification system used in the United States is Healthcare Common Procedure Coding System (HCPCS), maintained by Centers for Medicare and Medicaid Services (CMS). This system is divided into two levels: level I and level II.

Level I HCPCS codes classify services rendered by physicians. This system is based on Common Procedure Terminology (CPT), a coding system maintained by the American Medical Association (AMA). Level II codes, which are the focus of this public dataset, are used to identify products, supplies, and services not included in level I codes. The level II codes include items such as ambulance services, durable medical goods, prosthetics, orthotics and supplies used outside a physician’s office.

Given the ubiquity of administrative data in healthcare, HCPCS coding systems are also commonly used in areas of clinical research such as outcomes based research.

You can start exploring this data in the BigQuery console:

Go to HCPCS Level II data

Sample queries

Here are some examples of SQL queries you can run on this data in BigQuery.

These samples use BigQuery’s support for standard SQL. Use the #standardSQL tag to let BigQuery know you want to use standard SQL. For more information about the #standardSQL prefix, see Setting a query prefix.

What are the descriptions for a set of HCPCS level II codes?

This query retrieves the descriptions of the following HCPCS level II codes: G0202, A0998, A4465, A4565, S9441.

Web UI

Open the following query in the Web UI

#standardSQL
SELECT
  HCPC,
  SEQNUM,
  RECID,
  LONG_DESCRIPTION,
  SHORT_DESCRIPTION
FROM
  `bigquery-public-data.cms_codes.hcpcs`
WHERE
  HCPC IN ('G0202',
    'A0998',
    'A4465',
    'A4565',
    'S9441' )

Command-line

bq query --use_legacy_sql=false '
SELECT
  HCPC,
  SEQNUM,
  RECID,
  LONG_DESCRIPTION,
  SHORT_DESCRIPTION
FROM
  `bigquery-public-data.cms_codes.hcpcs`
WHERE
  HCPC IN ('G0202',
    'A0998',
    'A4465',
    'A4565',
    'S9441' )'

Sample results are shown here:

+-------+----------+--------+--------------------------------------------------------+------------------------------+
| HCPC  | SEQNUM   | RECID  | LONG_DESCRIPTION                                       | SHORT_DESCRIPTION            |
+-------+----------+--------+--------------------------------------------------------+------------------------------+
| S9441 | 0010     | 3      | Asthma education, non-physician provider, per session  | Asthma education             |
| A4465 | 0010     | 3      | Non-elastic binder for extremity                       | Non-elastic extremity binder |
| A0998 | 0010     | 3      | Ambulance response and treatment, no transport         | Ambulance response/treatment |
| A4565 | 0010     | 3      | Slings                                                 | Slings                       |
| G0202 | 0010     | 3      | Screening mammography, bilateral (2-view study of each | Scr mammo bi incl cad        |
|                             breast), including computer-aided detection (cad) when                                |
|                             performed                                                                             |
+-------+----------+--------+--------------------------------------------------------+------------------------------+

About the data

Dataset Source: Center for Medicare and Medicaid Services

Category: Healthcare

Use: This dataset is publicly available for anyone to use under the following terms provided by the Dataset Source - http://www.data.gov/privacy-policy#data_policy — and is provided "AS IS" without any warranty, express or implied, from Google. Google disclaims all liability for any damages, direct or indirect, resulting from the use of the dataset.

Update Frequency: Yearly

View in BigQuery: Go to HCPCS Level II data

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...