当前位置: 首页>>代码示例>>PHP>>正文


PHP Konek::getAll方法代码示例

本文整理汇总了PHP中Konek::getAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Konek::getAll方法的具体用法?PHP Konek::getAll怎么用?PHP Konek::getAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Konek的用法示例。


在下文中一共展示了Konek::getAll方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: elseif

	function simpan_tracer_check($value) {
		$cleaner = new FormCleaner;
		$cleaner->setValue($value);
		$cleaner->clean();
		$val = $cleaner->getValue();

		$objResponse = new xajaxResponse;

		if(!$val[no_rm]) {
			$objResponse->addAlert("Silakan Isi Nomor Rekam Medis");
			$objResponse->addScriptCall("fokus", "no_rm");
		} elseif(!$val[peminjam]) {
			$objResponse->addAlert("Silakan Isi Peminjam");
			$objResponse->addScriptCall("fokus", "peminjam");
		} else {
			$kon = new Konek;
			$arr_no_rm = explode("\n", $val[no_rm]);
			$str_no_rm = str_replace("\n", ", ", $val[no_rm]);
			//$objResponse->addAlert($str_no_rm);
			$kon->sql = "
				SELECT 
					CONCAT_WS('-', SUBSTRING(trc.pasien_id, 1,2), SUBSTRING(trc.pasien_id, 3,2), SUBSTRING(trc.pasien_id, 5,2), SUBSTRING(trc.pasien_id, 7,2)) as no_rm,
					kmr.nama as nama_kamar, 
					trc.peminjam as peminjam,
					DATE_FORMAT(trc.tgl_keluar, '%d/%m/%y') as tgl_keluar,
					p.nama as nama
				FROM 
					tracer trc
					LEFT JOIN kunjungan_kamar kk ON (kk.id = trc.kunjungan_kamar_id)
					LEFT JOIN kamar kmr ON (kmr.id = kk.kamar_id)
					JOIN pasien p ON (p.id = trc.pasien_id)
				WHERE
					trc.pasien_id IN (".$str_no_rm.")
					AND trc.tgl_kembali IS NULL
			";
			$kon->execute();
			$data = $kon->getAll();
			if(!empty($data)) {
				$str = "\n";
				for($i=0;$i<sizeof($data);$i++) {
					$str .= "---------------------------------------\n";
					$str .= "No RM : " . $data[$i][no_rm] . "\n";
					$str .= "Pasien : " . $data[$i][nama] . "\n";
					$str .= "Tgl Keluar : " . $data[$i][tgl_keluar] . "\n";
					if( $data[$i][peminjam]) $str .= "Peminjam : " . $data[$i][peminjam] . "\n";
					if( $data[$i][nama_kamar]) $str .= "Pelayanan : " . $data[$i][nama_kamar] . "\n";
					$str .= "---------------------------------------\n";
				}
				$objResponse->addAlert("Data Tidak Dapat Disimpan.\nNomor Rekam Medis Berikut Belum Kembali Ke Rak Penyimpanan :\n" . $str);
				$objResponse->addScriptCall("fokus", "no_rm");
			} else {
				$objResponse->addScriptCall("xajax_simpan_tracer", $val, $arr_no_rm);
			}
		}
		return $objResponse;
	}
开发者ID:reekoheek,项目名称:srmis,代码行数:56,代码来源:buat_tracer.php

示例2: xajaxResponse

    function get_bed($inputId, $id, $id_sel = NULL) {
		$objResponse = new xajaxResponse();
		$kon = new Konek;
		$kon->sql = "SELECT id,nomor FROM ref_kamar WHERE pelayanan_id = '".$id."' AND status=0 ORDER BY nomor";
		$kon->execute();
		$data = $kon->getAll();	
		$objResponse->addAssign($inputId, "options.length", "1");
		for($i=0;$i<sizeof($data);$i++) {
			if($data[$i][id] == $id_sel)
				$objResponse->addScript("addOption('".$inputId."','".$inputId."kamar_".$data[$i][id]."','".$data[$i][nama]."','".$data[$i][id]."',false,true);");
			else
				$objResponse->addScript("addOption('".$inputId."','".$inputId."_kamar_".$data[$i][id]."','".$data[$i][nama]."','".$data[$i][id]."',false,false);");
		}
		//$objResponse->addScript("addOption('".$inputId."','".$inputId."_tidak_ada_dokter','Dokter Lain','',false,false);");
		return $objResponse;
	}    			
开发者ID:reekoheek,项目名称:srmis,代码行数:16,代码来源:ref_kamar.php

示例3: xajaxResponse

	function get_kabupaten($id_propinsi, $id_sel = NULL) {
		$kon = new Konek;
		$kon->sql = "
			SELECT 
				id, 
				nama
			FROM 
				ref_kabupaten
			WHERE
				propinsi_id = '".$id_propinsi."'
			ORDER BY
				nama
		";
		$kon->execute();
		$data = $kon->getAll();
		$objResponse = new xajaxResponse();
		$objResponse->addAssign("kabupaten_id", "options.length", "1");
		for($i=0;$i<sizeof($data);$i++) {
			if($data[$i][id] == $id_sel) {
				$objResponse->addScript("addOption('kabupaten_id','kabupaten_".$data[$i][id]."','".$data[$i][nama]."','".$data[$i][id]."',false,true);");	
			} else {
				$objResponse->addScript("addOption('kabupaten_id','kabupaten_".$data[$i][id]."','".$data[$i][nama]."','".$data[$i][id]."',false,false);");
			}
		}
		//$objResponse->addScript("addOption('kabupaten_id','add_kabupaten','--- TAMBAH KABUPATEN ---','add_kabupaten');");
		return $objResponse;
	}
开发者ID:reekoheek,项目名称:srmis,代码行数:27,代码来源:kecamatan.php

示例4: SUBSTRING

	function buka_kunjungan($id_kunjungan_lab) {
		$objResponse = new xajaxResponse;
		$kon = new Konek;
		$sql = "
			SELECT 
				lk.kunjungan_kamar_id as kunjungan_kamar_id,
				CONCAT_WS('-', SUBSTRING(p.id, 1,2), SUBSTRING(p.id, 3,2), SUBSTRING(p.id, 5,2), SUBSTRING(p.id, 7,2)) as no_rm,
				p.id as pasien_id,
				p.nama as nama,
				p.sex as sex,
				p.tgl_lahir as tgl_lahir,
				DATE(lk.tgl_daftar) as tgl_daftar,
				DATE(lk.tgl_periksa) as tgl_periksa,
				lk.kelas as kelas,
				lk.pengirim as pengirim,
				CONCAT_WS(' - ', lk.cara_masuk, kmr.nama) as cara_masuk,
				CONCAT_WS(' - ', lk.cara_bayar, lk.jenis_askes, rper.nama) as cara_bayar
			FROM 
				lab_kunjungan lk
				JOIN pasien p ON (p.id = lk.pasien_id)
				LEFT JOIN kunjungan_kamar kk ON (kk.id = lk.kunjungan_kamar_id)
				LEFT JOIN kamar kmr ON (kmr.id = kk.kamar_id)
				LEFT JOIN ref_perusahaan rper ON (rper.id = lk.perusahaan_id)
			WHERE
				lk.id = '".$id_kunjungan_lab."'
		";
		$kon->sql = $sql;
		$kon->execute();
		$data = $kon->getOne();

		//get data specimen
		$kon->sql = "
			SELECT
				id as kunjungan_bayar_id,
				nama as nama,
				hak_id as hak_id,
				jumlah as jumlah,
				biaya_bhp as biaya_bhp,
				biaya_jasa as biaya_jasa,
				bayar_bhp as bayar_bhp,
				bayar_jasa as bayar_jasa
			FROM
				kunjungan_bayar
			WHERE
				lab_kunjungan_id = '".$id_kunjungan_lab."'
				AND lab_specimen_id IS NOT NULL
			GROUP BY 
				id
		";
		$kon->execute();
		$data_spc = $kon->getAll();
		
		//get data BHP
		$kon->sql = "
			SELECT
				id as kunjungan_bayar_id,
				nama as nama,
				hak_id as hak_id,
				jumlah as jumlah,
				sifat as sifat,
				biaya_bhp as biaya,
				bayar_bhp as bayar
			FROM
				kunjungan_bayar
			WHERE
				lab_kunjungan_id = '".$id_kunjungan_lab."'
				AND bhp_id IS NOT NULL
			GROUP BY 
				id
		";
		$kon->execute();
		$data_bhp = $kon->getAll();


		$skr = date("Y-m-d");
		$usia = hitungUmur($data[tgl_lahir], $skr);
		$umur = empty($usia[tahun])?"":$usia[tahun] . "&nbsp;th&nbsp;&nbsp;";
		$umur .= empty($usia[bulan])?"":$usia[bulan] . "&nbsp;bl&nbsp;&nbsp;";
		$umur .= empty($usia[hari])?"":$usia[hari] . "&nbsp;hr&nbsp;&nbsp;";
		
		//$objResponse->addAssign("debug", "innerHTML", $sql);
		//info utama
		$objResponse->addAssign("input_no_rm", "innerHTML", $data[no_rm]);
		$objResponse->addAssign("input_pasien", "innerHTML", $data[nama]);
		$objResponse->addAssign("input_sex", "innerHTML", $data[sex]);
		$objResponse->addAssign("input_usia", "innerHTML", $umur);
		$objResponse->addAssign("input_cara_masuk", "innerHTML", $data[cara_masuk]);
		$objResponse->addAssign("input_cara_bayar", "innerHTML", $data[cara_bayar]);
		$objResponse->addAssign("input_id_kunjungan_lab", "value", $id_kunjungan_lab);
		$objResponse->addAssign("input_id_kunjungan_kamar", "value", $data[kunjungan_kamar_id]);
		$objResponse->addAssign("input_kelas", "value", $data[kelas]);
		$objResponse->addAssign("display_kelas", "innerHTML", $data[kelas]);
		$objResponse->addAssign("kelas", "value", $data[kelas]);
		
		$objResponse->addAssign("input_kunjungan_ke", "innerHTML", $data[kunjungan_ke]);
		$objResponse->addAssign("input_spesialisasi", "innerHTML", $data[spesialisasi]);
		$objResponse->addScriptCall("xajax_ref_get_dokter_from_kamar", "input_dokter_id", $data[id_kamar], $data[id_dokter]);

		$objResponse->addAssign("input_tgl_daftar", "innerHTML", tanggalIndo($data[tgl_daftar], 'j F Y'));
		$objResponse->addAssign("input_tgl_periksa", "innerHTML", tanggalIndo($data[tgl_daftar], 'j F Y'));
//.........这里部分代码省略.........
开发者ID:reekoheek,项目名称:srmis,代码行数:101,代码来源:kunjungan.modal.php

示例5: array

	function get_lap_rl1($val) {
		$objResponse = new xajaxResponse;
		$kon = new Konek;
		$sql = "
			SELECT
				id,
				nama as nama_lain
			FROM
				pelayanan
			WHERE
				jenis = 'RAWAT INAP'
		";
		$kon->sql = $sql;
		$kon->execute();
		$data = $kon->getAll();
		$baru = array();
		$s = 0;
		
		/*
			I : 1 januari - 31 maret
			II : 1 april - 30 juni
			III : 1 juli - 30 september
			IV : 1 oktober - 31 desember
		*/

		switch($val[tw]) {
			case "I" : 
				$tgl_awal = $val[tahun] . "-01-01";
				$tgl_akhir = $val[tahun] . "-03-31";
				$tgl_start_bln = 1;
			break;
			case "II" : 
				$tgl_awal = $val[tahun] . "-04-01";
				$tgl_akhir = $val[tahun] . "-06-30";
				$tgl_start_bln = 4;
			break;
			case "III" : 
				$tgl_awal = $val[tahun] . "-07-01";
				$tgl_akhir = $val[tahun] . "-09-30";
				$tgl_start_bln = 7;
			break;
			default : 
				$tgl_awal = $val[tahun] . "-10-01";
				$tgl_akhir = $val[tahun] . "-12-31";
				$tgl_start_bln = 10;
			break;
		}
		$selisih_hari = datediff("d", $tgl_awal, $tgl_akhir);
		for($i=0;$i<sizeof($data);$i++) {
			$baru[$i][nama] = $data[$i][nama_lain];
			/* 
			get px awal triwulan ~ pasien sisa / pasien yg masih dirawat
			syarat : tgl masuk < tgl_awal 
					 tgl_keluar > tgl_awal
			*/
			$kon->sql = "
				SELECT 
					COUNT(kk.id) as jml
				FROM
					kunjungan_kamar kk
					JOIN kamar kmr ON (kmr.id = kk.kamar_id)
					JOIN kunjungan k ON (k.id = kk.kunjungan_id)
				WHERE
					kmr.pelayanan_id = '".$data[$i][id]."'
					AND (DATE(kk.tgl_daftar) < '".$tgl_awal."' AND (DATE(kk.tgl_keluar) >= '".$tgl_awal."' OR kk.tgl_keluar IS NULL))
			";
			$kon->execute();
			$px_awal = $kon->getOne();
			$baru[$i][px_awal] = $px_awal[jml];
			$total[px_awal] += $baru[$i][px_awal];

			/* 
			get px masuk
			ASUMSI SEMENTARA : PASIEN PINDAHAN DIHITUNG
			syarat : tgl masuk diantara tgl_awal dan tgl_keluar
			*/
			$kon->sql = "
				SELECT 
					COUNT(kk.id) as jml
				FROM
					kunjungan_kamar kk
					JOIN kamar kmr ON (kmr.id = kk.kamar_id)
					JOIN kunjungan k ON (k.id = kk.kunjungan_id)
				WHERE
					kmr.pelayanan_id = '".$data[$i][id]."'
					AND (DATE(kk.tgl_daftar) BETWEEN '".$tgl_awal."' AND '".$tgl_akhir."')
			";
			$kon->execute();
			$px_masuk = $kon->getOne();
			$baru[$i][px_masuk] = $px_masuk[jml];
			$total[px_masuk] += $baru[$i][px_masuk];

			/* 
			get px keluar 
			syarat : tgl keluar diantara tgl_awal dan tgl_keluar dan keadaan keluar = sembuh, belum sembuh
			*/
			$kon->sql = "
				SELECT 
					COUNT(kk.id) as jml,
					k.keadaan_keluar as keadaan_keluar
//.........这里部分代码省略.........
开发者ID:reekoheek,项目名称:srmis,代码行数:101,代码来源:lap_rl1.php

示例6: array

	function get_lap_rl2a($val) {
		$objResponse = new xajaxResponse;
		$dtd = array('292.0','292.2','292.4','292.6','292.8');
		$dtd_kecuali = implode("','", $dtd);
		switch($val[tw]) {
			case "IV" :
				$s = " AND kk.tgl_keluar BETWEEN '".$val[tahun]."-10-01' AND '".$val[tahun]."-12-31'";
			break;
			case "III" :
				$s = " AND kk.tgl_keluar BETWEEN '".$val[tahun]."-07-01' AND '".$val[tahun]."-09-30'";
			break;
			case "II" :
				$s = " AND kk.tgl_keluar BETWEEN '".$val[tahun]."-04-01' AND '".$val[tahun]."-06-30'";
			break;
			default :
				$s = " AND kk.tgl_keluar BETWEEN '".$val[tahun]."-01-01' AND '".$val[tahun]."-03-31'";
			break;
		}

		$kon = new Konek;
		$sql = "
			SELECT
				i.no_dtd as no_dtd,
				i.kode_icd as kode_icd,
				i.gol_sebab_sakit as gol_sebab_sakit,
				p.tgl_lahir as tgl_lahir,
				kk.tgl_keluar as tgl_keluar,
				p.sex as sex,
				k.keadaan_keluar as keadaan_keluar
			FROM
				kunjungan_kamar kk
				JOIN kunjungan k ON (k.id = kk.kunjungan_id)
				JOIN pasien p ON (p.id = k.pasien_id)
				JOIN kamar kmr ON (kmr.id = kk.kamar_id)
				JOIN pelayanan pel ON (pel.id = kmr.pelayanan_id)
				JOIN icd i ON (i.id = kk.diagnosa_utama_id)
			WHERE
				kk.tgl_keluar IS NOT NULL
				AND pel.jenis = 'RAWAT INAP'
				AND kk.kelanjutan IN ('DIRUJUK', 'PULANG')
				AND i.no_dtd NOT IN ('" . $dtd_kecuali . "')
				$s
			ORDER BY i.no_dtd
		";
		//$objResponse->addAssign("debug", "innerHTML", $sql);
		$kon->sql = $sql;
		$kon->execute();
		$data = $kon->getAll();
		$baru = array();
		$s = 0;
		for($i=0;$i<sizeof($data);$i++) {
			$umur = hitungUmur($data[$i][tgl_lahir], $data[$i][tgl_keluar]);
			$umur_tahun = $umur[tahun];
			$umur_hari = $umur[hari];
			if($data[$i][no_dtd] == $data[$i-1][no_dtd]) {
				//bikin anak
				//nggabungin kode icd
				if($baru[$s][kode_icd] != $data[$i][kode_icd]) $baru[$s][kode_icd] = $baru[$s][kode_icd] . ", " . $data[$i][kode_icd];

				if($umur[tahun] > 64) {
					$baru[$s]['nam_lima'] += 1;
					$total['nam_lima'] += 1;
				} elseif ($umur[tahun] > 44) {
					$baru[$s]['pat_lima'] += 1;
					$total['pat_lima'] += 1;
				} elseif ($umur[tahun] > 24) {
					$baru[$s]['dua_lima'] += 1;
					$total['dua_lima'] += 1;
				} elseif ($umur[tahun] > 14) {
					$baru[$s]['lima_belas'] += 1;
					$total['lima_belas'] += 1;
				} elseif ($umur[tahun] > 4) {
					$baru[$s]['lima'] += 1;
					$total['lima'] += 1;
				} elseif ($umur[tahun] >=1) {
					$baru[$s]['satu'] += 1;
					$total['satu'] += 1;
				} elseif ($umur[hari] > 27) {
					$baru[$s]['dua_lapan'] += 1;
					$total['dua_lapan'] += 1;
				} else {
					$baru[$s]['nol'] += 1;
					$total['nol'] += 1;
				}
				//sex
				if($data[$i][sex] == "LAKI-LAKI") {
					$baru[$s][sex_laki] += 1;
					$total['sex_laki'] += 1;
					$total['total'] += 1;
				} else {
					$baru[$s][sex_prp] += 1;
					$total['sex_prp'] += 1;
					$total['total'] += 1;
				}
				if($data[$i][keadaan_keluar] == "MATI < 48 JAM" || $data[$i][keadaan_keluar] == "MATI >= 48 JAM") {
					$baru[$s][mati] += 1;
					$total['mati'] += 1;
				}
				$baru[$s][total] = $baru[$s][sex_prp] + $baru[$s][sex_laki];
			} else {
//.........这里部分代码省略.........
开发者ID:reekoheek,项目名称:srmis,代码行数:101,代码来源:lap_rl2a.php

示例7: tanggalIndo

	function get_pasien($val) {
		$tgl_start = @date("Y-m-d", @mktime(1,1,1,$val[tgl_periksa_bln_start], $val[tgl_periksa_tgl_start], $val[tgl_periksa_thn_start]));
		$tgl_end = @date("Y-m-d", @mktime(1,1,1,$val[tgl_periksa_bln_end], $val[tgl_periksa_tgl_end], $val[tgl_periksa_thn_end]));
		
		$title = "Distribusi Pasien Menurut Pekerjaan";
		
		unset($_SESSION[rekmed][statistik_pasien_semua_pekerjaan]);

		$kon = new Konek;
		if($val[jangka_waktu] == "hari") {
			$tanggal_awal = tanggalIndo($tgl_start, "j F Y");
			$tanggal_akhir = tanggalIndo($tgl_end, "j F Y");
			$_q .= "AND DATE(p.tgl_daftar) BETWEEN '" . $tgl_start . "' AND '" . $tgl_end . "'";
		} elseif($val[jangka_waktu] == "bulan") {
			$tanggal_awal = tanggalIndo($tgl_start, "F Y");
			$tanggal_akhir = tanggalIndo($tgl_end, "F Y");
			$_q .= "AND EXTRACT(YEAR_MONTH FROM p.tgl_daftar) BETWEEN EXTRACT(YEAR_MONTH FROM '" . $tgl_start . "') AND EXTRACT(YEAR_MONTH FROM '" . $tgl_end . "')";
		} else {
			$tanggal_awal = tanggalIndo($tgl_start, "Y");
			$tanggal_akhir = tanggalIndo($tgl_end, "Y");
			$_q .= "AND YEAR(p.tgl_daftar) BETWEEN YEAR('" . $tgl_start . "') AND YEAR ('" . $tgl_end . "')";
		}

		$title .= "\nPeriode " . $tanggal_awal . " s.d. " . $tanggal_akhir;
		$_SESSION[rekmed][statistik_pasien_semua_pekerjaan][title] = $title;
		$sql = "
			SELECT
				rp.id as id,
				rp.nama as nama,
				COUNT(p.id) as jml
			FROM
				ref_pekerjaan rp
				JOIN pasien p ON (p.pekerjaan_id = rp.id)
			WHERE
				1=1
				$_q
			GROUP BY
				rp.id
			ORDER BY 3 DESC
		";
		$kon->sql = $sql;
		$kon->execute();
		$data = $kon->getAll();
		$objResponse = new xajaxResponse();
		//$objResponse->addAssign("debug", "innerHTML", $sql);
		$table = new Table;
		$table->scroll = false;
		$table->addTh("No", "Pekerjaan", "Jumlah", "%");
		$table->addExtraTh(
			"style=\"width:50px\"",
			"style=\"width:200px\"",
			"",
			"style=\"width:70px\""
		);
		$table->addTh("1", "2", "3", "4");
		for($i=0;$i<sizeof($data);$i++) {
			$total = $total+$data[$i][jml];
		}
		for($i=0;$i<sizeof($data);$i++) {
			$persen = round($data[$i][jml]/$total * 100, 2);
			$table->addRow(($i+1), $data[$i][nama], $data[$i][jml], $persen);
			$table->addOnclickTd(
				"xajax_list_pasien('0', '".$data[$i][id]."', xajax.getFormValues('statistik_pasien_semua_pekerjaan'))", 
				"xajax_list_pasien('0', '".$data[$i][id]."', xajax.getFormValues('statistik_pasien_semua_pekerjaan'))", 
				"xajax_list_pasien('0', '".$data[$i][id]."', xajax.getFormValues('statistik_pasien_semua_pekerjaan'))", 
				"xajax_list_pasien('0', '".$data[$i][id]."', xajax.getFormValues('statistik_pasien_semua_pekerjaan'))");

			$_SESSION[rekmed][statistik_pasien_semua_pekerjaan][no][$i] = ($i+1);
			$_SESSION[rekmed][statistik_pasien_semua_pekerjaan][nama][$i] = $data[$i][nama];
			$_SESSION[rekmed][statistik_pasien_semua_pekerjaan][jml][$i] = $data[$i][jml];
			$_SESSION[rekmed][statistik_pasien_semua_pekerjaan][persen][$i] = $persen;
			$persen_total += $persen;
		}
		$_SESSION[rekmed][statistik_pasien_semua_pekerjaan][total] = $total;
		$_SESSION[rekmed][statistik_pasien_semua_pekerjaan][persen_total] = round($persen_total);
		$table->addRow("", "<b>Total</b>", $_SESSION[rekmed][statistik_pasien_semua_pekerjaan][total], $_SESSION[rekmed][statistik_pasien_semua_pekerjaan][persen_total]);
		$ret = $table->build();
		if(empty($_SESSION[rekmed][statistik_pasien_semua_pekerjaan][jml])) $_SESSION[rekmed][statistik_pasien_semua_pekerjaan][jml][0] = 1;
		if(empty($_SESSION[rekmed][statistik_pasien_semua_pekerjaan][nama]))	$_SESSION[rekmed][statistik_pasien_semua_pekerjaan][nama][0] = "No Data";
		

		$objResponse->addAssign("list_data", "innerHTML", $ret);
		$objResponse->addAssign("title", "innerHTML", nl2br($_SESSION[rekmed][statistik_pasien_semua_pekerjaan][title]));
		$_SESSION[rekmed][statistik_pasien_semua_pekerjaan][graph] = "<img src=\"" . URL . "rekmed/statistik_pasien_semua_pekerjaan_graph_pie/?md5=".md5(date("Ymdhis"))."\" alt=\"Pasien\" />";
		$objResponse->addAssign("graph", "innerHTML", $_SESSION[rekmed][statistik_pasien_semua_pekerjaan][graph]);
		return $objResponse;
	}
开发者ID:reekoheek,项目名称:srmis,代码行数:87,代码来源:statistik_pasien_semua_pekerjaan.php

示例8: elseif


//.........这里部分代码省略.........
			"Tgl<br />Periksa",
			"Asal<br />Pasien",
			"Dokter<br />Pengirim", 
			"Status Bayar"
			/*,"Hapus"*/
		);
		//$table->addExtraTh("style=\"width:50px;\"","style=\"width:50px;\"","style=\"width:80px;\"","style=\"width:200px;\"","","","","","","","style=\"width:70px;\"");
		$table->addExtraTh("style=\"width:50px;\"","style=\"width:50px;\"","style=\"width:80px;\"","style=\"width:200px;\"","","","","");
		for($i=0;$i<sizeof($data);$i++) {
		  
                  //get data radio
            	$kon->sql = "
            		SELECT
            			kb.nama as nama,
            			kb.bayar_bhp+kb.bayar_jasa as bayar,
            			kb.mampu_bayar_bhp+kb.mampu_bayar_jasa as mampu_bayar,
            			kwd.kwitansi_id as kwitansi_id,
                        kw.status as status
            		FROM
            			kunjungan_bayar kb
            			JOIN radio_kunjungan lk ON (lk.id = kb.lab_kunjungan_id)
            			JOIN kunjungan_kamar kk ON (kk.id = lk.kunjungan_kamar_id)
            			LEFT JOIN kwitansi_detil kwd ON (kwd.kunjungan_bayar_id = kb.id)
                        LEFT JOIN kwitansi kw ON  (kw.id = kwd.kwitansi_id)
            		WHERE
            			kb.radio_specimen_id IS NOT NULL
            			AND kk.kunjungan_id = '".$data[$i][kunjungan_id]."'
            		GROUP BY
            			kb.id
            		ORDER BY kb.id
            	";
            	$kon->execute();
        		$data_r = $kon->getOne();
                if(!empty($data_r)){
                    if (!empty($data_r[status])){
                        $status_bayar = "<font color = blue><b>LUNAS</b></font>";
                    }    
                    else {
                        $status_bayar = "<font color = red><b>BELUM LUNAS</b></font>";                        
                    }        
                }else 
                {$status_bayar = "<font color = red><b>BELUM LUNAS</b></font>";}
          
          	$table->addRow(
				($no+$i), 
				$data[$i][id_kunjungan_radio], 
				$data[$i][no_rm], 
				$data[$i][nama], 
				tanggalIndo($data[$i][tgl_periksa], 'j M Y'), 
				$data[$i][asal], 
				$data[$i][pengirim], 
				$status_bayar
				/*,"<input type=\"button\" value=\"[  x  ]\" name=\"hapus\" class=\"inputan\" onclick=\"xajax_hapus_kunjungan_kamar_confirm('".$data[$i][id_kunjungan]."','".$data[$i][id_kunjungan_kamar]."', this)\" />"*/
				);
			if ($val[cara_masuk_p]=='PASIEN LUAR')
			{
				$table->addOnclickTd(
					"xajax_buka_kunjungan('".$data[$i][id_kunjungan_radio]."')",
					"xajax_buka_kunjungan('".$data[$i][id_kunjungan_radio]."')",
					"xajax_buka_kunjungan('".$data[$i][id_kunjungan_radio]."')",
					"xajax_buka_kunjungan('".$data[$i][id_kunjungan_radio]."')",
					"xajax_buka_kunjungan('".$data[$i][id_kunjungan_radio]."')",
					"xajax_buka_kunjungan('".$data[$i][id_kunjungan_radio]."')",
					"xajax_buka_kunjungan('".$data[$i][id_kunjungan_radio]."')"
				);
			}
			else
			{
				$table->addOnclickTd(
					"buka_daftar_penunjang('".$data[$i][id_kunjungan_kamar]."')",
					"buka_daftar_penunjang('".$data[$i][id_kunjungan_kamar]."')",
					"buka_daftar_penunjang('".$data[$i][id_kunjungan_kamar]."')",
					"buka_daftar_penunjang('".$data[$i][id_kunjungan_kamar]."')",
					"buka_daftar_penunjang('".$data[$i][id_kunjungan_kamar]."')",
					"buka_daftar_penunjang('".$data[$i][id_kunjungan_kamar]."')",
					"buka_daftar_penunjang('".$data[$i][id_kunjungan_kamar]."')"
				);	
			}
			
		}
		$ret = $table->build();
		$objResponse = new xajaxResponse();
		//$objResponse->addAssign("debug", "innerHTML", $sql);
/*
BIKIN SESSION HAK DAN SIFAT, AGAR NGIRIT MEMORI DI MODAL KUNJUNGAN
*/
		$kon = new Konek;
		$kon->sql = "SELECT id, nama FROM hak ORDER BY nama";
		$kon->execute();
		$_SESSION[radio][hak] = $kon->getAll();

		$kon->sql = "SELECT * FROM sifat";
		$kon->execute();
		$_SESSION[radio][sifat] = $kon->getAll();


		$objResponse->addAssign("navi", "innerHTML", $navi);
		$objResponse->addAssign("list_data", "innerHTML", $ret);
		return $objResponse;
	}
开发者ID:reekoheek,项目名称:srmis,代码行数:101,代码来源:kunjungan.php

示例9: SUBSTRING

	function list_data($jenis = "BELUM", $limit = 5, $auto = "0", $tgl="") {
		if($jenis == "BELUM") $s .= " AND trc.cetak = 'BELUM' ";
		elseif($jenis == "SUDAH") $s .= " AND trc.cetak = 'SUDAH' ";
		if($tgl) $s .= "AND DATE(trc.tgl_keluar) = '".$tgl."' ";
		$kon = new Konek;
		$sql = "
			SELECT 
				k.id as id_kunjungan,
				kk.id as id_kunjungan_kamar,
				CONCAT_WS('-', SUBSTRING(p.id, 1,2), SUBSTRING(p.id, 3,2), SUBSTRING(p.id, 5,2), SUBSTRING(p.id, 7,2)) as no_rm,
				p.id as pasien_id,
				p.nama as nama,
				kmr.nama as kamar,
				kk.tgl_daftar as tgl_daftar,
				kk.tgl_periksa as tgl_periksa,
				d.nama as nama_dokter,
				trc.cetak as tercetak
			FROM 
				kunjungan k
				JOIN pasien p ON (p.id = k.pasien_id)
				JOIN kunjungan_kamar kk ON (kk.kunjungan_id = k.id)
				JOIN tracer trc ON (trc.kunjungan_kamar_id = kk.id)
				JOIN kamar kmr ON (kmr.id = kk.kamar_id)
				LEFT JOIN dokter d ON (d.id = kk.dokter_id)
			WHERE
				trc.cetak IS NOT NULL
				$s
			ORDER BY 
				kk.id
		";
		$kon->sql = $sql;
		$kon->execute();
		$data = $kon->getAll();

		$table = new Table;
		$table->tbody_height = 340;
		$table->addTh(
			"No", 
			"No.<br />Kjg",
			"No. RM", 
			"Pasien", 
			"Pelayanan", 
			"Dokter", 
			"Tgl<br />Daftar",
			"Tgl<br />Periksa",
			"Tracer<br />Tercetak",
			"Cetak<br />Sendiri"
		);
		$table->addExtraTh("style=\"width:50px;\"","style=\"width:50px;\"","style=\"width:80px;\"","style=\"width:200px;\"","","","","","","style=\"width:50px;\"");
		for($i=0;$i<sizeof($data);$i++) {
			$table->addRow(
				($i+1), 
				$data[$i][id_kunjungan], 
				$data[$i][no_rm], 
				$data[$i][nama], 
				$data[$i][kamar], 
				$data[$i][nama_dokter], 
				tanggalIndo($data[$i][tgl_daftar], 'j M Y'), 
				tanggalIndo($data[$i][tgl_periksa], 'j M Y'), 
				$data[$i][tercetak], 
				"<a href=\"javascript:void(0)\" title=\"Cetak ini saja\" style=\"display:block;\" onclick=\"cetak('".URL."filing/cetak_tracer_cetak/?kkid=".$data[$i][id_kunjungan_kamar]."',350,300)\"><img src=\"".IMAGES_URL."printer_hitam.png\" alt=\"Cetak\" border=\"0\" /></a>");
			$table->addOnclickTd(
				"xajax_list_semua_kunjungan('0', '".$data[$i][pasien_id]."')",
				"xajax_list_semua_kunjungan('0', '".$data[$i][pasien_id]."')",
				"xajax_list_semua_kunjungan('0', '".$data[$i][pasien_id]."')",
				"xajax_list_semua_kunjungan('0', '".$data[$i][pasien_id]."')",
				"xajax_list_semua_kunjungan('0', '".$data[$i][pasien_id]."')",
				"xajax_list_semua_kunjungan('0', '".$data[$i][pasien_id]."')",
				"xajax_list_semua_kunjungan('0', '".$data[$i][pasien_id]."')",
				"xajax_list_semua_kunjungan('0', '".$data[$i][pasien_id]."')",
				"xajax_list_semua_kunjungan('0', '".$data[$i][pasien_id]."')"
			);
		}
		$ret = $table->build();
		$objResponse = new xajaxResponse();
		//$objResponse->addAssign("debug", "innerHTML", $auto);
		$objResponse->addAssign("navi", "innerHTML", $navi);
		$objResponse->addAssign("list_data", "innerHTML", $ret);

		//jika ada pasien dan auto cetak dihidupkan, maka jalankan skrip membuka window cetak
		if(!empty($data) && $auto == "1") {
			$tgl = str_replace("-", "|", $tgl);
			$objResponse->addScriptCall("cetak_tracer", URL . "filing/cetak_tracer_cetak/?jenis=" . $jenis . "&limit=" . $limit . "&tgl=" . $tgl, 350, 600);
		}
		return $objResponse;
	}
开发者ID:reekoheek,项目名称:srmis,代码行数:86,代码来源:cetak_tracer.php

示例10: SUBSTRING

	function buka_langsung_bayar($idkk) {
		unset($_SESSION[igd][langsung_bayar]);
		$kon = new Konek;
		//$kon->debug = 1;
		$objResponse = new xajaxResponse;
		//get data pasien
		$kon->sql = "
			SELECT
				CONCAT_WS('-', SUBSTRING(p.id, 1,2), SUBSTRING(p.id, 3,2), SUBSTRING(p.id, 5,2), SUBSTRING(p.id, 7,2)) as id_display,
				p.nama as nama,
				p.tgl_lahir as tgl_lahir,
				CONCAT(p.alamat, ' ', IF(p.rt = '','',CONCAT(' RT ', p.rt)), IF(p.rw = '','',CONCAT(' RW ', p.rw)), ', ', des.nama, ', ', kec.nama, ', ', kab.nama) as alamat,
				kk.tgl_periksa as tgl_periksa,
				CONCAT_WS(' - ', pel.jenis, pel.nama) as nama_pelayanan,
				p.sex as jk,
				CONCAT_WS(' - ', kk.cara_bayar, kk.jenis_askes, rper.nama) as cara_bayar,
				kk.nomor as nomor
			FROM
				kunjungan_kamar kk
				JOIN kunjungan k ON (k.id = kk.kunjungan_id)
				JOIN pasien p ON (p.id = k.pasien_id)
				JOIN kamar kmr ON (kmr.id = kk.kamar_id)
				JOIN pelayanan pel ON (pel.id = kmr.pelayanan_id)
				JOIN ref_desa des ON (des.id = p.desa_id)
				JOIN ref_kecamatan kec ON (kec.id = des.kecamatan_id)
				JOIN ref_kabupaten kab ON (kab.id = kec.kabupaten_id)
				JOIN ref_propinsi prop ON (prop.id = kab.propinsi_id)
				LEFT JOIN ref_perusahaan rper ON (rper.id = kk.perusahaan_id)
			WHERE
				kk.id = '".$idkk."'
			GROUP BY
				p.id
		";
		$kon->execute();
		$data_pasien = $kon->getOne();
		$arr_usia = hitungUmur($data_pasien[tgl_lahir], $data_pasien[tgl_periksa]);
		$data_pasien[usia] = empty($arr_usia[tahun])?"":$arr_usia[tahun] . " thn ";
		$data_pasien[usia] .= empty($arr_usia[bulan])?"":$arr_usia[bulan] . " bln ";
		$data_pasien[usia] .= empty($arr_usia[hari])?"":$arr_usia[hari] . " hr ";
		$objResponse->addClear("modal_lb", "style.display");
		$objResponse->addAssign("lb_id_kunjungan_kamar", "value", $idkk);
		$objResponse->addAssign("lb_no_rm", "innerHTML", $data_pasien[id_display]);
		$objResponse->addAssign("lb_pasien", "innerHTML", $data_pasien[nama]);
		$objResponse->addAssign("lb_sex", "innerHTML", $data_pasien[jk]);
		$objResponse->addAssign("lb_usia", "innerHTML", $data_pasien[usia]);
		$objResponse->addAssign("lb_alamat", "innerHTML", $data_pasien[alamat]);
		$objResponse->addAssign("lb_tgl_periksa", "innerHTML", tanggalIndo($data_pasien[tgl_periksa], 'j F Y'));
		$objResponse->addAssign("lb_cara_bayar", "innerHTML", $data_pasien[cara_bayar]);
		$objResponse->addAssign("lb_pelayanan", "innerHTML", $data_pasien[nama_pelayanan]);
		$objResponse->addAssign("lb_nomor", "innerHTML", empty($data_pasien[nomor])?"-":$data_pasien[nomor]);

		//BIKIN SESSION UNTUK DICETAK
		$_SESSION[igd][langsung_bayar][data_px] = $data_pasien;

		$tabel = new Table;
		$tabel->cellspacing = "0";
		$tabel->scroll = false;
		$tabel->extra_table = "style=\"width:9cm;\"";
		$tabel->addTh("No", "Jasa", "Biaya");
		$tabel->addExtraTh("style=\"width:0.7cm;\"", "style=\"width:6.5cm;\"", "");
		//get data karcis
		$kon->sql = "
			SELECT
				kb.nama as nama,
				kb.bayar_bhp+kb.bayar_jasa as bayar,
				kb.mampu_bayar_bhp+kb.mampu_bayar_jasa as mampu_bayar,
				kwd.kwitansi_id as kwitansi_id
			FROM
				kunjungan_bayar kb
				JOIN kunjungan_kamar kk ON (kk.id = kb.kunjungan_kamar_id)
				LEFT JOIN kwitansi_detil kwd ON (kwd.kunjungan_bayar_id = kb.id)
			WHERE
				kb.karcis_id IS NOT NULL
				AND kk.id = '".$idkk."'
			GROUP BY
				kb.id
			ORDER BY kb.id
		";
		$kon->execute();
		$data_karcis = $kon->getAll();
		if(!empty($data_karcis)) {
			$tabel->addRow("","<b>Karcis</b>","");
			for($i=0;$i<sizeof($data_karcis);$i++) {
				$tabel->addRow(
					($i+1),
					$data_karcis[$i][nama],
					uangIndo($data_karcis[$i][bayar])
				);
				$total += $data_karcis[$i][bayar];
				$sudah_dibayar += $data_karcis[$i][mampu_bayar];
				//belum bayar
				if(!$data_karcis[$i][kwitansi_id]) $kurang += $data_karcis[$i][bayar];
			}
		}

		//get data tindakan
		$kon->sql = "
			SELECT
				kki.nama as nama,
				SUM(kb.bayar_jasa) as bayar,
//.........这里部分代码省略.........
开发者ID:reekoheek,项目名称:srmis,代码行数:101,代码来源:langsung_bayar.modal.php

示例11: ON

    function bayar_uang_muka($val){
        $kon = new Konek;
        $objResponse= new xajaxResponse;
       	$kon->sql = "SELECT kb.id as id, kb.bayar_bhp as bayar_bhp, kb.biaya_jasa as bayar_jasa FROM kunjungan_bayar kb JOIN kunjungan_kamar kk ON (kk.id = kb.kunjungan_kamar_id) LEFT JOIN kwitansi_detil kwd ON (kwd.kunjungan_bayar_id = kb.id) WHERE kk.kunjungan_id = '".$val[lb_id_kunjungan]."' AND kwd.kwitansi_id IS NULL";
        $_SESSION[idkk] = $val[lb_id_kunjungan];
		$kon->execute();
		$data = $kon->getAll();
		if(!empty($data)) {
		  for($i=0;$i<sizeof($data);$i++){
		      $kon->sql= "update kunjungan_bayar set uang_muka = '".$data[$i][lb_uang_muka]."' WHERE id = '".$data[$i][id]."'";
              $kon->execute();
		  }
		}
        return $objResponse;
    }
开发者ID:reekoheek,项目名称:srmis,代码行数:15,代码来源:langsung_bayar_angsuran.modal.php

示例12: datediff

	function get_kunjungan($val) {
		unset($_SESSION[radio][statistik_kunjungan_radio]);
		$tgl_start = @date("Y-m-d", @mktime(1,1,1,$val[tgl_periksa_bln_start], $val[tgl_periksa_tgl_start], $val[tgl_periksa_thn_start]));
		$tgl_end = @date("Y-m-d", @mktime(1,1,1,$val[tgl_periksa_bln_end], $val[tgl_periksa_tgl_end], $val[tgl_periksa_thn_end]));
		$title = "Statistik Kunjungan Radiologi";
		
		if($val[tampilkan] == "hari") {
			$selisih = datediff('d', $tgl_start, $tgl_end);
		} elseif($val[tampilkan] == "bulan") {
			$selisih = datediff('m', $tgl_start, $tgl_end);
		} else {
			$selisih = datediff('y', $tgl_start, $tgl_end);
		}
		if($val[tampilkan] == "hari") {
			$tanggal_awal = tanggalIndo($tgl_start, "j F Y");
			$tanggal_akhir = tanggalIndo($tgl_end, "j F Y");
		} elseif($val[tampilkan] == "bulan") {
			$tanggal_awal = tanggalIndo($tgl_start, "F Y");
			$tanggal_akhir = tanggalIndo($tgl_end, "F Y");
		} else {
			$tanggal_awal = tanggalIndo($tgl_start, "Y");
			$tanggal_akhir = tanggalIndo($tgl_end, "Y");
		}

		$title .= "\nPeriode " . $tanggal_awal . " s.d. " . $tanggal_akhir;

		$arr_tgl_start = explode("-",$tgl_start);
		$tgl_start_tgl = $arr_tgl_start[2];
		$tgl_start_bln = $arr_tgl_start[1];
		$tgl_start_thn = $arr_tgl_start[0];

		$arr_tgl_end = explode("-",$tgl_end);
		$tgl_end_tgl = $arr_tgl_end[2];
		$tgl_end_bln = $arr_tgl_end[1];
		$tgl_end_thn = $arr_tgl_end[0];

		$objResponse = new xajaxResponse();
		$kon = new Konek;
		$kon->sql = "SELECT id, nama, hari_buka FROM pelayanan WHERE jenis = 'RAWAT JALAN'";
		$kon->execute();
		$poli = $kon->getAll();
		
		for($i=0;$i<=$selisih;$i++) {
			if($val[tampilkan] == "hari") {
				$tgl[$i] = @date("Y-m-d", @mktime(1, 1, 1, $tgl_start_bln, ($i+$tgl_start_tgl), $tgl_start_thn));
				$tgl_periksa[$i] = tanggalIndo($tgl[$i], "j M\nY");
				$_SESSION[radio][statistik_kunjungan_radio][radioel_tick][$i] = @date("j", @mktime(1, 1, 1,$tgl_start_bln, ($tgl_start_tgl+$i), $tgl_start_thn));
				$radioel_x[$i] = @date("M Y", @mktime(1, 1, 1, $tgl_start_bln, ($tgl_start_tgl+$i), $tgl_start_thn));
				$where = " AND DATE(lk.tgl_periksa) = '" . $tgl[$i] . "' ";
			} elseif($val[tampilkan] == "bulan") {
				$tgl[$i] = @date("Y-m-d", @mktime(1, 1, 1, ($tgl_start_bln+$i), 1, $tgl_start_thn));
				$tgl_periksa[$i] = tanggalIndo($tgl[$i], "M\nY");
				$_SESSION[radio][statistik_kunjungan_radio][radioel_tick][$i] = @date("M y", @mktime(1, 1, 1, ($tgl_start_bln+$i), 1, $tgl_start_thn));
				$radioel_x[$i] = @date("Y", @mktime(1, 1, 1, ($tgl_start_bln+$i), 1, $tgl_start_thn));
				$where = " AND EXTRACT(YEAR_MONTH FROM lk.tgl_periksa) = EXTRACT(YEAR_MONTH FROM '" . $tgl[$i] . "') ";
			} else {
				$tgl[$i] = @date("Y-m-d", @mktime(1, 1, 1, 1, 1, ($tgl_start_thn + $i)));
				$tgl_periksa[$i] = tanggalIndo($tgl[$i], "Y");
				$_SESSION[radio][statistik_kunjungan_radio][radioel_tick][$i] = @date("Y", @mktime(1, 1, 1, 1, 1, ($tgl_start_thn+$i)));
				$radioel_x[$i] = "Tahun";
				$where = " AND YEAR(lk.tgl_periksa) = YEAR('" . $tgl[$i] . "') ";
			}
			
			$sql = "
				SELECT
					COUNT(lk.id) as jml_baru
				FROM
					radio_kunjungan lk 
					JOIN pasien p ON (p.id = lk.pasien_id)
				WHERE
					DATE(lk.tgl_daftar) = DATE(p.tgl_daftar)
					$where
				";
			$kon->sql = $sql;
			$kon->execute();
			$baru[$i] = $kon->getOne();
			if(!$baru[$i][jml_baru]) $baru[$i][jml_baru] = 0;

			$sql = "
				SELECT
					COUNT(lk.id) as jml_lama
				FROM
					radio_kunjungan lk 
					JOIN pasien p ON (p.id = lk.pasien_id)
				WHERE
					DATE(lk.tgl_daftar) <> DATE(p.tgl_daftar)
					$where
				";
			$kon->sql = $sql;
			$kon->execute();
			$lama[$i] = $kon->getOne();
			if(!$lama[$i][jml_lama]) $lama[$i][jml_lama] = 0;

			//dari IRD
			$kon->sql = "
				SELECT
					COUNT(lk.id) as jml_igd
				FROM
					radio_kunjungan lk 
					JOIN pasien p ON (p.id = lk.pasien_id)
//.........这里部分代码省略.........
开发者ID:reekoheek,项目名称:srmis,代码行数:101,代码来源:statistik_kunjungan_radio.php

示例13: xajaxResponse

		}
		return $objResponse;
	}

	function reset_kamar () {
		$objResponse = new xajaxResponse();
		$objResponse->addClear("id_kamar", "value");
		$objResponse->addClear("nama", "value");
		$objResponse->addClear("pelayanan_id", "value");
		$objResponse->addClear("kelas", "value");
		$objResponse->addClear("jml_bed", "value");
		$objResponse->addScriptCall("fokus", "pelayanan_id");
		return $objResponse;
	}
}

$kon = new Konek;
$kon->sql = "SELECT * FROM pelayanan WHERE jenis = 'RAWAT INAP' ORDER BY nama";
$kon->execute();
$_data_pel = $kon->getAll();

//$_xajax->debugOn();
$_xajax->registerFunction(array("list_data", "Kamar", "list_data"));
$_xajax->registerFunction(array("get_kamar", "Kamar", "get_kamar"));
$_xajax->registerFunction(array("hapus_kamar", "Kamar", "hapus_kamar"));
$_xajax->registerFunction(array("simpan_kamar", "Kamar", "simpan_kamar"));
$_xajax->registerFunction(array("simpan_kamar_check", "Kamar", "simpan_kamar_check"));
$_xajax->registerFunction(array("reset_kamar", "Kamar", "reset_kamar"));

include AJAX_REF_DIR . "kunjungan.php";
?>
开发者ID:reekoheek,项目名称:srmis,代码行数:31,代码来源:kamar.php

示例14: tanggalIndo

	function get_pasien($val) {
		$tgl_start = @date("Y-m-d", @mktime(1,1,1,$val[tgl_periksa_bln_start], $val[tgl_periksa_tgl_start], $val[tgl_periksa_thn_start]));
		$tgl_end = @date("Y-m-d", @mktime(1,1,1,$val[tgl_periksa_bln_end], $val[tgl_periksa_tgl_end], $val[tgl_periksa_thn_end]));
		
		$title = "Statistik Kunjungan Berdasar Keadaan Keluar";
		
		unset($_SESSION[rekmed][statistik_kunjungan_semua_keadaan_keluar]);

		$kon = new Konek;
		if($val[jangka_waktu] == "hari") {
			$tanggal_awal = tanggalIndo($tgl_start, "j F Y");
			$tanggal_akhir = tanggalIndo($tgl_end, "j F Y");
			$_q .= "AND DATE(kk.tgl_daftar) BETWEEN '" . $tgl_start . "' AND '" . $tgl_end . "'";
		} elseif($val[jangka_waktu] == "bulan") {
			$tanggal_awal = tanggalIndo($tgl_start, "F Y");
			$tanggal_akhir = tanggalIndo($tgl_end, "F Y");
			$_q .= "AND EXTRACT(YEAR_MONTH FROM kk.tgl_daftar) BETWEEN EXTRACT(YEAR_MONTH FROM '" . $tgl_start . "') AND EXTRACT(YEAR_MONTH FROM '" . $tgl_end . "')";
		} else {
			$tanggal_awal = tanggalIndo($tgl_start, "Y");
			$tanggal_akhir = tanggalIndo($tgl_end, "Y");
			$_q .= "AND YEAR(kk.tgl_daftar) BETWEEN YEAR('" . $tgl_start . "') AND YEAR ('" . $tgl_end . "')";
		}

		$title .= "\nPeriode " . $tanggal_awal . " s.d. " . $tanggal_akhir;
		$_SESSION[rekmed][statistik_kunjungan_semua_keadaan_keluar][title] = $title;
		$sql = "
			SELECT
				k.keadaan_keluar as nama,
				COUNT(k.id) as jml
			FROM
				kunjungan k
				JOIN kunjungan_kamar kk ON (kk.kunjungan_id = k.id)
			WHERE
				keadaan_keluar IS NOT NULL
				$_q
			GROUP BY
				1
			ORDER BY 1
		";
		$kon->sql = $sql;
		$kon->execute();
		$data = $kon->getAll();
		$objResponse = new xajaxResponse();
		//$objResponse->addAssign("debug", "innerHTML", $sql);
		$table = new Table;
		$table->scroll = false;
		$table->addTh("No", "Keadaan Keluar", "Jumlah", "%");
		$table->addExtraTh(
			"style=\"width:50px\"",
			"style=\"width:200px\"",
			"",
			"style=\"width:70px\""
		);
		$table->addTh("1", "2", "3", "4");
		for($i=0;$i<sizeof($data);$i++) {
			$total = $total+$data[$i][jml];
		}
		for($i=0;$i<sizeof($data);$i++) {
			$persen = round($data[$i][jml]/$total * 100, 2);
			$table->addRow(($i+1), $data[$i][nama], $data[$i][jml], $persen);

			$_SESSION[rekmed][statistik_kunjungan_semua_keadaan_keluar][no][$i] = ($i+1);
			$_SESSION[rekmed][statistik_kunjungan_semua_keadaan_keluar][nama][$i] = $data[$i][nama];
			$_SESSION[rekmed][statistik_kunjungan_semua_keadaan_keluar][jml][$i] = $data[$i][jml];
			$_SESSION[rekmed][statistik_kunjungan_semua_keadaan_keluar][persen][$i] = $persen;
			$persen_total += $persen;
		}
		$_SESSION[rekmed][statistik_kunjungan_semua_keadaan_keluar][total] = $total;
		$_SESSION[rekmed][statistik_kunjungan_semua_keadaan_keluar][persen_total] = round($persen_total);
		$table->addRow("", "<b>Total</b>", $_SESSION[rekmed][statistik_kunjungan_semua_keadaan_keluar][total], $_SESSION[rekmed][statistik_kunjungan_semua_keadaan_keluar][persen_total]);
		$ret = $table->build();
		if(empty($_SESSION[rekmed][statistik_kunjungan_semua_keadaan_keluar][jml])) $_SESSION[rekmed][statistik_kunjungan_semua_keadaan_keluar][jml][0] = 1;
		if(empty($_SESSION[rekmed][statistik_kunjungan_semua_keadaan_keluar][nama]))	$_SESSION[rekmed][statistik_kunjungan_semua_keadaan_keluar][nama][0] = "No Data";
		

		$objResponse->addAssign("list_data", "innerHTML", $ret);
		$objResponse->addAssign("title", "innerHTML", nl2br($_SESSION[rekmed][statistik_kunjungan_semua_keadaan_keluar][title]));
		$_SESSION[rekmed][statistik_kunjungan_semua_keadaan_keluar][graph] = "<img src=\"" . URL . "rekmed/statistik_kunjungan_semua_keadaan_keluar_graph_pie/?md5=".md5(date("Ymdhis"))."\" alt=\"Pasien\" />";
		$objResponse->addAssign("graph", "innerHTML", $_SESSION[rekmed][statistik_kunjungan_semua_keadaan_keluar][graph]);
		return $objResponse;
	}
开发者ID:reekoheek,项目名称:srmis,代码行数:81,代码来源:statistik_kunjungan_semua_keadaan_keluar.php

示例15:

			if($i % 2 == 0) {
				$table->Th[1][] = "Masuk";
			} else {
				$table->Th[1][] = "Keluar";
			}
			$table->Th[2][] = ($i+1);		
		}
		$ret = $table->build();

		$_SESSION[ranap][statistik_kunjungan_ranap][th_0] = $table->Th[0];
		$_SESSION[ranap][statistik_kunjungan_ranap][th_1] = $table->Th[1];
		$_SESSION[ranap][statistik_kunjungan_ranap][extra_th_0] = $table->extra_th[0];
		$_SESSION[ranap][statistik_kunjungan_ranap][row] = $table->Row[0];
		
		$objResponse->addAssign("list_data", "innerHTML", $ret);
		$_SESSION[ranap][statistik_kunjungan_ranap][graph] = "<img src=\"" . URL . "ranap/statistik_kunjungan_ranap_graph_bar/?md5=".md5(date("Ymdhis"))."\" alt=\"Kunjungan\" />";
		$_SESSION[ranap][statistik_kunjungan_ranap][title] = $title;
		$objResponse->addAssign("title", "innerHTML", nl2br($_SESSION[ranap][statistik_kunjungan_ranap][title]));
		$objResponse->addAssign("graph", "innerHTML", $_SESSION[ranap][statistik_kunjungan_ranap][graph]);
		return $objResponse;
	}

}
$kon = new Konek;
$kon->sql = "SELECT id, nama FROM pelayanan WHERE jenis = 'RAWAT INAP' ORDER BY nama";
$kon->execute();
$data_poli = $kon->getAll();

$_xajax->registerFunction(array("get_kunjungan", "Statistik_Kunjungan_Rawat_Inap", "get_kunjungan"));
$_xajax->registerFunction(array("get_kunjungan_check", "Statistik_Kunjungan_Rawat_Inap", "get_kunjungan_check"));
?>
开发者ID:reekoheek,项目名称:srmis,代码行数:31,代码来源:statistik_kunjungan_ranap.php


注:本文中的Konek::getAll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。