updated US CDC website link to current immunization VIS page (#7855)
[openemr.git] / templates / super / rules / controllers / detail / view.php
blobc00d0cb08b08a66eb0196dcd37acc3c1a35204e2
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
13 * @license There are segments of code in this file that have been generated via ChatGPT and are licensed as Public Domain, they are marked with a header and footer.
16 use OpenEMR\ClinicalDecisionRules\Interface\Common;
18 $rule = $viewBean->rule ?>
20 <script src="<?php Common::js_src('detail.js') ?>"></script>
21 <script>
22 var detail = new rule_detail( {editable: <?php echo $rule->isEditable() ? "true" : "false"; ?>});
23 detail.init();
24 </script>
26 <br />
27 <header class="title"><?php echo xlt('Rule Detail'); ?>
28 <a href="index.php?action=browse!list" class="btn btn-primary btn-back mx-auto" onclick="top.restoreSession();"><?php echo xlt('Back'); ?></a>
29 </header>
30 <hr />
31 <div class="rule_detail">
32 <!-- -->
33 <!-- summary -->
34 <!-- -->
35 <div class="section">
36 <p class="header">
37 <?php echo xlt('Summary'); ?>
38 <a href="index.php?action=edit!summary&id=<?php echo attr_url($rule->id); ?>"
39 class="action_link" id="edit_summary" onclick="top.restoreSession()">(<?php echo xlt('edit'); ?>)</a>
40 </p>
41 <p><b><?php echo xlt($rule->title); ?></b>
42 (<?php echo Common::implode_funcs(", ", $rule->getRuleTypeLabels(), array('xlt')); ?>)
43 </p>
44 <p><b><?php echo xlt('Bibliographic Citation'); ?>:</b>&nbsp;<?php echo text($rule->bibliographic_citation); ?></p>
45 <p><b><?php echo xlt('Developer'); ?>:</b>&nbsp;<?php echo text($rule->developer); ?></p>
46 <p><b><?php echo xlt('Funding Source'); ?>:</b>&nbsp;<?php echo text($rule->funding_source); ?></p>
47 <p><b><?php echo xlt('Release'); ?>:</b>&nbsp;<?php echo text($rule->release); ?></p>
48 <p><b><?php echo xlt('Web Reference'); ?>:</b>&nbsp;<?php echo text($rule->web_reference); ?></p>
49 <p><b><?php echo xlt('Referential CDS (codetype:code)'); ?>:</b>&nbsp;<?php echo text($rule->linked_referential_cds); ?></p>
50 <?php
51 /** Note the following code is in the Public Domain and was generated using ChatGPT */
53 <p><b><?php echo xlt('Use of Patient\'s Race'); ?>:</b>&nbsp;<?php echo text($rule->patient_race_usage); ?></p>
54 <p><b><?php echo xlt('Use of Patient\'s Ethnicity'); ?>:</b>&nbsp;<?php echo text($rule->patient_ethnicity_usage); ?></p>
55 <p><b><?php echo xlt('Use of Patient\'s Language'); ?>:</b>&nbsp;<?php echo text($rule->patient_language_usage); ?></p>
56 <p><b><?php echo xlt('Use of Patient\'s Sexual Orientation'); ?>:</b>&nbsp;<?php echo text($rule->patient_sexual_orientation_usage); ?></p>
57 <p><b><?php echo xlt('Use of Patient\'s Gender Identity'); ?>:</b>&nbsp;<?php echo text($rule->patient_gender_identity_usage); ?></p>
58 <p><b><?php echo xlt('Use of Patient\'s Sex'); ?>:</b>&nbsp;<?php echo text($rule->patient_sex_usage); ?></p>
59 <p><b><?php echo xlt('Use of Patient\'s Date of Birth'); ?>:</b>&nbsp;<?php echo text($rule->patient_dob_usage); ?></p>
60 <p><b><?php echo xlt('Use of Patient\'s Social Determinants of Health'); ?>:</b>&nbsp;<?php echo text($rule->patient_sodh_usage); ?></p>
61 <p><b><?php echo xlt('Use of Patient\'s Health Status Assessments'); ?>:</b>&nbsp;<?php echo text($rule->patient_health_status_usage); ?></p>
62 <?php
63 /** End ChatGPT Public Domain Code */
65 </div>
66 <!-- -->
67 <!-- reminder intervals -->
68 <!-- -->
69 <?php $intervals = $rule->reminderIntervals; if ($intervals) { ?>
70 <div class="section">
71 <p class="header">
72 <?php echo xlt('Reminder intervals'); ?>
73 <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>
74 </p>
76 <?php if ($intervals->getTypes()) {?>
77 <p>
78 <div>
79 <span class="left_col colhead"><u><?php echo xlt('Type'); ?></u></span>
80 <span class="end_col colhead"><u><?php echo xlt('Detail'); ?></u></span>
81 </div>
83 <?php foreach ($intervals->getTypes() as $type) {?>
84 <div>
85 <span class="left_col"><?php echo xlt($type->lbl); ?></span>
86 <span class="end_col">
87 <?php echo text($intervals->displayDetails($type)); ?>
88 </span>
89 </div>
90 <?php } ?>
91 </p>
92 <?php } else { ?>
93 <p><?php echo xlt('None defined'); ?></p>
94 <?php } ?>
95 </div>
96 <?php } ?>
98 <!-- -->
99 <!-- rule filter criteria -->
100 <!-- -->
101 <?php $filters = $rule->filters; if ($filters) { ?>
102 <div class="section">
103 <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>
105 <?php if ($filters->criteria) { ?>
106 <div>
107 <span class="left_col">&nbsp;</span>
108 <span class="mid_col"><u><?php echo xlt('Criteria'); ?></u></span>
109 <span class="mid_col"><u><?php echo xlt('Characteristics'); ?></u></span>
110 <span class="end_col"><u><?php echo xlt('Requirements'); ?></u></span>
111 </div>
113 <?php foreach ($filters->criteria as $criteria) { ?>
114 <div>
115 <span class="left_col">
116 <a href="index.php?action=edit!filter&id=<?php echo attr_url($rule->id); ?>&guid=<?php echo attr_url($criteria->guid); ?>"
117 class="action_link" onclick="top.restoreSession()">
118 (<?php echo xlt('edit'); ?>)
119 </a>
120 <a href="index.php?action=edit!delete_filter&id=<?php echo attr_url($rule->id); ?>&guid=<?php echo attr_url($criteria->guid); ?>"
121 class="action_link" onclick="top.restoreSession()">
122 (<?php echo xlt('delete'); ?>)
123 </a>
124 </span>
125 <span class="mid_col"><?php echo( text($criteria->getTitle()) ); ?></span>
126 <span class="mid_col"><?php echo( text($criteria->getCharacteristics()) ); ?></span>
127 <span class="end_col"><?php echo( text($criteria->getRequirements()) ); ?></span>
128 </div>
129 <?php } ?>
130 <?php } else { ?>
131 <p><?php echo xlt('None defined'); ?></p>
132 <?php } ?>
133 </p>
134 </div>
135 <?php } ?>
137 <!-- -->
138 <!-- rule groups -->
139 <!-- -->
142 <div class="section">
143 <p class="header"><?php echo xlt('Target/Action Groups'); ?></p>
144 <?php $groupId = 0;
145 foreach ($rule->groups as $group) {
146 $groupId = $group->groupId; ?>
147 <div class="group">
148 <!-- -->
149 <!-- rule target criteria -->
150 <!-- -->
152 <?php $targets = $group->ruleTargets; if ($targets) { ?>
153 <div class="section">
154 <p class="header"><?php echo xlt('Clinical targets'); ?>
155 <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()">
156 (<?php echo xlt('add'); ?>)
157 </a>
158 </p>
160 <?php if ($targets->criteria) { ?>
161 <div>
162 <span class="left_col">&nbsp;</span>
163 <span class="mid_col"><u><?php echo xlt('Criteria'); ?></u></span>
164 <span class="mid_col"><u><?php echo xlt('Characteristics'); ?></u></span>
165 <span class="end_col"><u><?php echo xlt('Requirements'); ?></u></span>
166 </div>
168 <?php foreach ($targets->criteria as $criteria) { ?>
169 <div class="form-row">
170 <span class="left_col">
171 <a href="index.php?action=edit!target&id=<?php echo attr_url($rule->id); ?>&guid=<?php echo attr_url($criteria->guid); ?>"
172 class="action_link" onclick="top.restoreSession()">
173 (<?php echo xlt('edit'); ?>)
174 </a>
175 <a href="index.php?action=edit!delete_target&id=<?php echo attr_url($rule->id); ?>&guid=<?php echo attr_url($criteria->guid); ?>"
176 class="action_link" onclick="top.restoreSession()">
177 (<?php echo xlt('delete'); ?>)
178 </a>
179 </span>
180 <span class="mid_col"><?php echo( text($criteria->getTitle()) ); ?></span>
181 <span class="mid_col"><?php echo( text($criteria->getCharacteristics()) ); ?></span>
182 <span class="end_col">
183 <?php echo( text($criteria->getRequirements()) ) ?>
184 <?php echo is_null($criteria->getInterval()) ? "" :
185 " | " . xlt('Interval') . ": " . text($criteria->getInterval()); ?>
186 </span>
187 </div>
188 <?php } ?>
189 <?php } else { ?>
190 <p><?php echo xlt('None defined'); ?></p>
191 <?php } ?>
192 </p>
193 </div>
194 <?php } ?>
196 <!-- -->
197 <!-- rule actions -->
198 <!-- -->
199 <?php $actions = $group->ruleActions; if ($actions) { ?>
200 <div class="section">
201 <p class="header"><?php echo xlt('Actions'); ?>
202 <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()">
203 (<?php echo xlt('add'); ?>)
204 </a>
205 </p>
207 <?php if ($actions->actions) { ?>
208 <div>
209 <span class="left_col">&nbsp;</span>
210 <span class="end_col"><u><?php echo xlt('Category/Title'); ?></u></span>
211 </div>
213 <div>
214 <?php foreach ($actions->actions as $action) { ?>
215 <span class="left_col">
216 <a href="index.php?action=edit!action&id=<?php echo attr_url($rule->id); ?>&guid=<?php echo attr_url($action->guid); ?>"
217 class="action_link" onclick="top.restoreSession()">
218 (<?php echo xlt('edit'); ?>)</a>
219 <a href="index.php?action=edit!delete_action&id=<?php echo attr_url($rule->id); ?>&guid=<?php echo attr_url($action->guid); ?>"
220 class="action_link" onclick="top.restoreSession()">
221 (<?php echo xlt('delete'); ?>)</a>
222 </span>
223 <span class="end_col"><?php echo text($action->getTitle()); ?></span>
224 <?php } ?>
225 </div>
226 <?php } else { ?>
227 <p><?php echo xlt('None defined'); ?></p>
228 <?php } ?>
229 </p>
230 </div>
231 <?php } ?>
232 </div>
233 <?php
234 } // iteration over groups ?>
235 <div class="group">
236 <?php $nextGroupId = $groupId + 1; ?>
237 <div class="section">
238 <p class="header"><?php echo xlt('Clinical targets'); ?>
239 <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()">
240 (<?php echo xlt('add'); ?>)
241 </a>
242 </p>
243 </div>
244 <div class="section">
245 <p class="header"><?php echo xlt('Actions'); ?>
246 <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()">
247 (<?php echo xlt('add'); ?>)
248 </a>
249 </p>
250 </div>
251 </div>
253 </div>
255 </div>