Bug Report: Past Appointments all showing the same comment

@robert.down
There was a bug pointed out to me today.

On the past appointments, the comment for the first appointment is shown for all subsequent appointment making it look as though they all have the same comment.

I added unset($etitle);

That fixed the issue.

hi @juggernautsei, was this on the main patient summary screen past appointments widget? what file did you edit, thank you

Apologies,

image

It is the \interface\demographics.php line, 1833ish just above if (isset($pres) && $res != null) {

Will try to replicate tonight

Hello Sherwin ( @juggernautsei ),

Comment drift still occurs when your line…

unset($etitle);

is added (just before line 1840 (current dev code))…

unset($etitle);
}

if (isset($pres) && $res != null) {

When one or more appointments are displayed in the appointments widget and the last appointment displayed has a comment, then this comment will also appear in the first appointment (if present) in the Past Appointment widget.

both this issue and your issue can be fixed by adding the following line…

(that mirrors line 1653 in the Appointment widget code)

$etitle = xl('(Click to view)');

just before line 1831 (current dev code) in…

interface/patient_file/summary/demographics.php

lines 1831-1934 become…

$etitle = xl('(Click to view)');
if ($row['pc_hometext'] != "") {
    $etitle = xl('Comments').": ".($row['pc_hometext'])."\r\n".$etitle;
}

I don’t understand this. Are you saying to added this line

    $etitle = xl('(Click to view)');

What I have loaded is 5.0.2 and that line is already there. I have the unset inside the while loop at line 1811

  while ($row = sqlFetchArray($pres)) {

so that variable is reset to empty on each pass of the loop. If it is outside the loop it will not work.

(I just edited my post as you posted yours)

$etitle = xl('(Click to view)');

is not already in the code, the following line is…

$etitle = xl('(Click to edit)');

(line 1653)

Ok, I see where you are now.