Skip to main content

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 SetMaintainerLast UpdatedDownload CSV
Admit SourceNational Uniform Billing Committee1/1/2024Link
Admit TypeNational Uniform Billing Committee1/1/2024Link
APR-DRG3M1/1/2024Link
Bill TypeNational Uniform Billing Committee11/3/2022Link
Claim TypeTuva11/4/2023Link
Code TypeTuva4/19/2022Link
Discharge DispositionNational Uniform Billing Committee1/1/2024Link
Encounter TypeTuva6/17/2022Link
EthnicityTuva11/3/2022Link
GenderTuva4/19/2022Link
HCPCS Level IICenters for Medicare & Medicaid Services (CMS)4/19/2022Link
ICD-9-CMCenters for Medicare & Medicaid Services (CMS)5/10/2023Link
ICD-9-PCSCenters for Medicare & Medicaid Services (CMS)5/10/2023Link
ICD-10-CMCenters for Disease Control and Prevention (CDC)1/1/2024Link
ICD-10-PCSCenters for Medicare & Medicaid Services (CMS)1/1/2024Link
LOINCRegenstrief Institute9/18/2023Link
LOINC Deprecated MappingRegenstrief Institute9/18/2023Link
MDCCenters for Medicare & Medicaid Services (CMS)1/1/2024Link
Medicare Dual EligibilityCenters for Medicare & Medicaid Services (CMS)3/7/2023Link
Medicare StatusCenters for Medicare & Medicaid Services (CMS)11/3/2022Link
MS-DRGCenters for Medicare & Medicaid Services (CMS)1/1/2024Link
NDCCodeRx2/7/2024Link
Payer TypeTuva4/19/2022Link
Place of ServiceCenters for Medicare & Medicaid Services (CMS)4/19/2022Link
Present on AdmissionCenters for Medicare & Medicaid Services (CMS)4/19/2022Link
RaceTuva2/3/2023Link
Revenue CenterNational Uniform Billing Committee6/23/2022Link
RxNorm to ATCCodeRx2/7/2024Link
SNOMED-CT to ICD-10-CM MapUS National Library of Medicine9/1/2023Link

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

  1. Navigate to the ResDac Inpatient website
  2. Click "View Data Documentation" under the page title
  3. Locate and select the Variable Name "Claim Source Inpatient Admission Code"
  4. 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

  1. Copy and paste the code list into any text editor
  2. Format the codes as a CSV file and save
    • Find and replace "—" with a hyphen (-)
  3. Import the CSV file into any data warehouse
  4. 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;
  1. Create a branch in The Tuva Project
  2. Copy and paste the updated codes into the admit source file
  3. Submit a pull request
  4. Create a branch in docs. Update the last_updated column in the table above with the current date.
  5. Submit a pull request

Admit Type Code

  1. Navigate to the ResDac Inpatient website
  2. Click "View Data Documentation" under the page title
  3. Locate and select the Variable Name "Claim Inpatient Admission Type Code"
  4. Open the .txt file at the bottom of the webpage

Follow steps 5-11 if there are any changes. Otherwise, skip to step 12

  1. Copy and paste the code list into any text editor
  2. Format the codes as a CSV file and save
    • Find and replace "—" with a hyphen (-)
  3. Import the CSV file into any data warehouse
  4. 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;
  1. Create a branch in The Tuva Project
  2. Copy and paste the updated codes into the admit type file
  3. Submit a pull request
  4. Create a branch in docs. Update the last_updated column in the table above with the current date
  5. Submit a pull request

APR-DRG

  1. Navigate to the AHRQ HCUP website
  2. Click the header tab "Database Information"
  3. Click on the hyperlink "NIS Database Documentation"
  4. Under "Additional Resources for Data Elements" click on the hyperlink "APR-DRGs Methodology Overview Version 31"
  5. 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
  6. Format the codes as a CSV file and save
  7. Import the CSV file into any data warehouse
  8. 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;
  1. Create a branch in The Tuva Project
  2. Copy and paste the CSV formatted code list into the APR-DRG file
  3. Create a branch in docs. Update the last_updated column in the table above with the current date
  4. Submit a pull request

