673 lines
35 KiB
PHP
673 lines
35 KiB
PHP
<?php
|
|
// GET PROVINSI
|
|
$ss = $db->query('SELECT * from m_provinsi order by idprovinsi ASC');
|
|
$opsi_provinsi = '<select name="KDPROVINSI" class="form-control text" style="width:100%" id="KDPROVINSI" onchange="propinsi_change()"> <option value=""> --pilih-- </option>';
|
|
$KDPROVINSI = (array_key_exists('KDPROVINSI', $_GET)) ? $_GET['KDPROVINSI'] : null;
|
|
foreach($ss->fetchAll() as $ds){
|
|
if($KDPROVINSI == $ds['idprovinsi']): $sel = "selected=Selected"; else: $sel = ''; endif;
|
|
$opsi_provinsi .= '<option value="'.$ds['idprovinsi'].'"> '.$ds['namaprovinsi'].'</option>';
|
|
}
|
|
$opsi_provinsi .= '</select>';
|
|
if($KDPROVINSI != null){
|
|
$ss = $db->query('SELECT * from m_kota where idprovinsi = '.$KDPROVINSI.' order by idkota ASC');
|
|
$KOTA = (array_key_exists('KOTA', $_GET)) ? $_GET['KOTA'] : null;
|
|
$opsi_kota = '<select name="KOTA" class="form-control text" style="width:100%" id="KOTA" > <option value=""> --pilih-- </option>';
|
|
foreach($ss->fetchAll() as $ds){
|
|
if($_GET['KOTA'] == $ds['idkota']): $sel = "selected=Selected"; else: $sel = ''; endif;
|
|
$opsi_kota .= '<option value="'.$ds['idkota'].'" '.$sel.' > '.$ds['namakota'].'</option>';
|
|
}
|
|
$opsi_kota .= '</select>';
|
|
}
|
|
if($KOTA != null){
|
|
$ss = $db->query('SELECT * from m_kecamatan where idkota = '.$KOTA.' order by idkecamatan ASC');
|
|
$opsi_kecamatan = '<select name="KDKECAMATAN" class="form-control text" style="width:100%" id="KDKECAMATAN" > <option value=""> --pilih-- </option>';
|
|
$KDKECAMATAN = (array_key_exists('KDKECAMATAN', $_GET)) ? $_GET['KDKECAMATAN'] : null;
|
|
foreach($ss->fetchAll() as $ds){
|
|
if($KDKECAMATAN == $ds['idkecamatan']): $sel = "selected=Selected"; else: $sel = ''; endif;
|
|
$opsi_kecamatan .= '<option value="'.$ds['idkecamatan'].'" '.$sel.' /> '.$ds['namakecamatan'].'</option>';
|
|
}
|
|
$opsi_kecamatan .= '</select>';
|
|
$js_opsi_kecamatan = preg_replace("/\"/","\\\"",$opsi_kecamatan);
|
|
}
|
|
if($KDKECAMATAN != null) {
|
|
$ss = $db->query('SELECT * from m_kelurahan where idkecamatan = '.$KDKECAMATAN.' order by idkelurahan ASC');
|
|
$opsi_kelurahan = '<select name="KELURAHAN" class="form-control text" style="width:100%" id="KELURAHAN" > <option value=""> --pilih-- </option>';
|
|
$KELURAHAN = (array_key_exists('KELURAHAN', $_GET)) ? $_GET['KELURAHAN'] : null;
|
|
foreach($ss->fetchAll() as $ds){
|
|
if($KELURAHAN == $ds['idkelurahan']): $sel = "selected=Selected"; else: $sel = ''; endif;
|
|
$opsi_kelurahan .= '<option value="'.$ds['idkelurahan'].'" '.$sel.' /> '.$ds['namakelurahan'].'</option>';
|
|
}
|
|
$opsi_kelurahan .= '</select>';
|
|
$js_opsi_kelurahan = preg_replace("/\"/","\\\"",$opsi_kelurahan);
|
|
}
|
|
// GET STATUS
|
|
$ss = $db->query('SELECT * from m_status_pasien order by id_status ASC');
|
|
$opsi_status = '';
|
|
foreach($ss->fetchAll() as $ds){
|
|
if((isset($m_pasien) && $m_pasien->STATUS == $ds['id_status']) || (array_key_exists('STATUS', $_GET) && $_GET['STATUS'] == $ds['id_status'])): $sel = "Checked"; else: $sel = ''; endif;
|
|
$opsi_status .= '<div class="form-check form-check-inline">
|
|
<input type="radio" name="STATUS" id="status_'.$ds['id_status'].'" title="*" class="form-check-input required" '.$sel.' value="'.$ds['id_status'].'">
|
|
<label class="form-check-label" for="status_'.$ds['id_status'].'"> '.$ds['nama_status'].'</label>
|
|
</div>';
|
|
}
|
|
|
|
// GET AGAMA
|
|
$ss = $db->query('SELECT * from m_agama_pasien order by id_agama ASC');
|
|
$input_agama_lain = '<input type="text" name="agama_lain" id="agama_lain" class="form-control" placeholder="Isikan Agama lainnya" style="display:none">';
|
|
foreach($ss->fetchAll() as $ds){
|
|
if((isset($m_pasien) && $m_pasien->AGAMA == $ds['id_agama']) || (array_key_exists('AGAMA', $_GET) && $_GET['AGAMA'] == $ds['id_agama'])): $sel = "Checked"; else: $sel = ''; endif;
|
|
$opsi_agama .= '<div class="form-check form-check-inline">
|
|
<input type="radio" name="AGAMA" id="AGAMA_'.$ds['id_agama'].'" title="*" class="form-check-input required" '.$sel.' value="'.$ds['id_agama'].'">
|
|
<label class="form-check-label" for="AGAMA_'.$ds['id_agama'].'"> '.$ds['nama_agama'].'</label>
|
|
</div>';
|
|
}
|
|
|
|
// GET PENDIDIKAN
|
|
$ss = $db->query('SELECT * from m_pendidikan_pasien order by id_pendidikan ASC');
|
|
$opsi_pendidikan = '';$arr_pendidikan = [];
|
|
foreach($ss->fetchAll() as $ds){
|
|
if((isset($m_pasien) && $m_pasien->PENDIDIKAN == $ds['id_pendidikan']) || (array_key_exists('PENDIDIKAN', $_GET) && $_GET['PENDIDIKAN'] == $ds['id_pendidikan'])): $sel = "Checked"; else: $sel = ''; endif;
|
|
$arr_pendidikan[$ds['id_pendidikan']] = $ds['nama_pendidikan'];
|
|
$opsi_pendidikan .= '<div class="form-check form-check-inline">
|
|
<input type="radio" name="PENDIDIKAN" id="PENDIDIKAN_'.$ds['id_pendidikan'].'" title="*" class="form-check-input required" '.$sel.' value="'.$ds['id_pendidikan'].'">
|
|
<label class="form-check-label" for="PENDIDIKAN_'.$ds['id_pendidikan'].'"> '.$ds['nama_pendidikan'].'</label>
|
|
</div>';
|
|
}
|
|
|
|
$ss = $db->query('SELECT * from m_bahasa order by IDXBAHASA ASC');
|
|
$opsi_bahasa = '<select name="bahasa" class="form-control text required" style="width:100%" id="bahasa" required> <option value=""> --pilih-- </option>';
|
|
$arr_bahasa = array(''=>'--pilih--');
|
|
$bahasa = (array_key_exists('bahasa', $_GET)) ? $_GET['bahasa'] : null;
|
|
foreach($ss->fetchAll() as $ds){
|
|
if($bahasa == $ds['nmbahasa']): $sel = "selected=Selected"; else: $sel = ''; endif;
|
|
$opsi_bahasa .= '<option value="'.$ds['nmbahasa'].'" '.$sel.' /> '.$ds['nmbahasa'].'</option>';
|
|
$arr_bahasa[$ds['nmbahasa']] = $ds['nmbahasa'];
|
|
}
|
|
$opsi_bahasa .= '</select>';
|
|
|
|
$ss = $db->query('SELECT * from m_suku order by IDXSUKU ASC');
|
|
$opsi_suku = '<select name="kebangsaan" class="form-control text required" style="width:100%" id="kebangsaan" required> <option value=""> --pilih-- </option>';
|
|
$arr_suku = array(''=>'--pilih--');
|
|
$kebangsaan = (array_key_exists('kebangsaan', $_GET)) ? $_GET['kebangsaan'] : null;
|
|
foreach($ss->fetchAll() as $ds){
|
|
if($kebangsaan == $ds['nmsuku']): $sel = "selected=Selected"; else: $sel = ''; endif;
|
|
$opsi_suku .= '<option value="'.$ds['nmsuku'].'" '.$sel.' /> '.$ds['nmsuku'].'</option>';
|
|
$arr_suku[$ds['nmsuku']] = $ds['nmsuku'];
|
|
}
|
|
$opsi_suku .= '</select>';
|
|
|
|
$ss = $db->query('SELECT * from m_pekerjaan order by IDXPEKERJAAN ASC');
|
|
$arr_pekerjaan = array(''=>'--pilih--');
|
|
$PEKERJAAN = (array_key_exists('PEKERJAAN', $_GET)) ? $_GET['PEKERJAAN'] : null;
|
|
foreach($ss->fetchAll() as $ds){
|
|
$arr_pekerjaan[$ds['nmpekerjaan']] = $ds['nmpekerjaan'];
|
|
}
|
|
|
|
$ss = $db->query('SELECT * from m_disabilitas');
|
|
$arr_disabilitas = array(''=>'--pilih--');
|
|
$DISABILITAS = (array_key_exists('DISABILITAS', $_GET)) ? $_GET['DISABILITAS'] : null;
|
|
foreach($ss->fetchAll() as $ds){
|
|
$arr_disabilitas[$ds['kode_disabilitas']] = $ds['nama_disabilitas'];
|
|
}
|
|
|
|
$ss = $db->query('SELECT * from m_hubunganpasien');
|
|
$arr_hubungan = array(''=>'--pilih--');
|
|
$hubungan_penanggungjawab = (array_key_exists('hubungan_penanggungjawab', $_GET)) ? $_GET['hubungan_penanggungjawab'] : null;
|
|
foreach($ss->fetchAll() as $ds){
|
|
$arr_hubungan[$ds['nama_hubpasien']] = $ds['nama_hubpasien'];
|
|
}
|
|
|
|
?>
|
|
<script language="JavaScript">
|
|
function propinsi_change() {
|
|
var selectValues = $("#KDPROVINSI").val();
|
|
var kotaHidden = $("#KOTAHIDDEN").val();
|
|
var kecHidden = $("#KECAMATANHIDDEN").val();
|
|
$.post('<?php echo _BASE_;?>include/ajaxload.php',{kdprov:selectValues, kdkota:kotaHidden, kdkec:kecHidden, load_kota:'true'},function(data){
|
|
$('#kotapilih').html(data);
|
|
$("#kotapilih select").select2();
|
|
$('#KOTA').val(kotaHidden).change();
|
|
v_status = $(".statuspasien:checked").val();
|
|
if(v_status == 0) {
|
|
$("select#KOTA").prop("disabled",false);
|
|
var kecHidden = $("#KECAMATANHIDDEN").val();
|
|
$.post('./include/ajaxload.php',{kdkota:kotaHidden,load_kecamatan:'true'},function(data){
|
|
$('#kecamatanpilih').html(data);
|
|
$('#kecamatanpilih select').select2();
|
|
$('#KDKECAMATAN').val(kecHidden).change();
|
|
$("select#KDKECAMATAN").prop("disabled",false);
|
|
var kelHidden = $("#KELURAHANHIDDEN").val();
|
|
$.post('./include/ajaxload.php',{kdkecamatan:kecHidden,load_kelurahan:'true'},function(data){
|
|
$('#kelurahanpilih').html(data);
|
|
$('#kelurahanpilih select').select2();
|
|
$('#KELURAHAN').val(kelHidden).change();
|
|
$("select#KELURAHAN").prop("disabled",false);
|
|
});
|
|
|
|
});
|
|
}
|
|
else {
|
|
$('#kecamatanpilih').html("<?php echo $js_opsi_kecamatan; ?>");
|
|
$('#kelurahanpilih').html("<?php echo $js_opsi_kelurahan; ?>");
|
|
}
|
|
|
|
});
|
|
}
|
|
$(document).ready(function(){
|
|
$("#KDPROVINSI").change(function(){
|
|
propinsi_change();
|
|
});
|
|
|
|
$('#CALLER').on('select2:select', function (e) {
|
|
var data = e.params.data;
|
|
if(data.id=="Tn") {
|
|
$("#JENISKELAMIN_L").attr("checked","checked");
|
|
$("#JENISKELAMIN_P").removeAttr("checked");
|
|
}
|
|
else if(data.id=="Ny" || data.id=="Nn") {
|
|
$("#JENISKELAMIN_P").attr("checked","checked");
|
|
$("#JENISKELAMIN_L").removeAttr("checked");
|
|
}
|
|
else {
|
|
$("#JENISKELAMIN_L").removeAttr("checked");
|
|
$("#JENISKELAMIN_P").removeAttr("checked");
|
|
}
|
|
});
|
|
|
|
$("#kebangsaan").on("change",function() {
|
|
kebangsaan = $(this).find(":selected").val();
|
|
if(kebangsaan == 'WNI') {
|
|
$("#suku").val("").trigger("change").prop("disabled",false);
|
|
}
|
|
else {
|
|
$("#suku").val("").trigger("change").prop("disabled",true);
|
|
}
|
|
});
|
|
});
|
|
</SCRIPT>
|
|
<?php
|
|
// recheck variable with notice
|
|
$caller = (array_key_exists('CALLER', $_GET)) ? $_GET['CALLER'] : null;
|
|
$tempat = (array_key_exists('TEMPAT', $_GET) && !empty($_GET['TEMPAT'])) ? $_GET['TEMPAT'] : ( (isset($m_pasien)) ? $m_pasien->TEMPAT : null) ;
|
|
$tgl_lahir = (array_key_exists('TGLLAHIR', $_GET) && !empty($_GET['TGLLAHIR'])) ? $_GET['TGLLAHIR'] : ( (isset($m_pasien)) ? date('d/m/Y', strtotime($m_pasien->TGLLAHIR)) : null) ;
|
|
$arr_kebangsaan = ['WNI'=>'WNI','WNA'=>'WNA'];
|
|
?>
|
|
<div id='msg'></div>
|
|
<div id="list_data"></div>
|
|
<fieldset class="fieldset">
|
|
<div class="card" id="identitas_pasien">
|
|
<div class="card-header"><h5>DATA PASIEN</h5></div>
|
|
<div class="card-body">
|
|
<div class="row text-left">
|
|
<div class="col-md-6">
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label" >No KTP </label>
|
|
<div class="col-sm-6">
|
|
<input class="mask-noktp form-control text" value="<?php echo (array_key_exists('NOKTP', $_GET) && !empty($_GET['NOKTP'])) ? $_GET['NOKTP'] : (isset($m_pasien) ? $m_pasien->NOKTP : null); ?>" type="text" name="NOKTP" id="NOKTP" size="25">
|
|
</div>
|
|
<div class="col-sm-2">
|
|
<input type="button" id="btnCariPeserta2" data-jenis="nik" class="btn btn-outline-secondary btn-block" value="Cari">
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label" style="text-align:left">Dokumen KTP</label>
|
|
<div class="col-sm-8">
|
|
<div class="input-group">
|
|
<div class="custom-file">
|
|
<input type="file" name="ktp_file" class="custom-file-input" id="ktp_file">
|
|
<label class="custom-file-label" for="ktp_file">Pilih File KTP</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4"> </div>
|
|
<div class="col-sm-8" id="ktp_wrapper"></div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label" style="text-align:left">Dokumen KK</label>
|
|
<div class="col-sm-8">
|
|
<div class="input-group">
|
|
<div class="custom-file">
|
|
<input type="file" name="kk_file" class="custom-file-input" id="kk_file">
|
|
<label class="custom-file-label" for="kk_file">Pilih File KK</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4"> </div>
|
|
<div class="col-sm-8" id="kk_wrapper"></div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label" >Nama Lengkap Pasien</label>
|
|
<div class="col-sm-8">
|
|
<div class="row">
|
|
<div class="col-md-8">
|
|
<span id="nam"><input title="*" class="form-control text required" type="text" name="NAMA" size="30" value="<?php echo (array_key_exists('NAMA', $_GET)) ? $_GET['NAMA'] : ''; ?>" id="NAMA" oninput="this.value = this.value.toUpperCase()"></span>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<select name="CALLER" class="form-control text" id="CALLER"><option selected="selected" value="">- Alias -</option><option value="Tn" <?php if($caller=="Tn") echo "selected=selected"; ?>> Tn </option><option value="Ny" <?php if($caller=="Ny") echo "selected=selected"; ?>> Ny </option><option value="Nn" <?php if($caller=="Nn") echo "selected=selected"; ?>> Nn </option><option value="An" <?php if($caller=="An") echo "selected=selected"; ?>> An </option><option value="By.Ny" <?php if($caller=="By.Ny") echo "selected=selected"; ?>> By.Ny. </option></select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label" >Tempat, Tanggal Lahir</label>
|
|
<div class="col-sm-8">
|
|
<div class="row">
|
|
<div class="col-md-8">
|
|
<input type="text" value="<?php echo $tempat; ?>" class="form-control text" title="*" name="TEMPAT" size="15" id="TEMPAT" placeholder="Tempat Lahir" oninput="this.value = this.value.toUpperCase()" required>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<input onblur="calage1(this.value,'umur');$('#umur').prop('readonly','true');" type="text" class="datepicker-lahir mask-date-lahir form-control text required" title="*" value="<?php echo $tgl_lahir; ?>" name="TGLLAHIR" id="TGLLAHIR" size="20" required>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label" >Umur </label>
|
|
<div class="col-sm-8">
|
|
<span id="umurc"><input class="form-control text" type="text" value="" name="umur" id="umur" size="45" readonly="true"></span>
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label" >Alamat Sekarang</label>
|
|
<div class="col-sm-8">
|
|
<input name="ALAMAT" id="ALAMAT" class="form-control text required" type="text" value="<?php echo (!empty($_GET['ALAMAT'])) ? $_GET['ALAMAT'] : null; ?>" title="*" size="45" oninput="this.value = this.value.toUpperCase()" >
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label" >Alamat KTP</label>
|
|
<div class="col-sm-8">
|
|
<input name="ALAMAT_KTP" class="form-control text" type="text" value="<?php echo (!empty($_GET['ALAMAT_KTP'])) ? $_GET['ALAMAT_KTP'] : null; ?>" size="45" id="ALAMAT_KTP" oninput="this.value = this.value.toUpperCase()" >
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label" >Bahasa</label>
|
|
<div class="col-sm-8" >
|
|
<?php echo form_dropdown('bahasa',$arr_bahasa,$bahasa,'class="form-control" id="bahasa"'); ?>
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label" >Kebangsaan</label>
|
|
<div class="col-sm-8" >
|
|
<?php echo form_dropdown('kebangsaan',$arr_kebangsaan,$kebangsaan,'class="form-control" id="kebangsaan"'); ?>
|
|
<?php echo form_dropdown('suku',$arr_suku,'','class="form-control m-2" id="suku"'); ?>
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label" >Provinsi</label>
|
|
<div class="col-sm-8" >
|
|
<div id="wrap_propinsi">
|
|
<?php echo $opsi_provinsi; ?>
|
|
</div>
|
|
<input value="<?php echo (array_key_exists('KOTA', $_GET) && !empty($_GET['KOTA'])) ? $_GET['KOTA'] : null; ?>" type="hidden" name="KOTAHIDDEN" id="KOTAHIDDEN">
|
|
<input value="<?php echo (array_key_exists('KECAMATAN', $_GET) && !empty($_GET['KECAMATAN'])) ? $_GET['KECAMATAN'] : null; ?>" type="hidden" name="KECAMATANHIDDEN" id="KECAMATANHIDDEN">
|
|
<input value="<?php echo (array_key_exists('KELURAHAN', $_GET) && !empty($_GET['KELURAHAN'])) ? $_GET['KELURAHAN'] : null; ?>" type="hidden" name="KELURAHANHIDDEN" id="KELURAHANHIDDEN">
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label" >Kabupaten / Kota</label>
|
|
<div class="col-sm-8" >
|
|
<div id="kotapilih"> <?php echo $opsi_kota; ?></div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label" >Kecamatan</label>
|
|
<div class="col-sm-8" >
|
|
<div id="kecamatanpilih"><?php echo $opsi_kecamatan; ?></div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label" >Kelurahan</label>
|
|
<div class="col-sm-8" >
|
|
|
|
<div id="kelurahanpilih"><?php echo $opsi_kelurahan; ?></div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label" >No Telepon / HP </label>
|
|
<div class="col-sm-8">
|
|
<input class="mask-telepon form-control text" value="<?php echo (array_key_exists('NOTELP', $_GET) && !empty($_GET['NOTELP'])) ? $_GET['NOTELP'] : (isset($m_pasien) ? $m_pasien->NOTELP : null); ?>" type="text" name="NOTELP" size="25" id="notelp">
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label" >No Telepon Rumah </label>
|
|
<div class="col-sm-8">
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<input class="mask-telepon form-control text" value="<?php echo (array_key_exists('notelprumah1', $_GET) && !empty($_GET['notelprumah1'])) ? $_GET['notelprumah1'] : (isset($m_pasien) ? $m_pasien->notelprumah1 : null); ?>" type="text" name="notelprumah1" size="25" id="notelprumah1" placeholder="Telepon Rumah 1">
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<input class="mask-telepon form-control text" value="<?php echo (array_key_exists('notelprumah2', $_GET) && !empty($_GET['notelprumah2'])) ? $_GET['notelprumah2'] : (isset($m_pasien) ? $m_pasien->notelprumah2 : null); ?>" type="text" name="notelprumah2" size="25" id="notelprumah2" placeholder="Telepon Rumah 2">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label" >No Telepon Kantor / HP </label>
|
|
<div class="col-sm-8">
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<input class="mask-telepon form-control text" value="<?php echo (array_key_exists('notelpkantor', $_GET) && !empty($_GET['notelpkantor'])) ? $_GET['notelpkantor'] : (isset($m_pasien) ? $m_pasien->notelpkantor : null); ?>" type="text" name="notelpkantor" size="25" id="notelpkantor" placeholder="Telepon Kantor">
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<input class="mask-telepon form-control text" value="<?php echo (array_key_exists('no_hp', $_GET) && !empty($_GET['no_hp'])) ? $_GET['no_hp'] : (isset($m_pasien) ? $m_pasien->no_hp : null); ?>" type="text" name="no_hp" size="25" id="no_hp" placeholder="HP">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label" >No SIM </label>
|
|
<div class="col-sm-8">
|
|
<input class="mask-noktp form-control text" value="<?php echo (array_key_exists('SIM', $_GET) && !empty($_GET['sim'])) ? $_GET['sim'] : (isset($m_pasien) ? $m_pasien->sim : null); ?>" type="text" name="sim" id="sim" size="25">
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label" >No PASPOR </label>
|
|
<div class="col-sm-8">
|
|
<input class="mask-paspor form-control text" value="<?php echo (array_key_exists('paspor', $_GET) && !empty($_GET['paspor'])) ? $_GET['paspor'] : (isset($m_pasien) ? $m_pasien->paspor : null); ?>" type="text" name="paspor" id="paspor" size="25">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<div class="form-group row">
|
|
<label class="col-form-label col-sm-4" >Isi Identitas Orangtua </label>
|
|
<div class="form-check form-check-inline">
|
|
<input type="radio" name="st_identitas_ortu" id="st_identitas_ortu_y" title="*" class="form-check-input st_identitas_ortu" value="1" checked="checked">
|
|
<label class="form-check-label" for="st_identitas_ortu_y"> Ya </label>
|
|
</div>
|
|
<div class="form-check form-check-inline">
|
|
<input type="radio" name="st_identitas_ortu" id="st_identitas_ortu_t" title="*" class="form-check-input st_identitas_ortu" value="0">
|
|
<label class="form-check-label" for="st_identitas_ortu_t"> Tidak </label>
|
|
</div>
|
|
</div>
|
|
<div id="wrapper_identitas_orangtua">
|
|
<div class="form-group row" >
|
|
<label class="col-sm-4 col-form-label" >Nama Ayah Kandung </label>
|
|
<div class="col-sm-8">
|
|
<input class="form-control text" type="text" value="<?php echo (array_key_exists('nama_ayah_kandung', $_GET) && !empty($_GET['nama_ayah_kandung'])) ? $_GET['nama_ayah_kandung'] : (isset($m_pasien) ? $m_pasien->nama_ayah_kandung : null); ?>" name="nama_ayah_kandung" id="nama_ayah_kandung" size="100" oninput="this.value = this.value.toUpperCase()">
|
|
</div>
|
|
</div>
|
|
<div class="form-group row" >
|
|
<label class="col-sm-4 col-form-label" >Nama Ibu Kandung </label>
|
|
<div class="col-sm-8">
|
|
<input class="form-control text" type="text" value="<?php echo (array_key_exists('nama_ibu_kandung', $_GET) && !empty($_GET['nama_ibu_kandung'])) ? $_GET['nama_ibu_kandung'] : (isset($m_pasien) ? $m_pasien->nama_ibu_kandung : null); ?>" name="nama_ibu_kandung" id="nama_ibu_kandung" size="100" oninput="this.value = this.value.toUpperCase()">
|
|
</div>
|
|
</div>
|
|
<div class="form-group row" >
|
|
<label class="col-sm-4 col-form-label" >Pendidikan Ayah </label>
|
|
<div class="col-sm-8">
|
|
<?php echo form_dropdown('pendidikan_ayah',$arr_pendidikan,'','class="form-control" id="pendidikan_ayah"'); ?>
|
|
</div>
|
|
</div>
|
|
<div class="form-group row" >
|
|
<label class="col-sm-4 col-form-label" >Pendidikan Ibu </label>
|
|
<div class="col-sm-8">
|
|
<?php echo form_dropdown('pendidikan_ibu',$arr_pendidikan,'','class="form-control" id="pendidikan_ibu"'); ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label" >Pekerjaan Pasien / Orang Tua</label>
|
|
<div class="col-sm-8 " >
|
|
<?php echo form_dropdown('PEKERJAAN',$arr_pekerjaan,$PEKERJAAN,'class="form-control" id="PEKERJAAN"'); ?>
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label" >Nama Penanggung Jawab</label>
|
|
<div class="col-sm-8">
|
|
<input class="form-control text" type="text" name="nama_penanggungjawab" size="30" value="<?php echo (!empty($_GET['nama_penanggungjawab'])) ? $_GET['nama_penanggungjawab'] : null; ?>" id="nama_penanggungjawab" oninput="this.value = this.value.toUpperCase()">
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label" >Hubungan Dengan Pasien</label>
|
|
<div class="col-sm-8">
|
|
<?php echo form_dropdown('hubungan_penanggungjawab',$arr_hubungan,$hubungan_penanggungjawab,'class="form-control" id="hubungan_penanggungjawab"'); ?>
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label" >Alamat</label>
|
|
<div class="col-sm-8">
|
|
<input name="alamat_penanggungjawab" class="form-control text" type="text" size="45" value="<?php echo (!empty($_GET['alamat_penanggungjawab'])) ? $_GET['alamat_penanggungjawab'] : null; ?>" id="alamat_penanggungjawab" oninput="this.value = this.value.toUpperCase()" >
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label" >No Telepon / HP</label>
|
|
<div class="col-sm-8">
|
|
<input class="mask-telepon form-control text" type="text" name="phone_penanggungjawab" size="25" value="<?php echo (!empty($_GET['phone_penanggungjawab'])) ? $_GET['phone_penanggungjawab'] : null; ?>" id="phone_penanggungjawab">
|
|
</div>
|
|
</div>
|
|
|
|
<fieldset class="form-group">
|
|
<div class="row">
|
|
<legend class="col-form-label col-sm-4 pt-0" >Jenis Kelamin </legend>
|
|
<div class="col-sm-8" style="text-align:left;">
|
|
<div class="form-check form-check-inline">
|
|
<input type="radio" name="JENISKELAMIN" id="JENISKELAMIN_L" title="*" class="form-check-input required" value="L" <?php if(array_key_exists('JENISKELAMIN', $_GET) && $_GET['JENISKELAMIN']=="L") echo "checked"; ?>>
|
|
<label class="form-check-label" for="JENISKELAMIN_L"> Laki-laki </label>
|
|
</div>
|
|
<div class="form-check form-check-inline">
|
|
<input type="radio" name="JENISKELAMIN" id="JENISKELAMIN_P" title="*" class="required" value="P" <?php if(array_key_exists('JENISKELAMIN', $_GET) && $_GET['JENISKELAMIN']=="P") echo "checked"; ?>>
|
|
<label class="form-check-label" for="JENISKELAMIN_P"> Perempuan </label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<fieldset class="form-group">
|
|
<div class="row">
|
|
<legend class="col-form-label col-sm-4 pt-0" >Status Perkawinan </legend>
|
|
<div class="col-sm-8" style="text-align:left;">
|
|
<?php echo $opsi_status; ?>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<fieldset class="form-group">
|
|
<div class="row">
|
|
<legend class="col-form-label col-sm-4 pt-0" >Pendidikan </legend>
|
|
<div class="col-sm-8" style="text-align:left;">
|
|
<?php echo $opsi_pendidikan; ?>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<fieldset class="form-group">
|
|
<div class="row">
|
|
<legend class="col-form-label col-sm-4 pt-0" >Agama </legend>
|
|
<div class="col-sm-8" style="text-align:left;">
|
|
<?php echo $opsi_agama; ?>
|
|
<?php echo $input_agama_lain; ?>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<fieldset class="form-group">
|
|
<div class="row">
|
|
<legend class="col-form-label col-sm-4 pt-0" >Kepercayaan </legend>
|
|
<div class="col-sm-8" style="text-align:left;">
|
|
<input type="text" name="kepercayaan" class="form-control" id="kepercayaan" placeholder="Isian Kepecercayaan">
|
|
<small class="form-text text-muted">Contoh: Tidak ingin diperiksa oleh dokter laki-laki</small>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<fieldset class="form-group">
|
|
<div class="row">
|
|
<legend class="col-form-label col-sm-4 pt-0" >Disabilitas </legend>
|
|
<div class="col-sm-8" style="text-align:left;">
|
|
<div class="form-check form-check-inline">
|
|
<input type="radio" name="st_disabilitas" id="st_disabilitas_y" title="*" class="form-check-input st_disabilitas" value="1">
|
|
<label class="form-check-label" for="st_disabilitas_y"> Ya </label>
|
|
</div>
|
|
<div class="form-check form-check-inline">
|
|
<input type="radio" name="st_disabilitas" id="st_disabilitas_t" title="*" class="form-check-input st_disabilitas" value="0" checked="checked">
|
|
<label class="form-check-label" for="st_disabilitas_t"> Tidak </label>
|
|
</div>
|
|
|
|
<?php echo form_dropdown('disabilitas',$arr_disabilitas,$DISABILITAS,'class="form-control" id="disabilitas" disabled'); ?>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<fieldset class="form-group">
|
|
<div class="row">
|
|
<legend class="col-form-label col-sm-4 pt-0" >Hambatan Berkomunikasi </legend>
|
|
<div class="col-sm-8" style="text-align:left;">
|
|
<div class="form-check form-check-inline">
|
|
<input type="radio" name="hambatan_komunikasi" id="hambatan_komunikasiy" title="*" class="form-check-input required" value="Y"<?php if(array_key_exists('hambatan_komunikasi', $_GET) && $_GET['hambatan_komunikasi']=="Y") echo "checked"; ?>>
|
|
<label class="form-check-label" for="hambatan_komunikasiy"> Ya </label>
|
|
</div>
|
|
<div class="form-check form-check-inline">
|
|
<input type="radio" name="hambatan_komunikasi" id="hambatan_komunikasit" title="*" class="required" value="T"<?php if(array_key_exists('hambatan_komunikasi', $_GET) && $_GET['hambatan_komunikasi']=="T") echo "checked"; ?>>
|
|
<label class="form-check-label" for="hambatan_komunikasit"> Tidak </label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-footer text-muted">
|
|
<div class="row">
|
|
<div class="col-md-2 offset-md-8"><button type="button" name="daftar" id="simpan_daftar" class="btn btn-block btn-primary">S I M P A N</button></div>
|
|
<div class="col-md-2">
|
|
<button type="button" name="print" class="btn btn-secondary btn-block text" onclick="cetak();">Print Kartu Pasien</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<input type='hidden' name='stop_daftar' id='stop_daftar' />
|
|
<input type="text" id="msgid" name="msgid" style="border:1px #FFF solid; width:0px; height:0px;">
|
|
<br>
|
|
</fieldset>
|
|
<?php
|
|
if(!empty($tgl_lahir)){
|
|
$js_init .= 'calage1(\''.$tgl_lahir.'\',\'umur\');';
|
|
}
|
|
$js_init .= 'var wrap_propinsi = \''.$opsi_provinsi.'\';';
|
|
?>
|
|
|
|
<script language="javascript" type="text/javascript">
|
|
function cetak(){
|
|
var nomr = document.getElementById('NOMR').value;
|
|
var nama = document.getElementById('NAMA').value;
|
|
var alamat = document.getElementById('ALAMAT').value;
|
|
var TGLLAHIR = document.getElementById('TGLLAHIR').value;
|
|
var JENISKELAMIN = document.getElementById('JENISKELAMIN_L').value;
|
|
|
|
window.open("pdfb/kartupasien.php?NOMR="+ nomr +"&NAMA="+ nama +"&ALAMAT="+ alamat+"&TGLLAHIR="+ TGLLAHIR+"&JENISKELAMIN="+ JENISKELAMIN,"mywindow");
|
|
return false;
|
|
|
|
}
|
|
const Toast = Swal.mixin({
|
|
toast: true,
|
|
position: "top-end",
|
|
showConfirmButton: false,
|
|
timer: 3000
|
|
});
|
|
$("#btnCariPeserta2").click(function() {
|
|
nik = $("#NOKTP").val();
|
|
if(nik != "" && nik.length == 16) {
|
|
reg_nik = /^(([1-9]{2})(0[1-9]|[1-9]\d)(0[1-9]|[1-9]\d)([04][1-9]|[1256][0-9]|[37][01])(0[1-9]|1[0-2])(\d{2})(\d{2})(0[1-9]|[1-9]\d)|\w{1,3}\d{6,8})$/g;
|
|
tes_nik = nik.match(reg_nik);
|
|
if(tes_nik) {
|
|
$.ajax({
|
|
type : "POST",
|
|
url : "<?php echo _BASE_.'anjungan/anjungan.php'; ?>",
|
|
data : {page:"get_nik_curl",nik},
|
|
dataType : "json",
|
|
success : function(data) {
|
|
if(data.content != null) {
|
|
if('RESPONSE_DESC' in data.content[0]) {
|
|
$("#NAMA").val("");
|
|
$("#TEMPAT").val("");
|
|
$("#TGLLAHIR,#umur").val("");
|
|
$("#ALAMAT").val("");
|
|
$("#ALAMAT_KTP").val("");
|
|
$("#PEKERJAAN").val("").trigger("change");
|
|
$("#JENISKELAMIN_L,#JENISKELAMIN_P").removeAttr('checked');
|
|
$("#status_1,#status_2").removeAttr('checked');
|
|
$('#AGAMA_1,#AGAMA_2,#AGAMA_3,#AGAMA_4,#AGAMA_5,#AGAMA_6').removeAttr('checked');
|
|
$("#KELURAHAN,#KDKECAMATAN,#KOTA,#PROVINSI").val("").trigger("change");
|
|
Toast.fire({title:data.content[0].RESPONSE_DESC,type:'error'});
|
|
return false;
|
|
}
|
|
else {
|
|
penduduk = data.content[0];
|
|
|
|
$("#NAMA").val(penduduk.NAMA_LGKP);
|
|
$("#TEMPAT").val(penduduk.TMPT_LHR);
|
|
// $("#TGLLAHIR").val(penduduk.TGL_LHR);
|
|
sp_tgl = penduduk.TGL_LHR.split('-');
|
|
$("#TGLLAHIR").val(sp_tgl[2]+"/"+sp_tgl[1]+"/"+sp_tgl[0]);
|
|
|
|
calage1(sp_tgl[2]+"/"+sp_tgl[1]+"/"+sp_tgl[0],'umur');
|
|
|
|
$("#ALAMAT").val(penduduk.ALAMAT);
|
|
$("#ALAMAT_KTP").val(penduduk.ALAMAT+" "+penduduk.KEL_NAME+" RT."+penduduk.NO_RT+" RW."+penduduk.NO_RW+" Kec. "+penduduk.KEC_NAME+" "+penduduk.KAB_NAME+" "+penduduk.PROP_NAME);
|
|
$.post("<?php echo _BASE_.'include/master.php'; ?>",{get_alamat_dispenduk:1,penduduk},function(data) {
|
|
if('not_found' in data){
|
|
|
|
}
|
|
else {
|
|
$("#KOTAHIDDEN").val(data.id_kota);
|
|
$("#KECAMATANHIDDEN").val(data.id_kecamatan);
|
|
$("#KELURAHANHIDDEN").val(data.id_kelurahan);
|
|
$("#KDPROVINSI").val(data.id_provinsi).trigger("change");
|
|
setTimeout(function(){
|
|
$("#KOTA").val(data.id_kota).trigger("change");
|
|
},300);
|
|
|
|
setTimeout(function(){
|
|
$("#KDKECAMATAN").val(data.id_kecamatan).trigger("change");
|
|
},500);
|
|
|
|
setTimeout(function(){
|
|
$("#KELURAHAN").val(data.id_kelurahan).trigger("change");
|
|
},800);
|
|
}
|
|
},"json");
|
|
$("#PEKERJAAN").val(penduduk.JENIS_PKRJN).trigger("change");
|
|
if(penduduk.JENIS_KLMIN == 'Laki-Laki') {
|
|
$("#JENISKELAMIN_L").attr('checked','checked');
|
|
}
|
|
else {
|
|
$("#JENISKELAMIN_P").attr('checked','checked');
|
|
}
|
|
if(penduduk.STATUS_KAWIN == 'KAWIN') {
|
|
$("#status_2").attr('checked','checked');
|
|
}
|
|
else {
|
|
$("#status_1").attr('checked','checked');
|
|
}
|
|
if(penduduk.AGAMA == 'ISLAM') {
|
|
$('#AGAMA_1').attr('checked','checked');
|
|
}
|
|
else if(penduduk.AGAMA == 'KRISTEN') {
|
|
$('#AGAMA_2').attr('checked','checked');
|
|
}
|
|
else if(penduduk.AGAMA == 'KATOLIK') {
|
|
$('#AGAMA_3').attr('checked','checked');
|
|
}
|
|
else if(penduduk.AGAMA == 'HINDU') {
|
|
$('#AGAMA_4').attr('checked','checked');
|
|
}
|
|
else if(penduduk.AGAMA == 'BUDHA') {
|
|
$('#AGAMA_5').attr('checked','checked');
|
|
}
|
|
else if(penduduk.AGAMA == 'KONGHUCU') {
|
|
$('#AGAMA_6').attr('checked','checked');
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
Toast.fire({title:"NIK tidak ditemukan!",type:"error"});
|
|
change_page = false;
|
|
}
|
|
},
|
|
error : function(xhr,status,error) {
|
|
Toast.fire({title:"NIK tidak ditemukan!",type:"error"});
|
|
}
|
|
});
|
|
}
|
|
else {
|
|
Toast.fire({title:"NIK tidak valid!",type:"error"});
|
|
}
|
|
}
|
|
})
|
|
</script>
|