Encounter Review Tab title shows "Unknown"

Situation
When you click the “review” button on the encounter selector/dropdown, the Tab title shows “Unknown”.

See screenshot below
Screenshot 2024-10-22 131009

OpenEMR Version
V7.0.2
V7.0.2 patch 1

Browser:
I’m using: Chrome

Operating System
I’m using: Windows

Search
Did you search the forum for similar questions? Yes

Logs
Did you check the logs? Yes
Was there anything pertinent in them? No
Please paste them here (surround with three backticks (```) for readability.
You can also turn on User Debugging under Administration->Globals->Logging User Debugging Options=>All

i’ve not been able to reproduce this problem ? - have you tried the obvious - log out and log in again? I’m using linux 7.0.2 (1) but it shouldn’t be system dependant

Turn on User Debug All. I’d bet you’re getting a JS error. Well I won’t bet much, maybe a dollar.:slight_smile:

Hello @sjpadgett,

I set User Debug to All. Still didn’t get any errors in the logs nor console.

I realized that the encounter showing “Unknown” only has a Prior-Authorization form which i was testing.

I have another encounter which contains a procedure order, CAMOS form and the eye module which shows “Chief Complaint” as the tab title.

Does this help?

You’re going to have to set up debugger and/or trace javascript in browser to figure this out.
Otherwise I don’t know how to help. Take a look at code where the unknown is set and usually it’s because a title isn’t present.

In /interface/patient_file/encounter/forms.php,

i think this is where the title is being set.

<?php if ($reviewMode) { ?>
        $("body table:first").hide();
        $(".encounter-summary-column").hide();
        $(".btn").hide();
        $(".encounter-summary-column:first").show();
        $(".title:first").text(<?php echo xlj("Review"); ?> + " " + $(".title:first").text() + " ( " + <?php echo js_escape($encounter); ?> + " )");
    <?php } ?>

I may be wrong. can you point me to where the title is being set on Encounter review?

@kkappiah
I have reproduced and will take a quick look see!
I’ll let you know but if I find a fix I’ll add to an open PR I have for patch 2.

Great. I will appreciate it.

Thanks

Need to add a title with class title in head.
<title class="title"></title>

 <?php if ($reviewMode) { ?>
    $("body table:first").hide();
    $(".encounter-summary-column").hide();
    $(".btn").hide();
    $(".encounter-summary-column:first").show();
    $(".title:first").text(<?php echo xlj("Review Encounter"); ?> + " (" + <?php echo js_escape($encounter); ?> + ")");
    <?php } ?>

2 Likes

Thanks @sjpadgett ,

this fixed the problem