GithubHelp home page GithubHelp logo

claimclarity / cpt_icd_fetcher Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sangstar/cpt_icd_fetcher

0.0 0.0 0.0 13 KB

Fetches CPT and ICD-11 codes using NLP and the ICD API for submitting prior authorizations or orders for medical procedures

Python 100.00%

cpt_icd_fetcher's Introduction

CPT & ICD Fetcher

This is a little tool that uses BERT keyword extraction and cosine-similarity on context vectors as well as the ICD API to suggest CPT and ICD-11 codes that can be used when filling out prior authorizations / orders for procedures. Choosing the appropriate codes when filling this out is important for insurance agencies to deem medical necessity and provide coverage.

Quickstart

Initialize the CPT_ICD_Fetcher and add your ClientId and ClientSecret you got from the ICD API:

>>> from cpt_icd_fetcher import *
>>> text = 'stroke and mitral valve regurgitation'
>>> fetcher = CPT_ICD_Fetcher(ClientId, ClientSecret)

Describe a diagnostic profile and ICD codes will be suggested with the get_icd11_from_query method.

>>> fetcher.get_icd11_from_query(text)

[{'title': 'Stroke not known if ischaemic or haemorrhagic',
  'theCode': '8B20',
  'score': 0.0625,
  'text': 'stroke',
  'cos_sim': 0.8191625475883484,
  'final_score': 0.051197659224271774},
 {'title': 'Tremor due to certain specified central nervous system diseases',
  'theCode': '8A04.33',
  'score': 0.03125,
  'text': 'stroke',
  'cos_sim': 0.8513481020927429,
  'final_score': 0.026604628190398216},
 {'title': 'Secondary stereotypy',
  'theCode': '8A07.01',
  'score': 0.03125,
  'text': 'stroke',
  'cos_sim': 0.8245825171470642,
  'final_score': 0.025768203660845757},
 {'title': 'Cerebral ischaemic stroke, unspecified',
  'theCode': '8B11.5Z',
  'score': 0.03125,
  'text': 'stroke',
  'cos_sim': 0.8037499785423279,
  'final_score': 0.025117186829447746}]

You can also get suggestions for CPT codes with the get_cpt_codes method.

>>> fetcher.get_cpt_codes(text, n_retrieve = 4)
[{'CPT': '33750',
  'label': 'Major vessel shunt',
  'cos_sim': 0.8993809819221497},
 {'CPT': '49428', 'label': 'Ligation of shunt', 'cos_sim': 0.8851978182792664},
 {'CPT': '0086T',
  'label': 'L ventricle fill pressure',
  'cos_sim': 0.8845935463905334},
 {'CPT': '92240', 'label': 'Icg angiography', 'cos_sim': 0.8832653760910034}]

cpt_icd_fetcher's People

Contributors

sangstar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.