forked from gaiaehr/gaiaehr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_dual.php
168 lines (152 loc) · 5.61 KB
/
_dual.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<?php
/**
* GaiaEHR (Electronic Health Records)
* Copyright (C) 2013 Certun, LLC.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
if (!defined('_GaiaEXEC')) die('No direct access allowed.');
?>
<html>
<head>
<script type="text/javascript">
var dual,
acl = {},
lang = {},
user = {},
settings = {},
globals = {},
ext = '<?php print EXTJS ?>',
version = '<?php print VERSION ?>',
site = '<?php print $site ?>',
requires;
</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="utf-8" http-equiv="encoding">
<title>GaiaEHR</title>
<link rel="stylesheet" type="text/css" href="resources/css/ext-all-gray.css">
<link rel="stylesheet" type="text/css" href="resources/css/style_newui.css">
<link rel="stylesheet" type="text/css" href="resources/css/custom_app.css">
<link rel="shortcut icon" href="favicon.ico">
</head>
<body>
<!-- slide down message div -->
<div id="msg-div"></div>
<!-- Loading Mask -->
<div id="mainapp-loading-mask" class="x-mask mitos-mask" style="width: 100%; height: 100%"></div>
<div id="mainapp-loading" class="mitos-mask-msg x-mask-msg x-layer x-mask-msg-default x-border-box">
<div id="mainapp-x-mask-msg" class="x-mask-msg-inner">
<div class="x-mask-msg-text">
Loading GaiaEHR...
</div>
</div>
</div>
<!-- Ext library -->
<script type="text/javascript" src="lib/<?php print EXTJS ?>/ext-all-debug.js"></script>
<!-- JSrouter and Ext.deirect API files -->
<script src="JSrouter.php?site=<?php print $site ?>"></script>
<script src="data/api.php?site=<?php print $site ?>"></script>
<script type="text/javascript">
window.i18n = window._ = function(key){
return window.lang[key] || '*'+key+'*';
};
window.say = function(args){
console.log(args);
};
window.g = function(global){
return window.globals[global] || false;
};
window.a = function(acl){
return window.acl[acl] || false;
};
/**
* Ext Localization file
* Using a anonymous function, in javascript.
* Is not intended to be used globally just this once.
*/
(function(){
document.write('<script type="text/javascript" src="lib/<?php print EXTJS ?>/locale/' + i18n('i18nExtFile') + '?_v' + version + '"><\/script>')
})(); // Set and enable Ext.loader for dynamic class loading
Ext.Loader.setConfig({
enabled: true,
disableCaching: false,
paths: {
'Ext': 'lib/<?php print EXTJS ?>/src',
'Ext.ux': 'lib/extjs-4.2.1/examples/ux',
'App': 'app',
'Modules': 'modules',
'Extensible': 'lib/extensible-1.5.1/src'
}
});
for(var x = 0; x < App.data.length; x++){
Ext.direct.Manager.addProvider(App.data[x]);
}
Ext.direct.Manager.on('exception', function(e, o){
say(e);
app.alert(
'<p><span style="font-weight:bold">'+ (e.where != 'undefined' ? e.message : e.message.replace(/\n/g,'')) +'</span></p><hr>' +
'<p>'+ (typeof e.where != 'undefined' ? e.where.replace(/\n/g,'<br>') : e.data) +'</p>',
'error'
);
});
</script>
<script type="text/javascript" src="app/ux/Overrides.js"></script>
<script type="text/javascript" src="app/ux/VTypes.js"></script>
<script type="text/javascript">
/**
* Sencha ExtJS OnReady Event
* When all the JS code is loaded execute the entire code once.
*/
Ext.application({
name: 'App',
models:[
'patient.PatientsOrders',
'patient.Referral',
'patient.PatientSocialHistory'
],
stores:[
'patient.PatientsOrders',
'patient.Referrals',
'patient.PatientSocialHistory',
'administration.Medications'
],
views:[
'patient.windows.DocumentViewer'
],
controllers:[
'DocumentViewer',
'DualScreen',
'patient.ActiveProblems',
'patient.AdvanceDirectives',
'patient.Allergies',
'patient.CognitiveAndFunctionalStatus',
'patient.DoctorsNotes',
'patient.Documents',
'patient.Immunizations',
'patient.LabOrders',
'patient.Medications',
'patient.RadOrders',
'patient.Referrals',
'patient.Results',
'patient.RxOrders',
'patient.Social'
],
launch: function() {
App.Current = this;
dual = Ext.create('App.view.ViewportDual');
}
});
</script>
</body>
</html>