Eye Exam (eye_mag) shows "Form not found!" when creating new encounter in OpenEMR 8.x

Hi OpenEMR community,

I’m using OpenEMR 8.0.0 in Docker (AWS and local Windows container) and I noticed the following behavior with the Eye Exam (eye_mag) form:

Steps to reproduce:

  1. Open a patient encounter.

  2. Try to add a new Eye Exam form (interface/forms/eye_mag/new.php).

  3. After clicking save, the system displays:

    Form not found!
    
  4. If I refresh the encounter or reopen the form list, the form is successfully created and I can edit it without any issues.

Logs from Apache/PHP:

OpenEMR.WARNING: An attempt was made to view an eye form belonging to a different patient or encounter {"user-id":"1","requested-form-id":"4","session-pid":"1","session-encounter":"0"}
GET /interface/patient_file/encounter/view_form.php?formname=eye_mag&id=4&pid=1 404

Observations:

  • The eye_mag folder exists in /interface/forms/.

  • The form is registered in the registry table.

  • The issue happens only when creating a new form; editing an existing form works correctly.

  • It seems related to the encounter ID not being assigned yet at the moment of redirection.

Questions:

  1. Is this a known bug in OpenEMR 8.x with legacy Eye Mag forms?

  2. Are there recommended workarounds or patches?

  3. Would converting Eye Exam to a Layout Based Form (LBF) fully resolve this behavior?

I would appreciate any guidance, patches, or confirmation from others experiencing the same issue.

Thanks in advance!

Hi @Rubmem, thanks for the report. Here’s the issue that was fixed the other day for reference. You can patch or wait for the patch to be released.