Difference between revisions of "Diagnostic Codes Development"

From OpenEMR Project Wiki
Line 52: Line 52:
::#Deal with all the places where, ICD9, CPT4, HCPCS or code_type id numbers are hard-coded into queries (surprisingly, there does not seem to be many of these). (besides report, which is covered above, so far, have only found a critical place in the claims code) ('''COMPLETED 7/3/12''')
::#Deal with all the places where, ICD9, CPT4, HCPCS or code_type id numbers are hard-coded into queries (surprisingly, there does not seem to be many of these). (besides report, which is covered above, so far, have only found a critical place in the claims code) ('''COMPLETED 7/3/12''')
::#Have the CDR diagnosis searching in rule edit use the modular code search function ('''COMPLETED 6/16/12''')
::#Have the CDR diagnosis searching in rule edit use the modular code search function ('''COMPLETED 6/16/12''')
::#Importing mechanism for ICD9/ICD10 codes '''(AWAITING 4TH CODE REVISION )'''
::#Importing mechanism for ICD9/ICD10 codes '''(AWAITING 4TH CODE REVISION)'''
::#Place an index on the code_type column in the codes table '''(PENDING CODE REVIEW AND TESTING 7/3/12)'''
::#Place an index on the code_type column in the codes table '''(PENDING CODE REVIEW AND TESTING 7/3/12)'''
::#Increase size of code_type column in the billing table (varchar(15)) '''(PENDING CODE REVIEW AND TESTING 7/3/12)'''
::#Increase size of code_type column in the billing table (varchar(15)) '''(PENDING CODE REVIEW AND TESTING 7/3/12)'''

Revision as of 09:22, 3 July 2012

Overview

OpenEMR currently supports ICD9 diagnostic codes by default (although the codes need to be imported via phpmyadmin). It is also important to support ICD10 and SNOMED as an option; this wiki page will track the development of this. This was started after active discussion in the icd10 sourceforge forum thread.

The vital pieces here are the 'codes' and 'code_type' sql tables. It seems a lot of the codebase relies on hard-coded 'ct_id' elements in the 'codes' table to identify the code set. However, to get things to work smoothly, one option is to consider refactoring the code to instead use join in the mysql queries in order to instead use the 'ct_key' elements in the 'code_type' table to identify the code set and is discussed on the Code Types wiki page.

ICD9

Already integrated and working on a default OpenEMR installation(although the codes need to be imported via phpmyadmin).
  • For ease of use, could consider mechanism that has these codes installed by default, but that needs to be turned "on" to use.
  • Create a mechanism to search for ICD9 codes by category.

ICD10

Article on transition from ICD9 to ICD10 in the US: Guest Article: Actionable advice on how to make tangible progress in ICD-9 to ICD-10 migration
Appears that some users have got this working.
  • active (will allow placing multiple code sets without them being used unless chosen)
  • external (0 for using the codes tables to hold codeset and then 1 or greater to use an external table(s) mechanism)
  • label (for displaying the code set name"
  • Modularize functions and place these functions in the custom/code_types.inc.php script.
  • Things that still need to be done can be found in the Common Issues section below.
  • Importing codes THIS PART IS ALMOST DONE
  • Plan to import codes via the UI mechanism (like SNOMED and RXNORM)
  • The latest raw data file packages can be downloaded from
  • See the following forum threads for ongoing progress on this project:

SNOMED

Can currently import the SNOMED datasets into the OpenEMR databasae, however it is currently not integrated with the OpenEMR codebase.
  • Create an entry in code_types table(with id of 100+). See Code Types wiki page for details.
  • Support this in the codebase

DSMIV

Appears that some users are working on this
  • Create an entry in code_types table(with id of 100+). See Code Types wiki page for details.
  • Support this in the codebase
  • Importing of codes
  • Suggest using same mechanism as the ICD10/SNOMED (and soon to be ICD9)

Common Issues

Still things left to do are:
  1. The fee sheet only shows the code (and not the code type) when selecting a justification code. It would be more clear to also show the code type (ie. ICD9:258.12 rather than 258.12). (COMPLETED 6/19/12)
  2. The justify sql column in the billing table should also include the code types of the codes (ie. ICD9:258.12 rather than 258.12) (COMPLETED 6/19/12)
  3. The ar_activity table should have a code_type column since it has a code column (akin to the billing table), otherwise not clear what code set the code is actually from. Note this is something that will also need to be fixed in Z&H's recent code submission that placed the COPAY from billing table into the ar_activity/ar_session tables. (COMPLETED 7/3/12)
  4. Deal with all the places where, ICD9, CPT4, HCPCS or code_type id numbers are hard-coded into queries (surprisingly, there does not seem to be many of these). (besides report, which is covered above, so far, have only found a critical place in the claims code) (COMPLETED 7/3/12)
  5. Have the CDR diagnosis searching in rule edit use the modular code search function (COMPLETED 6/16/12)
  6. Importing mechanism for ICD9/ICD10 codes (AWAITING 4TH CODE REVISION)
  7. Place an index on the code_type column in the codes table (PENDING CODE REVIEW AND TESTING 7/3/12)
  8. Increase size of code_type column in the billing table (varchar(15)) (PENDING CODE REVIEW AND TESTING 7/3/12)
  9. Increase size of modifier column in the codes and ar_activity table (varchar(12)) (PENDING CODE REVIEW AND TESTING 7/3/12)
  10. Place code_types (inactive) for CPTII,ICD9-SG,ICD10-PCS and SNOMED-CT (Change the labels of the ICD/SNOMED dx code types and export methods to make it clear) (PENDING CODE REVIEW AND TESTING 7/3/12)
  11. Change ICD/CPT labels in the financial reports to Diagnosis/Procedure-Service
  12. Grep ICD9/HCPCS/CPT4 to deal with some miscellaneous stuff
  13. The syndromic surveillance only works with ICD9 codes. I modified the Administraion->Fees to allow setting any code as reportable, however the Syndromic Surveillance report will still only show the ICD9 ones. So, will need to get the report to support other code sets.
  14. Add pertinent codes to the CDR engine (plan to do this for the next release - not planned for the 4.1.1 release)