Difference between revisions of "Diagnostic Codes Development"

From OpenEMR Project Wiki
 
(30 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Overview==
==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 [http://sourceforge.net/projects/openemr/forums/forum/202506/topic/4769675 '''icd10''' sourceforge forum thread].
OpenEMR 4.1.0 supports ICD9 diagnostic codes by default (although the codes need to be imported via phpmyadmin).


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.
OpenEMR 4.1.1 (planned release by September 2012) is much more flexible in diagnostic code and billing code support. See the [[Code Types]] wiki page for descriptions and instructions on how to use these advanced features that include easy importing and use of ICD9/ICD10/SNOMED codes along with a modular mechanism to add support for more codesets in the future (such as DSMIV and translated versions of ICD10/SNOMED etc.).
 
For historical purposes, leaving this page here (and to track the [[Diagnostic_Codes_Development#TODO|TODOs]] of this project). This project was started after active discussion in the [http://sourceforge.net/projects/openemr/forums/forum/202506/topic/4769675 '''icd10''' sourceforge forum thread].


==ICD9==
==ICD9==
:Already integrated and working on a default OpenEMR installation(although the codes need to be imported via phpmyadmin).
*In OpenEMR 4.1.0, 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.
*In OpenEMR 4.1.1, much easier to import codes, which is described in the [[Code Types]] wiki page.
:* Create a mechanism to search for ICD9 codes by category.
*See the [[Diagnostic_Codes_Development#TODO|TODOs]] section for work that is still ongoing.


==ICD10==
==ICD10==
*In OpenEMR 4.1.1, easy to import codes and they are fully integrated, which is described in the [[Code Types]] wiki page.
*See the [[Diagnostic_Codes_Development#TODO|TODOs]] section for work that is still ongoing.
*Rest of content in below ICD10 section is only being kept for historical purposes.
:Article on transition from ICD9 to ICD10 in the US: [http://www.healthcareguy.com/2011/10/17/guest-article-actionable-advice-on-how-to-make-tangible-progress-in-icd-9-to-icd-10-migration/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+HealthcareGuy+%28The+Healthcare+IT+Guy%29 Guest Article: Actionable advice on how to make tangible progress in ICD-9 to ICD-10 migration]
:Article on transition from ICD9 to ICD10 in the US: [http://www.healthcareguy.com/2011/10/17/guest-article-actionable-advice-on-how-to-make-tangible-progress-in-icd-9-to-icd-10-migration/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+HealthcareGuy+%28The+Healthcare+IT+Guy%29 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.
:Appears that some users have got this working in OpenEMR 4.1.0.
:*For standardization, propose following: '''([http://github.com/openemr/openemr/commit/f1203a12e9d010e9eeb91e026add4a51577d8ad3 THIS PART IS DONE])'''
:*For standardization, propose following: '''([http://github.com/openemr/openemr/commit/f1203a12e9d010e9eeb91e026add4a51577d8ad3 THIS PART IS DONE])'''
::*Add following sql columns to the code_types tables: '''([http://github.com/openemr/openemr/commit/f1203a12e9d010e9eeb91e026add4a51577d8ad3 THIS PART IS DONE])'''
::*Add following sql columns to the code_types tables: '''([http://github.com/openemr/openemr/commit/f1203a12e9d010e9eeb91e026add4a51577d8ad3 THIS PART IS DONE])'''
Line 18: Line 23:
:::*label (for displaying the code set name"
:::*label (for displaying the code set name"
::*Create an entry in code_types table(with id of 100+). See [[Code Types]] wiki page for details. '''([http://github.com/openemr/openemr/commit/f1203a12e9d010e9eeb91e026add4a51577d8ad3 THIS PART IS DONE])'''
::*Create an entry in code_types table(with id of 100+). See [[Code Types]] wiki page for details. '''([http://github.com/openemr/openemr/commit/f1203a12e9d010e9eeb91e026add4a51577d8ad3 THIS PART IS DONE])'''
::*Support this in the codebase '''([http://github.com/openemr/openemr/commit/f1203a12e9d010e9eeb91e026add4a51577d8ad3 THIS PART IS ALMOST DONE])'''
::*Support this in the codebase '''([http://github.com/openemr/openemr/commit/f1203a12e9d010e9eeb91e026add4a51577d8ad3 THIS PART IS DONE])'''
:::*Modularize functions and place these functions in the custom/code_types.inc.php script.
:::*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 [[Diagnostic_Codes_Development#Common_Issues|Common Issues]] section below.
:*Importing codes '''([http://github.com/openemr/openemr/commit/82354e7eb85d9938adb32b517297d4875a077f53 THIS PART IS DONE])'''
:*Importing codes '''THIS PART IS ALMOST DONE'''
::*Plan to import codes via the UI mechanism (like SNOMED and RXNORM)
::*Plan to import codes via the UI mechanism (like SNOMED and RXNORM)
:::*The latest raw data file packages can be downloaded from  
:::*The latest raw data file packages can be downloaded from  
Line 32: Line 36:


==SNOMED==
==SNOMED==
:Can currently import the SNOMED datasets into the OpenEMR databasae, however it is currently not integrated with the OpenEMR codebase.
*In OpenEMR 4.1.0, easy to import codes, but they were not integrated.
*In OpenEMR 4.1.1, easy to import codes and they are fully integrated, which is described in the [[Code Types]] wiki page.
*In OpenEMR 4.1.2, also added ability to import the US Extension SNOMED codes and added the ability to import the Spanish translation SNOMED set.
*See the [[Diagnostic_Codes_Development#TODO|TODOs]] section for work that is still ongoing.
*Rest of content in below SNOMED section is only being kept for historical purposes.
:*For standardization, propose following: '''([http://github.com/openemr/openemr/commit/f1203a12e9d010e9eeb91e026add4a51577d8ad3 THIS IS DONE])'''
:*For standardization, propose following: '''([http://github.com/openemr/openemr/commit/f1203a12e9d010e9eeb91e026add4a51577d8ad3 THIS IS DONE])'''
::*Create an entry in code_types table(with id of 100+). See [[Code Types]] wiki page for details.
::*Create an entry in code_types table(with id of 100+). See [[Code Types]] wiki page for details.
Line 38: Line 46:


==DSMIV==
==DSMIV==
:Appears that some users are working on this
*In OpenEMR 4.1.0 and 4.1.1, no standard importing mechanism set up yet (once imported, they would be fully integrated, though in OpenEMR 4.1.1 as described in the [[Code Types]] wiki page).
*See the [[Diagnostic_Codes_Development#TODO|TODOs]] section for work that is still ongoing.
:*For standardization, propose following: '''([http://github.com/openemr/openemr/commit/f1203a12e9d010e9eeb91e026add4a51577d8ad3 THIS IS DONE])'''
:*For standardization, propose following: '''([http://github.com/openemr/openemr/commit/f1203a12e9d010e9eeb91e026add4a51577d8ad3 THIS IS DONE])'''
::*Create an entry in code_types table(with id of 100+). See [[Code Types]] wiki page for details.
::*Create an entry in code_types table(with id of 100+). See [[Code Types]] wiki page for details.
::*Support this in the codebase
::*Support this in the codebase
:*Importing of codes
:*Importing of codes
::*Suggest using same mechanism as the ICD10/SNOMED (and soon to be ICD9)
::*Use same mechanism as the ICD9/ICD10/SNOMED (and soon to be ICD9)
::*Need to find a standard offering of the codes (such as the CMS or WHO for ICD10), which can then use to import.
*To distribute DSMIV codes, sounds like need to possibly get permission (which we have been told they will give). See this thread for details:
::*http://sourceforge.net/projects/openemr/forums/forum/202505/topic/5594433


==Common Issues==
==TODO==
::Still things left to do are:
::The TODO list:
::#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''')
::#The fee sheet only shows the code (and not the code type) when selecting a justification code. Will also show the code type (ie. ICD9:258.12 rather than 258.12). ('''COMPLETED 6/19/12''')
::#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''')
::#The justify sql column in the billing table will also include the code types of the codes (ie. ICD9:258.12 rather than 258.12) ('''COMPLETED 6/19/12''')
::#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''')
::#The ar_activity table will 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. This will also 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''')
::#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 hard-coding of ICD9, CPT4, HCPCS 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)'''
::#Place an index on the code_type column in the codes table ('''COMPLETED 7/5/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)) ('''COMPLETED 7/5/12''')
::#Increase size of code_type column in the billing table (varchar(15)) '''(PENDING CODE REVIEW AND TESTING 7/3/12)'''
::#Increase size of modifier column in the codes and ar_activity table (varchar(12)) ('''COMPLETED 7/5/12''')
::#Increase size of modifier column in the codes and ar_activity table (varchar(12)) '''(PENDING CODE REVIEW AND TESTING 7/3/12)'''
::#Place code_types (inactive) for CPTII, ICD9-SG, and ICD10-PCS (Change the labels of the ICD/SNOMED dx code types and External methods to make it clear) ('''COMPLETED 7/5/12''')
::#Place code_types (inactive) for CPTII,ICD9-SG, and ICD10-PCS (Change the labels of the ICD/SNOMED dx code types and External methods to make it clear) '''(PENDING CODE REVIEW AND TESTING 7/3/12)'''
::#Importing mechanism for ICD9/ICD10 codes ('''COMPLETED 7/17/12''')
::#Change ICD/CPT labels in the financial reports to Diagnosis/Procedure-Service
::#Fix hard-coding of ICD/CPT4 related stuff throughout codebase ('''COMPLETED 7/18/12''')
::#Grep ICD9/HCPCS/CPT4 to deal with some miscellaneous stuff
::#The syndromic surveillance only works with ICD9 codes. I modified the Administration->Fees to allow setting any code as reportable, however the Syndromic Surveillance report will still only show the ICD9 ones(because is involved in HL7 creation, so need to ensure it tests well with other code types before implementing). So, will need to get the report to support other code sets(and ensure it tests well since this module is needed for meaningful use).(may do this for the next release instead of 4.1.1)
::#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.
::#Add pertinent codes to the CDR engine (plan to do this for the next release - not planned for the 4.1.1 release)
::#Add pertinent codes to the CDR engine (plan to do this for the next release - not planned for the 4.1.1 release)
::#Consider adding support for DSMIV codeset
::#Consider mechanisms to improve the searching (for example, real-time population of search via ajax or searching by categories etc.)
::#Consider supporting other ICD10 sets and languages. For example, current ICD10 codes are from the CMS in the US. We can also support importing of the WHO ICD10 codes along with it on other languages.
::#Consider supporting other SNOMED languages. ('''COMPLETED 02/07/2013''')
::#Consider improving the performance of the SNOMED searching. Will await feedback from the community on the performance of the current algorithm. If we needed to improve this, there is a nice discussion of this (and sample code) on the following thread: http://sourceforge.net/projects/openemr/forums/forum/202506/topic/6686760


[[Category:Developer Guide]]
[[Category:Developer Guide]]

Latest revision as of 23:28, 8 February 2013

Overview

OpenEMR 4.1.0 supports ICD9 diagnostic codes by default (although the codes need to be imported via phpmyadmin).

OpenEMR 4.1.1 (planned release by September 2012) is much more flexible in diagnostic code and billing code support. See the Code Types wiki page for descriptions and instructions on how to use these advanced features that include easy importing and use of ICD9/ICD10/SNOMED codes along with a modular mechanism to add support for more codesets in the future (such as DSMIV and translated versions of ICD10/SNOMED etc.).

For historical purposes, leaving this page here (and to track the TODOs of this project). This project was started after active discussion in the icd10 sourceforge forum thread.

ICD9

  • In OpenEMR 4.1.0, already integrated and working on a default OpenEMR installation(although the codes need to be imported via phpmyadmin).
  • In OpenEMR 4.1.1, much easier to import codes, which is described in the Code Types wiki page.
  • See the TODOs section for work that is still ongoing.

ICD10

  • In OpenEMR 4.1.1, easy to import codes and they are fully integrated, which is described in the Code Types wiki page.
  • See the TODOs section for work that is still ongoing.
  • Rest of content in below ICD10 section is only being kept for historical purposes.
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 in OpenEMR 4.1.0.
  • 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.
  • 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

  • In OpenEMR 4.1.0, easy to import codes, but they were not integrated.
  • In OpenEMR 4.1.1, easy to import codes and they are fully integrated, which is described in the Code Types wiki page.
  • In OpenEMR 4.1.2, also added ability to import the US Extension SNOMED codes and added the ability to import the Spanish translation SNOMED set.
  • See the TODOs section for work that is still ongoing.
  • Rest of content in below SNOMED section is only being kept for historical purposes.
  • Create an entry in code_types table(with id of 100+). See Code Types wiki page for details.
  • Support this in the codebase

DSMIV

  • In OpenEMR 4.1.0 and 4.1.1, no standard importing mechanism set up yet (once imported, they would be fully integrated, though in OpenEMR 4.1.1 as described in the Code Types wiki page).
  • See the TODOs section for work that is still ongoing.
  • 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
  • Use same mechanism as the ICD9/ICD10/SNOMED (and soon to be ICD9)
  • Need to find a standard offering of the codes (such as the CMS or WHO for ICD10), which can then use to import.
  • To distribute DSMIV codes, sounds like need to possibly get permission (which we have been told they will give). See this thread for details:

TODO

The TODO list:
  1. The fee sheet only shows the code (and not the code type) when selecting a justification code. Will 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 will 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 will 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. This will also 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 hard-coding of ICD9, CPT4, HCPCS 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. Place an index on the code_type column in the codes table (COMPLETED 7/5/12)
  7. Increase size of code_type column in the billing table (varchar(15)) (COMPLETED 7/5/12)
  8. Increase size of modifier column in the codes and ar_activity table (varchar(12)) (COMPLETED 7/5/12)
  9. Place code_types (inactive) for CPTII, ICD9-SG, and ICD10-PCS (Change the labels of the ICD/SNOMED dx code types and External methods to make it clear) (COMPLETED 7/5/12)
  10. Importing mechanism for ICD9/ICD10 codes (COMPLETED 7/17/12)
  11. Fix hard-coding of ICD/CPT4 related stuff throughout codebase (COMPLETED 7/18/12)
  12. The syndromic surveillance only works with ICD9 codes. I modified the Administration->Fees to allow setting any code as reportable, however the Syndromic Surveillance report will still only show the ICD9 ones(because is involved in HL7 creation, so need to ensure it tests well with other code types before implementing). So, will need to get the report to support other code sets(and ensure it tests well since this module is needed for meaningful use).(may do this for the next release instead of 4.1.1)
  13. Add pertinent codes to the CDR engine (plan to do this for the next release - not planned for the 4.1.1 release)
  14. Consider adding support for DSMIV codeset
  15. Consider mechanisms to improve the searching (for example, real-time population of search via ajax or searching by categories etc.)
  16. Consider supporting other ICD10 sets and languages. For example, current ICD10 codes are from the CMS in the US. We can also support importing of the WHO ICD10 codes along with it on other languages.
  17. Consider supporting other SNOMED languages. (COMPLETED 02/07/2013)
  18. Consider improving the performance of the SNOMED searching. Will await feedback from the community on the performance of the current algorithm. If we needed to improve this, there is a nice discussion of this (and sample code) on the following thread: http://sourceforge.net/projects/openemr/forums/forum/202506/topic/6686760