I’m surely overlooking something but I cannot figure out how to limit the calendar display to only the logged in user.
I see the setting
$GLOBALS[‘docs_see_entire_calendar’] = false;
But it doesn’t seem to have any effect, all calendars are displayed regardless of this setting.
This is going to quickly become a problem for my intended use. I initially plan to roll out OpenEMR for 18+ School Based Health Centers. Following that I plan to use OpenEMR for 100+ mental health clinicians. You can imagine the trouble caused by trying to display 118+ calendars on the screen at once.
Thanks for your help,
Jason Morrill
IT Manager
Child & Family Agency
Looks like someone must have broken this option in a recent change. Any developer want to fess up?
But it will be a problem anyway, as non-practitioners will still see everyone in the calendar. There was a feature put in recently to break it down by facility, which will help if you have docs in separate facilities. Otherwise some better logic (which should not be difficult) would be in order.
yep,
That bug has been annoying me too. Was trying to figure it out a couple days ago. It’s not the /openemr/interface/main/main_info.php file. I think it’s something having to do with the /openemr/interface/main/calendar/index.php file, and I think the pc_username variable(maybe what was added in revision 1.2). Ran out of time and haven’t gotten back to it yet.
-brady
hey,
Did this function ever work? Couldn’t figure out any changes that have disabled it. But, at least figured out how to get it to work. Put below statement in /openemr/interface/main/calendar/index.php file:
if ($_GET[‘pc_username’]) $_SESSION[‘pc_username’] = $_GET[‘pc_username’];
If there’s not a better fix, I’ll just commit this.
-brady
hey,
This was fixed awhile ago (I think since version 3.0.1).
Is your GLOBALS = false; flag set correctly in interface/globals.php file.
To see the difference, set it to true, and you’ll note it shows all calendars. Then set it to false and it should only show the user’s calendar that has logged in by default.
If not working, let us know your OpenEMR version and operating system.
-brady
hey,
Are all calendars shown on the screen? Or, does the user have the option to add all calendars on the screen. Note, there’s not an option that will not allow other users to select/view other users calendars in the same facility.
-brady
thank you brady for the reply,
i found a solution by commenting this line
into ajax_template.html. so know when a praician log into openemr he see only his calendar and cannot see the other calendar
only front-office group and administrator can can.
2) do you know how i can customise this code :
//echo " <option value=’__PC_ALL__’>" .xl (“All Users”). “</option>\n”;
foreach ($provinfo as $doc) {
$username = $doc;
echo " <option value=’$username’";
foreach ($providers as $provider)
if ($provider == $username) echo " selected";
echo “>” . $doc . “, " . $doc . “</option>\n”;
}
echo " </select>\n”;
in that way …
if pc_username is frontoffice or admin…
allow to select all the calendar
else
show only my calendar
hey,
This may work:
Check to see if the pc_username is within the (in_array() function) $doc array. If it is not within the array, then follow same source code; if it is within the array, then only show that user.
-brady