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
Merged
Prev Previous commit
Next Next commit
Update encounters.php to handle attendant_type
attendant_type in this PR was not accounted for in the patient / dob display.
  • Loading branch information
adunsulag committed Apr 22, 2024
commit f4a91974d7d6298bcdb4b4e168067b17877cfda6
3 changes: 2 additions & 1 deletion interface/patient_file/history/encounters.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,13 @@ function changePageSize() {
<br />
<span class="heading" >
<?php
if ($attendant_type == 'pid') {
// 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') {

$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 ;


}
?>
</span>

Expand Down
Loading