query('SELECT * from m_form_lab where unit_form= \''.$kd_pa.'\' and aktif=1 order by form_id'); $arr_form = array(); if($sql->numRows() > 0) { foreach($sql->fetchAll() as $data_form) { $arr_form[$data_form['group_form']][$data_form['jenis_kelompok']][$data_form['form_id']] = $data_form['nama_field']; } } $query_hist = "SELECT lpa.noreglab as no_lab_pa, lpa.tglorder AS tgl_order_pa FROM t_admission a JOIN m_pasien b on b.nomr = a.nomr JOIN m_carabayar c on c.KODE = a.statusbayar JOIN m_ruang d on d.no = a.noruang JOIN m_dokter e on e.KDDOKTER = a.dokterpengirim JOIN (select distinct pk_m.NOREGLAB,TGLORDER,pk_m.IDXDAFTAR,pk_m.NOMR,pk_m.st_periksa FROM t_orderlabpa_main pk_m LEFT JOIN t_orderlabpa pk_d on pk_m.NOREGLAB = pk_d.NOLAB WHERE RAJAL = 0 AND pk_m.IDXDAFTAR = '{$_REQUEST['id_admission']}' AND pk_m.st_aktif = 1) lpa ON lpa.IDXDAFTAR = a.id_admission WHERE a.id_admission = '{$_REQUEST['id_admission']}' and a.noruang != 0 and a.keluarrs is null ORDER BY lpa.TGLORDER DESC"; $tmp_hist = $db->query($query_hist); $jml_hist = $tmp_hist->numRows(); echo $datetimepicker_css; echo $datetimepicker_js; ?> '; $script_disable_form .= '$(function() { $.each($("#order_lab_pa input, #order_lab_pa select, #pencarian input, #pencarian select"),function(elm){ $(this).prop("disabled",true); }); });'; $script_disable_form .= ''; echo $script_disable_form; } ?>
S I M P A N Anda tidak memiliki akses order lab'; } ?>

Bahan :

',print_r($arr_form['F1']),''; echo ''; $ia = 1; $jml = count($arr_form['F1']['Bahan']); foreach($arr_form['F1']['Bahan'] as $id => $nama_field) { if($ia == 1) { echo ''; } preg_match_all("/\((.*?)\)/", $nama_field, $match_choice); // if(is_array($match_choice)) { echo '
',print_r($match_choice),'
'; } if(array_key_exists(0, $match_choice[1])){ $arr_choice = explode("/",$match_choice[1][0]); $template = ''; } elseif(preg_match("/\.\.\./", $nama_field)) { $template = ''; } else { $template = ''; } $input_ket = (preg_match("/\.\.\./", $nama_field)) ? '' : ''; echo ''; if($ia==$jml || $ia%6==0) { if($ia%6==0){ echo ''.PHP_EOL; } elseif ($ia == $jml) { echo ''.PHP_EOL; } } $ia++; } echo '
'.$template.'
'; ?>

Fiksasi :

'; $ib = 1; $jml = count($arr_form['F1']['Fiksasi']); foreach($arr_form['F1']['Fiksasi'] as $id => $nama_field) { if($ib == 1) { echo ''; } $input_ket = (preg_match("/\.\.\./", $nama_field)) ? '' : ''; echo '
'.$input_ket.''; if($ib==$jml || $ib%6==0) { if($ib%6==0){ echo ''.PHP_EOL; } elseif ($ib == $jml) { echo ''.PHP_EOL; } } $ib++; } echo ''; ?>

'; $i = 1; $jml = count($arr_form['F2']); foreach($arr_form['F2'] as $jenis => $arr_item) { // if($i == 1) { echo ''; } // echo '
'.$jenis.'
'; // asort($arr_item); $j=0; foreach($arr_item as $id => $nama_field){ // $nama = substr($nama_field, 4, strlen($nama_field)); $nama = $nama_field; preg_match_all("/\((.*?)\)/", $nama, $match_choice); // if(is_array($match_choice)) { echo '
',print_r($match_choice),'
'; } if(array_key_exists(0, $match_choice[1])){ $arr_choice = explode("/",$match_choice[1][0]); $template = ''; } elseif(preg_match("/\.\.\./", $nama)) { $template = ''; } else { $template = ''; } if(preg_match("/\{textarea\}/",$nama)) { $nama_input = preg_replace("/\{textarea\}/",'',$nama); echo '
'.PHP_EOL; } elseif(preg_match("/\{text\}/",$nama)) { $nama_input = preg_replace("/\{text\}/",'',$nama); echo '
'.PHP_EOL; } else { echo '
'.$template.PHP_EOL; } $j++; } // echo '
'; // echo ''; if($i==$jml || $i%4==0) { // if($i%4==0){ // echo ''.PHP_EOL; // } // elseif ($i == $jml) { // echo ''.PHP_EOL; // } } $i++; } // echo ''; ?>

'; $i3 = 1; $jml = count($arr_form['F3']); foreach($arr_form['F3'] as $jenis => $arr_item) { // if($i3 == 1) { echo ''; } // echo '
'.$jenis.'
'; // asort($arr_item); $j=0; foreach($arr_item as $id => $nama_field){ // $nama = substr($nama_field, 4, strlen($nama_field)); $nama = $nama_field; preg_match_all("/\((.*?)\)/", $nama, $match_choice); // if(is_array($match_choice)) { echo '
',print_r($match_choice),'
'; } if(array_key_exists(0, $match_choice[1])){ $arr_choice = explode("/",$match_choice[1][0]); $template = '
'; foreach($arr_choice as $choice){ $template .= '
'; } $template .= '
'; } elseif(preg_match("/\.\.\./", $nama)) { $template = ''; } else { $template = ''; } if(preg_match("/\{textarea\}/",$nama)) { $nama_input = preg_replace("/\{textarea\}/",'',$nama); echo '
'.PHP_EOL; } elseif(preg_match("/\{text\}/",$nama)) { $nama_input = preg_replace("/\{text\}/",'',$nama); echo '
'.PHP_EOL; } else { echo '
'.$template.PHP_EOL; } $j++; } // echo '
'; // echo ''; if($i3==$jml || $i3%4==0) { // if($i3%4==0){ // echo ''.PHP_EOL; // } // elseif ($i3 == $jml) { // echo ''.PHP_EOL; // } } $i3++; } // echo ''; ?>