Discharge Disposition Code

  1. Navigate to the ResDac Inpatient website
  2. Click "View Data Documentation" under the page title
  3. Locate and select the Variable Name "Patient Discharge Status Code"
  4. Open the .txt file at the bottom of the webpage

Follow steps 5-11 if there are any changes. Otherwise, skip to step 12

  1. Copy and paste the code list into any text editor
  2. Format the codes as a CSV file and save
    • Find and replace "—" with a hyphen (-)
  3. Import the CSV file into any data warehouse
  4. 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;
  1. Create a branch in The Tuva Project
  2. Copy and paste the updated codes into Discharge Disposition file
  3. Submit a pull request
  4. Create a branch in docs. Update the last_updated column in the table above with the current date
  5. Submit a pull request

ICD-10-CM

  1. Navigate to the CMS ICD 10 website
  2. In the left hand menu, click the hyperlink for ICD-10-CM of the current fiscal year (e.g. 2024 ICD-10-CM)
  3. Under Downloads, click "Code Description in Tabular Order"
  4. Unzip the downloaded file and open "icd_10cm_codes"
  5. Format this file as a CSV and save
  6. Import the CSV file into any data warehouse
  7. 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;
  1. Create a branch in docs. Update the last_updated column in the table above with the current date
  2. 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.

  1. Create a branch in The Tuva Project
  2. Alter the headers as needed in ICD-10-CM file
  3. Submit a pull request

ICD-10-PCS

  1. Navigate to the CMS ICD 10 website
  2. In the left hand menu, click the hyperlink for ICD-10-PCS of the current fiscal year (e.g. 2024 ICD-10-PCS)
  3. Under Downloads, click "Code Description in Tabular Order"
  4. Unzip the downloaded file and open "icd_10pcs_codes"
  5. Format this file as a CSV and save
  6. Import the CSV file into any data warehouse
  7. Upload the CSV file from the data warehouse to S3 (credentials with write permissions to the S3 bucket are required)
  8. Create a branch in docs. Update the last_updated column in the table above with the current date
  9. 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.

  1. Create a branch in The Tuva Project
  2. Alter the headers as needed in ICD-10-PCS file
  3. Submit a pull request

MDC

  1. Navigate to the CMS MS DRG website
  2. 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.
  3. Click on the hyperlink "Appendix A List of MS-DRGs Version 41.0"
  4. Click on the hyperlink "Design and development of the Diagnosis Related Group (DRGs)"
  5. 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

  1. Copy and paste the code list into any text editor
  2. Format the codes as a CSV and save
  3. Import the CSV file into any data warehouse
  4. 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;
  1. Create a branch in The Tuva Project
  2. Copy and paste the updated codes into the MDC file
  3. Submit a pull request
  4. Create a branch in docs. Update the last_updated column in the table above with the current date
  5. 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.

  1. Navigate to the CMS MS DRG website
  2. 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.
  3. Click on the hyperlink "Appendix A List of MS-DRGs Version 41.0"
  4. Click on the hyperlink "List of MS-DRGs Version 41.0"
  5. Copy and paste the list of MS-DRGs into any text editor.
  6. Format the file
    • Remove the text "MDC" from column 2
    • Wrap the description in column 4 with double quotes so commas are interpreted correctly
  7. Save the file
  8. Import the file into any data warehouse that also has the previous version of MS-DRG loaded
  9. Use the SQL below to populate the deprecated and deprecated_date columns. The script does the following:
    1. 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)
    2. UNIONs the list of deprecated codes with new valid codes
    3. 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

  1. Create a branch in The Tuva Project
  2. Copy and paste the newly created code list into the MS-DRG file as a CSV file
  3. Submit a pull request
  4. 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;
  1. Create a branch in docs. Update the last_updated column with the current date (above).
  2. 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.