Update encounter history select box in the top nav

Hi all

i have a custom patien/client called morgan pharmacist
i have to create a encounter when a custom left nav button is clicked that i have done.
but in the top nav the created encounter is not updated. when i refresh the browser it works fine.
the question is “how to update the encounter in the top nav encounter history select box when that custom left nav button is clicked”?
note ( i tried refeshing methods only the main iframe is refreshing or when i trien to open with new tab the patient is not selected )

hoping some of the introductory developer wiki will help https://www.open-emr.org/wiki/index.php/OpenEMR_System_Architecture#PHP_Sessions_and_Browser_Windows

but maybe current session data is not resetting the encounter array

“onclick=‘top.restoreSession()’”

is not updating the encounter history select box, instead creates a new encounter…

i just want to update the top nav select box…

a lot of the js lives here openemr/tabs_view_model.js at bd2fa2f9e60deef996080d7ef9ac0fcfcf4cc0aa · openemr/openemr · GitHub

thanks @stephenwaite