complete a9 (#4976)
[openemr.git] / interface / super / rules / controllers / detail / view / view.php
blob94e549f5180dee02727c0e51112283b6e1216e11
1 <?php
3 /**
4 * interface/super/rules/controllers/detail/view/view.php
6 * @package OpenEMR
7 * @link https://www.open-emr.org
8 * @author Aron Racho <aron@mi-squared.com>
9 * @author Brady Miller <brady.g.miller@gmail.com>
10 * @copyright Copyright (c) 2010-2011 Aron Racho <aron@mi-squared.com>
11 * @copyright Copyright (c) 2019 Brady Miller <brady.g.miller@gmail.com>
12 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
15 $rule = $viewBean->rule ?>
17 <script src="<?php js_src('detail.js') ?>"></script>
18 <script>
19 var detail = new rule_detail( {editable: <?php echo $rule->isEditable() ? "true" : "false"; ?>});
20 detail.init();
21 </script>
23 <br />
24 <header class="title"><?php echo xlt('Rule Detail'); ?>
25 <a href="index.php?action=browse!list" class="btn btn-primary btn-back mx-auto" onclick="top.restoreSession();"><?php echo xlt('Back'); ?></a>
26 </header>
27 <hr />
28 <div class="rule_detail">
29 <!-- -->
30 <!-- summary -->
31 <!-- -->
32 <div class="section">
33 <p class="header">
34 <?php echo xlt('Summary'); ?>
35 <a href="index.php?action=edit!summary&id=<?php echo attr_url($rule->id); ?>"
36 class="action_link" id="edit_summary" onclick="top.restoreSession()">(<?php echo xlt('edit'); ?>)</a>
37 </p>
38 <p><b><?php echo xlt($rule->title); ?></b>
39 (<?php echo implode_funcs(", ", $rule->getRuleTypeLabels(), array('xlt')); ?>)
40 </p>
41 <p><?php echo xlt('Bibliographic Citation'); ?><b>:</b>&nbsp;<?php echo text($rule->bibliographic_citation); ?></p>
42 <p><?php echo xlt('Developer'); ?><b>:</b>&nbsp;<?php echo text($rule->developer); ?></p>
43 <p><?php echo xlt('Funding Source'); ?><b>:</b>&nbsp;<?php echo text($rule->funding_source); ?></p>
44 <p><?php echo xlt('Release'); ?><b>:</b>&nbsp;<?php echo text($rule->release); ?></p>
45 <p><?php echo xlt('Web Reference'); ?><b>:</b>&nbsp;<?php echo text($rule->web_ref); ?></p>
46 <p><?php echo xlt('Referential CDS (codetype:code)'); ?><b>:</b>&nbsp;<?php echo text($rule->linked_referential_cds); ?></p>
47 </div>
48 <!-- -->
49 <!-- reminder intervals -->
50 <!-- -->
51 <?php $intervals = $rule->reminderIntervals; if ($intervals) { ?>
52 <div class="section">
53 <p class="header">
54 <?php echo xlt('Reminder intervals'); ?>
55 <a href="index.php?action=edit!intervals&id=<?php echo attr_url($rule->id); ?>" class="action_link" onclick="top.restoreSession()">(<?php echo xlt('edit'); ?>)</a>
56 </p>
58 <?php if ($intervals->getTypes()) {?>
59 <p>
60 <div>
61 <span class="left_col colhead"><u><?php echo xlt('Type'); ?></u></span>
62 <span class="end_col colhead"><u><?php echo xlt('Detail'); ?></u></span>
63 </div>
65 <?php foreach ($intervals->getTypes() as $type) {?>
66 <div>
67 <span class="left_col"><?php echo xlt($type->lbl); ?></span>
68 <span class="end_col">
69 <?php echo text($intervals->displayDetails($type)); ?>
70 </span>
71 </div>
72 <?php } ?>
73 </p>
74 <?php } else { ?>
75 <p><?php echo xlt('None defined'); ?></p>
76 <?php } ?>
77 </div>
78 <?php } ?>
80 <!-- -->
81 <!-- rule filter criteria -->
82 <!-- -->
83 <?php $filters = $rule->filters; if ($filters) { ?>
84 <div class="section">
85 <p class="header"><?php echo xlt('Demographics filter criteria'); ?> <a href="index.php?action=edit!add_criteria&id=<?php echo attr_url($rule->id); ?>&criteriaType=filter" class="action_link" onclick="top.restoreSession()">(<?php echo xlt('add'); ?>)</a></p>
86 <p>
87 <?php if ($filters->criteria) { ?>
88 <div>
89 <span class="left_col">&nbsp;</span>
90 <span class="mid_col"><u><?php echo xlt('Criteria'); ?></u></span>
91 <span class="mid_col"><u><?php echo xlt('Characteristics'); ?></u></span>
92 <span class="end_col"><u><?php echo xlt('Requirements'); ?></u></span>
93 </div>
95 <?php foreach ($filters->criteria as $criteria) { ?>
96 <div>
97 <span class="left_col">
98 <a href="index.php?action=edit!filter&id=<?php echo attr_url($rule->id); ?>&guid=<?php echo attr_url($criteria->guid); ?>"
99 class="action_link" onclick="top.restoreSession()">
100 (<?php echo xlt('edit'); ?>)
101 </a>
102 <a href="index.php?action=edit!delete_filter&id=<?php echo attr_url($rule->id); ?>&guid=<?php echo attr_url($criteria->guid); ?>"
103 class="action_link" onclick="top.restoreSession()">
104 (<?php echo xlt('delete'); ?>)
105 </a>
106 </span>
107 <span class="mid_col"><?php echo( text($criteria->getTitle()) ); ?></span>
108 <span class="mid_col"><?php echo( text($criteria->getCharacteristics()) ); ?></span>
109 <span class="end_col"><?php echo( text($criteria->getRequirements()) ); ?></span>
110 </div>
111 <?php } ?>
112 <?php } else { ?>
113 <p><?php echo xlt('None defined'); ?></p>
114 <?php } ?>
115 </p>
116 </div>
117 <?php } ?>
119 <!-- -->
120 <!-- rule groups -->
121 <!-- -->
124 <div class="section">
125 <p class="header"><?php echo xlt('Target/Action Groups'); ?></p>
126 <?php $groupId = 0;
127 foreach ($rule->groups as $group) {
128 $groupId = $group->groupId; ?>
129 <div class="group">
130 <!-- -->
131 <!-- rule target criteria -->
132 <!-- -->
134 <?php $targets = $group->ruleTargets; if ($targets) { ?>
135 <div class="section">
136 <p class="header"><?php echo xlt('Clinical targets'); ?>
137 <a href="index.php?action=edit!add_criteria&id=<?php echo attr_url($rule->id); ?>&group_id=<?php echo attr_url($group->groupId); ?>&criteriaType=target" class="action_link" onclick="top.restoreSession()">
138 (<?php echo xlt('add'); ?>)
139 </a>
140 </p>
142 <?php if ($targets->criteria) { ?>
143 <div>
144 <span class="left_col">&nbsp;</span>
145 <span class="mid_col"><u><?php echo xlt('Criteria'); ?></u></span>
146 <span class="mid_col"><u><?php echo xlt('Characteristics'); ?></u></span>
147 <span class="end_col"><u><?php echo xlt('Requirements'); ?></u></span>
148 </div>
150 <?php foreach ($targets->criteria as $criteria) { ?>
151 <div class="form-row">
152 <span class="left_col">
153 <a href="index.php?action=edit!target&id=<?php echo attr_url($rule->id); ?>&guid=<?php echo attr_url($criteria->guid); ?>"
154 class="action_link" onclick="top.restoreSession()">
155 (<?php echo xlt('edit'); ?>)
156 </a>
157 <a href="index.php?action=edit!delete_target&id=<?php echo attr_url($rule->id); ?>&guid=<?php echo attr_url($criteria->guid); ?>"
158 class="action_link" onclick="top.restoreSession()">
159 (<?php echo xlt('delete'); ?>)
160 </a>
161 </span>
162 <span class="mid_col"><?php echo( text($criteria->getTitle()) ); ?></span>
163 <span class="mid_col"><?php echo( text($criteria->getCharacteristics()) ); ?></span>
164 <span class="end_col">
165 <?php echo( text($criteria->getRequirements()) ) ?>
166 <?php echo is_null($criteria->getInterval()) ? "" :
167 " | " . xlt('Interval') . ": " . text($criteria->getInterval()); ?>
168 </span>
169 </div>
170 <?php } ?>
171 <?php } else { ?>
172 <p><?php echo xlt('None defined'); ?></p>
173 <?php } ?>
174 </p>
175 </div>
176 <?php } ?>
178 <!-- -->
179 <!-- rule actions -->
180 <!-- -->
181 <?php $actions = $group->ruleActions; if ($actions) { ?>
182 <div class="section">
183 <p class="header"><?php echo xlt('Actions'); ?>
184 <a href="index.php?action=edit!add_action&id=<?php echo attr_url($rule->id); ?>&group_id=<?php echo attr_url($group->groupId);?>" class="action_link" onclick="top.restoreSession()">
185 (<?php echo xlt('add'); ?>)
186 </a>
187 </p>
189 <?php if ($actions->actions) { ?>
190 <div>
191 <span class="left_col">&nbsp;</span>
192 <span class="end_col"><u><?php echo xlt('Category/Title'); ?></u></span>
193 </div>
195 <div>
196 <?php foreach ($actions->actions as $action) { ?>
197 <span class="left_col">
198 <a href="index.php?action=edit!action&id=<?php echo attr_url($rule->id); ?>&guid=<?php echo attr_url($action->guid); ?>"
199 class="action_link" onclick="top.restoreSession()">
200 (<?php echo xlt('edit'); ?>)</a>
201 <a href="index.php?action=edit!delete_action&id=<?php echo attr_url($rule->id); ?>&guid=<?php echo attr_url($action->guid); ?>"
202 class="action_link" onclick="top.restoreSession()">
203 (<?php echo xlt('delete'); ?>)</a>
204 </span>
205 <span class="end_col"><?php echo text($action->getTitle()); ?></span>
206 <?php } ?>
207 </div>
208 <?php } else { ?>
209 <p><?php echo xlt('None defined'); ?></p>
210 <?php } ?>
211 </p>
212 </div>
213 <?php } ?>
214 </div>
215 <?php
216 } // iteration over groups ?>
217 <div class="group">
218 <?php $nextGroupId = $groupId + 1; ?>
219 <div class="section">
220 <p class="header"><?php echo xlt('Clinical targets'); ?>
221 <a href="index.php?action=edit!add_criteria&id=<?php echo attr_url($rule->id); ?>&group_id=<?php echo attr_url($nextGroupId); ?>&criteriaType=target" class="action_link" onclick="top.restoreSession()">
222 (<?php echo xlt('add'); ?>)
223 </a>
224 </p>
225 </div>
226 <div class="section">
227 <p class="header"><?php echo xlt('Actions'); ?>
228 <a href="index.php?action=edit!add_action&id=<?php echo attr_url($rule->id); ?>&group_id=<?php echo attr_url($nextGroupId); ?>" class="action_link" onclick="top.restoreSession()">
229 (<?php echo xlt('add'); ?>)
230 </a>
231 </p>
232 </div>
233 </div>
235 </div>
237 </div>