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

add print button and put patient's details at top of visit history page #7270 #7359

Merged
merged 7 commits into from
Apr 22, 2024

Conversation

ruthkonyn
Copy link
Contributor

@ruthkonyn ruthkonyn commented Apr 16, 2024

Fixes #7270

Short description of what this resolves:

to print or make a pdf of a visit history report one had to use the browsers print function, with ctrl+p or file/print etc. This only prints what had been displayed on the screen, so for a long history that takes several screens only the first would be printed.

Changes proposed in this pull request:

add a 'print' button that prints the complete page of the history being displayed. for page length 'ALL' this is the complete history which will produce a multi page document where necessary
display the patient's details at the top of the history window and on the first page of the print or pdf document.

@@ -401,7 +422,7 @@ function changePageSize() {

$countRes = sqlStatement($countQuery, $sqlBindArray);
$count = sqlFetchArray($countRes);
$numRes = $count['c'];
$numRes += $count['c'];
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

It looks like this didn't actually change the code logic, was thinking it did, but on further examination it keeps the code the same.

Copy link
Contributor Author

@ruthkonyn ruthkonyn Apr 22, 2024

Choose a reason for hiding this comment

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

oh yes, apologies: - i've been working on this code to sort out the problems where the documents are displayed on every page, issue #7275, and this new line has crept in from that work. It's not needed simply to add the print functionality. I'll fix the new PR

@@ -297,6 +308,16 @@ function changePageSize() {
</span>

<br />
<span class="heading" >
<?php
// RM put patienes name, id and dob at top of the history -->
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

This breaks if the attendant_type is not a patient (IE therapy group encounters are being viewed. We need to surround all of this:

 if ($attendant_type == 'pid') {

attendant_type in this PR was not accounted for in the patient / dob display.
Copy link
Sponsor Member

@adunsulag adunsulag left a comment

Choose a reason for hiding this comment

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

Had to fix a few minor things but this PR is now working properly for both patients and therapy groups.

@adunsulag adunsulag merged commit 2500b2c into openemr:master Apr 22, 2024
25 checks passed
@ruthkonyn
Copy link
Contributor Author

thank you so much stephen - i was just fixing these for a new PR when i noticed you'd done it already :-)

@ruthkonyn ruthkonyn deleted the visit-history-print branch April 22, 2024 16:04
sjpadgett pushed a commit to sjpadgett/openemr that referenced this pull request Apr 22, 2024
…age openemr#7270 (openemr#7359)

* add print button and put patient's details at top of visit history page

* add comment to say it fixes issue openemr#7270

* fix styling errors in PR

* fix styling errors in PR

* fix styling errors in PR

* Update encounters.php to handle attendant_type

attendant_type in this PR was not accounted for in the patient / dob display.

* Update encounters.php remove unused class reference

Removed unused class reference.

---------

Co-authored-by: Stephen Nielson <[email protected]>
(cherry picked from commit 2500b2c)
$name = getPatientNameFirstLast($pid);
$dob = text(oeFormatShortDate(getPatientData($pid, "DOB")['DOB']));
$external_id = getPatientData($pid, "pubpid")['pubpid'];
echo $name . " (" . $external_id . ")" . "&nbsp; &nbsp; DOB: " . $dob ;
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

need escaping:

echo text($name ). " (" . text($external_id) . ")" .  "&nbsp;  &nbsp; DOB: " . $dob ;

ruthkonyn added a commit to ruthkonyn/openemr that referenced this pull request Apr 23, 2024
sjpadgett pushed a commit that referenced this pull request May 26, 2024
sjpadgett added a commit to sjpadgett/openemr that referenced this pull request May 26, 2024
…_last_minute

* 'master' of https://github.com/openemr/openemr:
  escape strings - brady's comment on pr openemr#7359 (openemr#7400)
  Added fix for zip bomb (openemr#7407)
  Phantom date showing at the top of all reports. (openemr#7433)
  feat: show collection balance in billing widget (openemr#7454)
sjpadgett pushed a commit to sjpadgett/openemr that referenced this pull request May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants