2 // Copyright (C) 2010-2011 Aron Racho <aron@mi-squred.com>
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
7 // of the License, or (at your option) any later version.
9 $rule = $viewBean->rule ?
>
11 <script language
="javascript" src
="<?php js_src('detail.js') ?>"></script
>
12 <script type
="text/javascript">
13 var detail
= new rule_detail( {editable
: <?php
echo $rule->isEditable() ?
"true":"false"; ?
>});
17 <table
class="header">
19 <td
class="title"><?php
echo out(xl('Rule Detail')); ?
></td
>
21 <a href
="index.php?action=browse!list" class="iframe_medium css_button" onclick
="top.restoreSession()"><span
><?php
echo out(xl('Back')); ?
></span
></a
>
26 <div
class="rule_detail">
30 <div
class="section text">
32 <?php
echo out(xl('Summary')); ?
>
33 <a href
="index.php?action=edit!summary&id=<?php echo out($rule->id); ?>"
34 class="action_link" id
="edit_summary" onclick
="top.restoreSession()">(<?php
echo out(xl('edit')); ?
>)</a
>
36 <p
><b
><?php
echo out(xl($rule->title
)); ?
></b
>
37 (<?php
echo implode_funcs(", ", $rule->getRuleTypeLabels(), array( 'xl', 'out' )); ?
>)
39 <p
><?php
echo out(xl('Developer')); ?
><b
>:</b
> 
;<?php
echo out($rule->developer
); ?
></p
>
40 <p
><?php
echo out(xl('Funding Source')); ?
><b
>:</b
> 
;<?php
echo out($rule->funding_source
); ?
></p
>
41 <p
><?php
echo out(xl('Release')); ?
><b
>:</b
> 
;<?php
echo out($rule->release
); ?
></p
>
42 <p
><?php
echo out(xl('Web Reference')); ?
><b
>:</b
> 
;<?php
echo out($rule->web_ref
); ?
></p
>
46 <!-- reminder intervals
-->
48 <?php
$intervals = $rule->reminderIntervals
; if ($intervals) { ?
>
49 <div
class="section text">
51 <?php
echo out(xl('Reminder intervals')); ?
>
52 <a href
="index.php?action=edit!intervals&id=<?php echo $rule->id ?>" class="action_link" onclick
="top.restoreSession()">(<?php
echo out(xl('edit')); ?
>)</a
>
55 <?php
if ($intervals->getTypes()) {?
>
58 <span
class="left_col colhead"><u
><?php
echo out(xl('Type')); ?
></u
></span
>
59 <span
class="end_col colhead"><u
><?php
echo out(xl('Detail')); ?
></u
></span
>
62 <?php
foreach ($intervals->getTypes() as $type) {?
>
64 <span
class="left_col"><?php
echo out(xl($type->lbl
)); ?
></span
>
65 <span
class="end_col">
66 <?php
echo out($intervals->displayDetails($type)); ?
>
72 <p
><?php
echo out(xl('None defined')); ?
></p
>
78 <!-- rule filter criteria
-->
80 <?php
$filters = $rule->filters
; if ($filters) { ?
>
81 <div
class="section text">
82 <p
class="header"><?php
echo out(xl('Demographics filter criteria')); ?
> <a href
="index.php?action=edit!add_criteria&id=<?php echo out($rule->id); ?>&criteriaType=filter" class="action_link" onclick
="top.restoreSession()">(<?php
echo out(xl('add')); ?
>)</a
></p
>
84 <?php
if ($filters->criteria
) { ?
>
87 <span
class="left_col"> 
;</span
>
88 <span
class="mid_col"><u
><?php
echo out(xl('Criteria')); ?
></u
></span
>
89 <span
class="mid_col"><u
><?php
echo out(xl('Characteristics')); ?
></u
></span
>
90 <span
class="end_col"><u
><?php
echo out(xl('Requirements')); ?
></u
></span
>
93 <?php
foreach ($filters->criteria
as $criteria) { ?
>
95 <span
class="left_col">
96 <a href
="index.php?action=edit!filter&id=<?php echo out($rule->id); ?>&guid=<?php echo out($criteria->guid); ?>"
97 class="action_link" onclick
="top.restoreSession()">
98 (<?php
echo out(xl('edit')); ?
>)
100 <a href
="index.php?action=edit!delete_filter&id=<?php echo out($rule->id); ?>&guid=<?php echo out($criteria->guid); ?>"
101 class="action_link" onclick
="top.restoreSession()">
102 (<?php
echo out(xl('delete')); ?
>)
105 <span
class="mid_col"><?php
echo( out($criteria->getTitle()) ); ?
></span
>
106 <span
class="mid_col"><?php
echo( out($criteria->getCharacteristics()) ); ?
></span
>
107 <span
class="end_col"><?php
echo( out($criteria->getRequirements()) ); ?
></span
>
111 <p
><?php
echo out(xl('None defined')); ?
></p
>
122 <div
class="section text">
123 <p
class="header"><?php
echo out(xl('Target/Action Groups')); ?
></p
>
125 foreach ($rule->groups
as $group) {
126 $groupId = $group->groupId
; ?
>
129 <!-- rule target criteria
-->
132 <?php
$targets = $group->ruleTargets
; if ($targets) { ?
>
133 <div
class="section text">
134 <p
class="header"><?php
echo out(xl('Clinical targets')); ?
>
135 <a href
="index.php?action=edit!add_criteria&id=<?php echo out($rule->id); ?>&group_id=<?php echo out($group->groupId); ?>&criteriaType=target" class="action_link" onclick
="top.restoreSession()">
136 (<?php
echo out(xl('add')); ?
>)
140 <?php
if ($targets->criteria
) { ?
>
143 <span
class="left_col"> 
;</span
>
144 <span
class="mid_col"><u
><?php
echo out(xl('Criteria')); ?
></u
></span
>
145 <span
class="mid_col"><u
><?php
echo out(xl('Characteristics')); ?
></u
></span
>
146 <span
class="end_col"><u
><?php
echo out(xl('Requirements')); ?
></u
></span
>
149 <?php
foreach ($targets->criteria
as $criteria) { ?
>
151 <span
class="left_col">
152 <a href
="index.php?action=edit!target&id=<?php echo out($rule->id); ?>&guid=<?php echo out($criteria->guid); ?>"
153 class="action_link" onclick
="top.restoreSession()">
154 (<?php
echo out(xl('edit')); ?
>)
156 <a href
="index.php?action=edit!delete_target&id=<?php echo out($rule->id); ?>&guid=<?php echo out($criteria->guid); ?>"
157 class="action_link" onclick
="top.restoreSession()">
158 (<?php
echo out(xl('delete')); ?
>)
161 <span
class="mid_col"><?php
echo( out($criteria->getTitle()) ); ?
></span
>
162 <span
class="mid_col"><?php
echo( out($criteria->getCharacteristics()) ); ?
></span
>
163 <span
class="end_col">
164 <?php
echo( $criteria->getRequirements() ) ?
>
165 <?php
echo is_null($criteria->getInterval()) ?
"" :
166 " | " . out(xl('Interval')) . ": " . out($criteria->getInterval()); ?
>
171 <p
><?php
echo out(xl('None defined')); ?
></p
>
179 <!-- rule actions
-->
181 <?php
$actions = $group->ruleActions
; if ($actions) { ?
>
182 <div
class="section text">
183 <p
class="header"><?php
echo out(xl('Actions')); ?
>
184 <a href
="index.php?action=edit!add_action&id=<?php echo out($rule->id); ?>&group_id=<?php echo out($group->groupId);?>" class="action_link" onclick
="top.restoreSession()">
185 (<?php
echo out(xl('add')); ?
>)
189 <?php
if ($actions->actions
) { ?
>
191 <span
class="left_col"> 
;</span
>
192 <span
class="end_col"><u
><?php
echo out(xl('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 out($rule->id); ?>&guid=<?php echo out($action->guid); ?>"
199 class="action_link" onclick
="top.restoreSession()">
200 (<?php
echo out(xl('edit')); ?
>)</a
>
201 <a href
="index.php?action=edit!delete_action&id=<?php echo out($rule->id); ?>&guid=<?php echo out($action->guid); ?>"
202 class="action_link" onclick
="top.restoreSession()">
203 (<?php
echo out(xl('delete')); ?
>)</a
>
205 <span
class="end_col"><?php
echo out($action->getTitle()); ?
></span
>
209 <p
><?php
echo out(xl('None defined')); ?
></p
>
216 } // iteration over groups ?>
218 <?php
$nextGroupId = $groupId +
1; ?
>
219 <div
class="section text">
220 <p
class="header"><?php
echo out(xl('Clinical targets')); ?
>
221 <a href
="index.php?action=edit!add_criteria&id=<?php echo out($rule->id); ?>&group_id=<?php echo $nextGroupId; ?>&criteriaType=target" class="action_link" onclick
="top.restoreSession()">
222 (<?php
echo out(xl('add')); ?
>)
226 <div
class="section text">
227 <p
class="header"><?php
echo out(xl('Actions')); ?
>
228 <a href
="index.php?action=edit!add_action&id=<?php echo out($rule->id); ?>&group_id=<?php echo $nextGroupId; ?>" class="action_link" onclick
="top.restoreSession()">
229 (<?php
echo out(xl('add')); ?
>)