3 define('ROW_MAX',15); # define here the maximum number of rows for displaying the parameters
5 error_reporting(E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
);
6 require('./roots.php');
7 require($root_path.'include/inc_environment_global.php');
9 * CARE2X Integrated Hospital Information System Deployment 2.2 - 2006-07-10
10 * GNU General Public License
11 * Copyright 2002,2003,2004,2005,2006 Elpidio Latorilla
14 * See the file "copy_notice.txt" for the licence notice
16 //$lang_tables=array('chemlab_groups.php','chemlab_params.php');
17 define('LANG_FILE','lab.php');
18 $local_user='ck_lab_user';
19 require_once($root_path.'include/inc_front_chain_lang.php');
21 $thisfile=basename(__FILE__
);
26 require_once($root_path.'include/care_api_classes/class_lab.php');
29 if(!isset($parameterselect)||
$parameterselect=='') $parameterselect='priority';
31 $pitems=array('msr_unit','median','lo_bound','hi_bound','lo_critical','hi_critical','lo_toxic','hi_toxic');
33 # Load the date formatter */
34 include_once($root_path.'include/inc_date_format_functions.php');
36 # Get the test test groups
37 $tgroups=&$lab_obj->TestActiveGroups();
39 # Get the test parameter values
40 $tparams=&$lab_obj->TestParamsAdmin($parameterselect);
41 $breakfile="labor.php".URL_APPEND
;
43 # Start Smarty templating here
48 # Note: it is advisable to load this after the inc_front_chain_lang.php so
49 # that the smarty script can use the user configured template theme
51 require_once($root_path.'gui/smarty_template/smarty_care.class.php');
52 $smarty = new smarty_care('common');
55 $smarty->assign('sToolbarTitle',$LDTestParameters);
57 # href for help button
58 $smarty->assign('pbHelp',"javascript:gethelp('lab_param_config.php')");
61 $smarty->assign('pbBack',FALSE);
63 # href for close button
64 $smarty->assign('breakfile',$breakfile);
67 $smarty->assign('sWindowTitle',$LDTestParameters);
69 # collect extra javascript code
73 <script language
="javascript" name
="j1">
77 if(d
.parameterselect
.value
=="<?php echo $parameterselect ?>"){
82 function editParam(nr
)
84 urlholder
="<?php echo $root_path ?>modules/laboratory/labor_test_param_edit.php?sid=<?php echo "$sid&lang
=$lang" ?>&nr="+nr
;
85 editparam_
<?php
echo $sid ?
>=window
.open(urlholder
,"editparam_<?php echo $sid ?>","width=510,height=390,menubar=no,resizable=yes,scrollbars=yes");
90 urlholder
="<?php echo $root_path ?>modules/laboratory/labor_test_param_edit.php?sid=<?php echo "$sid&lang
=$lang" ?>&mode=new";
91 editparam_
<?php
echo $sid ?
>=window
.open(urlholder
,"editparam_<?php echo $sid ?>","width=510,height=390,menubar=no,resizable=yes,scrollbars=yes");
98 $sTemp = ob_get_contents();
101 $smarty->append('JavaScript',$sTemp);
103 $sTempNew = '<a href="javascript:newParam()"><img '.createLDImgSrc($root_path,'newplan.gif','0').'></a>';
104 $paramName = &$lab_obj->getGroupName($parameterselect);
105 if(isset($paramName) && !empty($paramName)) {
106 $paramName = $paramName->fetchRow();
109 $smarty->assign('sParamNew',$sTempNew);
110 $smarty->assign('sParamGroup',$sTemp. $paramName['name'] );
111 $smarty->assign('LDParameter',$LDParameter);
112 $smarty->assign('LDMsrUnit',$LDMsrUnit);
113 $smarty->assign('LDMedian',$LDMedian);
114 $smarty->assign('LDLowerBound',$LDLowerBound);
115 $smarty->assign('LDUpperBound',$LDUpperBound);
116 $smarty->assign('LDLowerCritical',$LDLowerCritical);
117 $smarty->assign('LDUpperCritical',$LDUpperCritical);
118 $smarty->assign('LDLowerToxic',$LDLowerToxic);
119 $smarty->assign('LDUpperToxic',$LDUpperToxic);
121 $smarty->assign('sFormAction',$thisfile);
122 $smarty->assign('LDSelectParamGroup',$LDSelectParamGroup);
123 $smarty->assign('LDParamGroup',$LDParamGroup);
125 # Generate and buffer parameter rows
131 if(is_object($tparams)){
132 while($tp=$tparams->FetchRow()){
134 //if($toggle) $bgc='#ffffee'; else $bgc='#efefef';
135 if($toggle) $bgc='wardlistrow1'; else $bgc='wardlistrow2';
137 if($tp['status']=='hidden') {
141 } elseif($tp['status']=='deleted') {
147 <tr class="'.$bgc.'">
152 if(isset($parameters[$tp['id']])&&!empty($parameters[$tp['id']])) echo $parameters[$tp['id']];
153 else echo $tp['name'];
155 echo ' </nobr></td>';
157 while(list($x,$v)=each($pitems)){
161 if($tp[$v]>0) echo $tp[$v];
172 <a href="javascript:editParam('.$tp['nr'].')"><img '.createLDImgSrc($root_path,'edit_sm.gif','0').'></a>
179 $sTemp = ob_get_contents();
182 $sShortHelp = $sShortHelp. "<font color=\"green\">$LDHiddenParams</font><br>";
183 $sShortHelp = $sShortHelp. "<font color=\"red\">$LDDeletedParams</font><br>";
184 $smarty->assign('sTestParamsRows',$sTemp);
185 $smarty->assign('sShortHelp',$sShortHelp);
186 # Create the parameter group select
188 $sTemp = '<select name="parameterselect" size=1>';
190 while($tg=$tgroups->FetchRow()){
191 $sTemp = $sTemp.'<option value="'.$tg['id'].'"';
192 if($parameterselect==$tg['id']) $sTemp = $sTemp.' selected';
194 if(isset($parametergruppe[$tg['id']])&&!empty($parametergruppe[$tg['group_id']])) $sTemp = $sTemp.$parametergruppe[$tg['id']];
195 else $sTemp = $sTemp.$tg['name'];
196 $sTemp = $sTemp.'</option>';
197 $sTemp = $sTemp."\n";
199 $sTemp = $sTemp.'</select>';
201 $smarty->assign('sParamGroupSelect',$sTemp);
203 # Assign the parameter group hidden and submit inputs
206 $smarty->assign('sSubmitSelect','<input type=hidden name="sid" value="'.$sid.'">
207 <input type=hidden name="lang" value="'.$lang.'">
208 <input type="image" '.createLDImgSrc($root_path,'auswahl2.gif','0').'>');
210 $smarty->assign('sMainBlockIncludeFile','laboratory/test_params.tpl');
215 $smarty->display('common/mainframe.tpl');