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.

parameterdescriptionoptions
npiNational Provider Identifier (NPI) of individual and/or
organizational provider(s) that appear on the encounter.
Any Valid NPI
systemName 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_codeTaxonomy 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 providervalues available
specialtySpecialty of the organization or individual provider(s), specific focus of a provider by patient population, disease, skill or philosophyvalues available
specialty_categorySpecialty category of the organization or individual provider(s), broad focus of a provider by patient population, disease, skill or philosophyvalues available
subspecialtySpecialty subcategory of the organization or individual
provider(s), hyper-specific focus of a provider by patient
population, disease, skill or philosophy
values available
short_zipFirst three digits the zip code of the NPPES registered provider address ⚠️ (may differ from actual practice location)First 3 digits of zip code(s)
metroMetropolitan and micropolitan statistical area of the NPPES registered provider address ⚠️ (may differ from actual practice location)values available
stateUS State code of the NPPES registered provider address
⚠️ (may differ from actual practice location)
values available
divisionUS Census Bureau divisional grouping of the NPPES registered provider address ⚠️ (may differ from actual practice location)values available
regionUS Census Bureau regional grouping of the NPPES registered provider address ⚠️ (may differ from actual practice location)values available
lookback_periodString indicating the quarter and year of the provider practice
affiliation behavior 1-year lookback window
"Q3-2023" or 'current' (default)
limitNumber of rows returned in the data requestInteger or False
showBinary 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

featuredescriptionexample
hcp_npiNational Provider Identifier for individual providers.1003002783
hcp_nameFull name of the corresponding individual provider.matthew hartman
hcp_taxonomyPrimary taxonomy code of the individual provider111N000000X
hcp_stateUS State code of the NPPES registered provider address
⚠️ (may differ from actual practice location)
PA
hcp_short_zipShort zip code of the NPPES registered provider address
⚠️ (may differ from actual practice location)
152
system_affiliationAnticipated health system affiliation of the individual provider derived from their practice patterns and reported affiliation.allegheny health network
affiliation_confoundedBinary indicator of whether provider practice patterns indicate multiple affiliations or absence of a reliable behavioral indicator of affiliation.0
primary_hco_npiNational 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_nameName 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_systemHealth 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_encountersNumber of encounters seen by individual provider at the primary_hco within the lookback window.2995
primary_hco_proportionProportion of encounters seen by individual provider at the primary_hco compared to all other hco's, within the lookback window.0.33
secondary_hco_npiNational 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_nameName 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_systemHealth 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_encountersNumber of encounters seen by individual provider at the secondary_hco within the lookback window.1915
secondary_hco_proportionProportion of encounters seen by individual provider at the secondary_hco compared to all other hco's, within the lookback window.0.21
tertiary_hco_npiNational 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_nameName 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_systemHealth 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_encountersNumber of encounters seen by individual provider at the tertiary_hco within the lookback window.1648
tertiary_hco_proportionProportion of encounters seen by individual provider at the tertiary_hco compared to all other hco's, within the lookback window.0.18
lookback_periodEnd 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'
currentBinary 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!