Esempio n. 1
0
CONCAT((SUBSTRING(`nonconf_date`, 1, 4) - 543), '-', DATE_FORMAT( `nonconf_date`, '%m' )) AS `ad_date`, 
COUNT(`nonconf_id`) AS `rows`, 
`come_from_id` 
			FROM `ncr2556` 
			WHERE `nonconf_date` LIKE :date_select 
            AND `come_from_id` != ''
            GROUP BY `ad_date`, `come_from_id`";

			$data = array(
				':date_select' => "$date%"
			);
			$db->select($sql, $data);
			$items = $db->get_items();

			
			$ykey = bc_to_ad($date);
			$new_item = array();
			foreach ($items as $key => $item) {
				$set_key = $item['year'].$item['month'].$item['come_from_id'];
				$new_item[$set_key] = $item;
			}
			?>
			<style type="text/css">
			#report{
				font-size: 22px;
			}
			td, th{
				padding: 2px;
			}
			h3{
				font-family: 'TH SarabunPSK';
Esempio n. 2
0
        <th>�ѹ�͹</th>
        <th>�ѹ��˹���</th>
        <th>�ä</th>
        <th>ᾷ��</th>
    </tr>
    <?php 
$detail = "�����";
include "connect.inc";
$query = "SELECT date_format(date,'%d/ %m/ %Y %H:%i'),date_format(date,'%H:%i'),an,hn,ptname,age,ptright,bedcode,date_format(dcdate,'%d/ %m/ %Y %H:%i'),diag,doctor,dcdate FROM ipcard WHERE date LIKE '{$appd1}%' ";
$result = mysql_query($query) or die("Query failed");
$n = 0;
$notdc_count = 0;
$ndc_lists = array();
while (list($datea, $timea, $an, $hn, $ptname, $age, $ptright, $bedcode, $dcdate, $diag, $doctor, $pdcdate) = mysql_fetch_row($result)) {
    // $time = substr($thidate,11);
    $date = bc_to_ad($pdcdate);
    // var_dump(strtotime($date));
    if (preg_match('/(0000\\-00\\-00)/', $date) > 0) {
        $notdc_count++;
        $ndc_lists[] = array($an, $hn, $ptname, $age, $ptright, $bedcode, $datea, $dcdate, $diag, $doctor);
    }
    $n++;
    ?>
        <tr bgcolor="66CDAA">
            <td><?php 
    echo $n;
    ?>
</td>
            <td><?php 
    echo $an;
    ?>
Esempio n. 3
0
					$time_8min = strtotime(bc_to_ad($test_date['0']).' '.$time_8start);
					$time_8max = strtotime(bc_to_ad($test_date['0']).' '.$time_8end);
					
					if( $item_date > $time_8min && $item_date < $time_8max ){
						if( $user_mx === 'mx00' ){
							$mx00_rows08++;
							$time_8mx00 += $stringtime3;
						}else{
							$mx01_rows08++;
							$time_8mx01 += $stringtime3;
						}
					}
					
					// А╨Х╖╣ра╙Хг╖Югер 11.00 - 13.00
					$time_11min = strtotime(bc_to_ad($test_date['0']).' '.$time_11start);
					$time_11max = strtotime(bc_to_ad($test_date['0']).' '.$time_11end);
					if( $item_date > $time_11min && $item_date < $time_11max ){
						if( $user_mx === 'mx00' ){
							$mx00_rows11++;
							$time_11mx00 += $stringtime3;
						}else{
							$mx01_rows11++;
							$time_11mx01 += $stringtime3;
						}
					}
					
					$count1++; //Ц╨йяХ╖брЮцуб║ця╨╥яИ╖ка╢
					
					// ЮгерЮ╘еуХбцга╣Хм╓╧
					$sum_total += $stringtime3;
					
Esempio n. 4
0
		</div>
	</div>
</form>

<?php
$eye_lists = array(
	'No DR' => 'NoDR',
	'Mild NPDR ' => 'Mild',
	'Moderate NPDR' => 'Moderate',
	'Severe NPDR' => 'Severe',
	'PDR' => 'PDR'
);

if( $show === 'inyear' ){
	
	$en_year = bc_to_ad($year);
	$sql = "SELECT `date_eye`,DATE_FORMAT( `date_eye`, '%Y-%m' ) AS `new_date`,`dr`,COUNT(`hn`) AS `rows` FROM `opd_eye` 
WHERE `dr` != '' 
AND `date_eye` LIKE '$en_year%' 
GROUP BY MONTH(`date_eye`), `dr`
ORDER BY `date_eye`";
	$items = DB::select($sql);
	
	$new_items = array();
	foreach( $items as $key => $item ){
		$key = $item['new_date'].'-'.$item['dr'];
		$new_items[$key] = $item;
	}
	
	?>
	<table>
Esempio n. 5
0
	</div>
	<div>
		гя╧йтИ╧йь╢ <input type="text" name="date_end" value="<?php 
echo $default_end;
?>
">
	</div>
	<div>
		<button type"submit">Ай╢╖╪е</button>
		<input type="hidden" name="action" value="">
	</div>
</form>
<?php 
$start = bc_to_ad(input('date_start', $default_start));
$end = bc_to_ad(input('date_end', $default_end));
$yAd = bc_to_ad($y);
$sql = "CREATE TEMPORARY TABLE `hypertension_history_temp` \nSELECT `thidate`, `hn`, `bp1`, `bp2`, `organ`\nFROM `hypertension_history` \nWHERE `thidate` LIKE '{$yAd}%'\nAND (`bp1` !='' OR `bp2` !='')";
mysql_query($sql);
$sql = "CREATE TEMPORARY TABLE `opd_temp` \nSELECT `thidate`, `hn`, `bp1`, `bp2`, `organ`\nFROM `opd` \nWHERE `thidate` LIKE '{$y}%'\nAND (`bp1` !='' OR `bp2` !='')";
mysql_query($sql);
$tbsql = "SELECT * FROM `hypertension_clinic` \nWHERE `thidate` BETWEEN '{$start}' AND '{$end}'\nORDER BY `joint_disease` DESC, `thidate` ASC";
$tbquery = mysql_query($tbsql);
$tbnum = mysql_num_rows($tbquery);
?>
<p align="center"><strong>црб╖р╧╪ыИ╩Хгб HT ╩цп╗с╩у╖╨╩цпарЁ <?php 
echo $y;
?>
</strong></p>
<table width="100%" border="1" cellpadding="3" cellspacing="0" bordercolor="#000000" style="border-collapse:collapse;">
	<tr>
		<td width="3%" align="center" bgcolor="#66CC99"><strong>ес╢я╨</strong></td>