2 * Copyright (C) 2016 Kevin Yeh <kevin.y@integralemr.com>
3 * Copyright (C) 2016 Brady Miller <brady.g.miller@gmail.com>
5 * LICENSE: This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 3
8 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
17 * @author Kevin Yeh <kevin.y@integralemr.com>
18 * @author Brady Miller <brady.g.miller@gmail.com>
19 * @link http://www.open-emr.org
22 function user_data_view_model(username,fname,lname,authGrp)
25 self.username=ko.observable(username);
26 self.fname=ko.observable(fname);
27 self.lname=ko.observable(lname);
28 self.authorization_group=ko.observable(authGrp);
29 self.messages=ko.observable(false);
30 self.portal=ko.observable(isPortalEnabled);
31 self.portalAlerts=ko.observable("");
32 self.portalAudits=ko.observable("");
33 self.portalMail=ko.observable("");
34 self.portalChats=ko.observable("");
40 function viewPtFinder()
42 navigateTab(webroot_url+"/interface/main/finder/dynamic_finder.php","fin", function () {
43 activateTabByName("fin",true);
47 function viewTgFinder() {
49 navigateTab(webroot_url+"/interface/therapy_groups/index.php?method=listGroups","gfn", function () {
50 activateTabByName("gfn",true);
54 function viewMessages()
56 navigateTab(webroot_url+"/interface/main/messages/messages.php?form_active=1","msg", function () {
57 activateTabByName("msg",true);
61 function viewPortalAudits()
63 navigateTab(webroot_url+"/portal/patient/onsiteactivityviews","msc", function () {
64 activateTabByName("msc",true);
68 function viewPortalMail()
70 navigateTab(webroot_url+"/portal/messaging/messages.php","por", function () {
71 activateTabByName("por",true);
75 function viewPortalChats()
77 navigateTab(webroot_url+"/portal/messaging/secure_chat.php","pop", function () {
78 activateTabByName("pop",true);
82 function editSettings()
84 navigateTab(webroot_url+"/interface/super/edit_globals.php?mode=user","msc", function () {
85 activateTabByName("msc",true);
89 function changePassword()
91 navigateTab(webroot_url+"/interface/usergroup/user_info.php","msc", function () {
92 activateTabByName("msc",true);
99 top.window.location=webroot_url+"/interface/logout.php";