- modules/fotolab updated imagej to current version & some cod fixes to make it work
[care2x.git] / Care2007 / modules / registration_admission / gui_bridge / default / gui_show_pregnancy.php
bloba5f5017418d8a5b34498d65e07a661d72463d554
1 <?php
2 if($rows){
3 # Transfer data into array
4 while($row=$pregs->FetchRow()){
5 $pregbuf[$row['encounter_nr']]=$row;
6 $buffer=$row['encounter_nr'];
8 $this_enc_preg=false;
9 if(!isset($show_preg_enc)||!$show_preg_enc){
10 if($parent_admit) {
11 $show_preg_enc=$HTTP_SESSION_VARS['sess_en'];
12 $this_enc_preg=true;
13 }elseif($rows==1){
14 $show_preg_enc=$buffer;
19 <table border=0 cellpadding=0 cellspacing=0 width=100%>
20 <?php
21 $show_details=false;
22 if($show_preg_enc&&isset($pregbuf[$show_preg_enc])){
23 $show_details=true;
24 # Get the field names
25 $fields=&$obj->coreFieldNames();
26 # If not this encounterĀ“s pregnancy, show warn notice
30 <tr>
31 <td colspan=6>
32 <table border=0 cellpadding=1 cellspacing=1 width=100% class="frame">
33 <?php
34 if(!$parent_admit){
37 <tr bgcolor="#fefefe">
38 <td <?php echo $tbg; ?>><FONT color="#ff0000"><b><?php echo $LDEncounterNr; ?></b></font></td>
39 <td <?php echo $tbg; ?>><FONT color="#ff0000"><?php echo $pregbuf[$show_preg_enc]['encounter_nr'] ?></font></td>
40 </tr>
42 <?php
45 while(list($z,$x)=each($fields)){
46 if($x=='status') break;
47 if($x=='nr'||$x=='encounter_nr'||empty($pregbuf[$show_preg_enc][$x])) continue;
51 <tr bgcolor="#fefefe">
52 <td><FONT color="#006600"><b><?php echo $LD[$x]; ?></b></font></td>
53 <td>
54 <?php
55 switch($x){
56 case 'delivery_date': echo formatDate2Local($pregbuf[$show_preg_enc][$x],$date_format); break;
57 case 'delivery_time': echo convertTimeToLocal($pregbuf[$show_preg_enc][$x]); break;
58 case 'delivery_mode':
59 $buf=&$obj->getDeliveryMode($pregbuf[$show_preg_enc]['delivery_mode']);
60 if(isset($$buf['LD_var'])&&$$buf['LD_var']) echo $$buf['LD_var'];
61 else echo $buf['name'];
62 break;
63 case 'outcome':
64 $buf=&$obj->getOutcome($pregbuf[$show_preg_enc]['outcome']);
65 if(isset($$buf['LD_var'])&&$$buf['LD_var']) echo $$buf['LD_var'];
66 else echo $buf['name'];
67 break;
68 case 'induction_method':
69 $buf=&$obj->getInductionMethod($pregbuf[$show_preg_enc][$x]);
70 if(isset($$buf['LD_var'])&&$$buf['LD_var']) echo $$buf['LD_var'];
71 else echo $buf['name'];
72 break;
73 case 'perineum':
74 $buf=&$obj->getPerineum($pregbuf[$show_preg_enc][$x]);
75 if(isset($$buf['LD_var'])&&$$buf['LD_var']) echo $$buf['LD_var'];
76 else echo $buf['name'];
77 break;
78 case 'anaesth_type_nr':
79 $buf=&$obj->getAnaesthesia($pregbuf[$show_preg_enc][$x]);
80 if(isset($$buf['LD_var'])&&$$buf['LD_var']) echo $$buf['LD_var'];
81 else echo $buf['name'];
82 break;
83 case 'child_encounter_nr':
84 if($pregbuf[$show_preg_enc][$x]){
85 $buf=explode(' ',$pregbuf[$show_preg_enc][$x]);
86 while(list($q,$r)=each($buf)){
87 echo'<a href="aufnahme_daten_zeigen.php'.URL_APPEND.'&encounter_nr='.$r.'&origin=admit&target='.$target.'">'.$r.'</a> ';
90 break;
91 case 'is_booked':
92 if($pregbuf[$show_preg_enc][$x]) echo $LDYes;
93 else echo $LDNo;
94 break;
95 case 'proteinuria':
96 if($pregbuf[$show_preg_enc][$x]) echo $LDYes;
97 else echo $LDNo;
98 break;
99 default: echo $pregbuf[$show_preg_enc][$x];
101 ?></td>
102 </tr>
104 <?php
108 </table>
110 </td>
111 </tr>
112 <?php
115 if($parent_admit&&$edit&&($show_preg_enc==$HTTP_SESSION_VARS['sess_en']||$no_enc_preg)){
117 <tr valign="top">
118 <td colspan=2>&nbsp;<br>
119 <img <?php echo createComIcon($root_path,'bul_arrowgrnlrg.gif','0','absmiddle'); ?>>
120 <a href="<?php
121 echo$thisfile.URL_APPEND.'&pid='.$HTTP_SESSION_VARS['sess_pid'].'&target='. strtr($target,' ','+').'&mode=new&allow_update='.$allow_update;
122 if($this_enc_preg) echo '&rec_nr='.$pregbuf[$show_preg_enc]['nr'];
123 ?>">
124 <?php
125 if($no_enc_preg) echo $LDEnterNewRecord;
126 else echo $LD['update_preg_details'];
128 </a>&nbsp;<p>
129 </td>
130 </tr>
131 <?php
133 if($show_details&&$rows>1){
135 <tr bgcolor="#f6f6f6" valign="top">
136 <td colspan=6><img <?php echo createComIcon($root_path,'dwnarrowgrnlrg.gif','absmiddle') ?>> <font size=3><?php echo $LDOtherRecords; ?></font>
137 </td>
138 </tr>
140 <?php
143 if($rows>1||($no_enc_preg)){
146 <tr bgcolor="#f6f6f6" valign="top">
147 <td <?php echo $tbg; ?>><FONT color="#000066">&nbsp;</td>
148 <td <?php echo $tbg; ?>><FONT color="#000066"><?php echo $LDEncounterNr; ?></td>
149 <td <?php echo $tbg; ?>><FONT color="#000066"><?php echo $LDDelivery.' '.$LDDate; ?></td>
150 <td <?php echo $tbg; ?>><FONT color="#000066"><?php echo $LDDelivery.' '.$LDMode; ?></td>
151 <td <?php echo $tbg; ?>><FONT color="#000066"><?php echo $LDOutcome; ?></td>
152 <td <?php echo $tbg; ?>><FONT color="#000066"><?php echo $LDNrOfFetus; ?></td>
153 </tr>
154 <?php
155 while(list($x,$v)=each($pregbuf)){
156 # Do not list this encounterĀ“s pregnancy in the admission module
157 if($x==$show_preg_enc) continue;
159 <tr bgcolor="#fefefe" valign="top">
160 <td>
161 <?php
162 if($parent_admit&&($v['encounter_nr']==$HTTP_SESSION_VARS['sess_en'])) echo '<img '.createComIcon($root_path,'info3.gif','0').'>';
163 else echo '&nbsp;';
165 </td>
166 <td><a href="<?php echo $thisfile.URL_APPEND.'&target='.$target.'&show_preg_enc='.$v['encounter_nr'] ?>"><?php echo $v['encounter_nr']; ?></a></td>
167 <td><?php echo @formatDate2Local($v['delivery_date'],$date_format); ?></td>
168 <td><?php echo $v['delivery_mode']; ?></td>
169 <td><?php echo $v['outcome']; ?></td>
170 <td><?php echo $v['nr_of_fetuses']; ?></td>
171 </tr>
173 <?php
178 </table>
179 <?php