• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Konek类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: simpan_tracer_check

	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: simpan_perujuk

	function simpan_perujuk($value) {
		$kon = new Konek;
		if(!$value['id_perujuk'])
			$kon->sql = "INSERT INTO ref_perujuk(nama, alamat) VALUES ('".$value[nama]."', '".$value[alamat]."')";
		else 
			$kon->sql = "UPDATE ref_perujuk SET nama = '".$value[nama]."', alamat = '".$value[alamat]."' WHERE id = '".$value[id_perujuk]."'";
		$kon->execute();
		$objResponse = new xajaxResponse();
		$objResponse->addScriptCall("show_status_simpan");
		$objResponse->addScriptCall("xajax_reset_perujuk");
		$objResponse->addScriptCall("xajax_list_data");
		return $objResponse;
	}
开发者ID:reekoheek,项目名称:srmis,代码行数:13,代码来源:perujuk.php


示例3: simpan_bhp

	function simpan_bhp($value) {
		$kon = new Konek;
		if(!$value['id_bhp'])
			$kon->sql = "INSERT INTO bhp(nama, biaya) VALUES ('".$value[nama]."', '".$value[biaya]."')";
		else 
			$kon->sql = "UPDATE bhp SET nama = '".$value[nama]."', biaya = '".$value[biaya]."' WHERE id = '".$value[id_bhp]."'";
		$kon->execute();
		$objResponse = new xajaxResponse();
		$objResponse->addScriptCall("show_status_simpan");
		$objResponse->addScriptCall("xajax_list_data", $_SESSION[setting_bhp][hal]);
		$objResponse->addScriptCall("xajax_reset_bhp");
		return $objResponse;
	}
开发者ID:reekoheek,项目名称:srmis,代码行数:13,代码来源:bhp.php


示例4: simpan_pendidikan

	function simpan_pendidikan($value) {
		$kon = new Konek;
		if(!$value['id_pendidikan'])
			$kon->sql = "INSERT INTO ref_pendidikan(nama) VALUES ('".$value[nama]."')";
		else 
			$kon->sql = "UPDATE ref_pendidikan SET nama = '".$value[nama]."' WHERE id = '".$value[id_pendidikan]."'";
		$kon->execute();
		$objResponse = new xajaxResponse();
		$objResponse->addScriptCall("show_status_simpan");
		$objResponse->addAssign("id_pendidikan", "value", "");
		$objResponse->addAssign("nama", "value", "");
		$objResponse->addScriptCall("xajax_list_data", $_SESSION[hal]);
		$objResponse->addScriptCall("fokus", "nama");
		return $objResponse;
	}
开发者ID:reekoheek,项目名称:srmis,代码行数:15,代码来源:pendidikan.php


示例5: get_bed

    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


示例6: getKarcis

      function getKarcis($id = null) {
         if(!$id) $id = $this->id;
         $kon = new Konek;
         $kon->sql = "
				SELECT
					k.pasien_id as pasien_id,
					k.kunjungan_id as kunjungan_id,
					kk.id as kunjungan_kamar_id,
					kkk.id as kunjungan_karcis_id,
					kkk.kwitansi_id as kwitansi_id,
					kw.tgl as tgl_kwitansi,
					kar.id as karcis_id,
					kar.nama as nama,
					kkk.jumlah as jumlah,
					kkk.biaya as biaya,
					kkk.bayar as bayar
				FROM
					kunjungan_kamar_karcis kkk
					JOIN karcis kar ON (kar.id = kkk.karcis_id)
					JOIN kwitansi kw ON (kw.id = kkk.kwitansi_id)
					JOIN kunjungan_kamar kk ON (kk.id = kkk.kunjungan_kamar_id)
					JOIN kunjungan k ON (k.id = kk.kunjungan_id)
				WHERE
					kkk.kwitansi_id = '".$id."'
				GROUP BY
					kkk.id ";
         $kon->execute();
         $data = $kon->getAll();
         $this->pasien_id = $data[0][pasien_id];
         return $data;
      }
开发者ID:reekoheek,项目名称:srmis,代码行数:31,代码来源:kwitansi.php


示例7: buka_langsung_bayar

	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


示例8: get_pasien

	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


示例9: simpan_kecamatan

	function simpan_kecamatan($value) {
		$kon = new Konek;
		if(!$value['id_kecamatan']) {
			$sql = "INSERT INTO ref_kecamatan(kabupaten_id, nama) VALUES ('".$value[kabupaten_id]."', '".$value[nama]."')";
			$kon->sql = $sql;
		} else {
			$sql = "UPDATE ref_kecamatan SET kabupaten_id = '".$value[kabupaten_id]."', nama = '".$value[nama]."' WHERE id = '".$value[id_kecamatan]."'";
			$kon->sql = $sql;
		}
		$kon->execute();
		$objResponse = new xajaxResponse();
		$objResponse->addScriptCall("show_status_simpan");
		$objResponse->addScriptCall("xajax_reset_kecamatan");
		$objResponse->addScriptCall("show_this_only", $_SESSION[setting_kecamatan][hal]);
		$objResponse->addScriptCall("fokus", "nama");
		return $objResponse;
	}
开发者ID:reekoheek,项目名称:srmis,代码行数:17,代码来源:kecamatan.php


示例10: get_no_antrian

      function get_no_antrian($val) {
         $tgl_periksa = $val[tgl_periksa_thn]."-".$val[tgl_periksa_bln]."-".$val[tgl_periksa_tgl];
         if($val[dokter_id]) $s = " AND dokter_id = '".$val[dokter_id]."' ";
         else $s = " AND dokter_id IS NULL ";
         $kon = new Konek;
         $sql = "
				SELECT
					CASE
						WHEN (MAX(no_antrian) IS NULL) THEN '1'
						ELSE (MAX(no_antrian) + 1)
					END AS no_antrian
				FROM
					kunjungan_kamar
				WHERE
					kamar_id = '".$val[kamar_id]."'
					AND DATE(tgl_periksa) = '".$tgl_periksa."'
					$s
			";
         $kon->sql = $sql;
         $kon->execute();
         $data = $kon->getOne();
         $objResponse = new xajaxResponse;
         $objResponse->addClear("tr_no_antrian", "style.display");
         $objResponse->addAssign("div_no_antrian", "innerHTML", $data[no_antrian]);
         $objResponse->addAssign("no_antrian", "value", $data[no_antrian]);
         return $objResponse;
      }
开发者ID:reekoheek,项目名称:srmis,代码行数:27,代码来源:rajal.php


示例11: get_pasien

	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


