4 * interface/super/rules/controllers/detail/view/view.php
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
>
19 var detail
= new rule_detail( {editable
: <?php
echo $rule->isEditable() ?
"true" : "false"; ?
>});
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
>
28 <div
class="rule_detail">
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
>
38 <p
><b
><?php
echo xlt($rule->title
); ?
></b
>
39 (<?php
echo implode_funcs(", ", $rule->getRuleTypeLabels(), array('xlt')); ?
>)
41 <p
><?php
echo xlt('Bibliographic Citation'); ?
><b
>:</b
> 
;<?php
echo text($rule->bibliographic_citation
); ?
></p
>
42 <p
><?php
echo xlt('Developer'); ?
><b
>:</b
> 
;<?php
echo text($rule->developer
); ?
></p
>
43 <p
><?php
echo xlt('Funding Source'); ?
><b
>:</b
> 
;<?php
echo text($rule->funding_source
); ?
></p
>
44 <p
><?php
echo xlt('Release'); ?
><b
>:</b
> 
;<?php
echo text($rule->release
); ?
></p
>
45 <p
><?php
echo xlt('Web Reference'); ?
><b
>:</b
> 
;<?php
echo text($rule->web_ref
); ?
></p
>
46 <p
><?php
echo xlt('Referential CDS (codetype:code)'); ?
><b
>:</b
> 
;<?php
echo text($rule->linked_referential_cds
); ?
></p
>
49 <!-- reminder intervals
-->
51 <?php
$intervals = $rule->reminderIntervals
; if ($intervals) { ?
>
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
>
58 <?php
if ($intervals->getTypes()) {?
>
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
>
65 <?php
foreach ($intervals->getTypes() as $type) {?
>
67 <span
class="left_col"><?php
echo xlt($type->lbl
); ?
></span
>
68 <span
class="end_col">
69 <?php
echo text($intervals->displayDetails($type)); ?
>
75 <p
><?php
echo xlt('None defined'); ?
></p
>
81 <!-- rule filter criteria
-->
83 <?php
$filters = $rule->filters
; if ($filters) { ?
>
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
>
87 <?php
if ($filters->criteria
) { ?
>
89 <span
class="left_col"> 
;</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
>
95 <?php
foreach ($filters->criteria
as $criteria) { ?
>
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'); ?
>)
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'); ?
>)
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
>
113 <p
><?php
echo xlt('None defined'); ?
></p
>
124 <div
class="section">
125 <p
class="header"><?php
echo xlt('Target/Action Groups'); ?
></p
>
127 foreach ($rule->groups
as $group) {
128 $groupId = $group->groupId
; ?
>
131 <!-- rule target criteria
-->
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'); ?
>)
142 <?php
if ($targets->criteria
) { ?
>
144 <span
class="left_col"> 
;</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
>
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'); ?
>)
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'); ?
>)
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()); ?
>
172 <p
><?php
echo xlt('None defined'); ?
></p
>
179 <!-- rule actions
-->
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'); ?
>)
189 <?php
if ($actions->actions
) { ?
>
191 <span
class="left_col"> 
;</span
>
192 <span
class="end_col"><u
><?php
echo xlt('Category/Title'); ?
></u
></span
>
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
>
205 <span
class="end_col"><?php
echo text($action->getTitle()); ?
></span
>
209 <p
><?php
echo xlt('None defined'); ?
></p
>
216 } // iteration over groups ?>
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'); ?
>)
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'); ?
>)