-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Conversation
@@ -401,7 +422,7 @@ function changePageSize() { | |||
|
|||
$countRes = sqlStatement($countQuery, $sqlBindArray); | |||
$count = sqlFetchArray($countRes); | |||
$numRes = $count['c']; | |||
$numRes += $count['c']; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 --> |
There was a problem hiding this comment.
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.
Removed unused class reference.
There was a problem hiding this 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.
thank you so much stephen - i was just fixing these for a new PR when i noticed you'd done it already :-) |
…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 . ")" . " DOB: " . $dob ; |
There was a problem hiding this comment.
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) . ")" . " DOB: " . $dob ;
…_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)
(cherry picked from commit 7febeb9)
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.