diagDetail

Query to specify data request for diagnosis parameters for additional context, categories and code ties.

Get Started with diagDetail

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

Example:

🔍

Request ICD-10 categories and details for all musculoskeletal system and connective tissue diagnoses.

# 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.diagDetail(diag_category = "musculoskeletal system and connective tissue")

# 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 diagDetail query, including details on the parameter values.

parameterdescriptionoptions
diag_codeICD-10 diagnosis codevalues available
diag_categoryCategory of the ICD-10 diagnosis codevalues available
diag_subcategorySub-category of the ICD-10 diagnosis codevalues available
short_diag_codeFirst three digits of the ICD-10 diagnosis codevalues available
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 query creation
True or False

Query Return Data

The diagDetail query returns the DIAG_TABLE for all diagnosis codes that meet the criterion specified within the query.

The DIAG_TABLE offers diagnosis descriptions, categorial mappings and additional detail relevant for analytic uses.

featuredescriptionexample
diag_codeICD-10 diagnosis codeE512
short_diag_codeFirst three characters of the ICD-10 diagnosis code, corresponding to the diagnosis subcategoryE51
diag_subcategoryName of the ICD-10 diagnosis sub-categorythiamine deficiency
diag_categoryName of the ICD-10 diagnosis categoryendocrine, nutri, and metabolic diseases/immunity disorders
diag_descDescription of the ICD-10 diagnosis codeWernicke's encephalopathy
icd9_codeICD-9 mapping to the ICD-10 diagnosis code2651
diag_severityCMS-designated severity score from 0 to 10070

Advanced Query Logic & Recipes

diagDetail 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!

🚧

diagDetail does not allow for nested lists within the query parameters

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