コード例 #1
0
ファイル: ipbed2pdf.php プロジェクト: robocon/shs
$cbedname = input_get('cbedname');


$db = Mysql::load();
$sql = "SELECT `hn`,`an`,`ptname`,`age`,`ptright`,`bedcode`,`doctor`,`bed`,`diagnos` 
FROM `bed` 
WHERE `an` = :an ";
$data = array(
    ':an' => $an
);
$db->select($sql, $data);
$item = $db->get_item();

$pdf = new SHSPdf('L', 'mm', array(82, 35));

$pdf->SetThaiFont(); // аЂзµњЌєµм
$pdf->SetAutoPageBreak(false, 0);
$pdf->SetMargins(2, 2); // left, top, right
$pdf->AddPage();
$pdf->SetFont('THSarabun','',16); // а√’¬°г™йІ“єњЌєµмЈ’иаµ√’¬Ѕд«й

// $pdf->Rect(0, 0, 84, 37);
$pdf->Cell(0, 5, $cbedname.'  '.$item['bed'], 0, 1);
$pdf->Cell(0, 5, 'AN: '.$item['an'].' HN: '.$item['hn'], 0, 1);
$pdf->Cell(0, 5, $item['ptname'].' Ќ“¬Ў '.$item['age'], 0, 1);
$pdf->Cell(0, 5, 'в√§: '.$item['diagnos'], 0, 1);
$pdf->Cell(0, 5, ' ‘ЈЄ‘: '.$item['ptright'], 0, 1);
$pdf->Cell(0, 5, 'бЊЈ¬м: '.$item['doctor'], 0, 1);

$pdf->AutoPrint(true);
$pdf->Output();
コード例 #2
0
ファイル: stk_basic_opd.php プロジェクト: robocon/shs
	$ht = 0;
}else{
	$ht = $height/100;
}

$bmi = number_format(($weight / ( $ht * $ht)), 2);

$sql111 = "Select dbirth From opcard where hn='$hn' ";
$result111 = Mysql_Query($sql111);
list($dbirth) = Mysql_fetch_row($result111);
$cAge = calcage($dbirth);


$pdf = new SHSPdf('L', 'mm', array( 80, 50));
$pdf->SetThaiFont(); // �絿͹��
$pdf->SetFont('THSarabun','',14); // ���¡��ҹ�͹������������
$pdf->SetAutoPageBreak(true, 2);
$pdf->SetMargins(2, 2);
$pdf->AddPage();

$full_text = "HN: $hn, $thidate, $cAge\n";
$full_text .= "VN: $vn, T: $temperature C, P: $pause ����/�ҷ�, R: $rate ����/�ҷ�\n";
$full_text .= "BP: $bp1 / $bp2 mmHg, ��: $weight ��., ��: $height ��.\n";
$full_text .= "������: $cigarette, ����: $alcohol, bmi: $bmi, PS: $painscore\n";
$full_text .= "�ѡɳ�: $type, ��Թԡ: ".(substr($clinic,3))."\n";
$full_text .= "�ä��Шӵ��: ".trim($congenital_disease)."\n";
$full_text .= "�ҡ��: ".trim($organ);

$pdf->MultiCell(0, 6, $full_text);

$pdf->AutoPrint(true);
コード例 #3
0
ファイル: dcsumpdf.php プロジェクト: robocon/shs
$Chn = input_get('Chn');
$db = Mysql::load();
$sql = "SELECT a.an, a.hn, a.date, a.bedcode, b.yot, b.name, b.surname, b.idcard, b.ptright, b.dbirth, b.sex, b.address, b.tambol, b.ampur, b.changwat, b.phone, b.ptf, b.ptfadd, b.ptffone, b.camp \nFROM `ipcard` AS a\nLEFT JOIN `opcard` AS b ON a.`hn` = b.`hn` \nWHERE a.`an` = '{$Can}'";
$db->select($sql);
$item = $db->get_item();
list($adate, $tdate) = explode(' ', $item['date']);
$age = calcage($item['dbirth']);
$sex = $item['sex'] === 'ª' ? 'ªÒÂ' : 'Ë­Ô§';
$pdf = new SHSPdf('P', 'mm', 'A4');
$pdf->SetThaiFont();
// à«çµ¿Í¹µì
$pdf->SetAutoPageBreak(false, 0);
$pdf->SetMargins(3, 3, 3);
// left, top, right
$pdf->AddPage();
$pdf->SetFont('THSarabun', '', 14);
// àÃÕ¡ãªé§Ò¹¿Í¹µì·ÕèàµÃÕÂÁäÇé
$pdf->Cell(197, 7, 'DISCHARGE SUMMARY', 0, 1, 'C');
$pdf->Cell(197, 7, 'FORT SURASAKMONTRI HOSPITAL FR-MDO-001/1 , 05, 01 , Ê.¤. 52', 0, 1, 'C');
$x = $pdf->GetX();
$y = $pdf->GetY();
// ¨Ø´ x,y µÒÁ˹éÒ¡ÃдÒÉ Êèǹ¤ÇÒÁ¡ÇéÒ§ÊÙ§¢Í§¡ÃͺµÒÁ¢Í§à´ÔÁ
// µÑǹÕéà»ç¹¡ÃͺãË­è
$pdf->Rect($x, $y, 197, 35);
$pdf->SetXY(3, 17);
$pdf->Cell(85, 7, "ADMIT: {$adate} àÇÅÒ: {$tdate}", 0, 1);
$pdf->SetXY(88, 17);
$pdf->SetFont('THSarabun', 'B');
$pdf->Cell(45, 7, 'AN: ' . $item['an'], 0, 1);
$pdf->SetXY(133, 17);
$pdf->Cell(67, 7, 'HN: ' . $item['hn'], 0, 1);