Importing 2022 ICD-10 codes in latest OpenEMR

I am unable to import ICD-10 codes into OpenEMR 6.1.0. I’m using Firefox nightly on the Lubuntu 21.10 daily. The server is Ubuntu 22.04.

Here is what I am seeing:

I ensured that local_infile=1 was in the MySQL config, and mysqli.allow_local_infile = On in the PHP config. I also manually imported the checksums into the database. Here’s the small code modification I made to interface/code_systems/list_staged.php to show the directory it’s looking for:

} else {
    ?>
    <div class="error_msg"><?php echo attr($mainPATH); ?><span class="msg" id="<?php echo attr($db); ?>_dirmsg">!</span></div>
    <?php
    ?>
    <!--<div class="error_msg"><?php echo xlt("The installation directory needs to be created."); ?><span class="msg" id="<?php echo attr($db); ?>_dirmsg">!</span></div>-->
    <?php
}

Even after changing permissions on the server, OpenEMR still can’t seem to find the directory. I also tried copying it to a different directory and temporarily changing $mainPATH to reflect that, still to no avail.

Versions:

root@test-emr:/var/www/openemr.example.com# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.4 LTS
Release:        20.04
Codename:       focal
root@test-emr:/var/www/openemr.example.com# php -v
PHP 7.4.3 (cli) (built: Mar  2 2022 15:36:52) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies
root@test-emr:/var/www/openemr.example.com# mysql --version
mysql  Ver 15.1 Distrib 10.3.34-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

Contents:

root@test-emr:/var/www/openemr.example.com# ls -lah /var/www/openemr.example.com/contrib/icd10
total 2.8M
drwxr-xr-x 2  777 root 4.0K Apr 29 00:32  .
drw------- 7 root root 4.0K Apr 20 06:28  ..
-rw-r--r-- 1  777 root 2.2M Apr 28 23:50  2022-Code_Descriptions.zip
-rw-r--r-- 1  777 root  126 Mar 22 18:23  README
-rw-r--r-- 1  777 root 641K Apr 28 23:50 'Zip File 3 2022 ICD-10-PCS Codes File.zip'

Any ideas? Thanks.

how did you install v6.1.0?

So it looks like the permissions on your parent directory ‘icd10’ from your screenshot are set to root only.

drw------- 7 root root 4.0K Apr 20 06:28  ..

If that’s the case and your OpenEMR apache server is not running as root (it typically runs under the apache user) it won’t be able to see the file. You need to either change the ownership of the folder or open up the permissions on it to allow other read access.

1 Like

Doesn’t fix it. Tried a chown to www-data and a chmod 777. The entire parent folder is owned by root, too.

Maybe I need to chown the entire osTicket tree? Seems dangerous.

Thanks

openemr should not run in root. If www-data is your user:owner then entire tree should be the same. Get out of root.
Also ensure composer is not installed in root same for public and vendor.

Still the same issue. Changing permissions doesn’t work.

Composer is also not installed as root.

The problem is not as simple as it may seem, or perhaps it is…

If you see the php information, mysql.allow.local_infile, is it also On?
example: info.php:

<?php
phpinfo();
?>

Regards.
Luis

8 posts were merged into an existing topic: Need to update ICD 10 codes - Suggestions needed