Documents display error in Patient Report

uhsarp wrote on Thursday, December 01, 2011:

Hello,

I’m using OpenEMR v4.1 on Centos (Linux emr 2.6.18-274.3.1.el5 #1 SMP Tue Sep 6 20:13:52 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux).

I did check to see if Imagemagick is installed.
php -m | grep imagick
PHP Warning:  Directive ‘magic_quotes_gpc’ is deprecated in PHP 5.3 and greater in Unknown on line 0
imagick

But for some reason when I print a patient’s report, it keeps giving this error:
cannot be converted to JPEG. Perhaps ImageMagick is not installed?

Is there a way to know what’s causing this issue and also is it possible for me to display the pdfs, jpegs the way they are without any conversion?

Thanks!

uhsarp wrote on Thursday, December 01, 2011:

Also, I’m looking into the source code of interface\patient_file\report\custom_report.php and is there’s a decryption code to decrypt the encrypted docs ( in the patient documents folder)? I can’t seem to find it.

bradymiller wrote on Friday, December 02, 2011:

Hi,
Confused on the imagemagick check you did. I think it is basically run outside of php, so would check to ensure it is installed on your system rather than php.
-brady

bradymiller wrote on Friday, December 02, 2011:

Also, for the decrypt stuff in patient summary/documents, do you need to type in a code(or something like that) when decrypting it?
-brady

uhsarp wrote on Friday, December 02, 2011:

Hi Brady,

I used the php -m command to check if php is able to have access to the Imagemagick modules. I did check to see if Imagemagick is installed on the machine. For patient docs, looks like the custom_report.php is feeding the encrypted documents to imagemagick and that’s why probably imagemagick is unable to convert them. I couldn’t find the document decryption code in the custom_report.php so I was wondering if it is indeed missing or I’m not looking at the right source files.

Here’s the rpm -qa output.

[root@emr-test httpd]# rpm -qa |grep Image
ImageMagick2-tools-6.6.5.10-1.el5.remi
ImageMagick-devel-6.2.8.0-4.el5_5.3
ImageMagick-c++-6.2.8.0-4.el5_5.3
ImageMagick-perl-6.2.8.0-4.el5_5.3
ImageMagick-devel-6.2.8.0-4.el5_5.3
ImageMagick-c++-6.2.8.0-4.el5_5.3
ImageMagick-6.2.8.0-4.el5_5.3
ImageMagick2-c++-6.6.5.10-1.el5.remi
ImageMagick2-perl-6.6.5.10-1.el5.remi
ImageMagick2-c++-devel-6.6.5.10-1.el5.remi
ImageMagick-6.2.8.0-4.el5_5.3
ImageMagick-c++-devel-6.2.8.0-4.el5_5.3
ImageMagick2-6.6.5.10-1.el5.remi
ImageMagick2-devel-6.6.5.10-1.el5.remi
ImageMagick-c++-devel-6.2.8.0-4.el5_5.3
ImageMagick2-doc-6.6.5.10-1.el5.remi

And here’s the httpd log

[root@emr-test httpd]# tail error_log
[Fri Dec 02 04:02:02 2011] [notice] Digest: generating secret for digest authentication ...
[Fri Dec 02 04:02:02 2011] [notice] Digest: done
Warning: Terminal locale not UTF-8, but UTF-8 locale is being forced.
         Screen output may not be correctly printed.
PHP Warning:  Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0
[Fri Dec 02 04:02:02 2011] [warn] RSA server certificate CommonName (CN) `emr' does NOT match server name!?
[Fri Dec 02 04:02:02 2011] [notice] Apache/2.2.8 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.8 OpenSSL/0.9.8e-fips-rhel5 configured -- resuming normal operations
convert: unable to open image `/var/www/html/sites/default/documents/2/ID_Cards':  @ error/blob.c/OpenBlob/2584.
convert: no decode delegate for this image format `/var/www/html/sites/default/documents/2/ID_Cards' @ error/constitute.c/ReadImage/532.
convert: missing an image filename `_converted.jpg' @ error/convert.c/ConvertImageCommand/2949.

Anyone else tried to pull a patient report with documents? I’m curious to know if this is a bug!