示例12: list_data

	function list_data($val) {
		unset($_SESSION[igd][pendapatan]);
		//get data karcis dan BHP
		$objResponse = new xajaxResponse;
		$kon = new Konek;
		$title = "Laporan Pembagian Jasa IRD";
		if($val[jangka_waktu] == "tahun") {
			$q = "AND YEAR(kw.tgl) BETWEEN '".$val[thn_start]."' AND '".$val[thn_end]."'";
			$title .= "\nPeriode " . $val[thn_start] . " - " . $val[thn_end];
		} elseif($val[jangka_waktu] == "bulan") {
			$q = "AND EXTRACT(YEAR_MONTH FROM kw.tgl) BETWEEN '".$val[thn_start].$val[bln_start]."' AND '".$val[thn_end].$val[bln_end]."'";
			$title .= "\nPeriode " . bulanIndo($val[bln_start], "F") . " " . $val[thn_start] . " - " . bulanIndo($val[bln_end], "F") . " " . $val[thn_end];
		} else {
			$q = "AND DATE(kw.tgl) BETWEEN '".$val[thn_start]."-".$val[bln_start]."-".$val[tgl_start]."' AND '".$val[thn_end]."-".$val[bln_end]."-".$val[tgl_end]."'";
			$title .= "\nPeriode " . tanggalIndo($val[thn_start] . "-" . $val[bln_start] . "-" . $val[tgl_start], "j F Y") . " - " . tanggalIndo($val[thn_end] . "-" . $val[bln_end] . "-" . $val[tgl_end], "j F Y");
		}
		$sql = "
			SELECT
				kb.nama as nama,
				hak.nama as nama_hak,
				SUM(ROUND(kb.mampu_bayar_bhp * bhp_p)) as bhp_p,
				SUM(ROUND(kb.mampu_bayar_bhp * bhp_rs_adm)) as bhp_rs_adm,
				SUM(ROUND(kb.mampu_bayar_bhp * bhp_rs_op)) as bhp_rs_op,
				SUM(ROUND(kb.mampu_bayar_jasa * jasa_p)) as jasa_p,
				SUM(ROUND(kb.mampu_bayar_jasa * jasa_rs_adm)) as jasa_rs_adm,
				SUM(ROUND(kb.mampu_bayar_jasa * jasa_rs_sdm)) as jasa_rs_sdm,
				SUM(ROUND(kb.mampu_bayar_jasa * jasa_rs_kembang)) as jasa_rs_kembang,
				SUM(ROUND(kb.mampu_bayar_jasa * jasa_rs_op)) as jasa_rs_op,

				SUM(ROUND(kb.mampu_bayar_jasa * spesialis * netto)) as spesialis,
				SUM(ROUND(kb.mampu_bayar_jasa * spesialis_pendamping * netto)) as spesialis_pendamping,
				SUM(ROUND(kb.mampu_bayar_jasa * perawat_perinatologi * netto)) as perawat_perinatologi,
				SUM(ROUND(kb.mampu_bayar_jasa * dr_umum * netto)) as dr_umum,
				SUM(ROUND(kb.mampu_bayar_jasa * dr_gigi * netto)) as dr_gigi,
				SUM(ROUND(kb.mampu_bayar_jasa * assisten_non_dokter * netto)) as assisten_non_dokter,
				SUM(ROUND(kb.mampu_bayar_jasa * spesialis_anestesi * netto)) as spesialis_anestesi,
				SUM(ROUND(kb.mampu_bayar_jasa * aknest * netto)) as aknest,
				SUM(ROUND(kb.mampu_bayar_jasa * gizi * netto)) as gizi,
				SUM(ROUND(kb.mampu_bayar_jasa * fisioterapi * netto)) as fisioterapi,
				SUM(ROUND(kb.mampu_bayar_jasa * analis_pa * netto)) as analis_pa,
				SUM(ROUND(kb.mampu_bayar_jasa * bidan * netto)) as bidan,
				SUM(ROUND(kb.mampu_bayar_jasa * perawat * netto)) as perawat,
				SUM(ROUND(kb.mampu_bayar_jasa * penunjang * netto)) as penunjang,
				SUM(ROUND(kb.mampu_bayar_jasa * ugp * netto)) as ugp,
				SUM(ROUND(kb.mampu_bayar_jasa * grabaf * netto)) as grabaf,
				SUM(ROUND(kb.mampu_bayar_jasa * zakat * netto)) as zakat,
				SUM(ROUND(pajak * (kb.mampu_bayar_jasa - kb.mampu_bayar_jasa * kb.jasa_p - kb.mampu_bayar_jasa * kb.jasa_rs_op - kb.mampu_bayar_jasa * kb.jasa_rs_kembang - kb.mampu_bayar_jasa * kb.jasa_rs_adm - kb.mampu_bayar_jasa * kb.jasa_rs_sdm))) as pajak,
				SUM(kb.mampu_bayar_bhp+kb.mampu_bayar_jasa) as mampu_bayar
			FROM
				kunjungan_bayar kb
				JOIN kunjungan_kamar kk ON (kk.id = kb.kunjungan_kamar_id)
				JOIN hak ON (hak.id = kb.hak_id)
				JOIN kwitansi kw ON (kw.id = kb.kwid)
			WHERE
				(kb.karcis_id IS NOT NULL OR kb.bhp_id IS NOT NULL)
				AND kw.tempat_pembayaran = 'IRD'
				$q
			GROUP BY
				kb.karcis_id, kb.bhp_id, kb.hak_id
		";
		//$objResponse->addAssign("debug", "innerHTML", nl2br($sql));
		$kon->sql = $sql;
		$kon->execute();
		$data_karcis = $kon->getAll();

		$table = new Table;
		$table->anime_bg_color = false;
		$table->addTh("Jasa", "Pemilik", "BHP", "JASA RS", "Sp", "Sp1", "SpAn", "UGP", "GRABAF", "Prwt", /*"Ass Non Dokter", "Aknest", "Gizi", "Fisio", "Analis PA", "Bidan", */"Pnjg", "Zakat", "Pajak", "Sub Total");
		$table->addExtraTh("rowspan=\"2\"", "rowspan=\"2\"", "colspan=\"5\"", "colspan=\"5\"", "rowspan=\"2\"", "rowspan=\"2\"", "rowspan=\"2\"", "rowspan=\"2\"", "rowspan=\"2\"", "rowspan=\"2\"", "rowspan=\"2\"", "rowspan=\"2\"", "rowspan=\"2\"", "rowspan=\"2\"", "rowspan=\"2\"", "rowspan=\"2\"", "rowspan=\"2\"", "rowspan=\"2\"", "rowspan=\"2\"", "rowspan=\"2\"");
		$table->addTh("Pemda", "Adm", "Op", "Rad", "Lab", "Pemda", "Adm", "Sdm", "Bang", "Op");
		for($i=0;$i<sizeof($data_karcis);$i++) {
			$table->addRow(
				$data_karcis[$i][nama], 
				$data_karcis[$i][nama_hak],
				$data_karcis[$i][bhp_p],
				$data_karcis[$i][bhp_rs_adm],
				$data_karcis[$i][bhp_rs_op],
				"?",
				"?",
				uangIndo($data_karcis[$i][jasa_p], false),
				uangIndo($data_karcis[$i][jasa_rs_adm], false),
				uangIndo($data_karcis[$i][jasa_rs_sdm], false),
				uangIndo($data_karcis[$i][jasa_rs_kembang], false),
				uangIndo($data_karcis[$i][jasa_rs_op], false),

				uangIndo($data_karcis[$i][spesialis], false),
				uangIndo($data_karcis[$i][spesialis_pendamping], false),
				uangIndo($data_karcis[$i][spesialis_anestesi], false),
				//uangIndo($data_karcis[$i][dr_umum] + $data_karcis[$i][dr_gigi] + $data_karcis[$i][ugp], false),
				uangIndo($data_karcis[$i][ugp], false),
				uangIndo($data_karcis[$i][grabaf], false),
				//uangIndo($data_karcis[$i][perawat] + $data_karcis[$i][perawat_perinatologi], false),
				uangIndo($data_karcis[$i][perawat], false),
				/*uangIndo($data_karcis[$i][assisten_non_dokter], false),
				uangIndo($data_karcis[$i][aknest], false),
				uangIndo($data_karcis[$i][gizi], false),
				uangIndo($data_karcis[$i][fisioterapi], false),
				uangIndo($data_karcis[$i][analis_pa], false),
				uangIndo($data_karcis[$i][bidan], false),*/
				uangIndo($data_karcis[$i][penunjang], false),
//.........这里部分代码省略.........
开发者ID:reekoheek,项目名称:srmis,代码行数:101,代码来源:bagi_jasa.php


示例13: daftar_penunjang

	function daftar_penunjang($val) {
		$kon = new Konek;
		$objResponse = new xajaxResponse;
		if($val[dp_lab] == "1") {
			$sql = "
			INSERT INTO lab_kunjungan(
				pasien_id, 
				kunjungan_kamar_id, 
				kelas, 
				tgl_daftar, 
				tgl_periksa, 
				pengirim, 
				cara_masuk, 
				cara_bayar, 
				jenis_askes, 
				perusahaan_id, 
				nomor, 
				pj_nama, 
				pj_alamat, 
				pj_telp, 
				pj_hubungan_keluarga) 
			SELECT 
				k.pasien_id,
				kk.id,
				kmr.kelas,
				NOW(),
				NOW(),
				'".$val[dp_pengirim]."',
				'IGD',
				kk.cara_bayar,
				kk.jenis_askes,
				kk.perusahaan_id,
				kk.nomor,
				kk.pj_nama, 
				kk.pj_alamat, 
				kk.pj_telp, 
				kk.pj_hubungan_keluarga
			FROM
				kunjungan k
				JOIN kunjungan_kamar kk ON (kk.kunjungan_id = k.id)
				JOIN kamar kmr ON (kmr.id = kk.kamar_id)
			WHERE
				kk.id = '".$val[dp_idkk]."'
			";
			$kon->sql = $sql;
			$kon->execute();
		}
		if($val[dp_radio] == "1") {
			$sql = "
			INSERT INTO radio_kunjungan(
				pasien_id, 
				kunjungan_kamar_id, 
				kelas, 
				tgl_daftar, 
				tgl_periksa, 
				pengirim, 
				cara_masuk, 
				cara_bayar, 
				jenis_askes, 
				perusahaan_id, 
				nomor, 
				pj_nama, 
				pj_alamat, 
				pj_telp, 
				pj_hubungan_keluarga) 
			SELECT 
				k.pasien_id,
				kk.id,
				kmr.kelas,
				NOW(),
				NOW(),
				'".$val[dp_pengirim]."',
				'IGD',
				kk.cara_bayar,
				kk.jenis_askes,
				kk.perusahaan_id,
				kk.nomor,
				kk.pj_nama, 
				kk.pj_alamat, 
				kk.pj_telp, 
				kk.pj_hubungan_keluarga
			FROM
				kunjungan k
				JOIN kunjungan_kamar kk ON (kk.kunjungan_id = k.id)
				JOIN kamar kmr ON (kmr.id = kk.kamar_id)
			WHERE
				kk.id = '".$val[dp_idkk]."'
			";
			$kon->sql = $sql;
			$kon->execute();
		}
		if($val[dp_radio] == "1") {
			$sql = "
			INSERT INTO radio_kunjungan(
				pasien_id, 
				kunjungan_kamar_id, 
				kelas, 
				tgl_daftar, 
				tgl_periksa, 
				pengirim, 
//.........这里部分代码省略.........
开发者ID:reekoheek,项目名称:srmis,代码行数:101,代码来源:kunjungan.php


示例14: simpan_kamar

	function simpan_kamar($value) {
		$kon = new Konek;
		if(!$value['id_kamar'])
			$sql = "INSERT INTO kamar(pelayanan_id, kelas, nama, jml_bed,tarif_umum,tarif_asuransi,no_kamar) VALUES ('".$value[pelayanan_id]."', '".$value[kelas]."', '".$value[nama]."', NULLIF('".$value[jml_bed]."', ''),NULLIF('".$value[tarif_umum]."', ''),NULLIF('".$value[tarif_asuransi]."', ''),NULLIF('".$value[no_kamar]."', ''))";
		else 
			$sql = "UPDATE kamar SET pelayanan_id = '".$value[pelayanan_id]."', kelas = '".$value[kelas]."', nama = '".$value[nama]."', jml_bed = NULLIF('".$value[jml_bed]."', ''), tarif_umum = NULLIF('".$value[tarif_umum]."', ''), tarif_asuransi = NULLIF('".$value[tarif_asuransi]."', ''),no_kamar=NULLIF('".$value[no_kamar]."', '') WHERE id = '".$value[id_kamar]."'";
		$kon->sql = $sql;
		$kon->execute();
		$objResponse = new xajaxResponse();
		//$objResponse->addAssign('debug', 'innerHTML', $sql);
		$objResponse->addScriptCall("show_status_simpan");
		$objResponse->addScriptCall("xajax_list_data", $_SESSION[modul_setting][kamar][hal]);
		//panggil sidebar bangsal
		$objResponse->addScriptCall("xajax_info_get_kamar_kosong");
		$objResponse->addScriptCall("xajax_reset_kamar");
		return $objResponse;
	}
开发者ID:reekoheek,项目名称:srmis,代码行数:17,代码来源:kamar.php


示例15: hapus_kunjungan_bayar

	function hapus_kunjungan_bayar($id) {
		$kon = new Konek;
		$objResponse = new xajaxResponse;
		$kon->sql = "DELETE FROM kunjungan_bayar WHERE id = '".$id."'";
		$kon->execute();
		return $objResponse;
	}
开发者ID:reekoheek,项目名称:srmis,代码行数:7,代码来源:kunjungan.modal.php


示例16: simpan_karcis

	function simpan_karcis($value) {
		$kon = new Konek;
		if(!$value['id_karcis']) {
			$sql = "
			INSERT INTO 
				karcis(
					nama,
					jenis,
					kelas, 
					biaya_bhp, 
					biaya_jasa, 
					bhp_p, 
					bhp_rs, 
					bhp_rs_adm, 
					bhp_rs_op, 
					jasa_p, 
					jasa_rs, 
					jasa_rs_op, 
					jasa_rs_kembang, 
					jasa_rs_adm, 
					jasa_rs_sdm, 
					spesialis, 
					spesialis_pendamping, 
					ugp, 
					grabaf, 
					perawat, 
					penunjang, 
					zakat, 
					pajak, 
					netto

				) 
			VALUES (
					'".$value[nama]."',
					'".$value[jenis]."',
					'".$value[kelas]."', 
					'".$value[biaya_bhp]."', 
					'".$value[biaya_jasa]."', 
					'".$value[bhp_p]."', 
					'".$value[bhp_rs]."', 
					'".$value[bhp_rs_adm]."', 
					'".$value[bhp_rs_op]."', 
					'".$value[jasa_p]."', 
					'".$value[jasa_rs]."', 
					'".$value[jasa_rs_op]."', 
					'".$value[jasa_rs_kembang]."', 
					'".$value[jasa_rs_adm]."', 
					'".$value[jasa_rs_sdm]."', 
					'".$value[spesialis]."', 
					'".$value[spesialis_pendamping]."', 
					'".$value[ugp]."', 
					'".$value[grabaf]."', 
					'".$value[perawat]."', 
					'".$value[penunjang]."', 
					'".$value[zakat]."', 
					'".$value[pajak]."', 
					'".$value[netto]."'
			)
			";
		} else {
			$sql = "
			UPDATE 
				karcis 
			SET 
				nama = '".$value[nama]."',
				jenis =	'".$value[jenis]."',
				kelas =	'".$value[kelas]."', 
				biaya_bhp = '".$value[biaya_bhp]."', 
				biaya_jasa = '".$value[biaya_jasa]."', 
				bhp_p = '".$value[bhp_p]."', 
				bhp_rs	= '".$value[bhp_rs]."', 
				bhp_rs_adm	= '".$value[bhp_rs_adm]."', 
				bhp_rs_op	= '".$value[bhp_rs_op]."', 
				jasa_p	= '".$value[jasa_p]."', 
				jasa_rs	= '".$value[jasa_rs]."', 
				jasa_rs_op	= '".$value[jasa_rs_op]."', 
				jasa_rs_kembang	= '".$value[jasa_rs_kembang]."', 
				jasa_rs_adm	= '".$value[jasa_rs_adm]."', 
				jasa_rs_sdm	= '".$value[jasa_rs_sdm]."', 
				spesialis	= '".$value[spesialis]."', 
				spesialis_pendamping	= '".$value[spesialis_pendamping]."', 
				ugp	= '".$value[ugp]."', 
				grabaf	= '".$value[grabaf]."', 
				perawat	= '".$value[perawat]."', 
				penunjang	= '".$value[penunjang]."', 
				zakat	= '".$value[zakat]."', 
				pajak	= '".$value[pajak]."', 
				netto	= '".$value[netto]."'
			WHERE 
				id = '".$value[id_karcis]."'
			";
		}
		$kon->sql = $sql;
		$kon->execute();
		$objResponse = new xajaxResponse();
		//$objResponse->addAssign("debug", "innerHTML", $sql);
		$objResponse->addScriptCall("show_status_simpan");
		$objResponse->addScriptCall("xajax_list_data", $_SESSION[setting_karcis][hal]);
		$objResponse->addScriptCall("xajax_reset_karcis");
		return $objResponse;
//.........这里部分代码省略.........
开发者ID:reekoheek,项目名称:srmis,代码行数:101,代码来源:karcis.php


示例17: get_desa

      function get_desa($id_kecamatan, $id_sel = null) {
         $kon = new Konek;
         $kon->sql = "
				SELECT
					id,
					nama
				FROM
					ref_desa
				WHERE
					kecamatan_id = '".$id_kecamatan."'
				ORDER BY
					nama
			";
         $kon->execute();
         $data = $kon->getAll();
         $objResponse = new xajaxResponse();
         $objResponse->addAssign("cari_desa_id", "options.length", "1");
         for($i = 0; $i < sizeof($data); $i++) {
            if($data[$i][id] == $id_sel) {
               $objResponse->addScript("addOption('cari_desa_id','desa_".$data[$i][id]."','".$data[$i][nama].
                  "','".$data[$i][id]."',false,true);");
            } else {
               $objResponse->addScript("addOption('cari_desa_id','desa_".$data[$i][id]."','".$data[$i][nama].
                  "','".$data[$i][id]."',false,false);");
            }
         }
         //$objResponse->addScript("addOption('desa_id','add_desa','--- TAMBAH KELURAHAN ---','add_desa');");
         return $objResponse;
      }
开发者ID:reekoheek,项目名称:srmis,代码行数:29,代码来源:sub.pencarian.php


示例18: simpan_pasien

      function simpan_pasien($value) {
      	 global $last_id;
         $objResponse = new xajaxResponse();
         $kon = new Konek;
         if(!$value['id_pasien']) {
            if(!$value['id']) {
               $sql = "
						INSERT INTO pasien(
							nama,
							tempat_lahir,
							tgl_lahir,
							gol_darah,
							sex,
							agama,
							pendidikan_id,
							pekerjaan_id,
							status_nikah,
							alamat,
							rt,
							rw,
							desa_id,
							telp,
							tgl_daftar,
                            nama_ayah,
                            nama_ibu,
                            nama_suami,
                            nama_istri,
                            no_ktp_sim,
                            created_datetime,
                            created_user,                           
                            kode_petugas
							)
						VALUES (
							'".$value[nama]."',
							'".$value[tempat_lahir]."',
							'".$value[tgl_lahir_thn]."-".$value[tgl_lahir_bln]."-".$value[tgl_lahir_tgl].
                  "',
							NULLIF('".$value[gol_darah_id]."',''),
							'".$value[sex]."',
							'".$value[agama]."',
							'".$value[pendidikan_id]."',
							'".$value[pekerjaan_id]."',
							'".$value[status_nikah]."',
							'".$value[alamat]."',
							'".$value[rt]."',
							'".$value[rw]."',
							'".$value[desa_id]."',
							'".$value[telp]."',
							NOW(),
                            '".$value[nama_ayah]."',
                            '".$value[nama_ibu]."',
                            '".$value[nama_suami]."',
                            '".$value[nama_istri]."',
                            '".$value[no_ktp_sim]."',
                             NOW(),
                            '".$_SESSION[username]."',
                            '".$value[nama_petugas] 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Kronolith类代码示例发布时间:2022-05-23
下一篇:
PHP Komento类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap