Missing Custom Layouts Report and Dispensed medications

Linux Mint 22.2

Hello, I just upgrade from 7.0.3 to 7.0.4

I have custom made layout from Forms. However, when go to Report and either do “Generate Report” and “Download PDF”. I don’t see the it.

These are all the forms when i click on encounter

However, when go to Print

When print as PDF or Generate REport, it only showed the Vitals.

I tried upgraded to 8.0.0 and it still the same





Separate matter

When upgrade to 7.0.4, There is a dispensed medications. How do I get rid of it.

I read on another thread to change the config -Features and didn’t work. I tried selecting all options and did not remove it.

Upgraded to 8.0.0 and still not working.

Hi @cornutaurus,

I tested those things out on a demo server and…

Dispensed Medications:

This is a bug — the section renders even when “Drugs and Products” (Admin > Globals > Features) is set to disabled. I’ve filed it here: Dispensed Medications section renders in encounter even when inhouse_pharmacy is disabled · Issue #11098 · openemr/openemr · GitHub

Custom Layouts in Reports:

The built-in LBF forms (like SOAP) do appear in both the report checkboxes and the generated output.

  • How did you create the custom layouts? (Admin > Layouts, or another way?)
  • What is the form name/ID?
  • When you go to Patient > Report, does the form show up as a checkbox under “Encounters & Forms”?

Hello,

For the missing custom layouts. I tested out on the demo at OpenEMR Login as well. with admin and pass. It did not work

I created a new layout Admin → Forms → Layouts

See picture.

Created a new encounter with patient Phil Belford and added the custom layout

When go to report to print, it did not show up

Does it have similar issue with this one on another thread?

Hi @cornutaurus I found the issue and is a one line fix. I should be close on line numbers but you can search for line to change in interface/patient_file/report/patient_report.php around L-436

// if the form does not match precisely with any names in the registry, now see if any front partial matches
// and change $form_name appropriately so it will print above in $toprint = $html_strings[$var]
      if (!$form_name_found_flag) {
          foreach ($registry_form_name as $var) {
              if (str_starts_with($form_name, $var)) {
                  $form_name = $var;
              }
          }
      }

Change str_starts_with($form_name, $var) to strpos($form_name, $var) == 0

Hope this helps and you might want to open a git issue so it gets tracked.

1 Like