Eye Exam Form broken in 5.0-3 updated instance

Hi Ray,
Your eye exam looks fantastic in the demo. I was looking forward to having access to it after upgrading to 5.0. However the First field showing visit date is present, but HPI and PMSFH show a perpetual spinning loading dial. The 6 fields below the above 2 are visible ( Mental Status, Vision, Tension, Amsler, Fields and Pupils). Below the 6 fields above there is another spinning loading dial and below that the 5 fields (Defaults, Text, Draw, Quick Picks and date field) are visible. Below the above 5 fields another spinning dial. Thus also missing External Exam, Anterior Segment, Retina, Neuro and both Impression/Plan fields.
Thank you for your assistance and my congratulations on your creation, of the Eye Exam Form.

Thank you,
Henry

Hi Henry,

I was unable to confirm this behavior on the 5.0.0(which is using patch 3) demo:
http://www.open-emr.org/wiki/index.php/OpenEMR_Demo

Can you test that demo to see if having those same issues. And recommend removing your browser cache/cookies?

-brady

Hi Brady,
I checked out the 5.0 Demo that’s running on Ubuntu 12.04, that’s how I know what isn’t working on my instance, which is running 16.04 Ubuntu. Has it been tested on Ubuntu 16.04? I upgraded from 4.2.1 directly to 5.0 via the wiki package. Is that ok, to upgrade skipping 4.2.2? Based on the Wiki it seemed that that wasn’t a problem. The upgrade went fine without any visible problems thus far.

Thank you,
Henry

Hi,

I tested this on 16.04 when released the new patch (I develop predominantly on 16.04).

Did you install the Eye Module separately before you upgraded to 5.0?

-brady

No. I just upgraded. Thought eye module automatically got installed. It appeared that Eye Exam was enabled. Are there steps that I missed?

Henry

Hi,

Nope, just wanted to make sure you didn’t install a development beta version of the eye form before you upgraded to 5.0.

Albeit I am not able to reproduce your issues, I have noted that the initial load up of the eye form takes much longer in php7 than it does in php5. If you wait it out, do all the elements load?

-brady

No. Just keeps trying to load.

anything in the php error log or the javascript error log?

Where do I find those 2 logs?

Hi @hamd ,

For ubuntu 16.04, default place for php error log is:
/var/log/apache2/error.log

The javascript error log is seen from your browser. In firefox:
Menu->Developer->Web Console->(Click Console tab and ensure the JS button is clicked to see the JS errors while use OpenEMR)

-brady

Hi Brady,

Below is a small sample of php error log (it seems to run forever).

[Fri May 26 00:30:16.914759 2017] [:error] [pid 6484] [client 10.0.0.43:53526] PHP Notice: Undefined index: OSVF2 in /var/www/openemr/interface/forms/eye_mag/save.php on line 744, referer: https://10.0.0.30/openemr/interface/forms/eye_mag/a_issue.php?uniqueID=1275810200&form_type=POH&pid=19&encounter=40708&form_id=4
[Fri May 26 00:30:16.914764 2017] [:error] [pid 6484] [client 10.0.0.43:53526] PHP Notice: Undefined index: OSVF3 in /var/www/openemr/interface/forms/eye_mag/save.php on line 745, referer: https://10.0.0.30/openemr/interface/forms/eye_mag/a_issue.php?uniqueID=1275810200&form_type=POH&pid=19&encounter=40708&form_id=4
[Fri May 26 00:30:16.914768 2017] [:error] [pid 6484] [client 10.0.0.43:53526] PHP Notice: Undefined index: OSVF4 in /var/www/openemr/interface/forms/eye_mag/save.php on line 746, referer: https://10.0.0.30/openemr/interface/forms/eye_mag/a_issue.php?uniqueID=1275810200&form_type=POH&pid=19&encounter=40708&form_id=4
[Fri May 26 00:30:16.914773 2017] [:error] [pid 6484] [client 10.0.0.43:53526] PHP Notice: Undefined index: TEST in /var/www/openemr/interface/forms/eye_mag/save.php on line 747, referer: https://10.0.0.30/openemr/interface/forms/eye_mag/a_issue.php?uniqueID=1275810200&form_type=POH&pid=19&encounter=40708&form_id=4

And below is the entire javascript error log:

Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead[Learn More] index.js:1
Use of getPreventDefault() is deprecated. Use defaultPrevented instead. index.js:5:17117
Use of getPreventDefault() is deprecated. Use defaultPrevented instead. index.js:3:3869
Use of getPreventDefault() is deprecated. Use defaultPrevented instead. index.js:3:7108
Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead[Learn More] index.js:1
Use of getPreventDefault() is deprecated. Use defaultPrevented instead. index.js:5:17117

Where is the problem?

Thank you,

Henry

Hi @hamd ,

Basically no errors in your logs that were pasted. Do you see any PHP error (or anything with the word error in the php log). Note the timestamps; can use this to focus on pertinent place in log, so open the eye form in openemr and then will know which entries in log are pertinent (ie. all on or after the time you tried the eye form)

Can you try the current development demo (this is using ubuntu 16.04) to see if that works on your browser?
http://www.open-emr.org/wiki/index.php/Development_Demo#Daily_Build_Development_Demo

-brady

Hi Henry,

I just did a fresh 5.0.0 install (no patch yet) on an Ubuntu 16.04 LTS VirtualBox instance and the Eye form loads up very quickly.

