This python tool enables a variety of mappings between ICD diagnostic codes (International Classification of Diseases) with a single line of code.
Project description
ICD-Mappings
This python tool enables a variety of mappings between ICD diagnostic codes (International Classification of Diseases) with a single line of code.
Supported Mappings
From ICD-9 CM
diagnostic codes to:
- ICD-10 CM: International Classification of Diseases version 10 Clinical Modification.
- CCS: Clinical Classification Software. Has a universe of just 283 diagnostic categories.
- CCI: Chronic Condition Indicator. True or False whether the diagnostic is chronic.
- ICD-9 Chapters: 19 Chapters of ICD-9 CM.
From ICD-10 CM
diagnostic codes to:
- ICD-9 CM: International Classification of Diseases version 9 Clinical Modification
- ICD-10 CM Chapters: 22 Chapters of ICD-10 CM.
Installation
pip install icd-mappings
Usage
from icdmappings import Mapper
mapper = Mapper()
# Make sure your codes don't include '.' separators
icd9code = '29410'
mapper.map(icd9code, source='icd9', target='ccs')
>>> '653'
# Can map any Iterable of codes (list, numpy array, pandas Series, you name it)
icd9codes = ['29410', '5362', 'NOT_A_CODE', '3669']
mapper.map(icd9codes, source='icd9', target='ccs')
>>> ['653', '141', None, '86']
# classify ICD-9 diagnostics into chronic or not-chronic
mapper.map(icd9codes, source='icd9', target='cci')
>>> [True, False, None, True]
# icd9 to icd10
mapper.map(icd9codes, source='icd9', target='icd10')
>>> ['F0280', 'R111000', None, 'H269']
# You can also check available mappers
mapper.show_mappers()
>>> Here are the available mappers
>>>
>>> From icd9 to:
>>> - icd10
>>> - ccs
>>> - cci
>>> - chapter
>>> From icd10 to:
>>> - icd9
>>> - chapter
Feature requests
Feel free to request a new feature here.
Acknowledgments
Tekaichi for building the initial version of the icd9->ccs pipeline
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
icd_mappings-0.3.3.tar.gz
(1.8 MB
view hashes)
Built Distribution
Close
Hashes for icd_mappings-0.3.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f991bd8b8824f8012e8e47f458b6f0ccaa8016ab009408c7462e0edb5045eb1 |
|
MD5 | 5379e623fdef81b2960947e8cbfa7f70 |
|
BLAKE2b-256 | 1a7a0990fe830439fd918aaa0101bc55f94695ec98f4aa3050e56509180710a7 |