CDR Module: Bug fixes for Clinical Reminders Batch send function
[openemr.git] / gacl / schema.xml
blob4bc68457369c2d9a246abb4a027c11e0fe1519ee
1 <?xml version="1.0"?>
2 <schema version="0.2">
4         <!-- phpGACL Table -->
5         <table name="phpgacl">
6                 <field name="name" type="C" size="230">
7                         <NOTNULL/>
8                         <KEY/>
9                 </field>
10                 <field name="value" type="C" size="150">
11                         <NOTNULL/>
12                 </field>
13         </table>
14         <sql>
15                 <descr>SQL to be executed only to insert default rows</descr>
16                 <query>
17                         DELETE FROM phpgacl WHERE name='version'
18                 </query>
19                 <query>
20                         INSERT INTO phpgacl (name,value) VALUES ('version','3.3.7')
21                 </query>
22                 <query>
23                         DELETE FROM phpgacl WHERE name='schema_version'
24                 </query>
25                 <query>
26                         INSERT INTO phpgacl (name,value) VALUES ('schema_version','2.1')
27                 </query>
28         </sql>
30         <!-- ACL Table -->
31         <table name="acl">
32                 <field name="id" type="I">
33                         <DEFAULT value="0"/>
34                         <NOTNULL/>
35                         <KEY/>
36                 </field>
37                 <field name="section_value" type="C" size="150">
38                         <DEFAULT value="system"/>
39                         <NOTNULL/>
40                 </field>
41                 <field name="allow" type="I">
42                         <DEFAULT value="0"/>
43                         <NOTNULL/>
44                 </field>
45                 <field name="enabled" type="I">
46                         <DEFAULT value="0"/>
47                         <NOTNULL/>
48                 </field>
49                 <field name="return_value" type="X">
50                 </field>
51                 <field name="note" type="X">
52                 </field>
53                 <field name="updated_date" type="I">
54                         <DEFAULT value="0"/>
55                         <NOTNULL/>
56                 </field>
57                 
58                 <index name="enabled_acl">
59                         <col>enabled</col>
60                 </index>
61                 <index name="section_value_acl">
62                         <col>section_value</col>
63                 </index>
64                 <index name="updated_date_acl">
65                         <col>updated_date</col>
66                 </index>
67         </table>
69         <!-- ACL Section Table -->
70         <table name="acl_sections">
71                 <field name="id" type="I">
72                         <DEFAULT value="0"/>
73                         <NOTNULL/>
74                         <KEY/>
75                 </field>
76                 <field name="value" type="C" size="150">
77                         <NOTNULL/>
78                 </field>
79                 <field name="order_value" type="I">
80                         <DEFAULT value="0"/>
81                         <NOTNULL/>
82                 </field>
83                 <field name="name" type="C" size="230">
84                         <NOTNULL/>
85                 </field>
86                 <field name="hidden" type="I">
87                         <DEFAULT value="0"/>
88                         <NOTNULL/>
89                 </field>
90                 
91                 <index name="value_acl_sections">
92                         <col>value</col>
93                         <UNIQUE/>
94                 </index>
95                 <index name="hidden_acl_sections">
96                         <col>hidden</col>
97                 </index>
98         </table>
99         <sql>
100                 <descr>SQL to be executed only to insert default rows</descr>
101                 <query>
102                         DELETE FROM acl_sections WHERE id=1 AND value='system'
103                 </query>
104                 <query>
105                         INSERT INTO acl_sections (id,value,order_value,name) VALUES (1,'system',1,'System')
106                 </query>
107                 <query>
108                         DELETE FROM acl_sections WHERE id=2 AND value='user'
109                 </query>
110                 <query>
111                         INSERT INTO acl_sections (id,value,order_value,name) VALUES (2,'user',2,'User')
112                 </query>
113         </sql>
115         <!-- ACO Table -->
116         <table name="aco">
117                 <field name="id" type="I">
118                         <DEFAULT value="0"/>
119                         <NOTNULL/>
120                         <KEY/>
121                 </field>
122                 <field name="section_value" type="C" size="150">
123                         <DEFAULT value="0"/>
124                         <NOTNULL/>
125                 </field>
126                 <field name="value" type="C" size="150">
127                         <NOTNULL/>
128                 </field>
129                 <field name="order_value" type="I">
130                         <DEFAULT value="0"/>
131                         <NOTNULL/>
132                 </field>
133                 <field name="name" type="C" size="255">
134                         <NOTNULL/>
135                 </field>
136                 <field name="hidden" type="I">
137                         <DEFAULT value="0"/>
138                         <NOTNULL/>
139                 </field>
140                 
141                 <index name="section_value_value_aco">
142                         <col>section_value</col>
143                         <col>value</col>
144                         <UNIQUE/>
145                 </index>
146                 <index name="hidden_aco">
147                         <col>hidden</col>
148                 </index>
149         </table>
151         <!-- ACL to ACO Map Table -->
152         <table name="aco_map">
153                 <field name="acl_id" type="I">
154                         <DEFAULT value="0"/>
155                         <NOTNULL/>
156                         <KEY/>
157                 </field>
158                 <field name="section_value" type="C" size="150">
159                         <DEFAULT value="0"/>
160                         <NOTNULL/>
161                         <KEY/>
162                 </field>
163                 <field name="value" type="C" size="150">
164                         <NOTNULL/>
165                         <KEY/>
166                 </field>
167         </table>
169         <!-- ACO Section Table -->
170         <table name="aco_sections">
171                 <field name="id" type="I">
172                         <DEFAULT value="0"/>
173                         <NOTNULL/>
174                         <KEY/>
175                 </field>
176                 <field name="value" type="C" size="150">
177                         <NOTNULL/>
178                 </field>
179                 <field name="order_value" type="I">
180                         <DEFAULT value="0"/>
181                         <NOTNULL/>
182                 </field>
183                 <field name="name" type="C" size="230">
184                         <NOTNULL/>
185                 </field>
186                 <field name="hidden" type="I">
187                         <DEFAULT value="0"/>
188                         <NOTNULL/>
189                 </field>
190                 
191                 <index name="value_aco_sections">
192                         <col>value</col>
193                         <UNIQUE/>
194                 </index>
195                 <index name="hidden_aco_sections">
196                         <col>hidden</col>
197                 </index>
198         </table>
200         <!-- ARO Table -->
201         <table name="aro">
202                 <field name="id" type="I">
203                         <DEFAULT value="0"/>
204                         <NOTNULL/>
205                         <KEY/>
206                 </field>
207                 <field name="section_value" type="C" size="150">
208                         <DEFAULT value="0"/>
209                         <NOTNULL/>
210                 </field>
211                 <field name="value" type="C" size="150">
212                         <NOTNULL/>
213                 </field>
214                 <field name="order_value" type="I">
215                         <DEFAULT value="0"/>
216                         <NOTNULL/>
217                 </field>
218                 <field name="name" type="C" size="255">
219                         <NOTNULL/>
220                 </field>
221                 <field name="hidden" type="I">
222                         <DEFAULT value="0"/>
223                         <NOTNULL/>
224                 </field>
225                 
226                 <index name="section_value_value_aro">
227                         <col>section_value</col>
228                         <col>value</col>
229                         <UNIQUE/>
230                 </index>
231                 <index name="hidden_aro">
232                         <col>hidden</col>
233                 </index>
234         </table>
236         <!-- ACL to ARO Map Table -->
237         <table name="aro_map">
238                 <field name="acl_id" type="I">
239                         <DEFAULT value="0"/>
240                         <NOTNULL/>
241                         <KEY/>
242                 </field>
243                 <field name="section_value" type="C" size="150">
244                         <DEFAULT value="0"/>
245                         <NOTNULL/>
246                         <KEY/>
247                 </field>
248                 <field name="value" type="C" size="150">
249                         <NOTNULL/>
250                         <KEY/>
251                 </field>
252         </table>
254         <!-- ARO Section Table -->
255         <table name="aro_sections">
256                 <field name="id" type="I">
257                         <DEFAULT value="0"/>
258                         <NOTNULL/>
259                         <KEY/>
260                 </field>
261                 <field name="value" type="C" size="150">
262                         <NOTNULL/>
263                 </field>
264                 <field name="order_value" type="I">
265                         <DEFAULT value="0"/>
266                         <NOTNULL/>
267                 </field>
268                 <field name="name" type="C" size="230">
269                         <NOTNULL/>
270                 </field>
271                 <field name="hidden" type="I">
272                         <DEFAULT value="0"/>
273                         <NOTNULL/>
274                 </field>
275                 
276                 <index name="value_aro_sections">
277                         <col>value</col>
278                         <UNIQUE/>
279                 </index>
280                 <index name="hidden_aro_sections">
281                         <col>hidden</col>
282                 </index>
283         </table>
285         <!-- AXO Table -->
286         <table name="axo">
287                 <field name="id" type="I">
288                         <DEFAULT value="0"/>
289                         <NOTNULL/>
290                         <KEY/>
291                 </field>
292                 <field name="section_value" type="C" size="150">
293                         <DEFAULT value="0"/>
294                         <NOTNULL/>
295                 </field>
296                 <field name="value" type="C" size="150">
297                         <NOTNULL/>
298                 </field>
299                 <field name="order_value" type="I">
300                         <DEFAULT value="0"/>
301                         <NOTNULL/>
302                 </field>
303                 <field name="name" type="C" size="255">
304                         <NOTNULL/>
305                 </field>
306                 <field name="hidden" type="I">
307                         <DEFAULT value="0"/>
308                         <NOTNULL/>
309                 </field>
310                 
311                 <index name="section_value_value_axo">
312                         <col>section_value</col>
313                         <col>value</col>
314                         <UNIQUE/>
315                 </index>
316                 <index name="hidden_axo">
317                         <col>hidden</col>
318                 </index>
319         </table>
321         <!-- ACL to AXO Map Table -->
322         <table name="axo_map">
323                 <field name="acl_id" type="I">
324                         <DEFAULT value="0"/>
325                         <NOTNULL/>
326                         <KEY/>
327                 </field>
328                 <field name="section_value" type="C" size="150">
329                         <DEFAULT value="0"/>
330                         <NOTNULL/>
331                         <KEY/>
332                 </field>
333                 <field name="value" type="C" size="150">
334                         <NOTNULL/>
335                         <KEY/>
336                 </field>
337         </table>
339         <!-- AXO Section Table -->
340         <table name="axo_sections">
341                 <field name="id" type="I">
342                         <DEFAULT value="0"/>
343                         <NOTNULL/>
344                         <KEY/>
345                 </field>
346                 <field name="value" type="C" size="150">
347                         <NOTNULL/>
348                 </field>
349                 <field name="order_value" type="I">
350                         <DEFAULT value="0"/>
351                         <NOTNULL/>
352                 </field>
353                 <field name="name" type="C" size="230">
354                         <NOTNULL/>
355                 </field>
356                 <field name="hidden" type="I">
357                         <DEFAULT value="0"/>
358                         <NOTNULL/>
359                 </field>
360                 
361                 <index name="value_axo_sections">
362                         <col>value</col>
363                         <UNIQUE/>
364                 </index>
365                 <index name="hidden_axo_sections">
366                         <col>hidden</col>
367                 </index>
368         </table>
370         <!-- ARO Group Table -->
371         <table name="aro_groups">
372                 <field name="id" type="I">
373                         <DEFAULT value="0"/>
374                         <NOTNULL/>
375                         <KEY/>
376                 </field>
377                 <field name="parent_id" type="I">
378                         <DEFAULT value="0"/>
379                         <NOTNULL/>
380                 </field>
381                 <field name="lft" type="I">
382                         <DEFAULT value="0"/>
383                         <NOTNULL/>
384                 </field>
385                 <field name="rgt" type="I">
386                         <DEFAULT value="0"/>
387                         <NOTNULL/>
388                 </field>
389                 <field name="name" type="C" size="255">
390                         <NOTNULL/>
391                 </field>
392                 <field name="value" type="C" size="150">
393                         <NOTNULL/>
394                         <KEY/>
395                 </field>
396                 
397                 <index name="parent_id_aro_groups">
398                         <col>parent_id</col>
399                 </index>
400                 <index name="value_aro_groups">
401                         <col>value</col>
402                         <UNIQUE/>
403                 </index>
404                 <index name="lft_rgt_aro_groups">
405                         <col>lft</col>
406                         <col>rgt</col>
407                 </index>
408         </table>
410         <!-- ARO to ARO Group Map Table -->
411         <table name="groups_aro_map">
412                 <field name="group_id" type="I">
413                         <DEFAULT value="0"/>
414                         <NOTNULL/>
415                         <KEY/>
416                 </field>
417                 <field name="aro_id" type="I">
418                         <DEFAULT value="0"/>
419                         <NOTNULL/>
420                         <KEY/>
421                 </field>
422                 <index name="aro_id">
423                         <descr>Index on aro_id</descr>
424                         <col>aro_id</col>
425                 </index>
426         </table>
428         <!-- ACL to ARO Group Map Table -->
429         <table name="aro_groups_map">
430                 <field name="acl_id" type="I">
431                         <DEFAULT value="0"/>
432                         <NOTNULL/>
433                         <KEY/>
434                 </field>
435                 <field name="group_id" type="I">
436                         <DEFAULT value="0"/>
437                         <NOTNULL/>
438                         <KEY/>
439                 </field>
440         </table>
442         <!-- AXO Group Table -->
443         <table name="axo_groups">
444                 <field name="id" type="I">
445                         <DEFAULT value="0"/>
446                         <NOTNULL/>
447                         <KEY/>
448                 </field>
449                 <field name="parent_id" type="I">
450                         <DEFAULT value="0"/>
451                         <NOTNULL/>
452                 </field>
453                 <field name="lft" type="I">
454                         <DEFAULT value="0"/>
455                         <NOTNULL/>
456                 </field>
457                 <field name="rgt" type="I">
458                         <DEFAULT value="0"/>
459                         <NOTNULL/>
460                 </field>
461                 <field name="name" type="C" size="255">
462                         <NOTNULL/>
463                 </field>
464                 <field name="value" type="C" size="150">
465                         <NOTNULL/>
466                         <KEY/>
467                 </field>
468                 
469                 <index name="parent_id_axo_groups">
470                         <col>parent_id</col>
471                 </index>
472                 <index name="value_axo_groups">
473                         <col>value</col>
474                         <UNIQUE/>
475                 </index>
476                 <index name="lft_rgt_axo_groups">
477                         <col>lft</col>
478                         <col>rgt</col>
479                 </index>
480         </table>
482         <!-- AXO to AXO Group Map Table -->
483         <table name="groups_axo_map">
484                 <field name="group_id" type="I">
485                         <DEFAULT value="0"/>
486                         <NOTNULL/>
487                         <KEY/>
488                 </field>
489                 <field name="axo_id" type="I">
490                         <DEFAULT value="0"/>
491                         <NOTNULL/>
492                         <KEY/>
493                 </field>
494                 <index name="axo_id">
495                         <descr>Index on axo_id</descr>
496                         <col>axo_id</col>
497                 </index>
498         </table>
500         <!-- ACL to AXO Group Map Table -->
501         <table name="axo_groups_map">
502                 <field name="acl_id" type="I">
503                         <DEFAULT value="0"/>
504                         <NOTNULL/>
505                         <KEY/>
506                 </field>
507                 <field name="group_id" type="I">
508                         <DEFAULT value="0"/>
509                         <NOTNULL/>
510                         <KEY/>
511                 </field>
512         </table>
513 </schema>