sajaddarabi / HCUP-US-EHR

HCUP-US Clinical Code Classification tool useful for electronic health records (EHR)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HCUP-US-EHR

This repo contains a simple script for downloading HCUP clinical code maps for diagnoses (ICD9) and CPTEVENTS.

In longitudinal EHR data clinical codes assigned to patients generally fall under a broader category and as there are limited data for each set of codes it may be useful to decrease the sparsity by grouping the codes under their common ancestor.

Here we use two tools provided by HCUP-US to achieve this:

  • CCS/AppendixASingleDx.txt
  • 2019_ccs_services_procedures

Refer to here for a description of the above.

Usage

python hcups_utils.py -t CPT --save_path ./data

python hcups_utils.py -t ICD9 --save_pah ./data

Mapping Proc To CCS

There are different ways of mapping Procedure codes, for example using crosswalk. In MappingProcToCCS.ipynb I've outlined how to do this using an external tool as well.

You can find sample outputs (i.e. codes to id's map) in example_output/

About

HCUP-US Clinical Code Classification tool useful for electronic health records (EHR)


Languages

Language:Python 53.2%Language:Jupyter Notebook 46.8%