ICD, rxNorm and Snomed data loads

bradymiller wrote on Wednesday, May 16, 2012:

Hi,

Committed above to sourceforge (also added an additional commit with a related bug fix). Here are the commits that went into sourceforge:
http://github.com/openemr/openemr/commit/a654c665ad8ded1c9be1673d9f0d279bde6877b9
http://github.com/openemr/openemr/commit/a6b6958d821cd2c08f44fa97c3bd7568434f9ce1

After playing around with the billing and looking through the code, note the following issues:
1. All the Reports->Financial (except for the Collections) have a CPT and ICD entry box. These should instead be Procedure and Diagnosis entry boxes and the code in all of these forms need to support this (appear to currently have CPT/ICD stuff hard-coded in.
2. 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.
3. 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).
4. 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)
5. 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.
6. 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).

-brady
OpenEMR

mcaloon wrote on Wednesday, May 16, 2012:

Hello,
    Added the formatted codes at https://github.com/mcaloon/openemr/compare/9bb8097f5d…d22dcb255c

Mac

Note: the SG codes for ICD10 do not contain any decimal points.

bradymiller wrote on Wednesday, May 16, 2012:

Hi Mac,

I have rebased all of your commits (I left out your one integration commit, though, which we can get to later) into one and placed it on the most recent codebase (note I just committed several items to sourceforge to use the formatted sql columns rather than the raw ones):
http://github.com/bradymiller/openemr/commits/mcaloon-ICD10-databaseLoadCode_5

It is testing well (I did some random sanity checks on the formatted columns which appear ok) and working. Things that should be considered before committing this to sourceforge are:
1. Consider placing keys/indexes on the code and formatted_code in the dx/proc tables to make lookups as fat as possible.
2. Migrate the sql “pieces” you use from sql directory to a sql/library directory (so users don’t get confused and try to install these pieces separately)
3. And the biggest issue is that users should be able to install/update both the ICD9 and ICD10 tables separately. For example, if a user already has ICD10 tables installed, they should still be able to install/update ICD9 tables. Whether to turn these tables off/on or do a full migration can be dealt with at Administration->Lists->‘Code Types’. By keeping these independent gives the most flexibility to practices. Potential ways to do this are to make the ICD9/ICD10 install/update mechanisms completely separate, which  then nicely allows the version sql column to hold something else in the future (such as CMS for using the cms tables or WHO-<language> to hold the WHO set in a specific language etc.). Let me know your thoughts here.

thanks,
-brady
OpenEMR

bradymiller wrote on Sunday, May 20, 2012:

Hi,

One more issue I noted is using command line to open a zip file:
// use shell based unzip to keep the original timestamps of the incoming data files

Doing this will mean that it likely won’t work in non-linux OS’s. Will be vital to try to get this to work via php functions.

-brady
OpenEMR Project

bradymiller wrote on Sunday, May 20, 2012:

