- modules/fotolab updated imagej to current version & some cod fixes to make it work
[care2x.git] / Care2007 / modules / registration_admission / show_procedure.php
bloba00ed5ed13efedbe766ce43b58788be15089dd39
1 <?php
2 error_reporting(E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR);
3 require('./roots.php');
4 require($root_path.'include/inc_environment_global.php');
5 /**
6 * CARE2X Integrated Hospital Information System beta 2.0.1 - 2004-07-04
7 * GNU General Public License
8 * Copyright 2002,2003,2004,2005,2006 Elpidio Latorilla
9 * elpidio@care2x.org,
11 * See the file "copy_notice.txt" for the licence notice
13 $thisfile=basename(__FILE__);
14 if(!isset($mode)){
15 $mode='show';
18 $lang_tables=array('drg.php');
19 require('./include/init_show.php');
21 $m_sql="SELECT d.*, c.description, pr.description AS parent_desc,
22 cat.LD_var AS cat_LD_var,
23 cat.name AS cat_name,
24 loc.LD_var AS loc_LD_var,
25 loc.name AS loc_name";
28 if($parent_admit){
29 $sql=$m_sql." FROM care_encounter_procedure AS d, care_ops301_de AS c
30 LEFT JOIN care_ops301_de AS pr ON d.code_parent=pr.code
31 LEFT JOIN care_category_procedure AS cat ON d.category_nr=cat.nr
32 LEFT JOIN care_type_localization AS loc ON d.localization=loc.nr
33 WHERE d.encounter_nr=".$HTTP_SESSION_VARS['sess_en']." AND d.code=c.code";
34 }else{
35 /*$sql="SELECT d.*, c.description FROM care_person AS p ,care_encounter AS e, care_encounter_procedure AS d, care_ops301_de AS c
36 WHERE p.pid='".$HTTP_SESSION_VARS['sess_pid']."' AND p.pid=e.pid AND e.encounter_nr=d.encounter_nr AND d.code=c.code";
38 $sql=$m_sql." FROM ( care_person AS p , care_encounter AS e, care_encounter_procedure AS d, care_ops301_de AS c )
39 LEFT JOIN care_ops301_de AS pr ON d.code_parent=pr.code
40 LEFT JOIN care_category_procedure AS cat ON d.category_nr=cat.nr
41 LEFT JOIN care_type_localization AS loc ON d.localization=loc.nr
42 WHERE p.pid='".$HTTP_SESSION_VARS['sess_pid']."' AND p.pid=e.pid AND e.encounter_nr=d.encounter_nr AND d.code=c.code";
44 if($result=$db->Execute($sql)){
45 $rows=$result->RecordCount();
46 }else{
47 echo $sql;
50 $subtitle=$LDProcedures;
51 $HTTP_SESSION_VARS['sess_file_return']=$thisfile;
53 $buffer=str_replace('~tag~',$title.' '.$name_last,$LDNoRecordFor);
54 $norecordyet=str_replace('~obj~',strtolower($subtitle),$buffer);
56 /* Load GUI page */
57 require('./gui_bridge/default/gui_show.php');