If you are in FireFox, can you see any errors in the Console Window (open Tools->Web Developer->Web Console on my version)? The panels are essentially “drop-in” panel retrieved via ajax - it is like loading pages within the page. Most likely you are missing or not loading a javascript file because the data for these panels is never received. Since this works with a new vanilla install, perhaps it is an upgrade issue. To figure it out though we need to reproduce what you are seeing.
Ray

Hi Ray and Brady,

I tried the Demo and Eye Exam works fine with all the panels open. I did a search of the error file for “PHP Error” and it come back empty. Every entry has “[:error]” as shown below but not “PHP Error”.

Below are the first 5 messages of 48 pages that seem similar:

[Sat May 27 11:31:59.454020 2017] [:error] [pid 1486] [client 10.0.0.43:56953] PHP Notice: Undefined variable: condition_str in /var/www/openemr/interface/new/new_comprehensive.php on line 451, referer: https://10.0.0.30/openemr/interface/main/tabs/main.php
[Sat May 27 11:31:59.454074 2017] [:error] [pid 1486] [client 10.0.0.43:56953] PHP Notice: Undefined variable: group_fields in /var/www/openemr/interface/new/new_comprehensive.php on line 451, referer: https://10.0.0.30/openemr/interface/main/tabs/main.php
[Sat May 27 11:31:59.461928 2017] [:error] [pid 1486] [client 10.0.0.43:56953] PHP Notice: Undefined variable: group_fields in /var/www/openemr/interface/new/new_comprehensive.php on line 451, referer: https://10.0.0.30/openemr/interface/main/tabs/main.php
[Sat May 27 11:31:59.462901 2017] [:error] [pid 1486] [client 10.0.0.43:56953] PHP Notice: Undefined variable: group_fields in /var/www/openemr/interface/new/new_comprehensive.php on line 451, referer: https://10.0.0.30/openemr/interface/main/tabs/main.php
[Sat May 27 11:31:59.463246 2017] [:error] [pid 1486] [client 10.0.0.43:56953] PHP Notice: Undefined variable: group_fields in /var/www/openemr/interface/new/new_comprehensive.php on line 451, referer: https://10.0.0.30/openemr/interface/main/tabs/main.php

After 48 pages of referring to “openemr/interface/main/tabs/main.php” as above there are 190 more pages of which the following is the beginning of the next section.

[Sat May 27 11:35:29.504569 2017] [:error] [pid 1490] [client 10.0.0.43:56990] PHP Notice: Undefined index: form_id in /var/www/openemr/library/options.inc.php on line 308, referer: https://10.0.0.30/openemr/interface/main/tabs/main.php
[Sat May 27 11:35:32.729975 2017] [:error] [pid 1490] [client 10.0.0.43:56990] PHP Notice: Undefined index: audit_events_lab-order in /var/www/openemr/library/log.inc on line 746, referer: https://10.0.0.30/openemr/interface/patient_file/encounter/encounter_top.php?set_encounter=40708
[Sat May 27 11:35:32.901986 2017] [:error] [pid 1490] [client 10.0.0.43:56990] PHP Notice: Undefined index: CHOICE in /var/www/openemr/interface/forms/eye_mag/report.php on line 64, referer: https://10.0.0.30/openemr/interface/patient_file/encounter/encounter_top.php?set_encounter=40708
[Sat May 27 11:35:32.902021 2017] [:error] [pid 1490] [client 10.0.0.43:56990] PHP Notice: Undefined index: ptid in /var/www/openemr/interface/forms/eye_mag/report.php on line 66, referer: https://10.0.0.30/openemr/interface/patient_file/encounter/encounter_top.php?set_encounter=40708
[Sat May 27 11:35:32.902026 2017] [:error] [pid 1490] [client 10.0.0.43:56990] PHP Notice: Undefined index: encid in /var/www/openemr/interface/forms/eye_mag/report.php on line 67, referer: https://10.0.0.30/openemr/interface/patient_file/encounter/encounter_top.php?set_encounter=40708
[Sat May 27 11:35:32.902030 2017] [:error] [pid 1490] [client 10.0.0.43:56990] PHP Notice: Undefined index: formid in /var/www/openemr/interface/forms/eye_mag/report.php on line 68, referer:

Is this of any help?

Thank you,

Henry

Does JavaScript need to be loaded into Ubuntu 16.04 instance?
I just checked and there are no JavaScript packages installed.

The PHP log info is only important if there is an “error”. The “INFO” lines are present for reporting purposes only and do not affect the form.

You are missing something - some file(s) is not loading.

There are a lot of js files that need to load for this form. In the console window or the network window of your browser, are any of the files the form is requesting failing to load? They may appear RED. This is where you’ll discover what is missing on your server. If there are missing files, we will need to know which one(s) so we can including this directives in the upgrade process for others.

Hi Ray,
It appears that it is felt to be possibly a browser problem however, if that were so then when I go into the Demo the Eye Exam shouldn’t load either right? Yet it loads fine. Might a more practical way around this be to reconstruct the appliance and install a backup of the present database production instance? Does that make sense? Not sure what you mean by red. I posted the JavaScript error output.

Thank you,

Henry

I do not think it is a browser problem because the demo loads. It must be that a js file is not loading.

Do the JavaScript files load from Ubuntu? Because I don’t find any JavaScript packages in Ubuntu.

If so, which JavaScript packages do I need?