Terminology
Overview
Terminology sets are reference code sets and descriptions used in healthcare analytics. These code sets are maintained by many different organizations, updated on various frequencies, and often distributed in ways that make it a pain to load them into your data warehouse.
We're adding as many open source healthcare terminology sets as we can to the Tuva Project so they are easily available for healthcare analytics in a data warehouse. You can search through and learn about these terminologies in this section. If there is a code set you would like to see added you can submit an issue on GitHub.
Most of the terminology sets are maintained on GitHub. However some of the larger sets are maintained on S3. If you click a link below and it takes you to a file on GitHub that only has a header, that terminology set is maintained on S3.
Terminology Set | Maintainer | Last Updated | Download CSV |
---|---|---|---|
Admit Source | National Uniform Billing Committee | 1/1/2024 | Link |
Admit Type | National Uniform Billing Committee | 1/1/2024 | Link |
APR-DRG | 3M | 1/1/2024 | Link |
Bill Type | National Uniform Billing Committee | 11/3/2022 | Link |
Claim Type | Tuva | 11/4/2023 | Link |
Code Type | Tuva | 4/19/2022 | Link |
Discharge Disposition | National Uniform Billing Committee | 1/1/2024 | Link |
Encounter Type | Tuva | 6/17/2022 | Link |
Ethnicity | Tuva | 11/3/2022 | Link |
Gender | Tuva | 4/19/2022 | Link |
HCPCS Level II | Centers for Medicare & Medicaid Services (CMS) | 4/19/2022 | Link |
ICD-9-CM | Centers for Medicare & Medicaid Services (CMS) | 5/10/2023 | Link |
ICD-9-PCS | Centers for Medicare & Medicaid Services (CMS) | 5/10/2023 | Link |
ICD-10-CM | Centers for Disease Control and Prevention (CDC) | 1/1/2024 | Link |
ICD-10-PCS | Centers for Medicare & Medicaid Services (CMS) | 1/1/2024 | Link |
LOINC | Regenstrief Institute | 9/18/2023 | Link |
LOINC Deprecated Mapping | Regenstrief Institute | 9/18/2023 | Link |
MDC | Centers for Medicare & Medicaid Services (CMS) | 1/1/2024 | Link |
Medicare Dual Eligibility | Centers for Medicare & Medicaid Services (CMS) | 3/7/2023 | Link |
Medicare Status | Centers for Medicare & Medicaid Services (CMS) | 11/3/2022 | Link |
MS-DRG | Centers for Medicare & Medicaid Services (CMS) | 1/1/2024 | Link |
NDC | CodeRx | 4/24/2024 | Link |
Payer Type | Tuva | 4/19/2022 | Link |
Place of Service | Centers for Medicare & Medicaid Services (CMS) | 4/19/2022 | Link |
Present on Admission | Centers for Medicare & Medicaid Services (CMS) | 4/19/2022 | Link |
Race | Tuva | 2/3/2023 | Link |
Revenue Center | National Uniform Billing Committee | 6/23/2022 | Link |
RxNorm to ATC | CodeRx | 4/24/2024 | Link |
Snomed-CT | US National Library of Medicine | 3/1/2024 | |
Snomed-CT transitive closures | US National Library of Medicine | 3/1/2024 | |
Snomed-CT to ICD-10-CM Map | US National Library of Medicine | 9/1/2023 | Link |
Maintenance
The instructions to update each terminology file have been provided below. Steps may differ based on how often codes are updated. For example, admit source is rarely updated so optional steps have been included. This file is also small enough that a person can manually review the codes for changes. On the other hand, ICD-10-CM codes are released yearly. The file is too large for manual review and should always be refreshed.
Admit Source Code
- Navigate to the ResDac Inpatient website
- Click "View Data Documentation" under the page title
- Locate and select the Variable Name "Claim Source Inpatient Admission Code"
- Open the .txt file at the bottom of the webpage
Follow steps 5-11 if there are any changes to the admit source codes. Otherwise, skip to step 12
- Copy and paste the code list into any text editor
- Format the codes as a CSV file and save
- Find and replace "—" with a hyphen (-)
- Import the CSV file into any data warehouse
- Upload the CSV file from the data warehouse to S3 (credentials with write permissions to the S3 bucket are required)
-- example code for Snowflake
copy into s3://tuva-public-resources/terminology/admit_source.csv
from [table_created_in_step_7]
file_format = (type = csv field_optionally_enclosed_by = '"')
storage_integration = [integration_with_s3_write_permissions]
OVERWRITE = TRUE;
- Create a branch in The Tuva Project
- Copy and paste the updated codes into the admit source file
- Submit a pull request
- Create a branch in docs. Update the
last_updated
column in the table above with the current date. - Submit a pull request
Admit Type Code
- Navigate to the ResDac Inpatient website
- Click "View Data Documentation" under the page title
- Locate and select the Variable Name "Claim Inpatient Admission Type Code"
- Open the .txt file at the bottom of the webpage
Follow steps 5-11 if there are any changes. Otherwise, skip to step 12
- Copy and paste the code list into any text editor
- Format the codes as a CSV file and save
- Find and replace "—" with a hyphen (-)
- Import the CSV file into any data warehouse
- Upload the CSV file from the data warehouse to S3 (credentials with write permissions to the S3 bucket are required)
-- example code for Snowflake
copy into s3://tuva-public-resources/terminology/admit_type.csv
from [table_created_in_step_7]
file_format = (type = csv field_optionally_enclosed_by = '"')
storage_integration = [integration_with_s3_write_permissions]
OVERWRITE = TRUE;
- Create a branch in The Tuva Project
- Copy and paste the updated codes into the admit type file
- Submit a pull request
- Create a branch in docs. Update the
last_updated
column in the table above with the current date - Submit a pull request
APR-DRG
- Navigate to the AHRQ HCUP website
- Click the header tab "Database Information"
- Click on the hyperlink "NIS Database Documentation"
- Under "Additional Resources for Data Elements" click on the hyperlink "APR-DRGs Methodology Overview Version 31"
- Scroll to the bottom of the PDF, copy and paste the codes found in "Appendix A - List of All Patient refined DRGs" into any text editor
- Format the codes as a CSV file and save
- Import the CSV file into any data warehouse
- Upload the CSV file from the data warehouse to S3 (credentials with write permissions to the S3 bucket are required)
-- example code for Snowflake
copy into s3://tuva-public-resources/terminology/apr_drg.csv
from [table_created_in_step_7]
file_format = (type = csv field_optionally_enclosed_by = '"')
storage_integration = [integration_with_s3_write_permissions]
OVERWRITE = TRUE;
- Create a branch in The Tuva Project
- Copy and paste the CSV formatted code list into the APR-DRG file
- Create a branch in docs. Update the
last_updated
column in the table above with the current date - Submit a pull request
Discharge Disposition
- Navigate to the ResDac Inpatient website
- Click "View Data Documentation" under the page title
- Locate and select the Variable Name "Patient Discharge Status Code"
- Open the .txt file at the bottom of the webpage
Follow steps 5-11 if there are any changes. Otherwise, skip to step 12
- Copy and paste the code list into any text editor
- Format the codes as a CSV file and save
- Find and replace "—" with a hyphen (-)
- Import the CSV file into any data warehouse
- Upload the CSV file from the data warehouse to S3 (credentials with write permissions to the S3 bucket are required)
-- example code for Snowflake
copy into s3://tuva-public-resources/terminology/discharge_disposition.csv
from [table_created_in_step_7]
file_format = (type = csv field_optionally_enclosed_by = '"')
storage_integration = [integration_with_s3_write_permissions]
OVERWRITE = TRUE;
- Create a branch in The Tuva Project
- Copy and paste the updated codes into Discharge Disposition file
- Submit a pull request
- Create a branch in docs. Update the
last_updated
column in the table above with the current date - Submit a pull request
ICD-10-CM
- Navigate to the CMS ICD 10 website
- In the left hand menu, click the hyperlink for ICD-10-CM of the current fiscal year (e.g. 2024 ICD-10-CM)
- Under Downloads, click "Code Description in Tabular Order"
- Unzip the downloaded file and open "icd_10cm_codes"
- Format this file as a CSV and save
- Import the CSV file into any data warehouse
- Upload the CSV file from the data warehouse to S3 (credentials with write permissions to the S3 bucket are required)
-- example code for Snowflake
copy into s3://tuva-public-resources/terminology/icd_10_cm.csv
from [table_created_in_step_7]
file_format = (type = csv field_optionally_enclosed_by = '"')
storage_integration = [integration_with_s3_write_permissions]
OVERWRITE = TRUE;
- Create a branch in docs. Update the
last_updated
column in the table above with the current date - Submit a pull request
The below steps are only required if the headers of the file need to be changed. The Tuva Project does not store the contents of the ICD-10-CM file in GitHub because it is a large file.
- Create a branch in The Tuva Project
- Alter the headers as needed in ICD-10-CM file
- Submit a pull request
ICD-10-PCS
- Navigate to the CMS ICD 10 website
- In the left hand menu, click the hyperlink for ICD-10-PCS of the current fiscal year (e.g. 2024 ICD-10-PCS)
- Under Downloads, click "Code Description in Tabular Order"
- Unzip the downloaded file and open "icd_10pcs_codes"
- Format this file as a CSV and save
- Import the CSV file into any data warehouse
- Upload the CSV file from the data warehouse to S3 (credentials with write permissions to the S3 bucket are required)
- Create a branch in docs. Update the
last_updated
column in the table above with the current date - Submit a pull request
-- example code for Snowflake
copy into s3://tuva-public-resources/terminology/icd_10_pcs.csv
from [table_created_in_step_6]
file_format = (type = csv field_optionally_enclosed_by = '"')
storage_integration = [integration_with_s3_write_permissions]
OVERWRITE = TRUE;
The below steps are only required if the headers of the file need to be changed. The Tuva Project does not store the contents of the ICD-10-PCS file in GitHub because it is a large file.
- Create a branch in The Tuva Project
- Alter the headers as needed in ICD-10-PCS file
- Submit a pull request
MDC
- Navigate to the CMS MS DRG website
- Under the section "MS-DRG Definitions and Manual and Software", click on "V41 Definitions and Manual Table of Contents - Full Titles - HTML Versions"
- The version (e.g. V41) will change with each new release.
- Click on the hyperlink "Appendix A List of MS-DRGs Version 41.0"
- Click on the hyperlink "Design and development of the Diagnosis Related Group (DRGs)"
- Scroll through the PDF to find the "Major Diagnostic Categories" table
Follow steps 5-11 if there are any changes. Otherwise, skip to step 12
- Copy and paste the code list into any text editor
- Format the codes as a CSV and save
- Import the CSV file into any data warehouse
- Upload the CSV file from the data warehouse to S3 (credentials with write permissions to the S3 bucket are required)
-- example code for Snowflake
copy into s3://tuva-public-resources/terminology/mdc.csv
from [table_created_in_step_7]
file_format = (type = csv field_optionally_enclosed_by = '"')
storage_integration = [integration_with_s3_write_permissions]
OVERWRITE = TRUE;
- Create a branch in The Tuva Project
- Copy and paste the updated codes into the MDC file
- Submit a pull request
- Create a branch in docs. Update the
last_updated
column in the table above with the current date - Submit a pull request
MS-DRG
On October 1st, CMS releases a list of MS-DRG codes that are valid for the fiscal year. This list only contains valid codes and omits any that have been deprecated. Tuva maintains these deprecated code so historical data can be analyzed.
- Navigate to the CMS MS DRG website
- Under the section "MS-DRG Definitions and Manual and Software", click on "V41 Definitions and Manual Table of Contents - Full Titles - HTML Versions"
- The version (e.g. V41) will change with each new release.
- Click on the hyperlink "Appendix A List of MS-DRGs Version 41.0"
- Click on the hyperlink "List of MS-DRGs Version 41.0"
- Copy and paste the list of MS-DRGs into any text editor.
- Format the file
- Remove the text "MDC" from column 2
- Wrap the description in column 4 with double quotes so commas are interpreted correctly
- Save the file
- Import the file into any data warehouse that also has the previous version of MS-DRG loaded
- Use the SQL below to populate the
deprecated
anddeprecated_date
columns. The script does the following:- Compares the old file with the new file to determine if codes have been deprecated. If they have been, set the column "deprecated" to 1 and "deprecated_date" to the date the newest codes were published (i.e. the beginning of the current fiscal year)
- UNIONs the list of deprecated codes with new valid codes
- Cleans up any formatting issues with the output and creates a table.
-- create table from the output of the script
create table [ms_drg_new] as
-- compare the old codes with the new codes and only return codes that are missing
with depreacted_ms_drg_codes as(
select
old.ms_drg_code
, old.mdc_code
, old.medical_surgical
, old.ms_drg_description
, 1 as deprecated
, case when deprecated = 0 then '2023-10-01'
else deprecated_date
end as deprecated_date
from [previous_ms_drg_codes] old
left join [current_ms_drg_codes] new
on old.ms_drg_code = new.ms_drg_code
where new.ms_drg_code is null
)
-- union valid codes and depreacted codes together
, union_all_codes as(
select
ms_drg_code
, mdc_code
, medical_surgical
, 0 as deprecated
, null as deprecated_date
from [current_ms_drg_codes]
where ms_drg_code not in (select ms_drg_code from depreacted_ms_drg_codes)
union all
select
ms_drg_code
, mdc_code
, medical_surgical
, deprecated
, deprecated_date
from depreacted_ms_drg_codes
)
-- clean up formatting as necessary
select
trim(ms_drg_code) as ms_drg_code
, nullif(trim(mdc_code),'') as mdc_code
, trim(medical_surgical) as medical_surgical
, trim(ms_drg_description) as ms_drg_description
, trim(deprecated) as deprecated
, trim(deprecated_date) as deprecated_date
from union_all_codes
- Create a branch in The Tuva Project
- Copy and paste the newly created code list into the MS-DRG file as a CSV file
- Submit a pull request
- Upload the newly created code list into S3 (credentials with write permissions to the S3 bucket are required)
-- example code for Snowflake
copy into s3://tuva-public-resources/terminology/ms_drg.csv
from [table_created_in_step_9]
file_format = (type = csv field_optionally_enclosed_by = '"')
storage_integration = [integration_with_s3_write_permissions]
OVERWRITE = TRUE;
- Create a branch in docs. Update the
last_updated
column with the current date (above). - Submit a pull request
SNOMED-CT to ICD-10-CM Map
This mapping is updated with each new relase of SNOMED CT US Edition which happens in March and September, and includes the annual ICD-10-CM update.
The mapping file can be found on the SNOMED CT United States Edition page. Click on the link to download the SNOMED CT to ICD-10-CM Mapping Resources which includes the human-readable version that contains all required data elements in a single TSV file.
The only clean-up required for the Tuva project is to remove the formatting
from the maptarget (ICD-10-CM code) field (e.g. replace(maptarget,'.','')
).
The HCC Suspecting data mart utilizes the default mapping guidance from NLM which specifies that the map priority rule of “TRUE” or “OTHERWISE TRUE” should be applied if nothing further is known about the patient’s condition. Other use-cases may need to further evaluate the map rules that consider a patient's age, gender, and comorbidities.