drgDetail
Query to specify data request for all Diagnosis Related Group (DRG) parameters for additional context and categories.
What is a Diagnosis Related Group (DRG)?
A patient classification scheme that groups patients into categories based on their principal diagnosis, secondary diagnoses, surgical procedures, age, sex, and discharge status. DRGs are used to determine hospital reimbursement rates under Medicare's Prospective Payment System (PPS).
Bespoke nature of DRG creation can be messy
The creation of DRGs is a deeply human process. Individual judgement and relationship dynamics play an outsized role in the creation and determination of DRG codes and the corresponding financial values - and many of these nuances are not recorded in a reliable fashion.
- 🏥 DRGs are assigned to patients based on information reported by the hospital on the Medicare Inpatient Hospital Discharge Data (MS-DRG) abstract.
- 🕓 These abstracts contain information about the patient's primary diagnosis, up to 24 additional diagnoses, and up to 25 procedures performed during the stay.
- ☔ DRGs are used by Medicare and other payors to make payments to hospitals for inpatient stays.
- 💸 Transparency of both clinical logic going into DRG code determinations (and the price coming out) are frequently obfuscated by
All in all, CareQuery® leverages the comprehensive longitudinal record of patients to articulately arrive at a reliable DRG determination for inpatient visits, helping users to comprehensively look through the DRG lens, despite the DRG's traditional data lineage shortcomings.
Get Started with drgDetail
If you have already setup CareQuery, run the below code to get started with your first drgDetail query.
Example:
Query the details around all Ischemic Stroke and Eye DRGs
# 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.drgDetail(drg_code = ["061","062","063"],
drg_category = "eye")
# 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.
parameter | description | options |
---|---|---|
drg_code | Diagnosis related group (DRG) code. This code is based on your primary and secondary diagnoses, other conditions (co-morbidities), age, sex, and necessary medical procedures. | values available |
drg_category | Medical Diagnostic Category MDC of the DRG | values available |
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 query creation | True or False |
Query Return Data
The drgDetail query returns the DRG_TABLE for all diagnosis codes that meet the criterion specified within the query.
The DRG_TABLE offers diagnosis descriptions, categorial mappings and additional detail relevant for analytic uses.
feature | description | example |
---|---|---|
drg_code | Diagnosis related group (DRG) code. This code is based on your primary and secondary diagnoses, other conditions (comorbidities), age, sex, and necessary medical procedures | 099 |
drg_name | Descriptive name of the DRG code | non-bacterial infection of nervous system except viral meningitis without cc/mcc |
drg_category | Medical Diagnostic Category MDC of the DRG | nervous system |
drg_type | The type of diagnosis related group (DRG) | medical |
drg_post_acute | Binary indicator of whether a DRG is post acute or not | False |
drg_special | Binary indicator of whether a DRG is a special condition - particularly complex or expensive conditions that may require specialized care, longer hospital stays, and/or more expensive medications and procedures | False |
drg_weight | Represents the relative resources required to care for patients in that particular DRG. This CMS computed figure highlights a DRG's relative to the average resources used to treat cases in all other DRGs | 1.3985 |
los_gmean | The geometric mean length of stay corresponding to a DRG | 3.7 |
los_mean | The arithmetic mean length of stay corresponding to a DRG | 4.6 |
Advanced Query Logic & Recipes
drgDetail 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!
drgDetail does not allow for nested lists within the query parameters
Please reference the following resources to better understand how to create rockstar queries!
Updated about 1 year ago