3 error_reporting(E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
);
4 require('./roots.php');
5 require($root_path.'include/inc_environment_global.php');
7 * CARE2X Integrated Hospital Information System Deployment 2.2 - 2006-07-10
8 * GNU General Public License
9 * Copyright 2002,2003,2004,2005,2006 Elpidio Latorilla
12 * See the file "copy_notice.txt" for the licence notice
14 define('LANG_FILE','lab.php');
15 $local_user='ck_lab_user';
16 require_once($root_path.'include/inc_front_chain_lang.php');
18 $thisfile=basename(__FILE__
);
23 require_once($root_path.'include/care_api_classes/class_lab.php');
26 # Load the date formatter */
27 include_once($root_path.'include/inc_date_format_functions.php');
29 if(isset($mode) && !empty($mode)) {
32 if(empty($HTTP_POST_VARS['status'])) $HTTP_POST_VARS['status']=' ';
33 $HTTP_POST_VARS['modify_id']=$HTTP_SESSION_VARS['sess_user_name'];
34 $HTTP_POST_VARS['id'] = "_" . str_replace(" ","_",strtolower($HTTP_POST_VARS['name'])) . '__' . strtolower($HTTP_POST_VARS['group_id']);
35 $HTTP_POST_VARS['id'] = strtolower($HTTP_POST_VARS['id']);
36 $HTTP_POST_VARS['history']=$lab_obj->ConcatHistory("Update ".date('Y-m-d H:i:s')." ".$HTTP_SESSION_VARS['sess_user_name']."\n");
37 # Set to use the test params
38 $lab_obj->useTestParams();
39 # Point to the data array
40 $lab_obj->setDataArray($HTTP_POST_VARS);
42 if($lab_obj->updateDataFromInternalArray($HTTP_POST_VARS['nr'])){
45 <script language
="JavaScript">
47 window
.opener
.location
.reload();
55 else echo $lab_obj->getLastQuery();
56 # end of if(mode==save)
59 if($mode == 'savenew') {
62 if(empty($HTTP_POST_VARS['status'])) $HTTP_POST_VARS['status']=' ';
63 //gjergji : used to generate user proof param id's :)
64 $HTTP_POST_VARS['id'] = "_" . str_replace(" ","_",strtolower($HTTP_POST_VARS['name'])) . "__" . strtolower($HTTP_POST_VARS['group_id']);
65 $HTTP_POST_VARS['modify_id']=$HTTP_SESSION_VARS['sess_user_name'];
66 $HTTP_POST_VARS['history']=$lab_obj->ConcatHistory("Created ".date('Y-m-d H:i:s')." ".$HTTP_SESSION_VARS['sess_user_name']."\n");
67 # Set to use the test params
68 $lab_obj->useTestParams();
69 # Point to the data array
70 //print_r($HTTP_POST_VARS);
71 $lab_obj->setDataArray($HTTP_POST_VARS);
72 if($lab_obj->insertDataFromInternalArray()){
76 <script language
="JavaScript">
78 window
.opener
.location
.reload();
86 else echo $lab_obj->getLastQuery();
87 # end of if(mode==new)
90 //$pnames=array($LDParameter,$LDMsrUnit,$LDMedian,$LDUpperBound,$LDLowerBound,$LDUpperCritical,$LDLowerCritical,$LDUpperToxic,$LDLowerToxic,$LDID,$LDShow);
91 //$pitems=array('name','msr_unit','median','hi_bound','lo_bound','hi_critical','lo_critical','hi_toxic','lo_toxic','id','status');
93 # Get the test parameter values
94 if($tparam=&$lab_obj->getTestParam($nr)){
95 $tp=$tparam->FetchRow();
96 $parameters=$paralistarray[$tp['group_id']];
101 //gjergji : i get the groups here...
102 $tgroups=&$lab_obj->TestActiveGroups();
104 <!DOCTYPE HTML
PUBLIC "-//IETF//DTD HTML 3.0//EN" "html.dtd">
105 <?php
html_rtl($lang); ?
>
107 <?php
echo setCharSet(); ?
>
108 <TITLE
>Konfigurimi i Parametrave
</TITLE
>
110 <script language
="javascript" name
="j1">
112 function editParam(nr
)
114 urlholder
="labor_test_param_edit?sid=<?php echo "$sid&lang
=$lang" ?>&nr="+nr
;
115 editparam_
<?php
echo $sid ?
>=window
.open(urlholder
,"editparam_<?php echo $sid ?>","width=500,height=600,menubar=no,resizable=yes,scrollbars=yes");
121 require($root_path.'include/inc_js_gethelp.php');
122 require($root_path.'include/inc_css_a_hilitebu.php');
124 <style type
="text/css" name
="1">
125 .va12_n
{font
-family
:verdana
,arial
; font
-size
:12; color
:#000099}
126 .a10_b
{font
-family
:arial
; font
-size
:10; color
:#000000}
127 .a12_b
{font
-family
:arial
; font
-size
:12; color
:#000000}
128 .a10_n
{font
-family
:arial
; font
-size
:10; color
:#000099}
130 <script src
="../../js/SpryAssets/SpryTabbedPanels.js" type
="text/javascript"></script
>
131 <link href
="../../js/SpryAssets/SpryTabbedPanels.css" rel
="stylesheet" type
="text/css" />
134 <BODY topmargin
=0 leftmargin
=0 marginwidth
=0 marginheight
=0
137 /*if($newid) echo ' onLoad="document.datain.test_date.focus();" ';*/
138 if (!$cfg['dhtml']){ echo 'link='.$cfg['body_txtcolor'].' alink='.$cfg['body_alink'].' vlink='.$cfg['body_txtcolor']; }
141 <table width
=100% border
=0 cellspacing
=0 cellpadding
=0>
144 <td bgcolor
="<?php echo $cfg['top_bgcolor']; ?>" >
145 <FONT COLOR
="<?php echo $cfg['top_txtcolor']; ?>" SIZE
=+
2 FACE
="Arial"><STRONG
>  
;
147 if(isset($parameters[$tp['id']])&&!empty($parameters[$tp['id']])) echo $parameters[$tp['id']];
148 else echo $tp['name'];
152 <td bgcolor
="<?php echo $cfg['top_bgcolor']; ?>" height
="10" align
=right
><nobr
><a href
="javascript:gethelp('lab_param_edit.php')"><img
<?php
echo createLDImgSrc($root_path,'hilfe-r.gif','0') ?
> <?php
if($cfg['dhtml'])echo'style=filter:alpha(opacity=70) onMouseover=hilite(this,1) onMouseOut=hilite(this,0)>';?
></a
><a href
="javascript:window.close()" ><img
<?php
echo createLDImgSrc($root_path,'close2.gif','0') ?
> <?php
if($cfg['dhtml'])echo'style=filter:alpha(opacity=70) onMouseover=hilite(this,1) onMouseOut=hilite(this,0)>';?
></a
></nobr
></td
>
155 <td bgcolor
=#dde1ec colspan=2>
157 <FONT SIZE
=-1 FACE
="Arial">
160 <table border
=0 bgcolor
=#ffdddd cellspacing=1 cellpadding=1 width="100%">
162 <td bgcolor
=#ff0000 colspan=2><FONT SIZE=2 FACE="Verdana,Arial" color="#ffffff">
166 if(isset($tp['group_id']) && !empty($tp['group_id'])) {
167 $paramName = &$lab_obj->getGroupName( $tp['group_id']);
168 $paramName = &$paramName->FetchRow();
169 echo $paramName['name'];
178 <form action
="<?php echo $thisfile; ?>" method
="post" name
="paramedit">
180 <div id
="TabbedPanels1" class="TabbedPanels">
181 <ul
class="TabbedPanelsTabGroup">
182 <li
class="TabbedPanelsTab" tabindex
="0"><?php
echo $LDParameter ?
></li
>
183 <li
class="TabbedPanelsTab" tabindex
="0"><?php
echo $LDMale ?
></li
>
184 <li
class="TabbedPanelsTab" tabindex
="0"><?php
echo $LDFemales ?
></li
>
185 <li
class="TabbedPanelsTab" tabindex
="0"><?php
echo $LD01Moth ?
></li
>
186 <li
class="TabbedPanelsTab" tabindex
="0"><?php
echo $LD112Month ?
></li
>
187 <li
class="TabbedPanelsTab" tabindex
="0"><?php
echo $LD114Years ?
></li
>
189 <div
class="TabbedPanelsContentGroup">
192 echo '<div class="TabbedPanelsContent"><table border="0" cellpadding=2 cellspacing=1>
193 <tr><td class="a12_b" bgcolor="#fefefe"> '.$LDParameter.'</td>
194 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="name" size=15 maxlength=15 value="'.$tp['name'].'">
197 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDMsrUnit.'</td>
198 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="msr_unit" size=15 maxlength=15 value="'.$tp['msr_unit'].'">
201 /* echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDID.'</td>
202 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="id" size=15 maxlength=50 value="'.$tp['id'].'">
205 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDMethod.'</td>
206 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="method" size=15 maxlength=50 value="'.$tp['method'].'">
209 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDShowParam.'</td>
210 <td bgcolor="'.$bgc.'" class="a12_b">
211 <select name="status">
212 <option value="">'.$LDShow.'</option>
213 <option value="hidden"';
214 if ($tp['status']=='hidden') echo "selected";
215 echo '>'.$LDHide.'</option>
216 <option value="deleted"';
217 if ($tp['status']=='deleted') echo "selected";
218 echo '>'.$LDDelete.'</option>';
221 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDGroup.'</td><td>';
222 echo '<select name="group_id" size=1>';
224 while($tg=$tgroups->FetchRow()){
225 $sTemp = $sTemp.'<option value="'.$tg['id'].'"';
226 if($tp['group_id']==$tg['id']) $sTemp = $sTemp.' selected';
228 if(isset($parametergruppe[$tg['id']])&&!empty($parametergruppe[$tg['group_id']])) $sTemp = $sTemp.$parametergruppe[$tg['id']];
229 else $sTemp = $sTemp.$tg['name'];
230 $sTemp = $sTemp.'</option>';
231 $sTemp = $sTemp."\n";
233 $sTemp = $sTemp.'</select>';
235 echo '</td></tr></table></div>
238 echo '<div class="TabbedPanelsContent"><table border="0" cellpadding=2 cellspacing=1>
239 <tr><td class="a12_b" bgcolor="#fefefe"> '.$LDMedian.'</td>
240 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="median" size=15 maxlength=15 value="'.$tp['median'].'">
243 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDUpperBound.'</td>
244 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="hi_bound" size=15 maxlength=15 value="'.$tp['hi_bound'].'">
247 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDLowerBound.'</td>
248 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="lo_bound" size=15 maxlength=15 value="'.$tp['lo_bound'].'">
250 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDUpperCritical.'</td>
251 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="hi_critical" size=15 maxlength=15 value="'.$tp['hi_critical'].'">
254 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDLowerCritical.'</td>
255 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="lo_critical" size=15 maxlength=15 value="'.$tp['lo_critical'].'">
258 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDUpperToxic.'</td>
259 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="hi_toxic" size=15 maxlength=15 value="'.$tp['hi_toxic'].'">
262 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDLowerToxic.'</td>
263 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="lo_toxic" size=15 maxlength=15 value="'.$tp['lo_toxic'].'">
264 </td></tr></table></div>
267 echo '<div class="TabbedPanelsContent"><table border="0" cellpadding=2 cellspacing=1>
268 <tr><td class="a12_b" bgcolor="#fefefe"> '.$LDMedian.'</td>
269 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="median_f" size=15 maxlength=15 value="'.$tp['median_f'].'">
272 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDUpperBound.'</td>
273 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="hi_bound_f" size=15 maxlength=15 value="'.$tp['hi_bound_f'].'">
276 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDLowerBound.'</td>
277 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="lo_bound_f" size=15 maxlength=15 value="'.$tp['lo_bound_f'].'">
279 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDUpperCritical.'</td>
280 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="hi_critical_f" size=15 maxlength=15 value="'.$tp['hi_critical_f'].'">
283 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDLowerCritical.'</td>
284 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="lo_critical_f" size=15 maxlength=15 value="'.$tp['lo_critical_f'].'">
287 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDUpperToxic.'</td>
288 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="hi_toxic_f" size=15 maxlength=15 value="'.$tp['hi_toxic_f'].'">
291 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDLowerToxic.'</td>
292 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="lo_toxic_f" size=15 maxlength=15 value="'.$tp['lo_toxic_f'].'">
293 </td></tr></table></div>
296 echo '<div class="TabbedPanelsContent"><table border="0" cellpadding=2 cellspacing=1>
297 <tr><td class="a12_b" bgcolor="#fefefe"> '.$LDMedian.'</td>
298 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="median_n" size=15 maxlength=15 value="'.$tp['median_n'].'">
301 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDUpperBound.'</td>
302 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="hi_bound_n" size=15 maxlength=15 value="'.$tp['hi_bound_n'].'">
305 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDLowerBound.'</td>
306 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="lo_bound_n" size=15 maxlength=15 value="'.$tp['lo_bound_n'].'">
308 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDUpperCritical.'</td>
309 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="hi_critical_n" size=15 maxlength=15 value="'.$tp['hi_critical_n'].'">
312 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDLowerCritical.'</td>
313 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="lo_critical_n" size=15 maxlength=15 value="'.$tp['lo_critical_n'].'">
316 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDUpperToxic.'</td>
317 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="hi_toxic_n" size=15 maxlength=15 value="'.$tp['hi_toxic_n'].'">
320 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDLowerToxic.'</td>
321 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="lo_toxic_n" size=15 maxlength=15 value="'.$tp['lo_toxic_n'].'">
322 </td></tr></table></div>
325 echo '<div class="TabbedPanelsContent"><table border="0" cellpadding=2 cellspacing=1>
326 <tr><td class="a12_b" bgcolor="#fefefe"> '.$LDMedian.'</td>
327 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="median_y" size=15 maxlength=15 value="'.$tp['median_y'].'">
330 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDUpperBound.'</td>
331 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="hi_bound_y" size=15 maxlength=15 value="'.$tp['hi_bound_y'].'">
334 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDLowerBound.'</td>
335 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="lo_bound_y" size=15 maxlength=15 value="'.$tp['lo_bound_y'].'">
337 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDUpperCritical.'</td>
338 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="hi_critical_y" size=15 maxlength=15 value="'.$tp['hi_critical_y'].'">
341 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDLowerCritical.'</td>
342 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="lo_critical_y" size=15 maxlength=15 value="'.$tp['lo_critical_n'].'">
345 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDUpperToxic.'</td>
346 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="hi_toxic_y" size=15 maxlength=15 value="'.$tp['hi_toxic_y'].'">
349 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDLowerToxic.'</td>
350 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="lo_toxic_y" size=15 maxlength=15 value="'.$tp['lo_toxic_y'].'">
351 </td></tr></table></div>
354 echo '<div class="TabbedPanelsContent"><table border="0" cellpadding=2 cellspacing=1>
355 <tr><td class="a12_b" bgcolor="#fefefe"> '.$LDMedian.'</td>
356 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="median_c" size=15 maxlength=15 value="'.$tp['median_c'].'">
359 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDUpperBound.'</td>
360 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="hi_bound_c" size=15 maxlength=15 value="'.$tp['hi_bound_c'].'">
363 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDLowerBound.'</td>
364 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="lo_bound_c" size=15 maxlength=15 value="'.$tp['lo_bound_c'].'">
366 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDUpperCritical.'</td>
367 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="hi_critical_c" size=15 maxlength=15 value="'.$tp['hi_critical_c'].'">
370 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDLowerCritical.'</td>
371 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="lo_critical_c" size=15 maxlength=15 value="'.$tp['lo_critical_c'].'">
374 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDUpperToxic.'</td>
375 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="hi_toxic_c" size=15 maxlength=15 value="'.$tp['hi_toxic_c'].'">
378 echo '<tr><td class="a12_b" bgcolor="#fefefe"> '.$LDLowerToxic.'</td>
379 <td bgcolor="'.$bgc.'" class="a12_b"><input type="text" name="lo_toxic_c" size=15 maxlength=15 value="'.$tp['lo_toxic_c'].'">
380 </td></tr></table></div>
385 <script type
="text/javascript">
387 echo 'var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");'
391 <input type
=hidden name
="nr" value
="<?php echo $nr; ?>">
392 <input type
=hidden name
="sid" value
="<?php echo $sid; ?>">
393 <input type
=hidden name
="lang" value
="<?php echo $lang; ?>">
394 <?php
if($mode=='new') { ?
>
395 <input type
=hidden name
="mode" value
="savenew">
397 <input type
=hidden name
="mode" value
="save">
399 <input type
="image" <?php
echo createLDImgSrc($root_path,'savedisc.gif','0') ?
>>