affiliationActivity

Query to specify health system provider affiliation query parameters to return nuanced affiliation data, including the actual claims activity-by-affiliation for each provider.

Health system provider affiliations, provider directories, and the reality/expectations/contradictions surrounding those relationships can be complicated.

affiliationActivity gives users to not only view affiliation, but also understand where a doctor is spending their time, which systems they're billing alongside and how that impacts the overall health affiliation posture of every individual provider in the US.

Get Started with affiliationActivity

If you have already setup CareQuery, run the below code to get started with your first affiliationActivity query.

Example:

🔍

All Gastro providers affiliated (in any way) with HCA in the Kansas City metro.

# import package
from care_query.care_query import CareQuery

# instantiate and connect
cq = CareQuery(email = "your-email", 
               token = "your-api-token")

# construct query
query = cq.affiliationActivity(system = "hca healthcare",
                               subspecialty = "internal medicine - gastroenterology",
  														 metro = "kansas city, mo-ks")

# estimate query size (optional)
estimate = query.estimate() 

# return query sample data (optional)
sample = query.sample() 

# execute query to return results
data = query.execute() 

Query Parameters

The following a parameters are available within the affiliationActivity query, including details on the parameter values.

parameter

description

options

npi

National Provider Identifier (NPI) of individual and/or
organizational provider(s) that appear on the encounter.

Any Valid NPI

system

Name of the system an individual provider may be affiliated with in any way - either indicated by overall affiliation, or via the system affiliation for any of the top 3 healthcare organization (hco) in which they practice at.

values available

taxonomy_code

Taxonomy of the organization or individual provider, 10-digit code that used to identify the type, classification, and area of specialization of an individual or organizational healthcare provider

values available

specialty

Specialty of the organization or individual provider(s), specific focus of a provider by patient population, disease, skill or philosophy

values available

specialty_category

Specialty category of the organization or individual provider(s), broad focus of a provider by patient population, disease, skill or philosophy

values available

subspecialty

Specialty subcategory of the organization or individual
provider(s), hyper-specific focus of a provider by patient
population, disease, skill or philosophy

values available

short_zip

First three digits the zip code of the NPPES registered provider address ⚠️ (may differ from actual practice location)

First 3 digits of zip code(s)

metro

Metropolitan and micropolitan statistical area of the NPPES registered provider address ⚠️ (may differ from actual practice location)

values available

state

US State code of the NPPES registered provider address
⚠️ (may differ from actual practice location)

values available

division

US Census Bureau divisional grouping of the NPPES registered provider address ⚠️ (may differ from actual practice location)

values available

region

US Census Bureau regional grouping of the NPPES registered provider address ⚠️ (may differ from actual practice location)

values available

lookback_period

String indicating the quarter and year of the provider practice
affiliation behavior 1-year lookback window

"Q3-2023" or 'current' (default)

limit

Number of rows returned in the data request

Integer or False

show

Binary indicator as to whether you'd like
query to be printed for review upon it's creation

True or False

Query Return Data

The affiliationActivity query returns the AFFILIATION_TABLE for all encounters that meet the criterion specified within the query.

The AFFILIATION_TABLE offers comprehensive detail of individual provider affiliations through time, with particular attention to the totals of their actual clinical activity, where they practice, how those locations are affiliated with systems and is even informed from our CareQuery® user base feedback via updateAffiliation

feature

description

example

hcp_npi

National Provider Identifier for individual providers.

1003002783

hcp_name

Full name of the corresponding individual provider.

matthew hartman

hcp_taxonomy

Primary taxonomy code of the individual provider

111N000000X

hcp_state

US State code of the NPPES registered provider address
⚠️ (may differ from actual practice location)

PA

hcp_short_zip

Short zip code of the NPPES registered provider address
⚠️ (may differ from actual practice location)

152

system_affiliation

Anticipated health system affiliation of the individual provider derived from their practice patterns and reported affiliation.

allegheny health network

affiliation_confounded

Binary indicator of whether provider practice patterns indicate multiple affiliations or absence of a reliable behavioral indicator of affiliation.

0

primary_hco_npi

National Provider Identifier (NPI) of the facility/department where the individual provider performed the most encounters within one year of the indicated lookback year/quarter.

1194744805

primary_hco_name

Name of the facility/department where the individual provider performed the most encounters within one year of the indicated lookback year/quarter.

west penn allegheny
health system inc

primary_hco_system

Health system affiliation of the facility/department where the individual provider performed the most encounters within one year of the indicated lookback year/quarter.

allegheny health network

primary_hco_encounters

Number of encounters seen by individual provider at the primary_hco within the lookback window.

2995

primary_hco_proportion

Proportion of encounters seen by individual provider at the primary_hco compared to all other hco's, within the lookback window.

0.33

secondary_hco_npi

National Provider Identifier (NPI) of the facility/department where the individual provider performed the second most encounters within one year of the indicated lookback year/quarter.

1992183164

secondary_hco_name

Name of the facility/department where the individual provider performed the second most encounters within one year of the indicated lookback year/quarter.

west penn allegheny
health system inc

secondary_hco_system

Health system affiliation of the facility/department where the individual provider performed the second most encounters within one year of the indicated lookback year/quarter.

allegheny health network

secondary_hco_encounters

Number of encounters seen by individual provider at the secondary_hco within the lookback window.

1915

secondary_hco_proportion

Proportion of encounters seen by individual provider at the secondary_hco compared to all other hco's, within the lookback window.

0.21

tertiary_hco_npi

National Provider Identifier (NPI) of the facility/department where the individual provider performed the third most encounters within one year of the indicated lookback year/quarter.

1285667493

tertiary_hco_name

Name of the facility/department where the individual provider performed the third most encounters within one year of the indicated lookback year/quarter.

west penn allegheny
health system inc

tertiary_hco_system

Health system affiliation of the facility/department where the individual provider performed the third most encounters within one year of the indicated lookback year/quarter.

allegheny health network

tertiary_hco_encounters

Number of encounters seen by individual provider at the tertiary_hco within the lookback window.

1648

tertiary_hco_proportion

Proportion of encounters seen by individual provider at the tertiary_hco compared to all other hco's, within the lookback window.

0.18

lookback_period

End year-quarter value of the 1-year lookback period. Per the example, affiliation is calculated using encounters from the start of Q3-2022 to the start of Q3-2023.

'Q3-2022 to Q3-2023'

current

Binary indicator as to whether the period is the most recent recorded within CareQuery.

1

Advanced Query Logic & Recipes

As one thinks about what the healthcare encounter's they'd like returned in a query...the diagnosis, procedure, location, time and specialty criterion...things can get quite complex.

affiliationActivity gives users categorical groupings for ease of use, as well as SQL-like capabilities to tactfully specify AND and OR logic, right within the CareQuery API!

Please reference the following resources to better understand how to create rockstar queries!