Hi,
Another obvious question is whether it makes sense to include the ICD9/ICD10 files in the OpenEMR package (so, easy for users to import the codes if wanted)? These files are actually rather small, so size not an issue. I think the main issue is licensing (ie. is it ok for us to package and distribute these files from CMS? thoughts?
-brady
OpenEMR

mcaloon wrote on Monday, May 21, 2012:

Brady,
    I have a contact at DHHS that I am following up with regarding distributing the downloads files.
Mac

mcaloon wrote on Monday, May 21, 2012:

Brady,
    I have a contact at DHHS that I am following up with regarding distributing the downloads files.
Mac

mcaloon wrote on Thursday, May 24, 2012:

Brady,
     I am looking into a consolidated UI approach to the ICD 9/10 issue of concurrent installs. I am also reviewing your post #43 above and will be back with a commit at some point soon.

Mac

kevmccor wrote on Thursday, May 24, 2012:

I just have a question.  Is there a table of icd-9 or icd-10 codes that are actually used in the problem lists?  This would be a table that is updated when a problem is added to a patient record.  My thinking is a practice will use a subset of these codes and, over time, a smaller table that will have what is needed 95% of the time would make lookups or finding the right code much faster.

bradymiller wrote on Friday, May 25, 2012:

Hi Mac,
Looking forward to the code. If I have some time, hope to continue working on the integration stuff.
-brady

bradymiller wrote on Friday, May 25, 2012:

Hi kevmccor,

Something I’ve found useful is to simply have a selector that shows all the codes that have been used for the current selected patient. So, for example, in the fee sheet, could have a selector that is called Previous (or something like that) which is populated by all codes (could have different selectors for each code type) that hev been used (in problem lists or billing table for the patient. The clinic wide storing of billing codes, I suppose could also be done; now that the code searching engine is centralized, wouldn’t be too tough to make this an optionable feature.

-brady

jcahn2 wrote on Friday, May 25, 2012:

Ahoy all,

Or maybe a field that tracks frequency of use for a code so that “Common Codes” , maybe the top 20, could be displayed.  Or at least codes with prior hits would be searched first.
Jack
OEMR Board

arnabnaha wrote on Saturday, May 26, 2012:

Hi…
I have activated the ICD 10 in the Administration->List-> Code types. Now when I search for ICD 10 codes in the issues, I get Empty list…Nothing comes up. I think the database is not present in the openemr. Can you help me getting the database and how to install it in the system?

Dr. Arnab Naha

bradymiller wrote on Saturday, May 26, 2012:

Hi,

You need to import the ICD10 database. Note the import feature has not been completed. Here’s the most recent revision if you want to test it out:
http://github.com/bradymiller/openemr/commit/66f8e03e27b28d2f7a5e2b6d602d1520ff280637
(see the contrib/icd/README file for instructions)

-brady
OpenEMR

bradymiller wrote on Saturday, May 26, 2012:

Also, to clarify. The importing code works, just a couple issues to fix before it’s ready to get into sourceforge. (see posts above for more specifics).
-brady

mcaloon wrote on Thursday, May 31, 2012:

Hello,
    I have split out ICD9 and ICD10 so they can be loaded and upgraded independently. Commits at https://github.com/mcaloon/openemr/commits/ICD10-integration

Mac

mcaloon wrote on Thursday, May 31, 2012:

whoops! i committed the zip files in the contrib directories… Freudian slip… :slight_smile:

bradymiller wrote on Friday, June 01, 2012:

Hi Mac,
Hopefully will be able to review this over the weekend.
thanks,
-brady

bradymiller wrote on Friday, June 01, 2012:

Hi Mac,
Looking better. Here’s my review:

Review:
1. The revision date appears to not be correct anymore (is using current date for both ICD9 and ICD10). Additionally it appears that a shell command is being used to get this; this will likely break on other os (such as windows); need to try to get this date via php to ensure works on all OSs.
2. Recommend not populating the revision_version in standardized_tables_trackyet , since info is not helpful. This can be used in future to track whether version is cms vs who (and if different language) to allow simple changing of the database. Allowing this will be key to make it easy to add support for ICD9/10 databases of different languages. Also, it appears you are populating this in the SNOMED/RXNORM tables with the date, which recommend against (again, plan to use this in the future to old language information for SNOMED etc.)
3. Recommend placing keys/indexes on the dx_code and formatted_dx_code in the following tables: icd9_dx_code, icd9_sg_code, icd10_dx_order_code
4. Recommend placing keys/indexes on the pcs_code column in the iicd10_pcs_order_code table.

And a completely optional thing is to combine all the import scripts into one (they are already one script anyways), and have ability to select, which one via a selector. For example, could have a link ‘Import Codes’ in Adsministration, which took to page where user could select ICD9,ICD10,SNOMED,RXNORM from a selector. Note this is just an idea and is outside the scope of what you are doing, so don’t feel inclined to do this. Dealing with my issues above are easily enough to get this code into the openemr codebase.

-brady
OpenEMR

bradymiller wrote on Friday, June 01, 2012:

BTW,
I rebased all of Mac’s code if anybosy wants to review/test it also:
http://github.com/bradymiller/openemr/commits/mcaloon-ICD10-databaseLoadCode_6
-brady
OpenEMR