Remove concurrent_layout and clarify layout and themes selections (#272)
[openemr.git] / interface / main / tabs / js / frame_proxies.js
blob2d0f4076868362ea991a62b4b34bae2b5519cd64
1 /**
2  * Copyright (C) 2016 Kevin Yeh <kevin.y@integralemr.com>
3  *
4  * LICENSE: This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version.
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  * You should have received a copy of the GNU General Public License
13  * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
14  *
15  * @package OpenEMR
16  * @author  Kevin Yeh <kevin.y@integralemr.com>
17  * @link    http://www.open-emr.org
18  */
20 var RTop = {
21     set location(url)
22     {
23         navigateTab(url,"pat");
24         activateTabByName("pat",true);
25     }
30 var left_nav = {
31     
34 left_nav.setPatient = function(pname, pid, pubpid, frname, str_dob)
36     if(
37         (app_view_model.application_data.patient()!==null) 
38         && (pid===app_view_model.application_data.patient().pid()))
39     {
40         app_view_model.application_data.patient().pname(pname);
41         app_view_model.application_data.patient().pubpid(pubpid);
42         app_view_model.application_data.patient().str_dob(str_dob);
43         
44         return;
45     }
46     var new_patient=new patient_data_view_model(pname,pid,pubpid,str_dob);
47     app_view_model.application_data.patient(new_patient);
48     navigateTab(webroot_url+"/interface/patient_file/history/encounters.php","enc");
49     tabCloseByName('rev');
51 left_nav.setPatientEncounter = function(EncounterIdArray,EncounterDateArray,CalendarCategoryArray)
53     app_view_model.application_data.patient().encounterArray.removeAll();
54     for(var encIdx=0;encIdx<EncounterIdArray.length;encIdx++)
55     {
56         app_view_model.application_data.patient().encounterArray.push(
57             new encounter_data(EncounterIdArray[encIdx]
58                               ,EncounterDateArray[encIdx]
59                               ,CalendarCategoryArray[encIdx]));
60     }
62 left_nav.setEncounter=function(edate, eid, frname)
64     app_view_model.application_data.patient().selectedEncounterID(eid);
67 left_nav.loadFrame=function(id,name,url)
69     if(name==="")
70     {
71         name='enc';
72     }
73     navigateTab(webroot_url+"/interface/"+url,name)
74     activateTabByName(name,true);
77 left_nav.syncRadios = function()
79