# Installing Updated ICD10 codes

**URL:** <https://community.open-emr.org/t/installing-updated-icd10-codes/9748>\
**Category:** Management and Administration\
**Created:** [March 11, 2018, 3:38am UTC](https://community.open-emr.org/t/installing-updated-icd10-codes/9748 "2018-03-11T03:38:25Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![lonesoac0](https://community.open-emr.org/letter_avatar_proxy/v4/letter/l/5fc32e/32.png) [@lonesoac0](https://community.open-emr.org/u/lonesoac0)\
**Post date:** [March 11, 2018, 3:38am UTC](https://community.open-emr.org/t/installing-updated-icd10-codes/9748/1 "2018-03-11T03:38:25Z")

</div>

Hello all,

I am interested in installing the latest and greatest ICD10 codes into my OpenEMR 5.0 system. According to the “External Database Import Utility”, the staged files are: 2017-GEM-DC.zip, 2017-GEM-PCS.zip, 2017-ICD10-Code-Descriptions.zip, and 2017-PCS-Long-Abbrev-Titles.zip. And according to some posts on this forum, the best site to get the newest files from is: [https://www.cms.gov/Medicare/Coding/ICD10/2017-ICD-10-CM-and-GEMs.html](https://www.cms.gov/Medicare/Coding/ICD10/2017-ICD-10-CM-and-GEMs.html). I am not sure how the Zip files map over to the staged files that are already in OpenEMR.

2017 General Equivalence Mappings (GEMs) – Diagnosis Codes [ZIP, 1MB] = 2017-GEM-DC.zip  
2017 Code Tables and Index [ZIP, 20MB] = ?

How do the files map over from the site to what OpenEMR says?

---

<div class="post-metadata">

**Author:** ![stephenwaite](https://community.open-emr.org/user_avatar/community.open-emr.org/stephenwaite/32/15754_2.png) [@stephenwaite](https://community.open-emr.org/u/stephenwaite)\
**Post date:** [March 11, 2018, 10:29pm UTC](https://community.open-emr.org/t/installing-updated-icd10-codes/9748/2 "2018-03-11T22:29:36Z")

</div>

hi, the 4 files you need to place in the contrib/icd10 folder are in step 3 here

> [@Upgrade icd10 code set](https://community.open-emr.org/t/upgrade-icd10-code-set/9010):
>
> it’s that time of year again slight_smile this icd10 update is for dos \>= 10-1-2017 you can go get the files from [https://www.cms.gov/Medicare/Coding/ICD10/2018-ICD-10-CM-and-GEMs.html](https://www.cms.gov/Medicare/Coding/ICD10/2018-ICD-10-CM-and-GEMs.html) and place the files in the contrib/icd10 folder then remove the 2017 files from that folder then go to your favorite mysql prompt and run the following queries or copy and paste into the phpmyadmin sql query tool INSERT INTO supported\_external\_dataloads (load\_type, load\_source, load\_release\_date, load…

---

<div class="post-metadata">

**Author:** ![lonesoac0](https://community.open-emr.org/letter_avatar_proxy/v4/letter/l/5fc32e/32.png) [@lonesoac0](https://community.open-emr.org/u/lonesoac0)\
**Post date:** [March 16, 2018, 4:19am UTC](https://community.open-emr.org/t/installing-updated-icd10-codes/9748/3 "2018-03-16T04:19:51Z")

</div>

Thank you!

---

<div class="post-metadata">

**Author:** ![growlingflea](https://community.open-emr.org/user_avatar/community.open-emr.org/growlingflea/32/15498_2.png) [@growlingflea](https://community.open-emr.org/u/growlingflea)\
**Post date:** [April 14, 2018, 4:27pm UTC](https://community.open-emr.org/t/installing-updated-icd10-codes/9748/4 "2018-04-14T16:27:45Z")

</div>

Can you explain what all the other files are for? I ended up having to go to two different links, each had 2 files that were on the list. Then there are added codes and errata. Also: where do the hash values come from in the SQL Insert statement?

2 files are here

 ![image](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/b305aa3dc47269a89749c5ce72fb1f493dff3bb0.png)

and 2 files are here

 ![image](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/e/e3958f0dbb9aac9be8875fae679f32ea56f3f8c2.png)

---

<div class="post-metadata">

**Author:** ![stephenwaite](https://community.open-emr.org/user_avatar/community.open-emr.org/stephenwaite/32/15754_2.png) [@stephenwaite](https://community.open-emr.org/u/stephenwaite)\
**Post date:** [April 14, 2018, 6:38pm UTC](https://community.open-emr.org/t/installing-updated-icd10-codes/9748/5 "2018-04-14T18:38:59Z")

</div>

hi @growlingflea, good questions, first for the errata it would be a manual process to go edit the codes in the database like for 2018 there was 1 change

UPDATE `icd10_dx_order_code` SET `short_desc`= “Left ovarian pregnancy with intrauterine pregnancy”,`long_desc`= “Left ovarian pregnancy with intrauterine pregnancy” WHERE `dx_code` = “O00212”

the hash values are `md5sum` ed values of the files, like

> $ md5sum /var/www/html/openemr/contrib/icd10/2018-ICD-10-Code-Descriptions.zip  
> 6f9c77440132e30f565222ca9bb6599c /var/www/html/openemr/contrib/icd10/2018-ICD-10-Code-Descriptions.zip

you could also get these files from the code base directory instead,

> [openemr/contrib/icd10 at master · openemr/openemr · GitHub](https://github.com/openemr/openemr/tree/master/contrib/icd10)

am not sure if anyone is using the procedure coding system but it will support institutional billing

the gems are required by the upgrade code but don’t think they are utilized and a recent change to the process is here to help ignore the addenda since the revision method just installs of the active codes in the table which handles the additions, deletions and addenda

> <https://github.com/openemr/openemr/blob/33ef407f6364a6eb1f75d7b0172708f84775dd25/library/standard_tables_capture.inc#L326>

all the other files should have a readme inside of the zip

---

<div class="post-metadata">

**Author:** ![growlingflea](https://community.open-emr.org/user_avatar/community.open-emr.org/growlingflea/32/15498_2.png) [@growlingflea](https://community.open-emr.org/u/growlingflea)\
**Post date:** [April 16, 2018, 3:20am UTC](https://community.open-emr.org/t/installing-updated-icd10-codes/9748/6 "2018-04-16T03:20:26Z")

</div>

Great Thanks!!!

---

<div class="post-metadata">

**Author:** ![growlingflea](https://community.open-emr.org/user_avatar/community.open-emr.org/growlingflea/32/15498_2.png) [@growlingflea](https://community.open-emr.org/u/growlingflea)\
**Post date:** [April 20, 2018, 7:00pm UTC](https://community.open-emr.org/t/installing-updated-icd10-codes/9748/7 "2018-04-20T19:00:51Z")

</div>

So I found that we have a missing ICD10 code F42.4. I tried adding using the following files:

2018-ICD-10-Addendum.zip  
2018\_ICD-10-PCS-Addendum.zip

and using the following SQL

INSERT INTO supported\_external\_dataloads (load\_type, load\_source, load\_release\_date, load\_filename, load\_checksum) VALUES (“ICD10”, “CMS”, “2017-10-01”, “2018-ICD-10-Addendum.zip”, “bdf656fecaaa6b76c6d33af05aec1f2c”);

Then going through the same process I did to update the 2018 ICD codes. Am I missing something?  
INSERT INTO supported\_external\_dataloads (load\_type, load\_source, load\_release\_date, load\_filename, load\_checksum) VALUES (“ICD10”, “CMS”, “2017-10-01”, “2018\_ICD-10-PCS-Addendum.zip”, “9a01ff04dc2baa6198513ce252ac2136”);

---

<div class="post-metadata">

**Author:** ![stephenwaite](https://community.open-emr.org/user_avatar/community.open-emr.org/stephenwaite/32/15754_2.png) [@stephenwaite](https://community.open-emr.org/u/stephenwaite)\
**Post date:** [April 21, 2018, 12:16pm UTC](https://community.open-emr.org/t/installing-updated-icd10-codes/9748/8 "2018-04-21T12:16:06Z")

</div>

recommend emptying the `icd10_dx_order_code` table and redoing the external data load

---

<div class="post-metadata">

**Author:** ![growlingflea](https://community.open-emr.org/user_avatar/community.open-emr.org/growlingflea/32/15498_2.png) [@growlingflea](https://community.open-emr.org/u/growlingflea)\
**Post date:** [April 24, 2018, 1:10am UTC](https://community.open-emr.org/t/installing-updated-icd10-codes/9748/9 "2018-04-24T01:10:05Z")

</div>

> [@stephenwaite](#):
>
> icd10\_dx\_order\_code

I emptied my local instance of the icd10\_dx\_order\_cde and ran the script. While am getting the waiting bar I checked the process list in mySQL and nothing is running: I let it run for about 30 minutes and checked the table and its not getting written to.

I then checked the apache error.log file and received the following FATAL error

PHP Fatal error: Uncaught Error: Class ‘ZipArchive’ not found in /var/www/html/openemr-500/library/standard\_tables\_capture.inc:61\nStack trace:\n#0 /var/www/html/openemr-500/library/standard\_tables\_capture.inc(500): temp\_unarchive(‘/tmp/ICD10/2018…’, ‘ICD10’)\n#1 /var/www/html/openemr-500/interface/code\_systems/standard\_tables\_manage.php(67): handle\_zip\_file(‘ICD10’, ‘/var/www/html/o…’)\n#2 {main}\n thrown in /var/www/html/openemr-500/library/standard\_tables\_capture.inc on line 61, referer: [http://openemr-500/interface/code\_systems/dataloads\_ajax.php](http://openemr-500/interface/code_systems/dataloads_ajax.php)  
[Mon Apr 23 18:23:38.917537 2018] [:error] [pid 24407] [client 127.0.0.1:42664] PHP Notice: Undefined index: debug\_ssl\_mysql\_connection in /var/www/html/openemr-500/library/sql.inc on line 69, referer: [http://openemr-500/interface/main/tabs/main.php](http://openemr-500/interface/main/tabs/main.php)  
[Mon Apr 23 18:23:38.917596 2018] [:error] [pid 24407] [client 127.0.0.1:42664] PHP Stack trace:, referer: [http://openemr-500/interface/main/tabs/main.php](http://openemr-500/interface/main/tabs/main.php)

![image](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/3/318025487b090f65f4be99c8f849635a2696810f.png)

---

<div class="post-metadata">

**Author:** ![brady.miller](https://community.open-emr.org/user_avatar/community.open-emr.org/brady.miller/32/10178_2.png) [@brady.miller](https://community.open-emr.org/u/brady.miller)\
**Post date:** [April 24, 2018, 9:16am UTC](https://community.open-emr.org/t/installing-updated-icd10-codes/9748/10 "2018-04-24T09:16:18Z")

</div>

Hi @growlingflea ,  
Looks like you need ZipArchive. What openemr package are you using and which operating system?  
-brady

---

<div class="post-metadata">

**Author:** ![growlingflea](https://community.open-emr.org/user_avatar/community.open-emr.org/growlingflea/32/15498_2.png) [@growlingflea](https://community.open-emr.org/u/growlingflea)\
**Post date:** [April 24, 2018, 3:33pm UTC](https://community.open-emr.org/t/installing-updated-icd10-codes/9748/11 "2018-04-24T15:33:32Z")

</div>

I’m running several instances, but the one where I have this issue is the most up-to-date version of rel-500

---

<div class="post-metadata">

**Author:** ![brady.miller](https://community.open-emr.org/user_avatar/community.open-emr.org/brady.miller/32/10178_2.png) [@brady.miller](https://community.open-emr.org/u/brady.miller)\
**Post date:** [April 24, 2018, 4:00pm UTC](https://community.open-emr.org/t/installing-updated-icd10-codes/9748/12 "2018-04-24T16:00:10Z")

</div>

Hi @growlingflea ,  
Likely not related to OpenEMR, but instead related to your environment; missing the php zip package.  
-brady

---

<div class="post-metadata">

**Author:** ![growlingflea](https://community.open-emr.org/user_avatar/community.open-emr.org/growlingflea/32/15498_2.png) [@growlingflea](https://community.open-emr.org/u/growlingflea)\
**Post date:** [April 24, 2018, 6:12pm UTC](https://community.open-emr.org/t/installing-updated-icd10-codes/9748/13 "2018-04-24T18:12:10Z")

</div>

Ok. Here is the solution. If you are missing php-ZIP you must do the following:

_Note: This is for Ubuntu 16.04 and php 7.0_

Step 1: Install php-zip  
sudo apt-get install php7.0-zip

Step 2: Append the following string to php.ini. Mine was located /etc/php/7.0/  
extension=zip.so

Then your “Upgrade” button should disappear

 ![image](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/d/d99c2ca7a38852d3eed8377642d9aa57c23c8d22.png)

Here is the link that helped me:

> <https://stackoverflow.com/questions/3872555/fatal-error-class-ziparchive-not-found-in>

---

<div class="post-metadata">

**Author:** ![growlingflea](https://community.open-emr.org/user_avatar/community.open-emr.org/growlingflea/32/15498_2.png) [@growlingflea](https://community.open-emr.org/u/growlingflea)\
**Post date:** [April 21, 2020, 5:05am UTC](https://community.open-emr.org/t/installing-updated-icd10-codes/9748/14 "2020-04-21T05:05:23Z")

</div>

Hi all. When trying to install the 2019 ICD10 codes on a test system, I got stuck when trying to do a fresh install of OpenEMR-502. There were several issues I ran into and by looking at previous threads I was able to finally be able to get the new codes. Here goes:

Initially, I had issues with importing the 2019 codes on a fresh install of rel-502. I had recently updated my PHP to version 7.3. This was working on 7.1 but it wasn’t clear what was happening I went to check my apache error log at /var/log/apache/error.log

I saw this error:

 ![image](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/f/fa678e167d9481b05b013c3aa38d720bb99dd657.png)

or

PHP Fatal error: Uncaught Error: Class ‘ZipArchive’ not found in /var/www/html/openemr-502/library/standard\_tables\_capture.inc:52\nStack trace

Basically, I was missing the zip files mentioned above. I went ahead and used the command

sudo apt-get install php7.3-zip

Now when I ran the command I recevied the error

**Warning: mysqli::query(): LOAD DATA LOCAL INFILE forbidde** or a SQL error very similar.

After doing some research I went to my

/etc/php/7.3/apache2/php.ini and my /etc/php/7.3/cli/php.ini and uncommented the

**mysqli.allow\_local\_infile = On**

lines and I was able to install without issue. I hope you find this helpful
