2 * Copyright (C) 2016 Kevin Yeh <kevin.y@integralemr.com>
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>;.
16 * @author Kevin Yeh <kevin.y@integralemr.com>
17 * @link http://www.open-emr.org
23 navigateTab(url,"pat");
24 activateTabByName("pat",true);
34 left_nav.setPatient = function(pname, pid, pubpid, frname, str_dob)
37 (app_view_model.application_data.patient()!==null)
38 && (pid===app_view_model.application_data.patient().pid()))
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);
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++)
56 app_view_model.application_data.patient().encounterArray.push(
57 new encounter_data(EncounterIdArray[encIdx]
58 ,EncounterDateArray[encIdx]
59 ,CalendarCategoryArray[encIdx]));
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)
73 navigateTab(webroot_url+"/interface/"+url,name)
74 activateTabByName(name,true);
77 left_nav.syncRadios = function()