Learn Health Data

Concepts /

Place of service

A two-digit code for where a service happened.

Professional claims carry a two-digit place of service (POS) code on every service line. It tells the payer where the service happened.

Examples from the CMS code set: 11 = Office, 20 = Urgent Care Facility, 24 = Ambulatory Surgical Center.

Medicare can pay differently for the same service depending on whether it happened in a facility or an office, so analysts often split results by setting.

In this site's data: provider_services_hi.place_of_service uses CMS's simplified version: F = facility, O = non-facility (generally an office).

In the tables

ColumnTablesMeaning
place_of_serviceprovider_services_hiCMS's facility flag for the place of service submitted on the claims: F = facility, O = non-facility. Non-facility is generally an office setting, but CMS includes other settings too.
npiprovider_services_hiThe performing provider. Together with hcpcs_code and place_of_service it defines one row.
hcpcs_codeprovider_services_hiThe billed code. The same NPI and code can have one F row and one O row.
servicesprovider_services_hiNumber of services for that NPI, code and setting. CMS notes the unit counted can vary from service to service.
beneficiariesprovider_services_hiDistinct Medicare beneficiaries for that NPI, code and setting.

Formats

Common pitfalls

Beginner queries

DuckDB SQL against this site's Parquet tables. Illustrative — the graded set is on /learn/.

Rows, providers and services by setting

DuckDB SQL

SELECT place_of_service, COUNT(*) AS rows, COUNT(DISTINCT npi) AS npi_count, SUM(services) AS services FROM provider_services_hi GROUP BY place_of_service ORDER BY place_of_service;

In this site's Hawaii cut, most rows and services are O (non-facility). Illustrative DuckDB SQL; graded exercises live on /learn/.

NPI and code pairs billed in both settings

DuckDB SQL

SELECT npi, hcpcs_code, COUNT(*) AS rows, SUM(services) AS services FROM provider_services_hi GROUP BY npi, hcpcs_code HAVING COUNT(DISTINCT place_of_service) = 2 ORDER BY services DESC LIMIT 10;

Each pair here has two rows. This is why you sum across settings before ranking.

Facility share of services by specialty

DuckDB SQL

SELECT p.specialty, SUM(s.services) AS services, ROUND(SUM(CASE WHEN s.place_of_service = 'F' THEN s.services ELSE 0 END) / SUM(s.services), 2) AS facility_share FROM provider_services_hi s JOIN providers_hi p USING (npi) GROUP BY p.specialty ORDER BY services DESC LIMIT 10;

Joins on npi to bring in specialty. Look at how different the facility share is from one specialty to the next.

Where this shows up in the claim cycle: How a Claim Gets Paid, module 2: The claim's journey

Used in: Join to HCPCS Level II descriptions

Sources