Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #7707, #7708 health snapshot, custom report #7709

Conversation

adunsulag
Copy link
Member

Made it so the custom report foudn in patient_report.php uses twig and also has a filter event for customizing the data that gets passed into the report selection system. This allows module writers to extend the interface and add data or hide sections as needed.

Did the same thing with the health snapshot to allow pieces of the snapshot to be overridden by twig templates.

This work was done to facilitate a module that wanted to have flags to hide/show different parts of the reports and health snapshot as they pilot test these areas with their patients.

Fixes #7707
Fixes #7708

Made it so the custom report foudn in patient_report.php uses twig and
also has a filter event for customizing the data that gets passed into
the report selection system.  This allows module writers to extend the
interface and add data or hide sections as needed.

Did the same thing with the health snapshot to allow pieces of the
snapshot to be overriden by twig templates.

This work was done to facilitate a module that wanted to have flags to
hide/show different parts of the reports and health snapshot as they
pilot test these areas with their patients.

Fixes openemr#7707
Fixes openemr#7708
portal/home.php Outdated
@@ -31,6 +31,8 @@
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Error\SyntaxError;
use OpenEMR\Events\PatientReport\PatientReportFilterEvent;
use OpenEMR\Common\Logging\SystemLogger;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alphabetize ordering

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fixed now.

use OpenEMR\Controllers\Portal\PortalPatientReportController;
use OpenEMR\Common\Twig\TwigContainer;
use OpenEMR\Events\PatientReport\PatientReportFilterEvent;
use Twig\Error\SyntaxError;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alphabetize

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should now be fixed.

{

// show available documents
$db = $GLOBALS['adodb']['db'];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is above $db variable being used?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed, not used.

<td>&nbsp;</td>
<td>
<label class="d-block" for='issue_{{ issue.id|attr }}'>
<input type='checkbox' name='issue_{{ issue.id|attr }}' id='issue_{{ issue.id|attr }}' class='issuecheckbox' value='/{{ issue.encounter|join("/")|text }}' />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

attr for the value attribute

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

<label>
<input type="checkbox" name="{{ form.formdir|attr }}_{{ form.form_id|attr }}"
id="{{ form.formdir|attr }}_{{ form.form_id|attr }}"
value="{{ form.encounter|attr }}" class="encounter_form">{{ form.display|attr }} ({{ form.date|date("Y-m-d")|attr }})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only need text for the form.display and form.date

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@bradymiller
Copy link
Member

@adunsulag , just noted several minor issues. Otherwise code looks good for bringing in.

@adunsulag
Copy link
Member Author

Fixed all the issues, if CI passes, will bring in to avoid holding up patch.

@adunsulag adunsulag merged commit 4d8d535 into openemr:master Sep 22, 2024
23 checks passed
sjpadgett pushed a commit to sjpadgett/openemr that referenced this pull request Sep 22, 2024
…emr#7709)

* Fixes openemr#7707, openemr#7708 health snapshot, custom report

Made it so the custom report foudn in patient_report.php uses twig and
also has a filter event for customizing the data that gets passed into
the report selection system.  This allows module writers to extend the
interface and add data or hide sections as needed.

Did the same thing with the health snapshot to allow pieces of the
snapshot to be overriden by twig templates.

This work was done to facilitate a module that wanted to have flags to
hide/show different parts of the reports and health snapshot as they
pilot test these areas with their patients.

Fixes openemr#7707
Fixes openemr#7708

* Fix code styles.

* Add copyright notice

* style fixes, escaping fixes

(cherry picked from commit 4d8d535)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants