@extends('base.layout')
@push('styles')
<style>
    /* Tombol Refresh */
    #refresh-btn {
        position: fixed;              /* selalu di tempat */
        bottom: 20px;                 /* jarak dari bawah */
        left: 20px;                   /* jarak dari kiri */
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background-color: rgba(0, 0, 0, 0.3); /* transparan */
        color: #fff;
        border: none;
        font-size: 22px;
        cursor: pointer;
        z-index: 9999;                /* pastikan di atas elemen lain */
        backdrop-filter: blur(6px);
        transition: all 0.3s ease;
    }

    #refresh-btn:hover {
        background-color: rgba(0, 0, 0, 0.5);
        transform: scale(1.1);
    }

    /* Responsif untuk mobile */
    @media (max-width: 600px) {
        #refresh-btn {
            width: 40px;
            height: 40px;
            font-size: 18px;
            bottom: 15px;
            left: 15px;
        }
    }
</style>
@endpush
@section('content')
<div class="wrapper">
	<div class="container-fluid">
		<div id="divawal">
			<div class="row">
				<div class="col-lg-5">
					<div class="card-box ribbon-box">
						<div class="ribbon ribbon-danger">Developer Mode</div>
						<p class="m-b-0"></p>
						<div class="form-row">
							<div class="form-group col-lg-4">
								<input type="text" name="mulai" id="mulai" class="form-control" placeholder="Start Date" data-mask="9999-99-99" value="{{ $initialStartDate ?? '' }}">
							</div>
							<div class="form-group col-lg-4">
								<input type="text" name="akhir" id="akhir" class="form-control" placeholder="End Date" data-mask="9999-99-99" value="{{ $initialEndDate ?? '' }}">
							</div>
							<div class="form-group col-lg-4">
								<button type="button" class="btn btn-warning" id="btnviewcustom"><i class="fa fa-search"></i></button>
							</div>
						</div>
					</div>
				</div>
				<div class="col-lg-5">
					<div class="card-box ribbon-box">
						<div class="ribbon ribbon-success">Search by ?</div>
						<p class="m-b-0"></p>
						<div class="form-row">
							<div class="form-group col-lg-6">
								<input type="text" name="valcari" id="valcari" class="form-control" placeholder="Key">
							</div>
							<div class="form-group col-lg-3">
								<select class="form-control" id="valjenis" name="valjenis">
									<option value="searchbydate">Pencarian Berdasarkan Tanggal</option>
									<option value="norm">No.RM</option>
									<option value="nofoto">No.Lab</option>
									<option value="rekues">Request/Modality</option>
									<option value="keterangan">Expertise</option>
									<option value="kesimpulan">Expertise + Date</option>
								</select>
							</div>
							<div class="form-group col-lg-3">
								<button type="button" class="btn btn-success" id="btnpencarian"><i class="fa fa-search"></i></button>
							</div>
						</div>
					</div>
				</div>
				<div class="col-lg-2">
					<div class="card-box ribbon-box">
						<div class="ribbon ribbon-info">View by ?</div>
						<div class="btn-group-vertical mb-2">
							<button type="button" class="btn btn-block btn-primary" id="timeremaining">0</button>
							<button type="button" class="btn btn-block btn-danger waves-effect btn-sm" id="btnhariinidoank">This Day Only</button>
							<button type="button" class="btn btn-block btn-info waves-effect btn-sm" id="btnmundur2">Last 2 Days</button>
							<button type="button" class="btn btn-block btn-warning waves-effect btn-sm" id="btnmundur3">Last 3 Days</button>
						</div>
					</div>
					
				</div>
			</div>
			<div class="row">
				<div class="col-lg-12" id="divpertama">
					<div class="card-box ribbon-box">
						<div class="ribbon ribbon-primary"  id="judul">Patient {{$lokasi}}</div>
						<p class="m-b-0"></p>
						<div id="gridpemeriksaan"></div>
					</div>
				</div>
				<div class="col-lg-6">
					<div style="margin-top: 20px" id="jqxlistbox"></div>
				</div>
			</div>
		</div>
		<div id="divperiksa">
			<form id="kt_form" enctype="multipart/form-data">
				<div class="row">
					<div class="col-sm-4" id="divkiri">
						<div class="card-box" id="divviewpacs">
							<div class="ribbon ribbon-info">Viewer</div>
							<p class="m-b-0"></p>
							<button type="button" id="btnkembali2" class="btn btn-custom">Close</button>
							<button type="button" id="btnopennewwindow" class="btn btn-info">Open In New Window</button>
							<div class="form-group">
								<div id="divviewer"></div>
							</div>
						</div>
						<div class="card-box ribbon-box" id="divpasien">
							<div class="ribbon ribbon-success">Patient ID</div>
							<p class="m-b-0"></p>
							<ul class="nav nav-tabs tabs-bordered nav-justified">
								<li class="nav-item">
									<a href="#home-b2" data-toggle="tab" aria-expanded="false" class="nav-link active">
										<i class="fi-monitor mr-2"></i> Patient ID
									</a>
								</li>
								<li class="nav-item">
									<a href="#profile-b2" data-toggle="tab" aria-expanded="true" class="nav-link">
										<i class="fi-head mr-2"></i> History
									</a>
								</li>
							</ul>
							<div class="tab-content">
								<div class="tab-pane active" id="home-b2">
									<table class="table table-striped">
										<tr>
											<td>Order</td>
											<td id="noservis"></td>
										</tr>
										<tr>
											<td>Dokter Pengirim</td>
											<td id="klinisi"></td>
										</tr>
										<tr>
											<td>Asal Pasien</td>
											<td id="asalpasien"></td>
										</tr>
										<tr>
											<td>No. Lokal Lab</td>
											<td><input type="text" id="nofoto" name="nofoto" class="form-control" readonly></td>
										</tr>
										<tr>
											<td>Register Number</td>
											<td><input type="text" id="norm" name="norm" class="form-control" readonly></td>
										</tr>
										<tr>
											<td>Name</td>
											<td><input type="text" id="nonama" name="nonama" class="form-control" readonly></td>
										</tr>
										<tr>
											<td>Gender, Age</td>
											<td><span id="nokel"></span>, <span id="nousia"></span></td>
										</tr>
										<tr>
											<td>Phone</td>
											<td id="tlppasien"></td>
										</tr>
										<tr>
											<td>Address</td>
											<td id="alamat"></td>
										</tr>
										<tr>
											<td>Status</td>
											<td id="nostatus"></td>
										</tr>
										
									</table>
									
								</div>
								<div class="tab-pane" id="profile-b2">
									<div class="form-group">
										<div id="gridriwayat"></div>
									</div>
								</div>
							</div>
						</div>
					</div>
					<div class="col-sm-8" id="divkanan">
						<div class="card-box ribbon-box">
							<div class="ribbon ribbon-danger">Expertise</div>
							<p class="m-b-0"></p>
							<div class="form-row">
								<div class="form-group col-lg-4">
									<label for="analis" class="col-form-label">ATLM</label>
									<select class="form-control select2" id="analis" name="analis">
										<option value="0">Pilih</option>
										@foreach($allanalis as $ranalis)
											@if($ranalis->id == Session('id'))
												<option value="{{ $ranalis->id }}" selected>{{ $ranalis->nama }}</option>
											@else
												<option value="{{ $ranalis->id }}">{{ $ranalis->nama }}</option>
											@endif
										@endforeach
									</select>
								</div>
								<div class="form-group col-lg-4">
									<label for="ppds3" class="col-form-label">PPDS</label>
									<select class="form-control select2" id="ppds3" name="ppds3">
										<option value="0">Pilih</option>
										@foreach($allppds as $rppds)
											@if($rppds->id == Session('id'))
												<option value="{{ $rppds->id }}" selected>{{ $rppds->nama }}</option>
											@else
												<option value="{{ $rppds->id }}">{{ $rppds->nama }}</option>
											@endif
										@endforeach
									</select>
								</div>
								<div class="form-group col-lg-4">
									<label for="dokter" class="col-form-label">SPV <font color="red">*</font></label>
									<select class="form-control select2" id="dokter" name="dokter">
										<option value="0">Pilih</option>
										@foreach($dokters as $dokter)
											@if($dokter->id == Session('id'))
												<option value="{{ $dokter->id }}" selected>{{ $dokter->nama }}</option>
											@else
												<option value="{{ $dokter->id }}">{{ $dokter->nama }}</option>
											@endif
										@endforeach
									</select>
								</div>
							</div>
							<div class="form-row">
								<label for="klinis" class="col-form-label">Klinis/Diagnosis</label>
								<input type="text" id="klinis" name="klinis" class="form-control isiandasar">
							</div>
							<div class="form-row">
								<div class="form-group col-lg-2">
									<label for="modaliti" class="col-form-label"><strong>Asal Sample</strong></label>
									<input type="text" id="modaliti" name="modaliti" class="form-control isiandasar">
								</div>
								<div class="form-group col-lg-2">
									<label for="bhp_media" class="col-form-label">Media</label>
									<input type="text" id="bhp_media" name="bhp_media" class="form-control isiandasar">
								</div>
								<div class="form-group col-lg-2">
									<label for="bhp_potsputum" class="col-form-label">Pot Sputum</label>
									<input type="text" id="bhp_potsputum" name="bhp_potsputum" class="form-control isiandasar">
								</div>
								<div class="form-group col-lg-2">
									<label for="bhp_poturine" class="col-form-label">Pot Urine</label>
									<input type="text" id="bhp_poturine" name="bhp_poturine" class="form-control isiandasar">
								</div>
								<div class="form-group col-lg-2">
									<label for="bhp_oshe" class="col-form-label">Oshe</label>
									<input type="text" id="bhp_oshe" name="bhp_oshe" class="form-control isiandasar">
								</div>
								<div class="form-group col-lg-2">
									<label for="bhp_obyekglass" class="col-form-label">ObyekGlass + Cover</label>
									<input type="text" id="bhp_obyekglass" name="bhp_obyekglass" class="form-control isiandasar">
								</div>
								<div class="form-group col-lg-2">
									<label for="bhp_botolbd" class="col-form-label">Botol Bachtect</label>
									<input type="text" id="bhp_botolbd" name="bhp_botolbd" class="form-control isiandasar">
								</div>
								<div class="form-group col-lg-2">
									<label for="bhp_parafilm" class="col-form-label">Parafilm</label>
									<input type="text" id="bhp_parafilm" name="bhp_parafilm" class="form-control isiandasar">
								</div>
								<div class="form-group col-lg-2">
									<label for="bhp_tips" class="col-form-label">Tips</label>
									<input type="text" id="bhp_tips" name="bhp_tips" class="form-control isiandasar">
								</div>
								<div class="form-group col-lg-2">
									<label for="bhp_cottonswab" class="col-form-label">Cotton Swab</label>
									<input type="text" id="bhp_cottonswab" name="bhp_cottonswab" class="form-control isiandasar">
								</div>
								<div class="form-group col-lg-2">
									<label for="bhp_antibiotiktambahan" class="col-form-label">Antibiotik Tambahan</label>
									<input type="text" id="bhp_antibiotiktambahan" name="bhp_antibiotiktambahan" class="form-control isiandasar">
								</div>
							</div>
							<div class="form-group">
								<button type="button" class="btn btn-primary waves-effect waves-light" id="btnshowtemplate"><i class="fa fa-gears"></i> Template</button>
								<div id="divtemplate">
									<div id="gridtemplate"></div>
								</div>
							</div>
							<div class="form-row templatejawaban" id="templatecci">
								<label>Pemeriksaan Candida Colonization Index</label>
								<div class="form-group col-lg-12">
									<label for="id_sputum" class="col-form-label">Sputum</label>
									<select class="form-control ekspertiseseletc" id="id_sputum" name="id_sputum">
										<option value="">Pilih Salah Satu</option>
										@if(isset($jsonsputum) && !empty($jsonsputum))
											@foreach($jsonsputum as $rows)
												<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
											@endforeach
										@endif
									</select>
								</div>
								<div class="form-group col-lg-12">
									<label for="id_swabtenggorok" class="col-form-label">Swab Tenggorok</label>
									<select class="form-control ekspertiseseletc" id="id_swabtenggorok" name="id_swabtenggorok">
										<option value="">Pilih Salah Satu</option>
										@if(isset($jsonswabtenggorok) && !empty($jsonswabtenggorok))
											@foreach($jsonswabtenggorok as $rows)
												<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
											@endforeach
										@endif
									</select>
								</div>
								<div class="form-group col-lg-12">
									<label for="id_urine" class="col-form-label">Urine</label>
									<select class="form-control ekspertiseseletc" id="id_urine" name="id_urine">
										<option value="">Pilih Salah Satu</option>
										@if(isset($jsonurine) && !empty($jsonurine))
											@foreach($jsonurine as $rows)
												<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
											@endforeach
										@endif
									</select>
								</div>
								<div class="form-group col-lg-12">
									<label for="id_swabperineum" class="col-form-label">Swab perineum</label>
									<select class="form-control ekspertiseseletc" id="id_swabperineum" name="id_swabperineum">
										<option value="">Pilih Salah Satu</option>
										@if(isset($jsonswabperineum) && !empty($jsonswabperineum))
											@foreach($jsonswabperineum as $rows)
												<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
											@endforeach
										@endif
									</select>
								</div>
							</div>
							<div class="form-row templatejawaban" id="templatekultur">
								<div class="form-group account-btn text-center m-t-10">
									<span class="badge badge-primary">A. Sediaan Langsung</span>
								</div>
								<div class="form-group col-lg-12">
									<label class="col-form-label">1. Pewarna Gram</label>
									<div class="form-row">
										<div class="form-group col-lg-12">
											<label for="id_selepitel" class="col-form-label">Sel Epitel</label>
											<select class="form-control ekspertiseseletc" id="id_selepitel" name="id_selepitel">
												<option value="">Pilih Salah Satu</option>
												@if(isset($jsonselepitel) && !empty($jsonselepitel))
													@foreach($jsonselepitel as $rows)
														<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
													@endforeach
												@endif
											</select>
										</div>
										<div class="form-group col-lg-12">
											<label for="id_selradang" class="col-form-label">Sel Radang</label>
											<select class="form-control ekspertiseseletc" id="id_selradang" name="id_selradang">
												<option value="">Pilih Salah Satu</option>
												@if(isset($jsonselradang) && !empty($jsonselradang))
													@foreach($jsonselradang as $rows)
														<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
													@endforeach
												@endif
											</select>
										</div>
										<div class="form-group col-lg-12">
											<label for="id_mikroorganisme" class="col-form-label">Mikroorganisme</label>
											<select class="form-control ekspertiseseletc" id="id_mikroorganisme" name="id_mikroorganisme">
												<option value="">Pilih Salah Satu</option>
												@if(isset($jsonmikroorganisme) && !empty($jsonmikroorganisme))
													@foreach($jsonmikroorganisme as $rows)
														<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
													@endforeach
												@endif
											</select>
										</div>
										<div class="form-group col-lg-12">
											<label for="id_mikroorganismeoptional" class="col-form-label">Bisa memilih lebih dari satu</label>
											<select class="form-control select2" id="id_mikroorganismeoptional" name="id_mikroorganismeoptional[]" style="width: 100%;" multiple="multiple">
												<option>Pilih Mikroorganisme</option>
												@php
													$keys = array_keys($mikroorganismes);
													for($i = 0; $i < count($mikroorganismes); $i++) {
												@endphp
														<optgroup label="{{ $mikroorganismestlist[$i] }}">
														@php
															foreach($mikroorganismes[$keys[$i]] as $key => $value) {
														@endphp
															<option value="{{ $value['name'] }}">{!! $value['name'] !!}</option>
														@php
													}
														@endphp
														</optgroup>
												@php
												}
												@endphp
											</select>
										</div>
										<div class="form-group col-lg-12">
											<label>Nuggent Score</label>
											<div class="form-row">
												<div class="form-group col-lg-4">
													<label for="id_lactobacillus" class="col-form-label">Lactobacillus</label>
													<div class="form-row">
														<div class="form-group col-lg-6">
															<select class="form-control ekspertiseseletc" id="id_jumlahlactobacillus" name="id_jumlahlactobacillus">
																<option value="">Pilih Jumlah Per Lapang</option>
																@if(isset($jsonjumlahlactobacillus) && !empty($jsonjumlahlactobacillus))
																	@foreach($jsonjumlahlactobacillus as $rows)
																		<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
																	@endforeach
																@endif
															</select>
														</div>
														<div class="form-group col-lg-6">
															<select class="form-control ekspertiseseletc" id="id_lactobacillus" name="id_lactobacillus">
																<option value="">Pilih Skore</option>
																@php
																	$mulai = 0;
																	while ($mulai != 5){
																		echo '<option value="'.$mulai.'">'.$mulai.'</option>';
																		$mulai++;
																	}
																@endphp
															</select>
														</div>
													</div>
												</div>
												<div class="form-group col-lg-4">
													<label for="id_gardnerella" class="col-form-label">Gardnerella</label>
													<div class="form-row">
														<div class="form-group col-lg-6">
															<select class="form-control ekspertiseseletc" id="id_jumlahgardnerella" name="id_jumlahgardnerella">
																<option value="">Pilih Jumlah Per Lapang</option>
																@if(isset($jsonjumlahgardnerella) && !empty($jsonjumlahgardnerella))
																	@foreach($jsonjumlahgardnerella as $rows)
																		<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
																	@endforeach
																@endif
															</select>
														</div>
														<div class="form-group col-lg-6">
															<select class="form-control ekspertiseseletc" id="id_gardnerella" name="id_gardnerella">
																<option value="">Pilih Skore</option>
																@php
																	$mulai = 0;
																	while ($mulai != 5){
																		echo '<option value="'.$mulai.'">'.$mulai.'</option>';
																		$mulai++;
																	}
																@endphp
															</select>
														</div>
													</div>
												</div>
												<div class="form-group col-lg-4">
													<label for="id_mobiluncus" class="col-form-label">Mobiluncus</label>
													<div class="form-row">
														<div class="form-group col-lg-6">
															<select class="form-control ekspertiseseletc" id="id_jumlahmobiluncus" name="id_jumlahmobiluncus">
																<option value="">Pilih Jumlah Per Lapang</option>
																@if(isset($jsonjumlahmobiluncus) && !empty($jsonjumlahmobiluncus))
																	@foreach($jsonjumlahmobiluncus as $rows)
																		<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
																	@endforeach
																@endif
															</select>
														</div>
														<div class="form-group col-lg-6">
															<select class="form-control ekspertiseseletc" id="id_mobiluncus" name="id_mobiluncus">
																<option value="">Pilih Skore</option>
																@php
																	$mulai = 0;
																	while ($mulai != 5){
																		echo '<option value="'.$mulai.'">'.$mulai.'</option>';
																		$mulai++;
																	}
																@endphp
															</select>
														</div>
													</div>
													
												</div>
											</div>
										</div>
									</div>
								</div>
								<div class="form-group col-lg-12">
									<label for="id_pewarnaanziehlnielsen" class="col-form-label">2. Pewarnaan Ziehl Neelsen (Pagi)</label>
									<select class="form-control ekspertiseseletc" id="id_pewarnaanziehlnielsen" name="id_pewarnaanziehlnielsen">
										<option value="">Pilih Salah Satu</option>
										@if(isset($jsonpewarnaanziehlnielsen) && !empty($jsonpewarnaanziehlnielsen))
											@foreach($jsonpewarnaanziehlnielsen as $rows)
												<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
											@endforeach
										@endif
									</select>
								</div>
								<div class="form-group col-lg-12">
									<label for="id_pewarnaanziehlnielsensewaktu" class="col-form-label">Pewarnaan Ziehl Neelsen (Sewaktu)</label>
									<select class="form-control ekspertiseseletc" id="id_pewarnaanziehlnielsensewaktu" name="id_pewarnaanziehlnielsensewaktu">
										<option value="">Pilih Salah Satu</option>
										@if(isset($jsonpewarnaanziehlnielsen) && !empty($jsonpewarnaanziehlnielsen))
											@foreach($jsonpewarnaanziehlnielsen as $rows)
												<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
											@endforeach
										@endif
									</select>
								</div>
								<div class="form-group col-lg-12" id="pewarnaankohselect">
									<label for="id_pewarnaankoh" class="col-form-label">3. Pewarnaan KOH</label>
									<select class="form-control ekspertiseseletc" id="id_pewarnaankoh" name="id_pewarnaankoh">
										<option value="">Pilih Salah Satu</option>
										@if(isset($jsonpewarnaankoh) && !empty($jsonpewarnaankoh))
											@foreach($jsonpewarnaankoh as $rows)
												<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
											@endforeach
										@else
											<option value="Ditemukan morfologi Hifa">Ditemukan morfologi Hifa</option>
											<option value="Ditemukan morfologi <i>Budding Cell</i>">Ditemukan morfologi Budding Cell </option>
											<option value="Ditemukan morfologi <i>Conidia</i>">Ditemukan morfologi Conidia</option>
											<option value="Ditemukan morfologi Hifa dan <i>Budding Cell</i>">Ditemukan morfologi Hifa dan Budding Cell</option>
											<option value="Ditemukan morfologi Hifa dan <i>Conidia</i>">Ditemukan morfologi Hifa dan Conidia</option>
											<option value="Ditemukan morfologi <i>Budding Cell</i> dan <i>Conidia</i>">Ditemukan morfologi Budding Cell dan Conidia</option>
											<option value="Tidak ditemukan morfologi <i>Budding Cell</i>, Hifa dan <i>Conidia</i>">Tidak ditemukan morfologi Budding Cell, Hifa dan Conidia</option>
											<option value="Tidak ditemukan morfologi <i>Budding Cell</i> dan Hifa">Tidak ditemukan morfologi Budding Cell dan Hifa</option>
										@endif
										<option value="lainnya">Lainnya (Ketik Manual)</option>
									</select>
								</div>
								<div class="form-group col-lg-12" id="pewarnaankohteks">
									<label for="id_pewarnaankohoptional" class="col-form-label">3. Pewarnaan KOH</label>
									<input type="text" id="id_pewarnaankohoptional" name="id_pewarnaankohoptional" class="form-control ekspertiseteks">
								</div>
								<div class="form-group col-lg-12">
									<label for="id_pewarnaanneisser" class="col-form-label">4. Pewarnaan Neisser</label>
									<select class="form-control ekspertiseseletc" id="id_pewarnaanneisser" name="id_pewarnaanneisser">
										<option value="">Pilih Salah Satu</option>
										@if(isset($jsonpewarnaanneisser) && !empty($jsonpewarnaanneisser))
											@foreach($jsonpewarnaanneisser as $rows)
												<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
											@endforeach
										@endif
									</select>
								</div>
								<div class="form-group col-lg-12">
									<label for="id_pewarnaannegatif" class="col-form-label">5. Pewarnaan Negatif</label>
									<select class="form-control ekspertiseseletc" id="id_pewarnaannegatif" name="id_pewarnaannegatif">
										<option value="">Pilih Salah Satu</option>
										@if(isset($jsonpewarnaannegatif) && !empty($jsonpewarnaannegatif))
											@foreach($jsonpewarnaannegatif as $rows)
												<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
											@endforeach
										@endif
									</select>
								</div>
								<div class="form-group col-lg-12">
									<label for="id_pewarnaanspora" class="col-form-label">6. Pewarnaan Spora</label>
									<select class="form-control ekspertiseseletc" id="id_pewarnaanspora" name="id_pewarnaanspora">
										<option value="">Pilih Salah Satu</option>
										@if(isset($jsonpewarnaanspora) && !empty($jsonpewarnaanspora))
											@foreach($jsonpewarnaanspora as $rows)
												<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
											@endforeach
										@endif
									</select>
								</div>
								<div class="form-group col-lg-12" id="pewarnaangiemsaselect">
									<label for="id_pewarnaangiesma" class="col-form-label">7. Pewarnaan Giemsa</label>
									<select class="form-control ekspertiseseletc" id="id_pewarnaangiesma" name="id_pewarnaangiesma">
										<option value="">Pilih Salah Satu</option>
										@if(isset($jsonpewarnaangiemsa) && !empty($jsonpewarnaangiemsa))
											@foreach($jsonpewarnaangiemsa as $rows)
												<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
											@endforeach
										@else 
											<option value="Ditemukan morfologi <i>Inclusion Bodies</i> dan <i>Reticulate Bodies</i>">Ditemukan morfologi Inclusion Bodies dan Reticulate Bodies</option>
											<option value="Tidak ditemukan morfologi <i>Inclusion Bodies</i> dan <i>Reticulate Bodies</i>">Tidak ditemukan morfologi Inclusion Bodies dan Reticulate Bodies</option>
											<option value="Ditemukan morfologi kista <i>tropozoid</i>">Ditemukan morfologi kista tropozoid</option>
											<option value="Tidak ditemukan morfologi <i>kista tropozoid</i>">Tidak ditemukan morfologi kista tropozoid</option>
										@endif
										<option value="lainnya">Lainnya (Di isi manual)</option>
									</select>
								</div>
								<div class="form-group col-lg-12" id="pewarnaangiemsateks">
									<label for="id_pewarnaangiesmaoptional" class="col-form-label">7. Pewarnaan Giemsa</label>
									<input type="text" id="id_pewarnaangiesmaoptional" name="id_pewarnaangiesmaoptional" class="form-control ekspertiseteks">
								</div>
								<div class="form-group account-btn text-center m-t-10">
									<span class="badge badge-primary">B. Biakan Kultur</span>
								</div>
								<div class="form-group col-lg-12">
									<span class="badge badge-danger">Khusus Kultur Darah dan Cairan Steril</span>
									<div class="row">
										<div class="form-group col-lg-6">
											<label for="bd_result" class="col-form-label">BD Result</label>
											<input type="text" id="bd_result" name="bd_result" class="form-control ekspertiseteks" readonly>
										</div>
										<div class="form-group col-lg-6">
											<label for="bd_result_date" class="col-form-label">BD Result Date</label>
											<input type="text" id="bd_result_date" name="bd_result_date" class="form-control ekspertiseteks" readonly>
										</div>
									</div>
								</div>
								<div class="form-group col-lg-12">
									<label class="col-form-label">Pertumbuhan Koloni (Kultur Primer):</label>
								</div>
								<div class="form-group col-lg-12">
									<label class="col-form-label">Kirby bauer :</label>
									<div class="form-row">
										<div class="form-group col-lg-4">
											<label for="id_kbamc" class="col-form-label">AMC</label>
											<div class="form-row">
												<div class="form-group col-lg-6">
													<select class="form-control pilihankirby" id="id_kbamc" name="id_kbamc">
														<option value="">Pilih Salah Satu</option>
														<option value="Tidak dilakukan">Tidak dilakukan</option>
														@php
															$mulai = 1;
															while ($mulai != 43){
																echo '<option value="'.$mulai.'">'.$mulai.'</option>';
																$mulai++;
															}
														@endphp
													</select>
												</div>
												<div class="form-group col-lg-6">
													<select class="form-control pilihankirby" id="id_sirkbamc" name="id_sirkbamc">
														<option value="">Pick</option>
														<option value="S">S</option>
														<option value="I">I</option>
														<option value="R">R</option>
													</select>
												</div>
											</div>
										</div>
										<div style="overflow: hidden; display: none;">
											<label for="id_kblef" class="col-form-label">LEV</label>
											<div class="form-row">
												<div class="form-group col-lg-6">
													<select class="form-control pilihankirby" id="id_kblef" name="id_kblef">
														<option value="">Pilih Salah Satu</option>
														<option value="Tidak dilakukan">Tidak dilakukan</option>
														@php
															$mulai = 1;
															while ($mulai != 43){
																echo '<option value="'.$mulai.'">'.$mulai.'</option>';
																$mulai++;
															}
														@endphp
													</select>
												</div>
												<div class="form-group col-lg-6">
													<select class="form-control pilihankirby" id="id_sirkblef" name="id_sirkblef">
														<option value="">Pick</option>
														<option value="S">S</option>
														<option value="I">I</option>
														<option value="R">R</option>
													</select>
												</div>
											</div>
										</div>
										<div class="form-group col-lg-4">
											<label for="id_kbak" class="col-form-label">AK</label>
											<div class="form-row">
												<div class="form-group col-lg-6">
													<select class="form-control pilihankirby" id="id_kbak" name="id_kbak">
														<option value="">Pilih Salah Satu</option>
														<option value="Tidak dilakukan">Tidak dilakukan</option>
														@php
															$mulai = 1;
															while ($mulai != 43){
																echo '<option value="'.$mulai.'">'.$mulai.'</option>';
																$mulai++;
															}
														@endphp
													</select>
												</div>
												<div class="form-group col-lg-6">
													<select class="form-control pilihankirby" id="id_sirkbak" name="id_sirkbak">
														<option value="">Pick</option>
														<option value="S">S</option>
														<option value="I">I</option>
														<option value="R">R</option>
													</select>
												</div>
											</div>
										</div>
										<div class="form-group col-lg-4">
											<label for="id_kbfos" class="col-form-label">FOS</label>
											<div class="form-row">
												<div class="form-group col-lg-6">
													<select class="form-control pilihankirby" id="id_kbfos" name="id_kbfos">
														<option value="">Pilih Salah Satu</option>
														<option value="Tidak dilakukan">Tidak dilakukan</option>
														@php
															$mulai = 1;
															while ($mulai != 43){
																echo '<option value="'.$mulai.'">'.$mulai.'</option>';
																$mulai++;
															}
														@endphp
													</select>
												</div>
												<div class="form-group col-lg-6">
													<select class="form-control pilihankirby" id="id_sirkbfos" name="id_sirkbfos">
														<option value="">Pick</option>
														<option value="S">S</option>
														<option value="I">I</option>
														<option value="R">R</option>
													</select>
												</div>
											</div>
										</div>
									</div>
									<div class="form-row">
										<div class="form-group col-lg-4">
											<label for="id_kbscf" class="col-form-label">SCF</label>
											<div class="form-row">
												<div class="form-group col-lg-6">
													<select class="form-control pilihankirby" id="id_kbscf" name="id_kbscf">
														<option value="">Pilih Salah Satu</option>
														<option value="Tidak dilakukan">Tidak dilakukan</option>
														@php
															$mulai = 1;
															while ($mulai != 43){
																echo '<option value="'.$mulai.'">'.$mulai.'</option>';
																$mulai++;
															}
														@endphp
													</select>
												</div>
												<div class="form-group col-lg-6">
													<select class="form-control pilihankirby" id="id_sirkbscf" name="id_sirkbscf">
														<option value="">Pick</option>
														<option value="S">S</option>
														<option value="I">I</option>
														<option value="R">R</option>
													</select>
												</div>
											</div>
										</div>
									</div>
								</div>
								<div class="form-group col-lg-12">
									<label for="id_biakankultur" class="col-form-label">Biakan Kultur (Aerob / Anaerob)</label>
									<select class="form-control ekspertiseseletc" id="id_biakankultur" name="id_biakankultur">
										<option value="">Pilih Salah Satu</option>
										@if(isset($jsonbiakankultur) && !empty($jsonbiakankultur))
											@foreach($jsonbiakankultur as $rows)
												<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
											@endforeach
										@endif
									</select>
								</div>
								<div class="form-group account-btn text-center m-t-10">
									<span class="badge badge-primary">C. Tes Kepekaan Antibiotika: (S: Sensitif ; I : Intermediate ; R: Resisten)</span>
								</div>
								<div class="form-group col-lg-12">
									<ul class="nav nav-tabs tabs-bordered nav-justified">
										<li class="nav-item">
											<a href="#media_bap" data-toggle="tab" aria-expanded="false" class="nav-link active">
												<i class="fi-monitor mr-2"></i> Media BAP
											</a>
										</li>
										<li class="nav-item">
											<a href="#media_cap" data-toggle="tab" aria-expanded="true" class="nav-link">
												<i class="fi-monitor mr-2"></i> Media CAP
											</a>
										</li>
										<li class="nav-item">
											<a href="#media_mcconkey" data-toggle="tab" aria-expanded="true" class="nav-link">
												<i class="fi-monitor mr-2"></i> Media Mc Conkey 
											</a>
										</li>
										<li class="nav-item">
											<a href="#media_sda" data-toggle="tab" aria-expanded="true" class="nav-link">
												<i class="fi-monitor mr-2"></i> Kultur Jamur
											</a>
										</li>
										<li class="nav-item">
											<a href="#media_sellainnya" data-toggle="tab" aria-expanded="true" class="nav-link">
												<i class="fi-monitor mr-2"></i> Media Selektif lainnya 
											</a>
										</li>
										<li class="nav-item">
											<a href="#media_tamlainnya" data-toggle="tab" aria-expanded="true" class="nav-link">
												<i class="fi-monitor mr-2"></i> Pemeriksaan Tambahan Lainnya  
											</a>
										</li>
									</ul>
									<div class="tab-content">
										<div class="tab-pane active" id="media_bap">
											<div class="card">
												<div class="card-box">
													<div class="card-header">
														<div class="form-row">
															<div class="form-group col-lg-3">
																<button type="button" class="btn btn-primary" id="btnuntukgridmediabap">
																	<i class="fa fa-calendar-check-o mr-1"></i> Ada Pertumbuhan
																</button>
															</div>
															<div class="form-group col-lg-3">
																<button type="button" class="btn btn-primary" id="btnbapkosong">
																	<i class="fa fa-calendar-times-o mr-1"></i> Tidak Ada Pertumbuhan
																</button>
															</div>
														</div>
													</div>
													<div class="card-body">
														<div id="gridmediabap"></div>
													</div>
												</div>
											</div>
										</div>
										<div class="tab-pane" id="media_cap">
											<div class="card">
												<div class="card-box">
													<div class="card-header">
														<button type="button" class="btn btn-primary" id="btnuntukgridmediacap">
															<i class="fa fa-calendar-check-o mr-1"></i> Ada Pertumbuhan
														</button>
														<button type="button" class="btn btn-primary" id="btncapkosong">
															<i class="fa fa-calendar-times-o mr-1"></i> Tidak Ada Pertumbuhan
														</button>
													</div>
													<div class="card-body">
														<div id="gridmediacap"></div>
													</div>
												</div>
											</div>
										</div>
										<div class="tab-pane" id="media_mcconkey">
											<div class="card">
												<div class="card-box">
													<div class="card-header row">
														<div class="form-group col-lg-3">
															<button type="button" class="btn btn-primary" id="btnuntukgridmediamcconkey">
																<i class="fa fa-calendar-check-o mr-1"></i> Ada Pertumbuhan
															</button>
														</div>
														<div class="form-group col-lg-3">
															<button type="button" class="btn btn-primary" id="btnmckonkeykosong">
																<i class="fa fa-calendar-times-o mr-1"></i> Tidak Ada Pertumbuhan
															</button>
														</div>
													</div>
													<div class="card-body">
														<div id="gridmediamcconkey"></div>
													</div>
												</div>
											</div>
										</div>
										<div class="tab-pane" id="media_sda">
											<div class="card">
												<div class="card-box">
													<div class="card-header">
														Kultur Jamur
													</div>
													<div class="card-body">
														<ul class="nav nav-tabs tabs-bordered nav-justified">
															<li class="nav-item">
																<a href="#media_sdar1" data-toggle="tab" aria-expanded="false" class="nav-link active">
																	<i class="fi-monitor mr-2"></i> Inkubasi suhu ruang 1 (R1)
																</a>
															</li>
															<li class="nav-item">
																<a href="#media_sdar2" data-toggle="tab" aria-expanded="true" class="nav-link">
																	<i class="fi-monitor mr-2"></i> Inkubasi suhu ruang 2 (R2)
																</a>
															</li>
															<li class="nav-item">
																<a href="#media_sdai1" data-toggle="tab" aria-expanded="true" class="nav-link">
																	<i class="fi-monitor mr-2"></i> Inkubasi suhu inkubator 1 (I1)
																</a>
															</li>
															<li class="nav-item">
																<a href="#media_sdai2" data-toggle="tab" aria-expanded="true" class="nav-link">
																	<i class="fi-monitor mr-2"></i> Inkubasi suhu inkubator 2 (I2)
																</a>
															</li>
														</ul>
														<div class="tab-content">
															<div class="tab-pane active" id="media_sdar1">
																<div class="card">
																	<div class="card-box">
																		<div class="card-header">
																			<div class="form-row">
																				<div class="form-group col-lg-3">
																					<button type="button" class="btn btn-primary" id="btnuntukgridmediasdar1">
																						<i class="fa fa-calendar-check-o mr-1"></i> Ada Pertumbuhan
																					</button>
																				</div>
																				<div class="form-group col-lg-3">
																					<button type="button" class="btn btn-primary" id="btnsdakosongr1">
																						<i class="fa fa-calendar-times-o mr-1"></i> Tidak Ada Pertumbuhan
																					</button>
																				</div>
																			</div>
																		</div>
																		<div class="card-body">
																			<div id="gridmediasdar1"></div>
																		</div>
																	</div>
																</div>
															</div>
															<div class="tab-pane" id="media_sdar2">
																<div class="card">
																	<div class="card-box">
																		<div class="card-header">
																			<button type="button" class="btn btn-primary" id="btnuntukgridmediasdar2">
																				<i class="fa fa-calendar-check-o mr-1"></i> Ada Pertumbuhan
																			</button>
																			<button type="button" class="btn btn-primary" id="btnsdakosongr2">
																				<i class="fa fa-calendar-times-o mr-1"></i> Tidak Ada Pertumbuhan
																			</button>
																		</div>
																		<div class="card-body">
																			<div id="gridmediasdar2"></div>
																		</div>
																	</div>
																</div>
															</div>
															<div class="tab-pane" id="media_sdai1">
																<div class="card">
																	<div class="card-box">
																		<div class="card-header row">
																			<div class="form-group col-lg-3">
																				<button type="button" class="btn btn-primary" id="btnuntukgridmediasdai1">
																					<i class="fa fa-calendar-check-o mr-1"></i> Ada Pertumbuhan
																				</button>
																			</div>
																			<div class="form-group col-lg-3">
																				<button type="button" class="btn btn-primary" id="btnsdakosongi1">
																					<i class="fa fa-calendar-times-o mr-1"></i> Tidak Ada Pertumbuhan
																				</button>
																			</div>
																		</div>
																		<div class="card-body">
																			<div id="gridmediasdai1"></div>
																		</div>
																	</div>
																</div>
															</div>
															<div class="tab-pane" id="media_sdai2">
																<div class="card">
																	<div class="card-box">
																		<div class="card-header row">
																			<div class="form-group col-lg-3">
																				<button type="button" class="btn btn-primary" id="btnuntukgridmediasdai2">
																					<i class="fa fa-calendar-check-o mr-1"></i> Ada Pertumbuhan
																				</button>
																			</div>
																			<div class="form-group col-lg-3">
																				<button type="button" class="btn btn-primary" id="btnsdakosongi2">
																					<i class="fa fa-calendar-times-o mr-1"></i> Tidak Ada Pertumbuhan
																				</button>
																			</div>
																		</div>
																		<div class="card-body">
																			<div id="gridmediasdai2"></div>
																		</div>
																	</div>
																</div>
															</div>
														</div>
													</div>
												</div>
											</div>
										</div>
										<div class="tab-pane" id="media_sellainnya">
											<div class="card">
												<div class="card-box">
													<div class="card-header">
														<button type="button" class="btn btn-primary" id="btnuntukgridmediasellainnya">
															<i class="fa fa-plus mr-1"></i> Tambah Data
														</button>
													</div>
													<div class="card-body">
														<div id="gridmediasellainnya"></div>
													</div>
												</div>
											</div>
										</div>
										<div class="tab-pane" id="media_tamlainnya">
											<div class="card">
												<div class="card-box">
													<div class="card-header">
														<button type="button" class="btn btn-primary" id="btnuntukgridmediatamlainnya">
															<i class="fa fa-plus mr-1"></i> Tambah Data
														</button>
													</div>
													<div class="card-body">
														<div id="gridmediatamlainnya"></div>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
							<div class="form-row templatejawaban" id="templatepewarnaanlangsung">
								<div class="form-group account-btn text-center m-t-10">
									<span class="badge badge-primary">A. Sediaan Langsung</span>
								</div>
								<div class="form-group col-lg-12">
									<label>1. Pewarnaan Gram</label>
									<label for="lsg_selepitel" class="col-form-label">Sel Epitel</label>
									<select class="form-control ekspertiseseletc" id="lsg_selepitel" name="lsg_selepitel">
										<option value="">Pilih Salah Satu</option>
										@if(isset($jsonselepitel) && !empty($jsonselepitel))
											@foreach($jsonselepitel as $rows)
												<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
											@endforeach
										@endif
									</select>
								</div>
								<div class="form-group col-lg-12">
									<label for="lsg_selradang" class="col-form-label">Sel Radang</label>
									<select class="form-control ekspertiseseletc" id="lsg_selradang" name="lsg_selradang">
										<option value="">Pilih Salah Satu</option>
										@if(isset($jsonselradang) && !empty($jsonselradang))
											@foreach($jsonselradang as $rows)
												<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
											@endforeach
										@endif
									</select>
								</div>
								<div class="form-group col-lg-12">
									<div class="form-row">
										<div class="form-group col-lg-4">
											<label for="lsg_mikroorganisme" class="col-form-label">Mikroorganisme</label>
										</div>
										<div class="form-group col-lg-8">
											<div class="form-group">
												<select class="form-control ekspertiseseletc" id="lsg_mikroorganisme" name="lsg_mikroorganisme">
													<option value="">Pilih Salah Satu</option>
													@if(isset($jsonmikroorganisme) && !empty($jsonmikroorganisme))
														@foreach($jsonmikroorganisme as $rows)
															<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
														@endforeach
													@endif
												</select>
											</div>
											<div class="form-group">
												<select class="form-control select2" id="lsg_mikroorganismeoptional" name="lsg_mikroorganismeoptional[]" style="width: 100%;" multiple="multiple">
													<option>Pilih Salah Satu</option>
													@php
														$keys = array_keys($mikroorganismes);
														for($i = 0; $i < count($mikroorganismes); $i++) {
													@endphp
															<optgroup label="{{ $mikroorganismestlist[$i] }}">
															@php
																foreach($mikroorganismes[$keys[$i]] as $key => $value) {
															@endphp
																<option value="{{ $value['name'] }}">{!! $value['name'] !!}</option>
															@php
														}
															@endphp
															</optgroup>
													@php
													}
													@endphp
												</select>
											</div>
										</div>
									</div>
								</div>
								<div class="form-group col-lg-12">
									<label for="lsg_pewarnaanziehlnielsen" class="col-form-label">2. Pewarnaan Ziehl Neelsen (Pagi)</label>
									<select class="form-control ekspertiseseletc" id="lsg_pewarnaanziehlnielsen" name="lsg_pewarnaanziehlnielsen">
										<option value="">Pilih Salah Satu</option>
										@if(isset($jsonpewarnaanziehlnielsen) && !empty($jsonpewarnaanziehlnielsen))
											@foreach($jsonpewarnaanziehlnielsen as $rows)
												<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
											@endforeach
										@endif
									</select>
								</div>
								<div class="form-group col-lg-12">
									<label for="lsg_pewarnaanziehlnielsensewaktu" class="col-form-label">Pewarnaan Ziehl Neelsen (Sewaktu)</label>
									<select class="form-control ekspertiseseletc" id="lsg_pewarnaanziehlnielsensewaktu" name="lsg_pewarnaanziehlnielsensewaktu">
										<option value="">Pilih Salah Satu</option>
										@if(isset($jsonpewarnaanziehlnielsen) && !empty($jsonpewarnaanziehlnielsen))
											@foreach($jsonpewarnaanziehlnielsen as $rows)
												<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
											@endforeach
										@endif
									</select>
								</div>
								<div class="form-group col-lg-12"  id="lsg_pewarnaankohselect">
									<label for="lsg_pewarnaankoh" class="col-form-label">3. Pewarnaan KOH</label>
									<select class="form-control ekspertiseseletc" id="lsg_pewarnaankoh" name="lsg_pewarnaankoh">
										<option value="">Pilih Salah Satu</option>
										@if(isset($jsonpewarnaankoh) && !empty($jsonpewarnaankoh))
											@foreach($jsonpewarnaankoh as $rows)
												<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
											@endforeach
										@else
											<option value="Ditemukan morfologi Hifa">Ditemukan morfologi Hifa</option>
											<option value="Ditemukan morfologi <i>Budding Cell</i>">Ditemukan morfologi Budding Cell </option>
											<option value="Ditemukan morfologi <i>Conidia</i>">Ditemukan morfologi Conidia</option>
											<option value="Ditemukan morfologi Hifa dan <i>Budding Cell</i>">Ditemukan morfologi Hifa dan Budding Cell</option>
											<option value="Ditemukan morfologi Hifa dan <i>Conidia</i>">Ditemukan morfologi Hifa dan Conidia</option>
											<option value="Ditemukan morfologi <i>Budding Cell</i> dan <i>Conidia</i>">Ditemukan morfologi Budding Cell dan Conidia</option>
											<option value="Tidak ditemukan morfologi <i>Budding Cell</i>, Hifa dan <i>Conidia</i>">Tidak ditemukan morfologi Budding Cell, Hifa dan Conidia</option>
											<option value="Tidak ditemukan morfologi <i>Budding Cell</i> dan Hifa">Tidak ditemukan morfologi Budding Cell dan Hifa</option>
										@endif
										<option value="lainnya">Lainnya (Ketik Manual)</option>
									</select>
								</div>
								<div class="form-group col-lg-12" id="lsg_pewarnaankohteks">
									<label for="lsg_pewarnaankohoptional" class="col-form-label">3. Pewarnaan KOH</label>
									<input type="text" id="lsg_pewarnaankohoptional" name="lsg_pewarnaankohoptional" class="form-control ekspertiseteks">
								</div>
								<div class="form-group col-lg-12">
									<label for="lsg_pewarnaanneisser" class="col-form-label">4. Pewarnaan Neisser</label>
									<select class="form-control ekspertiseseletc" id="lsg_pewarnaanneisser" name="lsg_pewarnaanneisser">
										<option value="">Pilih Salah Satu</option>
										@if(isset($jsonpewarnaanneisser) && !empty($jsonpewarnaanneisser))
											@foreach($jsonpewarnaanneisser as $rows)
												<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
											@endforeach
										@endif
									</select>
								</div>
								<div class="form-group col-lg-12">
									<label for="lsg_pewarnaannegatif" class="col-form-label">5. Pewarnaan Negatif</label>
									<select class="form-control ekspertiseseletc" id="lsg_pewarnaannegatif" name="lsg_pewarnaannegatif">
										<option value="">Pilih Salah Satu</option>
										@if(isset($jsonpewarnaannegatif) && !empty($jsonpewarnaannegatif))
											@foreach($jsonpewarnaannegatif as $rows)
												<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
											@endforeach
										@endif
									</select>
								</div>
								<div class="form-group col-lg-12"  id="lsg_pewarnaangiesmaselect">
									<label for="lsg_pewarnaangiesma" class="col-form-label">6. Pewarnaan Giemsa</label>
									<select class="form-control ekspertiseseletc" id="lsg_pewarnaangiesma" name="lsg_pewarnaangiesma">
										<option value="">Pilih Salah Satu</option>
										@if(isset($jsonpewarnaangiemsa) && !empty($jsonpewarnaangiemsa))
											@foreach($jsonpewarnaangiemsa as $rows)
												<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
											@endforeach
										@else 
											<option value="Ditemukan morfologi <i>Inclusion Bodies</i> dan <i>Reticulate Bodies</i>">Ditemukan morfologi Inclusion Bodies dan Reticulate Bodies</option>
											<option value="Tidak ditemukan morfologi <i>Inclusion Bodies</i> dan <i>Reticulate Bodies</i>">Tidak ditemukan morfologi Inclusion Bodies dan Reticulate Bodies</option>
											<option value="Ditemukan morfologi kista <i>tropozoid</i>">Ditemukan morfologi kista tropozoid</option>
											<option value="Tidak ditemukan morfologi <i>kista tropozoid</i>">Tidak ditemukan morfologi kista tropozoid</option>
										@endif
										<option value="lainnya">Lainnya (Ketik Manual)</option>
									</select>
								</div>
								<div class="form-group col-lg-12" id="lsg_pewarnaangiesmateks">
									<label for="lsg_pewarnaangiesmaoptional" class="col-form-label">6. Pewarnaan Giemsa</label>
									<input type="text" id="lsg_pewarnaangiesmaoptional" name="lsg_pewarnaangiesmaoptional" class="form-control ekspertiseteks">
								</div>
								<div class="form-group col-lg-12">
									<label for="lsg_pewarnaanspora" class="col-form-label">7. Pewarnaan Spora</label>
									<select class="form-control ekspertiseseletc" id="lsg_pewarnaanspora" name="lsg_pewarnaanspora">
										<option value="">Pilih Salah Satu</option>
										@if(isset($jsonpewarnaanspora) && !empty($jsonpewarnaanspora))
											@foreach($jsonpewarnaanspora as $rows)
												<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
											@endforeach
										@endif
									</select>
								</div>
								<div class="form-group col-lg-12">
									<label for="lsg_pewarnaanlain" class="col-form-label">8. Pewarnaan Lain-Lain</label>
									<textarea id="lsg_pewarnaanlain" style="width: 100%; height: 200px; font-size: 12px; line-height: 18px; border: 1px solid #dddddd; padding: 10px;"></textarea>
								</div>
								<div class="form-group col-lg-12">
									<label>Nuggent Score</label>
									<div class="form-row">
										<div class="form-group col-lg-4">
											<label for="lsg_lactobacillus" class="col-form-label">Lactobacillus</label>
											<div class="form-row">
												<div class="form-group col-lg-6">
													<select class="form-control ekspertiseseletc" id="lsg_jumlahlactobacillus" name="lsg_jumlahlactobacillus">
														<option value="">Pilih Jumlah Per Lapang</option>
														@if(isset($jsonjumlahlactobacillus) && !empty($jsonjumlahlactobacillus))
															@foreach($jsonjumlahlactobacillus as $rows)
																<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
															@endforeach
														@endif
													</select>
												</div>
												<div class="form-group col-lg-6">
													<select class="form-control ekspertiseseletc" id="lsg_lactobacillus" name="lsg_lactobacillus">
														<option value="">Pilih Skore</option>
														@php
															$mulai = 0;
															while ($mulai != 5){
																echo '<option value="'.$mulai.'">'.$mulai.'</option>';
																$mulai++;
															}
														@endphp
													</select>
												</div>
											</div>
										</div>
										<div class="form-group col-lg-4">
											<label for="lsg_gardnerella" class="col-form-label">Gardnerella</label>
											<div class="form-row">
												<div class="form-group col-lg-6">
													<select class="form-control ekspertiseseletc" id="lsg_jumlahgardnerella" name="lsg_jumlahgardnerella">
														<option value="">Pilih Jumlah Per Lapang</option>
														@if(isset($jsonjumlahgardnerella) && !empty($jsonjumlahgardnerella))
															@foreach($jsonjumlahgardnerella as $rows)
																<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
															@endforeach
														@endif
													</select>
												</div>
												<div class="form-group col-lg-6">
													<select class="form-control ekspertiseseletc" id="lsg_gardnerella" name="lsg_gardnerella">
														<option value="">Pilih Skore</option>
														@php
															$mulai = 0;
															while ($mulai != 5){
																echo '<option value="'.$mulai.'">'.$mulai.'</option>';
																$mulai++;
															}
														@endphp
													</select>
												</div>
											</div>
										</div>
										<div class="form-group col-lg-4">
											<label for="lsg_mobiluncus" class="col-form-label">Mobiluncus</label>
											<div class="form-row">
												<div class="form-group col-lg-6">
													<select class="form-control ekspertiseseletc" id="lsg_jumlahmobiluncus" name="lsg_jumlahmobiluncus">
														<option value="">Pilih Jumlah Per Lapang</option>
														@if(isset($jsonjumlahmobiluncus) && !empty($jsonjumlahmobiluncus))
															@foreach($jsonjumlahmobiluncus as $rows)
																<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
															@endforeach
														@endif
													</select>
												</div>
												<div class="form-group col-lg-6">
													<select class="form-control ekspertiseseletc" id="lsg_mobiluncus" name="lsg_mobiluncus">
														<option value="">Pilih Skore</option>
														@php
															$mulai = 0;
															while ($mulai != 5){
																echo '<option value="'.$mulai.'">'.$mulai.'</option>';
																$mulai++;
															}
														@endphp
													</select>
												</div>
											</div>
											
										</div>
									</div>
								</div>
							</div>
							<div class="form-row templatejawaban" id="templatetbc">
								<div class="form-group col-lg-12">
									<div class="mt-12">
										<p class="sub-header mb-2">Jenis Terduga / Pasien TBC</p>
										<div class="checkbox form-check-inline">
											<input type="checkbox" class="ekspertisecheckbox" id="inlineCheckbox1" value="TBC SO">
											<label for="inlineCheckbox1"> TBC SO </label>
										</div>
										<div class="checkbox checkbox-success form-check-inline">
											<input type="checkbox" class="ekspertisecheckbox" id="inlineCheckbox2" value="TBC RO">
											<label for="inlineCheckbox2"> TBC RO </label>
										</div>
										<div class="checkbox checkbox-pink form-check-inline">
											<input type="checkbox" class="ekspertisecheckbox" id="inlineCheckbox3" value="Anak">
											<label for="inlineCheckbox3"> Anak </label>
										</div>
										<div class="checkbox checkbox-pink form-check-inline">
											<input type="checkbox" class="ekspertisecheckbox" id="inlineCheckbox4" value="HIV">
											<label for="inlineCheckbox4"> HIV </label>
										</div>
										<div class="checkbox checkbox-pink form-check-inline">
											<input type="checkbox" class="ekspertisecheckbox" id="inlineCheckbox5" value="DM">
											<label for="inlineCheckbox5"> DM </label>
										</div>
									</div>
								</div>
								<div class="form-group col-lg-12">
									<label for="id_noidsediaan" class="col-form-label">No. Identitas Sediaan</label>
									<input type="text" id="id_noidsediaan" name="id_noidsediaan" class="form-control ekspertiseteks">
								</div>
								<div class="form-group col-lg-6">
									<label for="id_tanggalpengambilancontohuji" class="col-form-label">Tanggal Pengambilan Contoh Uji</label>
									<input type="text" id="id_tanggalpengambilancontohuji" name="id_tanggalpengambilancontohuji" class="form-control ekspertiseteks">
								</div>
								<div class="form-group col-lg-6">
									<label for="id_tanggalpengirimancontohuji" class="col-form-label">Tanggal Pengiriman Contoh Uji</label>
									<input type="text" id="id_tanggalpengirimancontohuji" name="id_tanggalpengirimancontohuji" class="form-control ekspertiseteks">
								</div>
								<div class="form-group col-lg-12">
									<label for="id_lamariwayatpengobatantb" class="col-form-label">Lama Riwayat Pengobatan Terduga/Pasien TBC</label>
									<select class="form-control ekspertiseseletc" id="id_lamariwayatpengobatantb" name="id_lamariwayatpengobatantb">
										<option value="">Pilih Salah Satu</option>
										<option value="Riwayat Pengobatan &gt;= 5 tahun">Riwayat Pengobatan &gt;= 5 tahun</option>
										<option value="Riwayat Pengobatan &lt; 5 tahun">Riwayat Pengobatan &lt; 5 tahun</option>
									</select>
								</div>
								<div class="form-group col-lg-6">
									<label for="id_jenispemeriksaantb" class="col-form-label">Jenis Pemeriksaan</label>
									<select class="form-control ekspertiseseletc" id="id_jenispemeriksaantb" name="id_jenispemeriksaantb">
										<option value="">Pilih Salah Satu</option>
										<option value="Mikroskopis">Mikroskopis</option>
										<option value="TCM MTB Rif (Xpert)">TCM MTB Rif Ultra (Xpert)</option>
										<option value="TCM XDR (Xpert)">TCM XDR (Xpert)</option>
										<option value="TCM MTB Rif (Truenat)">TCM MTB Rif (Truenat)</option>
										<option value="TCM MTB Rif INH (BDMAX)">TCM MTB Rif INH (BDMAX)</option>
										<option value="PCR Open System">PCR Open System</option>
										<option value="LPA lini 1">LPA lini 1</option>
										<option value="LPA lini 2">LPA lini 2</option>
										<option value="Biakan">Biakan</option>
										<option value="Paket standar uji kepekaan">Paket standar uji kepekaan</option>
									</select>
								</div>
								<div class="form-group col-lg-6" id="pilihanlokasianatomi">
									<label for="id_lokasianatomi" class="col-form-label">Lokasi Anatomi</label>
									<select class="form-control ekspertiseseletc" id="id_lokasianatomi" name="id_lokasianatomi">
										<option value="">Pilih Salah Satu</option>
										<option value="Paru">Paru</option>
										<option value="Ekstraparu">Ekstraparu</option>
									</select>
								</div>
								<div class="form-group col-lg-6" id="tekslokasianatomi">
									<label for="id_ekstraparu" class="col-form-label">Ekstraparu</label>
									<input type="text" id="id_ekstraparu" name="id_ekstraparu" class="form-control ekspertiseteks" placeholder="lokasi:.....">
								</div>
								<div class="form-group col-lg-4">
									<label for="id_alasanpemeriksaan" class="col-form-label">Alasan Pemeriksaan</label>
									<select class="form-control ekspertiseseletc" id="id_alasanpemeriksaan" name="id_alasanpemeriksaan">
										<option value="">Pilih Salah Satu</option>
										<option value="Diagnosis TBC">Diagnosis TBC</option>
										<option value="Diagnosis Baseline TBC">Diagnosis Baseline TBC</option>
										<option value="Akhir Pengobatan">Akhir Pengobatan</option>
									</select>
								</div>
								<div class="form-group col-lg-8">
									<div class="form-row">
										<div class="form-group col-lg-8">Pemantauan kemajuan pengobatan (Follow up)</div>
										<div class="form-group col-lg-4"><input type="text" id="id_bulankemajuantbfollow" name="id_bulankemajuantbfollow" class="form-control ekspertiseteks" placeholder="Bulan ke:....."></div>
									</div>
									<div class="form-row">
										<div class="form-group col-lg-8">Pemeriksaan ulang</div>
										<div class="form-group col-lg-4"><input type="text" id="id_bulanpemeriksaanulang" name="id_bulanpemeriksaanulang" class="form-control ekspertiseteks" placeholder="Bulan ke:....."></div>
									</div>
									<div class="form-row">
										<div class="form-group col-lg-8">Pemeriksaan setelah selesai pengobatan</div>
										<div class="form-group col-lg-4"><input type="text" id="id_bulanpemeriksaansetelahselesai" name="id_bulanpemeriksaansetelahselesai" class="form-control ekspertiseteks" placeholder="Bulan ke:....."></div>
									</div>
									<div class="form-row">
										<div class="form-group col-lg-8">No.Reg.TBC/TBC RO Fasyankes</div>
										<div class="form-group col-lg-4"><input type="text" id="id_noregfasyankes" name="id_noregfasyankes" class="form-control ekspertiseteks"></div>
									</div>
									<div class="form-row">
										<div class="form-group col-lg-8">No.Reg.TBC/TBC RO Kab/ Kota</div>
										<div class="form-group col-lg-4"><input type="text" id="id_noregkota" name="id_noregkota" class="form-control ekspertiseteks"></div>
									</div>
								</div>
								<div class="form-group col-lg-4" id="pilihancontohuji">
									<label for="id_contohuji" class="col-form-label">Contoh Uji</label>
									<select class="form-control ekspertiseseletc" id="id_contohuji" name="id_contohuji">
										<option value="">Pilih Salah Satu</option>
										<option value="Dahak">Dahak</option>
										<option value="Lainnya">Lainnya</option>
									</select>
								</div>
								<div class="form-group col-lg-4" id="tekscontohuji">
									<label for="id_contohujilainnya" class="col-form-label">Contoh Uji</label>
									<input type="text" id="id_contohujilainnya" name="id_contohujilainnya" class="form-control ekspertiseteks" placeholder=".....">
								</div>
								<div class="form-group col-lg-8">
									<div class="mt-12">
										<p class="sub-header mb-2">Secara visual dahak tampak (Sewaktu)</p>
										<div class="checkbox form-check-inline">
											<input type="checkbox" class="ekspertisecheckbox" id="inlineCheckbox6" value="Nanah Lendir">
											<label for="inlineCheckbox6"> Nanah Lendir </label>
										</div>
										<div class="checkbox checkbox-success form-check-inline">
											<input type="checkbox" class="ekspertisecheckbox" id="inlineCheckbox7" value="Bercak darah">
											<label for="inlineCheckbox7"> Bercak darah </label>
										</div>
										<div class="checkbox checkbox-pink form-check-inline">
											<input type="checkbox" class="ekspertisecheckbox" id="inlineCheckbox8" value="Air liur">
											<label for="inlineCheckbox8"> Air liur </label>
										</div>
									</div>
									<div class="mt-12">
										<p class="sub-header mb-2">Secara visual dahak tampak (Pagi)</p>
										<div class="checkbox form-check-inline">
											<input type="checkbox" class="ekspertisecheckbox" id="inlineCheckbox9" value="Nanah Lendir">
											<label for="inlineCheckbox9"> Nanah Lendir </label>
										</div>
										<div class="checkbox checkbox-success form-check-inline">
											<input type="checkbox" class="ekspertisecheckbox" id="inlineCheckbox10" value="Bercak darah">
											<label for="inlineCheckbox10"> Bercak darah </label>
										</div>
										<div class="checkbox checkbox-pink form-check-inline">
											<input type="checkbox" class="ekspertisecheckbox" id="inlineCheckbox11" value="Air liur">
											<label for="inlineCheckbox11"> Air liur </label>
										</div>
									</div>
								</div>
								<div class="form-group col-lg-12 hasilpemeriksaantb" id="hasilpemeriksaantbbiakan">
									<div class="form-row">
										<div class="form-group col-lg-4">
											<label for="hasilpemeriksaantbbiakan_tgl" class="col-form-label">Tanggal Hasil di Laporkan</label>
											<input type="text" id="hasilpemeriksaantbbiakan_tgl" name="hasilpemeriksaantbbiakan_tgl" class="form-control ekspertiseteks">
										</div>
										<div class="form-group col-lg-8">
											<div class="form-group">
												<label for="hasilpemeriksaantbbiakan_pagi" class="col-form-label">Hasil Pemeriksaan Mikroskopis (BTA/lainnya) (Pagi)</label>
												<select class="form-control ekspertiseseletc" id="hasilpemeriksaantbbiakan_pagi" name="hasilpemeriksaantbbiakan_pagi">
													<option value="">Pilih Salah Satu</option>
													<option value="+++">+++</option>
													<option value="++">++</option>
													<option value="+">+</option>
													<option value="1-9">1-9</option>
													<option value="Neg">Neg</option>
												</select>
											</div>
											<div class="form-group">
												<label for="hasilpemeriksaantbbiakan_sewaktu" class="col-form-label">Hasil Pemeriksaan Mikroskopis (BTA/lainnya) (Sewaktu)</label>
												<select class="form-control ekspertiseseletc" id="hasilpemeriksaantbbiakan_sewaktu" name="hasilpemeriksaantbbiakan_sewaktu">
													<option value="">Pilih Salah Satu</option>
													<option value="+++">+++</option>
													<option value="++">++</option>
													<option value="+">+</option>
													<option value="1-9">1-9</option>
													<option value="Neg">Neg</option>
												</select>
											</div>
										</div>
									</div>
									<div class="form-row">
										<div class="form-group col-lg-4">
											<label for="hasilpemeriksaantbbiakan_tglbiakan" class="col-form-label">Tanggal Hasil di Laporkan</label>
											<input type="text" id="hasilpemeriksaantbbiakan_tglbiakan" name="hasilpemeriksaantbbiakan_tglbiakan" class="form-control ekspertiseteks">
										</div>
										<div class="form-group col-lg-8">
											<div class="form-group">
												<label for="hasilpemeriksaantbbiakan_hasilbiakanmgit" class="col-form-label">Hasil Biakan (MGIT)</label>
												<select class="form-control ekspertiseseletc" id="hasilpemeriksaantbbiakan_hasilbiakanmgit" name="hasilpemeriksaantbbiakan_hasilbiakanmgit">
													<option value="">Pilih Salah Satu</option>
													<option value="Pos">Pos</option>
													<option value="Neg">Neg</option>
													<option value="NTM">NTM</option>
													<option value="KTM">KTM</option>
													<option value="TDL">TDL</option>
												</select>
											</div>
											<div class="form-group">
												<label for="hasilpemeriksaantbbiakan_hasilbiakanlj" class="col-form-label">Hasil Biakan (LJ)</label>
												<select class="form-control ekspertiseseletc" id="hasilpemeriksaantbbiakan_hasilbiakanlj" name="hasilpemeriksaantbbiakan_hasilbiakanlj">
													<option value="">Pilih Salah Satu</option>
													<option value="3+">3+</option>
													<option value="2+">2+</option>
													<option value="1+">1+</option>
													<option value="1-9">1-9</option>
													<option value="Neg">Neg</option>
													<option value="NTM">NTM</option>
													<option value="KTM">KTM</option>
													<option value="TDL">TDL</option>
												</select>
											</div>
										</div>
									</div>
								</div>
								<div class="form-group col-lg-12 hasilpemeriksaantb" id="hasilpemeriksaantmikroskopis">
									<div class="form-row">
										<div class="form-group col-lg-4">
											<label for="hasilpemeriksaantmikroskopis_tglsewaktu" class="col-form-label">Tanggal Hasil di Laporkan</label>
											<input type="text" id="hasilpemeriksaantmikroskopis_tglsewaktu" name="hasilpemeriksaantmikroskopis_tglsewaktu" class="form-control ekspertiseteks">
										</div>
										<div class="form-group col-lg-8">
											<div class="form-group">
												<label for="hasilpemeriksaantmikroskopis_hasilsewaktu" class="col-form-label">Hasil Pemeriksaan Mikroskopis (BTA/lainnya) (Sewaktu)</label>
												<select class="form-control ekspertiseseletc" id="hasilpemeriksaantmikroskopis_hasilsewaktu" name="hasilpemeriksaantmikroskopis_hasilsewaktu">
													<option value="">Pilih Salah Satu</option>
													<option value="+++">+++</option>
													<option value="++">++</option>
													<option value="+">+</option>
													<option value="1-9">1-9</option>
													<option value="Neg">Neg</option>
												</select>
											</div>
										</div>
									</div>
									<div class="form-row">
										<div class="form-group col-lg-4">
											<label for="hasilpemeriksaantmikroskopis_tglpagi" class="col-form-label">Tanggal Hasil di Laporkan</label>
											<input type="text" id="hasilpemeriksaantmikroskopis_tglpagi" class="form-control ekspertiseteks">
										</div>
										<div class="col-lg-8">
											<div class="form-group">
												<label for="hasilpemeriksaantmikroskopis_hasilpagi" class="col-form-label">Hasil Pemeriksaan Mikroskopis (BTA/lainnya) (Pagi)</label>
												<select class="form-control ekspertiseseletc" id="hasilpemeriksaantmikroskopis_hasilpagi" name="hasilpemeriksaantmikroskopis_hasilpagi">
													<option value="">Pilih Salah Satu</option>
													<option value="+++">+++</option>
													<option value="++">++</option>
													<option value="+">+</option>
													<option value="1-9">1-9</option>
													<option value="Neg">Neg</option>
												</select>
											</div>
										</div>
									</div>
								</div>
								<div class="form-group col-lg-12 hasilpemeriksaantb" id="hasilpemeriksaanttcmmtbrifxpert">
									<div class="form-row">
										<div class="form-group col-lg-4">
											<div class="form-row">
												<div class="form-group col-lg-12">
													<label for="hasilpemeriksaanttcmmtbrifxpert_tglsewaktu" class="col-form-label">Tanggal Hasil di Laporkan</label>
													<input type="text" id="hasilpemeriksaanttcmmtbrifxpert_tglsewaktu" name="hasilpemeriksaanttcmmtbrifxpert_tglsewaktu" class="form-control ekspertiseteks">
												</div>
												<div class="form-group col-lg-12">
													<label for="hasilpemeriksaanttcmmtbrifxpert_kodeunik" class="col-form-label">Kode Unik</label>
													<input type="text" id="hasilpemeriksaanttcmmtbrifxpert_kodeunik" name="hasilpemeriksaanttcmmtbrifxpert_kodeunik" class="form-control ekspertiseteks">
												</div>
											</div>
										</div>
										<div class="form-group col-lg-8">
											<label for="hasilpemeriksaanttcmmtbrifxpert_hasilsewaktu" class="col-form-label">Hasil Pemeriksaan TCM MTB Rif (Xpert) (Sewaktu)</label>
											<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbrifxpert_hasilsewaktu" name="hasilpemeriksaanttcmmtbrifxpert_hasilsewaktu">
												<option value="">Pilih Salah Satu</option>
												<option value="Neg">Neg</option>
												<option value="Rif Sen">Rif Sen</option>
												<option value="Rif Res">Rif Res</option>
												<option value="Rif Indet">Rif Indet</option>
												<option value="Invalid">Invalid</option>
												<option value="Error">Error</option>
												<option value="No result">No result</option>
											</select>
										</div>
									</div>
									<div class="form-row">
										<div class="form-group col-lg-4">
											<div class="form-row">
												<div class="form-group col-lg-12">
													<label for="hasilpemeriksaanttcmmtbrifxpert_tglpagi" class="col-form-label">Tanggal Hasil di Laporkan</label>
													<input type="text" id="hasilpemeriksaanttcmmtbrifxpert_tglpagi" name="hasilpemeriksaanttcmmtbrifxpert_tglpagi" class="form-control ekspertiseteks">
												</div>
												<div class="form-group col-lg-12">
													<label for="hasilpemeriksaanttcmmtbrifxpert_kodeunikpagi" class="col-form-label">Kode Unik</label>
													<input type="text" id="hasilpemeriksaanttcmmtbrifxpert_kodeunikpagi" name="hasilpemeriksaanttcmmtbrifxpert_kodeunikpagi" class="form-control ekspertiseteks">
												</div>
											</div>
										</div>
										<div class="form-group col-lg-8">
											<label for="hasilpemeriksaanttcmmtbrifxpert_hasilpagi" class="col-form-label">Hasil Pemeriksaan TCM MTB Rif (Xpert) (Pagi)</label>
											<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbrifxpert_hasilpagi" name="hasilpemeriksaanttcmmtbrifxpert_hasilpagi">
												<option value="">Pilih Salah Satu</option>
												<option value="Neg">Neg</option>
												<option value="Rif Sen">Rif Sen</option>
												<option value="Rif Res">Rif Res</option>
												<option value="Rif Indet">Rif Indet</option>
												<option value="Invalid">Invalid</option>
												<option value="Error">Error</option>
												<option value="No result">No result</option>
											</select>
										</div>
									</div>
								</div>
								<div class="form-group col-lg-12 hasilpemeriksaantb" id="hasilpemeriksaanttcmmtbxdrxpert">
									<div class="form-row">
										<div class="form-group col-lg-4">
											<div class="form-row">
												<div class="form-group col-lg-12">
													<label for="hasilpemeriksaanttcmmtbxdrxpert_tglpagi" class="col-form-label">Tanggal Hasil di Laporkan</label>
													<input type="text" id="hasilpemeriksaanttcmmtbxdrxpert_tglpagi" name="hasilpemeriksaanttcmmtbxdrxpert_tglpagi" class="form-control ekspertiseteks">
												</div>
												<div class="form-group col-lg-12">
													<label for="hasilpemeriksaanttcmmtbxdrxpert_kodeunikpagi" class="col-form-label">Kode Unik</label>
													<input type="text" id="hasilpemeriksaanttcmmtbxdrxpert_kodeunikpagi" name="hasilpemeriksaanttcmmtbxdrxpert_kodeunikpagi" class="form-control ekspertiseteks">
												</div>
											</div>
										</div>
										<div class="form-group col-lg-8">
											<div class="mt-12">
												<p class="sub-header mb-2">Hasil Pemeriksaan TCM XDR (Xpert) (Pagi)</p>
												<div class="form-row">
													<div class="form-group col-lg-6">
														<div class="form-row">
															<div class="form-group col-lg-8">TCM XDR</div>
															<div class="form-group col-lg-4">
																<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbxdrxpert_pagi" name="hasilpemeriksaanttcmmtbxdrxpert_pagi">
																	<option value=""></option>
																	<option value="Valid">Valid</option>
																	<option value="Invalid">Invalid</option>
																	<option value="No Result">No Result</option>
																	<option value="Error">Error</option>
																</select>
															</div>
														</div>
														<div class="form-row">
															<div class="form-group col-lg-8">MTB</div>
															<div class="form-group col-lg-4">
																<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbxdrxpert_pagimtb" name="hasilpemeriksaanttcmmtbxdrxpert_pagimtb">
																	<option value=""></option>
																	<option value="Detected">MTB Detected (D)</option>
																	<option value="Not Detected">MTB Not Detected (ND)</option>
																</select>
															</div>
														</div>
														<div class="form-row">
															<div class="form-group col-lg-8">H Low</div>
															<div class="form-group col-lg-4">
																<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbxdrxpert_paginhlow" name="hasilpemeriksaanttcmmtbxdrxpert_paginhlow">
																	<option value=""></option>
																	<option value="S">S</option>
																	<option value="I">I</option>
																	<option value="R">R</option>
																	<option value="Invalid">Invalid</option>
																	<option value="Error">Error</option>
																</select>
															</div>
														</div>
														<div class="form-row">
															<div class="form-group col-lg-8">H</div>
															<div class="form-group col-lg-4">
																<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbxdrxpert_pagih" name="hasilpemeriksaanttcmmtbxdrxpert_pagih">
																	<option value=""></option>
																	<option value="S">S</option>
																	<option value="I">I</option>
																	<option value="R">R</option>
																	<option value="Invalid">Invalid</option>
																	<option value="Error">Error</option>
																</select>
															</div>
														</div>
														<div class="form-row">
															<div class="form-group col-lg-8">FQ Low</div>
															<div class="form-group col-lg-4">
																<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbxdrxpert_pagifqlow" name="hasilpemeriksaanttcmmtbxdrxpert_pagifqlow">
																	<option value=""></option>
																	<option value="S">S</option>
																	<option value="I">I</option>
																	<option value="R">R</option>
																	<option value="Invalid">Invalid</option>
																	<option value="Error">Error</option>
																</select>
															</div>
														</div>
														<div class="form-row">
															<div class="form-group col-lg-8">FQ</div>
															<div class="form-group col-lg-4">
																<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbxdrxpert_pagifq" name="hasilpemeriksaanttcmmtbxdrxpert_pagifq">
																	<option value=""></option>
																	<option value="S">S</option>
																	<option value="I">I</option>
																	<option value="R">R</option>
																	<option value="Invalid">Invalid</option>
																	<option value="Error">Error</option>
																</select>
															</div>
														</div>
													</div>
													<div class="form-group col-lg-6">
														
														<div class="form-row">
															<div class="form-group col-lg-8">Amk</div>
															<div class="form-group col-lg-4">
																<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbxdrxpert_pagiamk" name="hasilpemeriksaanttcmmtbxdrxpert_pagiamk">
																	<option value=""></option>
																	<option value="S">S</option>
																	<option value="I">I</option>
																	<option value="R">R</option>
																	<option value="Invalid">Invalid</option>
																	<option value="Error">Error</option>
																</select>
															</div>
														</div>
														<div class="form-row">
															<div class="form-group col-lg-8">Km</div>
															<div class="form-group col-lg-4">
																<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbxdrxpert_pagikm" name="hasilpemeriksaanttcmmtbxdrxpert_pagikm">
																	<option value=""></option>
																	<option value="S">S</option>
																	<option value="I">I</option>
																	<option value="R">R</option>
																	<option value="Invalid">Invalid</option>
																	<option value="Error">Error</option>
																</select>
															</div>
														</div>
														<div class="form-row">
															<div class="form-group col-lg-8">Cm</div>
															<div class="form-group col-lg-4">
																<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbxdrxpert_pagicm" name="hasilpemeriksaanttcmmtbxdrxpert_pagicm">
																	<option value=""></option>
																	<option value="S">S</option>
																	<option value="I">I</option>
																	<option value="R">R</option>
																	<option value="Invalid">Invalid</option>
																	<option value="Error">Error</option>
																</select>
															</div>
														</div>
														<div class="form-row">
															<div class="form-group col-lg-8">Eto</div>
															<div class="form-group col-lg-4">
																<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbxdrxpert_pagieto" name="hasilpemeriksaanttcmmtbxdrxpert_pagieto">
																	<option value=""></option>
																	<option value="S">S</option>
																	<option value="I">I</option>
																	<option value="R">R</option>
																	<option value="Invalid">Invalid</option>
																	<option value="Error">Error</option>
																</select>
															</div>
														</div>
													</div>
												</div>
											</div>
										</div>
									</div>
									<div class="form-row">
										<div class="form-group col-lg-4">
											<div class="form-row">
												<div class="form-group col-lg-12">
													<label for="hasilpemeriksaanttcmmtbxdrxpert_tglsewaktu" class="col-form-label">Tanggal Hasil di Laporkan</label>
													<input type="text" id="hasilpemeriksaanttcmmtbxdrxpert_tglsewaktu" name="hasilpemeriksaanttcmmtbxdrxpert_tglsewaktu" class="form-control ekspertiseteks">
												</div>
												<div class="form-group col-lg-12">
													<label for="hasilpemeriksaanttcmmtbxdrxpert_kodeunik" class="col-form-label">Kode Unik</label>
													<input type="text" id="hasilpemeriksaanttcmmtbxdrxpert_kodeunik" name="hasilpemeriksaanttcmmtbxdrxpert_kodeunik" class="form-control ekspertiseteks">
												</div>
											</div>
										</div>
										<div class="form-group col-lg-8">
											<div class="mt-12">
												<p class="sub-header mb-2">Hasil Pemeriksaan TCM XDR (Xpert) (Sewaktu)</p>
												<div class="form-row">
													<div class="form-group col-lg-6">
														<div class="form-row">
															<div class="form-group col-lg-8">TCM XDR</div>
															<div class="form-group col-lg-4">
																<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbxdrxpert_sewaktu" name="hasilpemeriksaanttcmmtbxdrxpert_sewaktu">
																	<option value=""></option>
																	<option value="Valid">Valid</option>
																	<option value="Invalid">Invalid</option>
																	<option value="No Result">No Result</option>
																	<option value="Error">Error</option>
																</select>
															</div>
														</div>
														<div class="form-row">
															<div class="form-group col-lg-8">MTB</div>
															<div class="form-group col-lg-4">
																<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbxdrxpert_sewaktumtb" name="hasilpemeriksaanttcmmtbxdrxpert_sewaktumtb">
																	<option value=""></option>
																	<option value="Detected">MTB Detected (D)</option>
																	<option value="Not Detected">MTB Not Detected (ND)</option>
																</select>
															</div>
														</div>
														<div class="form-row">
															<div class="form-group col-lg-8">H Low</div>
															<div class="form-group col-lg-4">
																<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbxdrxpert_sewaktunhlow" name="hasilpemeriksaanttcmmtbxdrxpert_sewaktunhlow">
																	<option value=""></option>
																	<option value="S">S</option>
																	<option value="I">I</option>
																	<option value="R">R</option>
																	<option value="Invalid">Invalid</option>
																	<option value="Error">Error</option>
																	<option value="No Result">No Result</option>
																</select>
															</div>
														</div>
														<div class="form-row">
															<div class="form-group col-lg-8">H</div>
															<div class="form-group col-lg-4">
																<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbxdrxpert_sewaktuh" name="hasilpemeriksaanttcmmtbxdrxpert_sewaktuh">
																	<option value=""></option>
																	<option value="S">S</option>
																	<option value="I">I</option>
																	<option value="R">R</option>
																	<option value="Invalid">Invalid</option>
																	<option value="Error">Error</option>
																	<option value="No Result">No Result</option>
																</select>
															</div>
														</div>
														<div class="form-row">
															<div class="form-group col-lg-8">FQ Low</div>
															<div class="form-group col-lg-4">
																<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbxdrxpert_sewaktufqlow" name="hasilpemeriksaanttcmmtbxdrxpert_sewaktufqlow">
																	<option value=""></option>
																	<option value="S">S</option>
																	<option value="I">I</option>
																	<option value="R">R</option>
																	<option value="Invalid">Invalid</option>
																	<option value="Error">Error</option>
																	<option value="No Result">No Result</option>
																</select>
															</div>
														</div>
														<div class="form-row">
															<div class="form-group col-lg-8">FQ</div>
															<div class="form-group col-lg-4">
																<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbxdrxpert_sewaktufq" name="hasilpemeriksaanttcmmtbxdrxpert_sewaktufq">
																	<option value=""></option>
																	<option value="S">S</option>
																	<option value="I">I</option>
																	<option value="R">R</option>
																	<option value="Invalid">Invalid</option>
																	<option value="Error">Error</option>
																	<option value="No Result">No Result</option>
																</select>
															</div>
														</div>
													</div>
													<div class="form-group col-lg-6">
														<div class="form-row">
															<div class="form-group col-lg-8">Amk</div>
															<div class="form-group col-lg-4">
																<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbxdrxpert_sewaktuamk" name="hasilpemeriksaanttcmmtbxdrxpert_sewaktuamk">
																	<option value=""></option>
																	<option value="S">S</option>
																	<option value="I">I</option>
																	<option value="R">R</option>
																	<option value="Invalid">Invalid</option>
																	<option value="Error">Error</option>
																	<option value="No Result">No Result</option>
																</select>
															</div>
														</div>
														<div class="form-row">
															<div class="form-group col-lg-8">Km</div>
															<div class="form-group col-lg-4">
																<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbxdrxpert_sewaktukm" name="hasilpemeriksaanttcmmtbxdrxpert_sewaktukm">
																	<option value=""></option>
																	<option value="S">S</option>
																	<option value="I">I</option>
																	<option value="R">R</option>
																	<option value="Invalid">Invalid</option>
																	<option value="Error">Error</option>
																	<option value="No Result">No Result</option>
																</select>
															</div>
														</div>
														<div class="form-row">
															<div class="form-group col-lg-8">Cm</div>
															<div class="form-group col-lg-4">
																<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbxdrxpert_sewaktucm" name="hasilpemeriksaanttcmmtbxdrxpert_sewaktucm">
																	<option value=""></option>
																	<option value="S">S</option>
																	<option value="I">I</option>
																	<option value="R">R</option>
																	<option value="Invalid">Invalid</option>
																	<option value="Error">Error</option>
																	<option value="No Result">No Result</option>
																</select>
															</div>
														</div>
														<div class="form-row">
															<div class="form-group col-lg-8">Eto</div>
															<div class="form-group col-lg-4">
																<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbxdrxpert_sewaktueto" name="hasilpemeriksaanttcmmtbxdrxpert_sewaktueto">
																	<option value=""></option>
																	<option value="S">S</option>
																	<option value="I">I</option>
																	<option value="R">R</option>
																	<option value="Invalid">Invalid</option>
																	<option value="Error">Error</option>
																	<option value="No Result">No Result</option>
																</select>
															</div>
														</div>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
							<div class="form-row templatejawaban" id="templateviralload">
								<div class="form-group col-lg-3">
									<label for="vl_parameter01" class="col-form-label">Parameter</label>
									<select class="form-control ekspertiseseletc" id="vl_parameter01" name="vl_parameter01">
										<option value="">Pilih Salah Satu</option>
										@if(isset($jsonvlparameter) && !empty($jsonvlparameter))
											@foreach($jsonvlparameter as $rows)
												<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
											@endforeach
										@endif
									</select>
								</div>
								<div class="form-group col-lg-3" id="vl_hasildiv1select">
									<label for="vl_hasil01" class="col-form-label">Hasil</label>
									<select class="form-control ekspertiseseletc" id="vl_hasil01" name="vl_hasil01">
										<option value="">Pilih Salah Satu</option>
										<option value="NOT DETECTED">NOT DETECTED</option>
										<optgroup label="HIV">
											<option value="&lt;40">&lt;40</option>
											<option value="&lt;1.60">&lt;1.60</option>
											<option value="40">40</option>
											<option value="41">41</option>
											<option value="44">44</option>
											<option value="45">45</option>
											<option value="145">145</option>
										</optgroup>
										<optgroup label="TCM-HCV">
											<option value="&lt;10">&lt;10</option>
											<option value="20">20</option>
											<option value="322">322</option>
											<option value="511">511</option>
											<option value="144">144</option>
											<option value="211">211</option>
										</optgroup>
										<option value="lainnya">lainnya</option>
									</select>
								</div>
								<div class="form-group col-lg-3" id="vl_hasildiv1teks">
									<label for="vl_hasil01teks" class="col-form-label">Hasil</label>
									<input type="text" name="vl_hasil01teks" id="vl_hasil01teks" class="form-control ekspertiseteks">
								</div>
								<div class="form-group col-lg-3">
									<label for="vl_satuan01" class="col-form-label">Satuan</label>
									<select class="form-control ekspertiseseletc" id="vl_satuan01" name="vl_satuan01">
										<option value="">Pilih Salah Satu</option>
										<option value="copies/mL">copies/mL</option>
										<option value="IU/mL">IU/mL</option>
									</select>
								</div>
								<div class="form-group col-lg-3">
									<label for="vl_rujukan01" class="col-form-label">Nilai Rujukan</label>
									<select class="form-control ekspertiseseletc" id="vl_rujukan01" name="vl_rujukan01">
										<option value="">Pilih Salah Satu</option>
										<option value="40-10.000.000">40-10.000.000</option>
										<option value="10-100.000.000">10-100.000.000</option>
									</select>
								</div>
								<div class="form-group col-lg-3">
									<label for="vl_parameter02" class="col-form-label">Parameter 02</label>
									<select class="form-control ekspertiseseletc" id="vl_parameter02" name="vl_parameter02">
										<option value="">Pilih Salah Satu</option>
										<option value="LOG">LOG</option>
									</select>
								</div>
								<div class="form-group col-lg-3" id="vl_hasildiv2select">
									<label for="vl_hasil02" class="col-form-label">Hasil 02</label>
									<select class="form-control ekspertiseseletc" id="vl_hasil02" name="vl_hasil02">
										<option value="">Pilih Salah Satu</option>
										<option value="NOT DETECTED">NOT DETECTED</option>
										<optgroup label="HIV">
											<option value="&lt;1,60">&lt;1,60</option>
											<option value="&lt;1,85">&lt;1,85</option>
											<option value="1,60">1,60</option>
											<option value="1,61">1,61</option>
											<option value="1,64">1,64</option>
											<option value="1,65">1,65</option>
											<option value="2,16">2,16</option>
										</optgroup>
										<optgroup label="TCM-HCV">
											<option value="1,00">1,00</option>
											<option value="1,30">1,30</option>
											<option value="2,51">2,51</option>
											<option value="2,71">2,71</option>
											<option value="2,16">2,16</option>
											<option value="2,34">2,34</option>
										</optgroup>
										<option value="lainnya">lainnya</option>
									</select>
								</div>
								<div class="form-group col-lg-3" id="vl_hasildiv2teks">
									<label for="vl_hasil02teks" class="col-form-label">Hasil 02</label>
									<input type="text" name="vl_hasil02teks" id="vl_hasil02teks" class="form-control ekspertiseteks">
								</div>
								<div class="form-group col-lg-3">
									<label for="vl_satuan02" class="col-form-label">Satuan 02</label>
									<select class="form-control ekspertiseseletc" id="vl_satuan02" name="vl_satuan02">
										<option value="">Pilih Salah Satu</option>
										<option value="LOG">LOG</option>
									</select>
								</div>
								<div class="form-group col-lg-3">
									<label for="vl_rujukan02" class="col-form-label">Nilai Rujukan 02</label>
									<select class="form-control ekspertiseseletc" id="vl_rujukan02" name="vl_rujukan02">
										<option value="">Pilih Salah Satu</option>
										<option value="1,6-7">1,6-7</option>
										<option value="&nbsp;">&nbsp;</option>
									</select>
								</div>
								<div class="form-group col-lg-12">
									<textarea id="viralload" style="width: 100%; height: 200px; font-size: 12px; line-height: 18px; border: 1px solid #dddddd; padding: 10px;"></textarea>
								</div>
							</div>
							<div class="form-row templatejawaban" id="templateleptospira">
								<div class="form-group col-lg-6">
									<label for="igg_parameter" class="col-form-label">IgG Leptospira</label>
									<select class="form-control ekspertiseseletc" id="igg_parameter" name="igg_parameter">
										<option value="">Pilih Salah Satu</option>
										<option value="Positif">Positif</option>
										<option value="Negatif">Negatif</option>
									</select>
								</div>
								<div class="form-group col-lg-6">
									<label for="igm_parameter" class="col-form-label">IgM Leptospira</label>
									<select class="form-control ekspertiseseletc" id="igm_parameter" name="igm_parameter">
										<option value="">Pilih Salah Satu</option>
										<option value="Positif">Positif</option>
										<option value="Negatif">Negatif</option>
									</select>
								</div>
								<div class="form-group col-lg-12">
									<label for="iggigm_interpretasi" class="col-form-label">Interpretasi</label>
									<textarea id="iggigm_interpretasi" style="width: 100%; height: 200px; font-size: 12px; line-height: 18px; border: 1px solid #dddddd; padding: 10px;"></textarea>
								</div>
							</div>
							<div class="form-row templatejawaban" id="templatecovid">
								<div class="row">
									<div class="form-group col-lg-4">
										<label for="covid_virus01" class="col-form-label">Virus SARS-Cov-2</label>
										<select class="form-control ekspertiseseletc" id="covid_virus01" name="covid_virus01">
											<option value="">Pilih Salah Satu</option>
											<option value="Positif">Positif</option>
											<option value="Negatif">Negatif</option>
											<option value="Tidak Diperiksa">Tidak Diperiksa</option>
										</select>
									</div>
									<div class="form-group col-lg-4">
										<label for="covid_satuanvirus01" class="col-form-label">Satuan</label>
										<input type="text" name="covid_satuanvirus01" id="covid_satuanvirus01" class="form-control ekspertiseteks">
									</div>
									<div class="form-group col-lg-4">
										<label for="covid_rujukanvirus01" class="col-form-label">Nilai Rujukan</label>
										<input type="text" name="covid_rujukanvirus01" id="covid_rujukanvirus01" class="form-control ekspertiseteks">
									</div>
								</div>
								<div class="row">
									<div class="form-group col-lg-4">
										<label for="covid_virus02" class="col-form-label">Influenza A</label>
										<select class="form-control ekspertiseseletc" id="covid_virus02" name="covid_virus02">
											<option value="">Pilih Salah Satu</option>
											<option value="Positif">Positif</option>
											<option value="Negatif">Negatif</option>
											<option value="Tidak Diperiksa">Tidak Diperiksa</option>
										</select>
									</div>
									<div class="form-group col-lg-4">
										<label for="covid_satuanvirus02" class="col-form-label">Satuan</label>
										<input type="text" name="covid_satuanvirus02" id="covid_satuanvirus02" class="form-control ekspertiseteks">
									</div>
									<div class="form-group col-lg-4">
										<label for="covid_rujukanvirus02" class="col-form-label">Nilai Rujukan</label>
										<input type="text" name="covid_rujukanvirus02" id="covid_rujukanvirus02" class="form-control ekspertiseteks">
									</div>
								</div>
								<div class="row">
									<div class="form-group col-lg-4">
										<label for="covid_virus03" class="col-form-label">Indluenza B</label>
										<select class="form-control ekspertiseseletc" id="covid_virus03" name="covid_virus03">
											<option value="">Pilih Salah Satu</option>
											<option value="Positif">Positif</option>
											<option value="Negatif">Negatif</option>
											<option value="Tidak Diperiksa">Tidak Diperiksa</option>
										</select>
									</div>
									<div class="form-group col-lg-4">
										<label for="covid_satuanvirus03" class="col-form-label">Satuan</label>
										<input type="text" name="covid_satuanvirus03" id="covid_satuanvirus03" class="form-control ekspertiseteks">
									</div>
									<div class="form-group col-lg-4">
										<label for="covid_rujukanvirus03" class="col-form-label">Nilai Rujukan</label>
										<input type="text" name="covid_rujukanvirus03" id="covid_rujukanvirus03" class="form-control ekspertiseteks">
									</div>
								</div>
								<div class="row">
									<div class="form-group col-lg-4">
										<label for="covid_virus04" class="col-form-label">RSV</label>
										<select class="form-control ekspertiseseletc" id="covid_virus04" name="covid_virus04">
											<option value="">Pilih Salah Satu</option>
											<option value="Positif">Positif</option>
											<option value="Negatif">Negatif</option>
											<option value="Tidak Diperiksa">Tidak Diperiksa</option>
										</select>
									</div>
									<div class="form-group col-lg-4">
										<label for="covid_satuanvirus04" class="col-form-label">Satuan</label>
										<input type="text" name="covid_satuanvirus04" id="covid_satuanvirus04" class="form-control ekspertiseteks">
									</div>
									<div class="form-group col-lg-4">
										<label for="covid_rujukanvirus04" class="col-form-label">Nilai Rujukan</label>
										<input type="text" name="covid_rujukanvirus04" id="covid_rujukanvirus04" class="form-control ekspertiseteks">
									</div>
								</div>
							</div>
							<div class="form-group setelahdipilihtemplate">
								<div class="form-group account-btn text-center m-t-10">
									
									<button type="button" class="btn btn-light waves-effect" id="btngenexpert">
										<i class="mdi mdi-alpha-g-box mr-1"></i> GenExpert
									</button>
									<button type="button" class="btn btn-light waves-effect" id="btnabbot">
										<i class="mdi mdi-adobe mr-1"></i> Abbot
									</button>
									<button type="button" class="btn btn-light waves-effect" id="btnopensiarb">
										<i class="mdi mdi-alphabetical-variant mr-1"></i> SIR Ab
									</button>
								</div>
								<ul class="nav nav-tabs tabs-bordered nav-justified">
									<li class="nav-item">
										<a href="#tabel_vitek" data-toggle="tab" aria-expanded="false" class="nav-link active">
											<i class="fi-monitor mr-2"></i> Vitek
										</a>
									</li>
									<li class="nav-item">
										<a href="#tabel_manual1" data-toggle="tab" aria-expanded="true" class="nav-link">
											<i class="fi-monitor mr-2"></i> MALDITOF
										</a>
									</li>
									<li class="nav-item">
										<a href="#tabel_manual2" data-toggle="tab" aria-expanded="true" class="nav-link">
											<i class="fi-monitor mr-2"></i> Bakteri Manual I
										</a>
									</li>
								</ul>
								<div class="tab-content">
									<div class="tab-pane active" id="tabel_vitek">
										<div class="card">
											<div class="card-box">
												<div class="card-body">
													<div class="form-group col-lg-12 table-responsive p-0">
														<div class="row">
															<div class="form-group col-lg-3">
																<input type="text" id="bakteri" name="bakteri" class="form-control ekspertiseteks" readonly>
															</div>
															<div class="form-group col-lg-3">
																<select class="form-control ekspertiseseletc" id="bakterisir" name="bakterisir">
																	<option value="">Pilih Salah Satu</option>
																	<option value="ESBL">ESBL</option>
																	<option value="MRSA">MRSA</option>
																	<option value="MDR">MDR</option>
																	<option value="XDR">XDR</option>
																	<option value="PDR">PDR</option>
																	<option value="Carbapenem Resistant">Carbapenem Resistant</option>
																	<option value="MDR Carbapenem Resistant">MDR Carbapenem Resistant</option>
																	<option value="XDR Carbapenem Resistant">XDR Carbapenem Resistant</option>
																</select>
															</div>
															<div class="form-group col-lg-3" id="id_bakterihitungkolselect">
																<select class="form-control ekspertiseseletc" id="id_bakterihitungkol" name="id_bakterihitungkol">
																	<option value="">Pilih Salah Satu</option>
																	<option value="&ge; 10⁵ CFU/ml Urine (Bakteriuria bermakna)">&ge; 10⁵ CFU/ml Urine (Bakteriuria bermakna)</option>
																	<option value="&ge; 10⁵ CFU/ml Urine (Candiduria bermakna)">&ge; 10⁵ CFU/ml Urine (Candiduria bermakna)</option>
																	<option value="&ge; 10³ CFU/ml Urine (Bakteriuria bermakna)">&ge; 10³ CFU/ml Urine (Bakteriuria bermakna)</option>
																	<option value="8 x 10³  CFU/ml Urine (Bakteriuria bermakna)">8 x 10³ CFU/ml Urine (Bakteriuria bermakna)</option>
																	<option value="lainnya">lainnya</option>
																</select>
															</div>
															<div class="form-group col-lg-3" id="id_bakterihitungkolteks">
																<input type="text" id="id_bakterihitungkolteks" name="id_bakterihitungkolteks" class="form-control ekspertiseteks">
															</div>
															<div class="form-group col-lg-3">
																<select class="form-control ekspertiseseletc" id="id_baktericetak" name="id_baktericetak">
																	<option value="YA">CETAK</option>
																	<option value="TIDAK">TIDAK DI CETAK</option>
																</select>
															</div>
															<div class="form-group col-lg-3">
																<button type="button" class="btn btn-primary btn-rounded" id="btnopenviteklain">
																	<i class="mdi mdi-alpha-v-box mr-1"></i> Tarik dari No.Lab lain
																</button>
															</div>
														</div>
														<table class="table table-striped table-valign-middle" id="tblvitek">
															<thead>
																<tr>
																	<th>No</th>
																	<th>
																		<button type="button" class="btn btn-primary btn-rounded" id="btnunprintall">
																			<i class="fa fa-ban"></i>
																		</button> 
																	</th>
																	<th>Antibiotik</th>
																	<th>Value</th>
																	<th>Interpretation</th>
																	<th>Print Value.?</th>
																	<th>Edit</th>
																	<th>Delete</th>
																</tr>
															</thead>
															<tbody>

															</tbody>
														</table>
													</div>
												</div>
											</div>
										</div>
									</div>
									<div class="tab-pane" id="tabel_manual1">
										<div class="card">
											<div class="card-box">
												<div class="card-body">
													<div class="form-group col-lg-12 table-responsive p-0">
														<div class="row">
															<div class="form-group col-lg-3">
																<select class="form-control select2" id="id_bakteri01" name="id_bakteri01" style="width: 100%;">
																	<option>Pilih Salah Satu</option>
																	@php
																		$keys = array_keys($organismes);
																		for($i = 0; $i < count($organismes); $i++) {
																	@endphp
																			<optgroup label="{{ $bacterycateggories[$i] }}">
																			@php
																				foreach($organismes[$keys[$i]] as $key => $value) {
																			@endphp
																				<option value="{{ $value['name'] }}">{!! $value['name'] !!}</option>
																			@php
																		}
																			@endphp
																			</optgroup>
																	@php
																	}
																	@endphp
																</select>
															</div>
															<div class="form-group col-lg-3">
																<select class="form-control ekspertiseseletc" id="id_antibiotikmanual1" name="id_antibiotikmanual1">
																	<option value="default">Default</option>
																	@if(isset($antibiotics) && count($antibiotics) > 0)
																		@foreach($antibiotics as $antibiotic)
																			<option value="{{ trim($antibiotic->setmanual) }}">{{ trim($antibiotic->setmanual) }}</option>
																		@endforeach
																	@endif
																</select>
															</div>
															<div class="form-group col-lg-2">
																<select class="form-control ekspertiseseletc" id="id_bakterisir01" name="id_bakterisir01">
																	<option value="">Pilih Salah Satu</option>
																	<option value="ESBL">ESBL</option>
																	<option value="MRSA">MRSA</option>
																	<option value="MDR">MDR</option>
																	<option value="XDR">XDR</option>
																	<option value="PDR">PDR</option>
																	<option value="Carbapenem Resistant">Carbapenem Resistant</option>
																	<option value="MDR Carbapenem Resistant">MDR Carbapenem Resistant</option>
																	<option value="XDR Carbapenem Resistant">XDR Carbapenem Resistant</option>
																</select>
															</div>
															<div class="form-group col-lg-2" id="id_bakterihitungkol01select">
																<select class="form-control ekspertiseseletc" id="id_bakterihitungkol01" name="id_bakterihitungkol01">
																	<option value="">Pilih Salah Satu</option>
																	<option value="&ge; 10⁵ CFU/ml Urine (Bakteriuria bermakna)">&ge; 10⁵ CFU/ml Urine (Bakteriuria bermakna)</option>
																	<option value="&ge; 10⁵ CFU/ml Urine (Candiduria bermakna)">&ge; 10⁵ CFU/ml Urine (Candiduria bermakna)</option>
																	<option value="&ge; 10³ CFU/ml Urine (Bakteriuria bermakna)">&ge; 10³ CFU/ml Urine (Bakteriuria bermakna)</option>
																	<option value="8 x 10³  CFU/ml Urine (Bakteriuria bermakna)">8 x 10³ CFU/ml Urine (Bakteriuria bermakna)</option>
																	<option value="lainnya">lainnya</option>
																</select>
															</div>
															<div class="form-group col-lg-2" id="id_bakterihitungkol01teks">
																<input type="text" id="id_bakterihitungkolteks01" name="id_bakterihitungkolteks01" class="form-control ekspertiseteks">
															</div>
															<div class="form-group col-lg-2">
																<button type="button" class="btn btn-warninng btn-rounded" id="btnsimpannewkumanmanual1">
																	<i class="fa fa-plus mr-1"></i>
																</button>
															</div>
															<div class="form-group col-lg-3">
																<select class="form-control ekspertiseseletc" id="id_bakteri01cetak" name="id_bakteri01cetak">
																	<option value="YA">CETAK</option>
																	<option value="TIDAK">TIDAK DI CETAK</option>
																</select>
															</div>
															<div class="form-group col-lg-6">
																<p id="id_bakteri01cetakket" style="font-size: 11px; color: red;"></p>
															</div>
														</div>
														<table class="table table-striped table-valign-middle" id="tblkumanmanual1">
															<thead>
																<tr>
																	<th>No</th>
																	<th>
																		<button type="button" class="btn btn-primary btn-rounded" id="btnunprintallkumanmanual1">
																			<i class="fa fa-ban"></i>
																		</button> 
																	</th>
																	<th>Antibiotik</th>
																	<th>Value</th>
																	<th>Interpretation</th>
																	<th>S</th>
																	<th>I</th>
																	<th>R</th>
																	<th>Print Value.?</th>
																	<th>Delete</th>
																</tr>
															</thead>
															<tbody>

															</tbody>
														</table>
													</div>
												</div>
											</div>
										</div>
									</div>
									<div class="tab-pane" id="tabel_manual2">
										<div class="card">
											<div class="card-box">
												<div class="card-body">
													<div class="form-group col-lg-12 table-responsive p-0">
														<div class="row">
															<div class="form-group col-lg-3">
																<select class="form-control select2" id="id_bakteri02" name="id_bakteri02" style="width: 100%;">
																	<option>Pilih Salah Satu</option>
																	@php
																		$keys = array_keys($organismes);
																		for($i = 0; $i < count($organismes); $i++) {
																	@endphp
																			<optgroup label="{{ $bacterycateggories[$i] }}">
																			@php
																				foreach($organismes[$keys[$i]] as $key => $value) {
																			@endphp
																				<option value="{{ $value['name'] }}">{!! $value['name'] !!}</option>
																			@php
																		}
																			@endphp
																			</optgroup>
																	@php
																	}
																	@endphp
																</select>
															</div>
															<div class="form-group col-lg-3">
																<select class="form-control ekspertiseseletc" id="id_antibiotikmanual2" name="id_antibiotikmanual2">
																	<option value="default">Default</option>
																	@if(isset($antibiotics) && count($antibiotics) > 0)
																		@foreach($antibiotics as $antibiotic)
																			<option value="{{ trim($antibiotic->setmanual) }}">{{ trim($antibiotic->setmanual) }}</option>
																		@endforeach
																	@endif
																</select>
															</div>
															<div class="form-group col-lg-2">
																<select class="form-control ekspertiseseletc" id="id_bakterisir02" name="id_bakterisir02">
																	<option value="">Pilih Salah Satu</option>
																	<option value="ESBL">ESBL</option>
																	<option value="MRSA">MRSA</option>
																	<option value="MDR">MDR</option>
																	<option value="XDR">XDR</option>
																	<option value="PDR">PDR</option>
																	<option value="Carbapenem Resistant">Carbapenem Resistant</option>
																	<option value="MDR Carbapenem Resistant">MDR Carbapenem Resistant</option>
																	<option value="XDR Carbapenem Resistant">XDR Carbapenem Resistant</option>
																</select>
															</div>
															<div class="form-group col-lg-2" id="id_bakterihitungkol02select">
																<select class="form-control ekspertiseseletc" id="id_bakterihitungkol02" name="id_bakterihitungkol02">
																	<option value="">Pilih Salah Satu</option>
																	<option value="&ge; 10⁵ CFU/ml Urine (Bakteriuria bermakna)">&ge; 10⁵ CFU/ml Urine (Bakteriuria bermakna)</option>
																	<option value="&ge; 10⁵ CFU/ml Urine (Candiduria bermakna)">&ge; 10⁵ CFU/ml Urine (Candiduria bermakna)</option>
																	<option value="&ge; 10³ CFU/ml Urine (Bakteriuria bermakna)">&ge; 10³ CFU/ml Urine (Bakteriuria bermakna)</option>
																	<option value="8 x 10³  CFU/ml Urine (Bakteriuria bermakna)">8 x 10³ CFU/ml Urine (Bakteriuria bermakna)</option>
																	<option value="lainnya">lainnya</option>
																</select>
															</div>
															<div class="form-group col-lg-2" id="id_bakterihitungkol02teks">
																<input type="text" id="id_bakterihitungkolteks02" name="id_bakterihitungkolteks02" class="form-control ekspertiseteks">
															</div>
															<div class="form-group col-lg-2">
																<button type="button" class="btn btn-warninng btn-rounded" id="btnsimpannewkumanmanual2">
																	<i class="fa fa-plus mr-1"></i>
																</button>
															</div>
															<div class="form-group col-lg-3">
																<select class="form-control ekspertiseseletc" id="id_bakteri02cetak" name="id_bakteri02cetak">
																	<option value="YA">CETAK</option>
																	<option value="TIDAK">TIDAK DI CETAK</option>
																</select>
															</div>
														</div>
														<table class="table table-striped table-valign-middle" id="tblkumanmanual2">
															<thead>
																<tr>
																	<th>No</th>
																	<th>
																		<button type="button" class="btn btn-primary btn-rounded" id="btnunprintallkumanmanual2">
																			<i class="fa fa-ban"></i>
																		</button> 
																	</th>
																	<th>Antibiotik</th>
																	<th>Value</th>
																	<th>Interpretation</th>
																	<th>S</th>
																	<th>I</th>
																	<th>R</th>
																	<th>Print Value.?</th>
																	<th>Delete</th>
																</tr>
															</thead>
															<tbody>

															</tbody>
														</table>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
								<div class="form-group col-lg-12" id="sirabketerangan">
									<div id="gridsirab"></div>
								</div>
								<div class="form-group col-lg-12">
									<label for="keterangan" class="col-form-label">Expertise</label>
									<textarea id="keterangan" style="width: 100%; height: 300px;"></textarea>
								</div>
								<div class="form-group col-lg-12" id="divadendumketerangan">
									<label for="addendumketerangan" class="col-form-label"><strong><font color="red">Alasan Kenapa Di Edit</font></strong></label>
									<textarea id="addendumketerangan" style="width: 100%; height: 300px;"></textarea>
								</div>
							</div>
							<div class="form-row">
								<div class="col-lg-2">
									<input type="hidden" id="periksa_id" name="periksa_id">
									<button type="button" id="btnkembali" class="btn btn-primary">Back</button>
								</div>
								<div class="col-lg-2 setelahdipilihtemplate">
									<button type="button" id="btnsavedraft" class="btn btn-success pull-left">Save as Draft</button>
								</div>
								@if (Session('previlage') == 'supervisor' OR Session('previlage') == 'developer')
									<div class="col-lg-2">
										@if ($master === 'buku03')
											<div class="form-check mb-2">
												<input class="form-check-input" type="checkbox" id="nilai_kritis" name="nilai_kritis">
												<label class="form-check-label" for="nilai_kritis">
													Nilai Kritis
												</label>
											</div>
										@else
											<small class="text-danger d-inline-block mt-2">Nilai kritis hanya berlaku di sample darah.</small>
										@endif
									</div>
									<div class="col-lg-4 btn-group">
										<button type="button" id="btnsavepreliminary" class="btn btn-danger pull-right">Save Preliminary result</button>
										<button type="button" id="btnsendexpertisetopacs" class="btn btn-warning pull-right">Save Final Result</button>
								@else
									<div class="col-lg-4">
										<button type="button" id="btnSavePeriksa" class="btn btn-warning pull-right">Save and Send To SPV</button>
								@endif
									</div>
							</div>
							<div class="form-group setelahdipilihtemplate">
								<div id="gridadendum"></div>
							</div>
						</div>
					</div>
				</div>
			</form>
		</div>
		<button id="refresh-btn" title="Refresh Halaman">🔄</button>
	</div>
</div>
<div class="modal fade" id="modalerror">
  <div class="modal-dialog">
	<div class="modal-content">
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal">&times;</button>
			<h4 class="modal-title">Error..!!!</h4>
		</div>
		<div class="modal-body">
			<div class="form-group">
				<input type="text" class="form-control" readonly="readonly" id="err_text">
			</div><!-- /input-group -->
		</div>
		<div class="modal-footer">
			<button type="button" class="btn btn-outline pull-left" data-dismiss="modal">Close</button>	
		</div>
	</div>
  </div>
</div>
<div class="modal fade" id="modalpembatalan">
  <div class="modal-dialog">
	<div class="modal-content">
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal">&times;</button>
			<h4 class="modal-title">Isikan Alasannya</h4>
		</div>
		<div class="modal-body">
			<div class="form-group">
				<input type="text" id="id_alasanpembatan" class="form-control">
			</div>
		</div>
		<div class="modal-footer">
			<button type="button" class="btn btn-outline pull-left" data-dismiss="modal">Close</button>	
			<button type="button" id="btncancel" class="btn btn-danger">Cancel Order</button>
		</div>
	</div>
  </div>
</div>
<div class="modal fade" id="modalgakdipake">
  <div class="modal-dialog">
	<div class="modal-content">
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal">&times;</button>
			<h4 class="modal-title">Gakdipake..!!!</h4>
		</div>
		<div class="modal-body">
			<div class="form-group">
				<textarea class="form-control" id="kesimpulan" name="kesimpulan" rows="5"></textarea>
			</div>
		</div>
		<div class="modal-footer">
			<button type="button" class="btn btn-outline pull-left" data-dismiss="modal">Close</button>	
		</div>
	</div>
  </div>
</div>
<div class="modal fade" id="modaleditormic">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">&times;</button>
				<h4 class="modal-title">Editor MIC</h4>
			</div>
			<div class="modal-body">
				<div class="form-group">
					<input type="text" class="form-control" name="micvalue_editor" id="micvalue_editor">
				</div>
				<div class="form-group">
					<select class="form-control" id="micinterpretatition_editor" name="micinterpretatition_editor">
						<option value=""></option>
						<option value="S">Sensitif</option>
						<option value="I">Intermediate</option>
						<option value="R">Resisten</option>
						<option value="Invalid">Invalid</option>
						<option value="Error">Error</option>
						<option value="No Result">No Result</option>
					</select>
				</div>
			</div>
			<div class="modal-footer">
				<input type="hidden" name="micvalue_id" id="micvalue_id">
				<button type="button" class="btn btn-primary" id="btneditmicvalue">Simpan</button>	
				<button type="button" class="btn btn-outline pull-left" data-dismiss="modal">Close</button>	
			</div>
		</div>
	</div>
</div>
<div class="modal fade" id="modalgridmediabap">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">&times;</button>
				<h4 class="modal-title">Media BAP</h4>
			</div>
			<div class="modal-body">
				<div class="form-row">
					<div class="form-group col-lg-6">
						<select class="form-control" id="id_mediabapkuman">
							<option>Kuman 1</option>
							<option>Kuman 2</option>
							<option>Kuman 3</option>
							<option>Kuman 4</option>
							<option>Kuman 5</option>
						</select>
					</div>
					<div class="form-group col-lg-6">
						<select class="form-control" id="id_mediabap">
							<option>Pilih Salah Satu</option>
							@if(isset($jsonmediabap) && !empty($jsonmediabap))
								@foreach($jsonmediabap as $rows)
									<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
								@endforeach
							@endif
						</select>
					</div>
				</div>
				<div class="form-group">
					<label for="id_pemeriksaanhemolisa" class="col-form-label">Hemolisa</label>
					<select class="form-control ekspertiseseletc" id="id_pemeriksaanhemolisa" name="id_pemeriksaanhemolisa">
						<option value="">Pilih Salah Satu</option>
						<option value="Alpha">Alpha</option>
						<option value="Beta">Beta</option>
						<option value="Gamma">Gamma</option>
					</select>
				</div>
				<div class="form-group">
					<label for="id_pemeriksaankatalase" class="col-form-label">Katalase</label>
					<select class="form-control ekspertiseseletc" id="id_pemeriksaankatalase" name="id_pemeriksaankatalase">
						<option value="">Pilih Salah Satu</option>
						<option value="POS">POS</option>
						<option value="NEG">NEG</option>
					</select>
				</div>
				<div class="form-group">
					<label for="id_pemeriksaankabulase" class="col-form-label">Koagulase</label>
					<select class="form-control ekspertiseseletc" id="id_pemeriksaankabulase" name="id_pemeriksaankabulase">
						<option value="">Pilih Salah Satu</option>
						<option value="POS">POS</option>
						<option value="NEG">NEG</option>
					</select>
				</div>
				<div class="form-group">
					<label for="id_ujialainnyabap" class="col-form-label">Uji Lainnya</label>
					<input type="text" id="id_ujialainnyabap" name="id_ujialainnyabap" class="form-control ekspertiseteks">
				</div>

				
				<div class="form-group" id="id_bakterimediabapselect">
					<select class="form-control ekspertiseseletc" id="id_bakterihitungkolmediabap" name="id_bakterihitungkolmediabap">
						<option value="">Pilih Salah Satu</option>
						<option value="&ge; 10⁵ CFU/ml Urine (Bakteriuria bermakna)">&ge; 10⁵ CFU/ml Urine (Bakteriuria bermakna)</option>
						<option value="&ge; 10⁵ CFU/ml Urine (Candiduria bermakna)">&ge; 10⁵ CFU/ml Urine (Candiduria bermakna)</option>
						<option value="&ge; 10³ CFU/ml Urine (Bakteriuria bermakna)">&ge; 10³ CFU/ml Urine (Bakteriuria bermakna)</option>
						<option value="8 x 10³  CFU/ml Urine (Bakteriuria bermakna)">8 x 10³ CFU/ml Urine (Bakteriuria bermakna)</option>
						<option value="lainnya">lainnya</option>
					</select>
				</div>
				<div class="form-group" id="id_bakterimediabapteks">
					<input type="text" id="id_bakterihitungkolmediabapteks" name="id_bakterihitungkolmediabapteks" class="form-control ekspertiseteks">
				</div>
				<div class="form-group">
					<label for="id_statusmediabap" class="col-form-label">Status</label>
					<select class="form-control ekspertiseseletc" id="id_statusmediabap" name="id_statusmediabap">
						<option value="">Pilih Salah Satu</option>
						<option value="Inkubasi Lanjutan">Inkubasi Lanjutan</option>
						<option value="Sub Kultur">Sub Kultur</option>
						<option value="Proses identifikasi dan uji kepekaan vitek">Proses identifikasi dan uji kepekaan vitek</option>
						<option value="Proses identifikasi dan uji kepekaan manual">Proses identifikasi dan uji kepekaan manual</option>
						<option value="Proses identifikasi malditof+ uji kepekaan vitek">Proses identifikasi malditof+ uji kepekaan vitek</option>
						<option value="Proses identifikasi malditof+ uji kepekaan manual">Proses identifikasi malditof+ uji kepekaan manual</option>
						<option value="Proses identifikasi malditof+ uji kepekaan vitek">Proses identifikasi malditof+ uji kepekaan vitek</option>
						<option value="Tidak Lanjut Identifikasi">Tidak Lanjut Identifikasi</option>
					</select>
				</div>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-primary" id="btnsimpanpertumbuhankolonibap">Simpan</button>	
				<button type="button" class="btn btn-outline pull-left" data-dismiss="modal">Close</button>	
			</div>
		</div>
	</div>
</div>
<div class="modal fade" id="modalgridmediasdar1">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">&times;</button>
				<h4 class="modal-title">Inkubasi suhu ruang 1 (R1)</h4>
			</div>
			<div class="modal-body">
				<div class="form-row">
					<div class="form-group col-lg-6">
						<select class="form-control" id="sdar1_mediakuman">
							<option>Kuman 1</option>
							<option>Kuman 2</option>
							<option>Kuman 3</option>
							<option>Kuman 4</option>
							<option>Kuman 5</option>
						</select>
					</div>
					<div class="form-group col-lg-6">
						<input type="text" id="sdar1_media" name="sdar1_media" class="form-control ekspertiseteks" placeholder="Masukkan Nama Media SDA">
					</div>
				</div>
				<div class="form-group">
					<label for="sdar1_pemeriksaanhemolisa" class="col-form-label">Tumbuh di Area Inokulasi.?</label>
					<select class="form-control ekspertiseseletc" id="sdar1_pemeriksaanhemolisa" name="sdar1_pemeriksaanhemolisa">
						<option value="">Pilih Salah Satu</option>
						<option value="YA">YA</option>
						<option value="TIDAK">TIDAK</option>
					</select>
				</div>
				<div class="form-group">
					<label for="sdar1_status" class="col-form-label">Status</label>
					<select class="form-control ekspertiseseletc" id="sdar1_status" name="sdar1_status">
						<option value="">Pilih Salah Satu</option>
						<option value="Tidak Lanjut Identifikasi">Tidak Lanjut Identifikasi</option>
						<option value="PATOGEN (Lanjut Identifikasi Vitek)">PATOGEN (Lanjut Identifikasi Vitek)</option>
						<option value="PATOGEN (Lanjut Identifikasi Manual)">PATOGEN (Lanjut Identifikasi Manual)</option>
					</select>
				</div>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-primary" id="btnsimpanpertumbuhankolonisdar1">Simpan</button>	
				<button type="button" class="btn btn-outline pull-left" data-dismiss="modal">Close</button>	
			</div>
		</div>
	</div>
</div>
<div class="modal fade" id="modalgridmediasdar2">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">&times;</button>
				<h4 class="modal-title">Inkubasi suhu ruang 2 (R2)</h4>
			</div>
			<div class="modal-body">
				<div class="form-row">
					<div class="form-group col-lg-6">
						<select class="form-control" id="sdar2_mediakuman">
							<option>Kuman 1</option>
							<option>Kuman 2</option>
							<option>Kuman 3</option>
							<option>Kuman 4</option>
							<option>Kuman 5</option>
						</select>
					</div>
					<div class="form-group col-lg-6">
						<input type="text" id="sdar2_media" name="sdar2_media" class="form-control ekspertiseteks" placeholder="Masukkan Nama Media SDA">
					</div>
				</div>
				<div class="form-group">
					<label for="sdar2_pemeriksaanhemolisa" class="col-form-label">Tumbuh di Area Inokulasi.?</label>
					<select class="form-control ekspertiseseletc" id="sdar2_pemeriksaanhemolisa" name="sdar2_pemeriksaanhemolisa">
						<option value="">Pilih Salah Satu</option>
						<option value="YA">YA</option>
						<option value="TIDAK">TIDAK</option>
					</select>
				</div>
				<div class="form-group">
					<label for="sdar2_status" class="col-form-label">Status</label>
					<select class="form-control ekspertiseseletc" id="sdar2_status" name="sdar2_status">
						<option value="">Pilih Salah Satu</option>
						<option value="Tidak Lanjut Identifikasi">Tidak Lanjut Identifikasi</option>
						<option value="PATOGEN (Lanjut Identifikasi Vitek)">PATOGEN (Lanjut Identifikasi Vitek)</option>
						<option value="PATOGEN (Lanjut Identifikasi Manual)">PATOGEN (Lanjut Identifikasi Manual)</option>
					</select>
				</div>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-primary" id="btnsimpanpertumbuhankolonisdar2">Simpan</button>	
				<button type="button" class="btn btn-outline pull-left" data-dismiss="modal">Close</button>	
			</div>
		</div>
	</div>
</div>
<div class="modal fade" id="modalgridmediasdai1">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">&times;</button>
				<h4 class="modal-title">Inkubasi suhu inkubator 1 (I1)</h4>
			</div>
			<div class="modal-body">
				<div class="form-row">
					<div class="form-group col-lg-6">
						<select class="form-control" id="sdai1_mediakuman">
							<option>Kuman 1</option>
							<option>Kuman 2</option>
							<option>Kuman 3</option>
							<option>Kuman 4</option>
							<option>Kuman 5</option>
						</select>
					</div>
					<div class="form-group col-lg-6">
						<input type="text" id="sdai1_media" name="sdai1_media" class="form-control ekspertiseteks" placeholder="Masukkan Nama Media SDA">
					</div>
				</div>
				<div class="form-group">
					<label for="sdai1_pemeriksaanhemolisa" class="col-form-label">Tumbuh di Area Inokulasi.?</label>
					<select class="form-control ekspertiseseletc" id="sdai1_pemeriksaanhemolisa" name="sdai1_pemeriksaanhemolisa">
						<option value="">Pilih Salah Satu</option>
						<option value="YA">YA</option>
						<option value="TIDAK">TIDAK</option>
					</select>
				</div>
				<div class="form-group">
					<label for="sdai1_status" class="col-form-label">Status</label>
					<select class="form-control ekspertiseseletc" id="sdai1_status" name="sdai1_status">
						<option value="">Pilih Salah Satu</option>
						<option value="Tidak Lanjut Identifikasi">Tidak Lanjut Identifikasi</option>
						<option value="PATOGEN (Lanjut Identifikasi Vitek)">PATOGEN (Lanjut Identifikasi Vitek)</option>
						<option value="PATOGEN (Lanjut Identifikasi Manual)">PATOGEN (Lanjut Identifikasi Manual)</option>
					</select>
				</div>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-primary" id="btnsimpanpertumbuhankolonisdai1">Simpan</button>	
				<button type="button" class="btn btn-outline pull-left" data-dismiss="modal">Close</button>	
			</div>
		</div>
	</div>
</div>
<div class="modal fade" id="modalgridmediasdai2">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">&times;</button>
				<h4 class="modal-title">Inkubasi suhu inkubator 2 (I2)</h4>
			</div>
			<div class="modal-body">
				<div class="form-row">
					<div class="form-group col-lg-6">
						<select class="form-control" id="sdai2_mediakuman">
							<option>Kuman 1</option>
							<option>Kuman 2</option>
							<option>Kuman 3</option>
							<option>Kuman 4</option>
							<option>Kuman 5</option>
						</select>
					</div>
					<div class="form-group col-lg-6">
						<input type="text" id="sdai2_media" name="sdai2_media" class="form-control ekspertiseteks" placeholder="Masukkan Nama Media SDA">
					</div>
				</div>
				<div class="form-group">
					<label for="sdai2_pemeriksaanhemolisa" class="col-form-label">Tumbuh di Area Inokulasi.?</label>
					<select class="form-control ekspertiseseletc" id="sdai2_pemeriksaanhemolisa" name="sdai2_pemeriksaanhemolisa">
						<option value="">Pilih Salah Satu</option>
						<option value="YA">YA</option>
						<option value="TIDAK">TIDAK</option>
					</select>
				</div>
				<div class="form-group">
					<label for="sdai2_status" class="col-form-label">Status</label>
					<select class="form-control ekspertiseseletc" id="sdai2_status" name="sdai2_status">
						<option value="">Pilih Salah Satu</option>
						<option value="Tidak Lanjut Identifikasi">Tidak Lanjut Identifikasi</option>
						<option value="PATOGEN (Lanjut Identifikasi Vitek)">PATOGEN (Lanjut Identifikasi Vitek)</option>
						<option value="PATOGEN (Lanjut Identifikasi Manual)">PATOGEN (Lanjut Identifikasi Manual)</option>
					</select>
				</div>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-primary" id="btnsimpanpertumbuhankolonisdai2">Simpan</button>	
				<button type="button" class="btn btn-outline pull-left" data-dismiss="modal">Close</button>	
			</div>
		</div>
	</div>
</div>
<div class="modal fade" id="modalgridmediacap">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">&times;</button>
				<h4 class="modal-title">Media CAP</h4>
			</div>
			<div class="modal-body">
				<div class="form-row">
					<div class="form-group col-lg-6">
						<select class="form-control" id="id_mediacapkuman">
							<option>Kuman 1</option>
							<option>Kuman 2</option>
							<option>Kuman 3</option>
							<option>Kuman 4</option>
							<option>Kuman 5</option>
						</select>
					</div>
					<div class="form-group col-lg-6">
						<select class="form-control" id="id_mediacap">
							<option>Pilih Salah Satu</option>
							@if(isset($jsonmediacap) && !empty($jsonmediacap))
								@foreach($jsonmediacap as $rows)
									<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
								@endforeach
							@endif
						</select>
					</div>
				</div>
				<div class="form-group">
					<label for="cap_pemeriksaankatalase" class="col-form-label">Katalase</label>
					<select class="form-control ekspertiseseletc" id="cap_pemeriksaankatalase" name="cap_pemeriksaankatalase">
						<option value="">Pilih Salah Satu</option>
						<option value="POS">POS</option>
						<option value="NEG">NEG</option>
					</select>
				</div>
				<div class="form-group">
					<label for="cap_pemeriksaankabulase" class="col-form-label">Koagulase</label>
					<select class="form-control ekspertiseseletc" id="cap_pemeriksaankabulase" name="cap_pemeriksaankabulase">
						<option value="">Pilih Salah Satu</option>
						<option value="POS">POS</option>
						<option value="NEG">NEG</option>
					</select>
				</div>
				<div class="form-group">
					<label for="id_ujialainnyacap" class="col-form-label">Uji Lainnya</label>
					<input type="text" id="id_ujialainnyacap" name="id_ujialainnyacap" class="form-control ekspertiseteks">
				</div>
				<div class="form-group">
					<label for="id_statusmediacap" class="col-form-label">Status</label>
					<select class="form-control ekspertiseseletc" id="id_statusmediacap" name="id_statusmediacap">
						<option value="">Pilih Salah Satu</option>
						<option value="Inkubasi Lanjutan">Inkubasi Lanjutan</option>
						<option value="Sub Kultur">Sub Kultur</option>
						<option value="Proses identifikasi dan uji kepekaan vitek">Proses identifikasi dan uji kepekaan vitek</option>
						<option value="Proses identifikasi dan uji kepekaan manual">Proses identifikasi dan uji kepekaan manual</option>
						<option value="Proses identifikasi malditof+ uji kepekaan vitek">Proses identifikasi malditof+ uji kepekaan vitek</option>
						<option value="Proses identifikasi malditof+ uji kepekaan manual">Proses identifikasi malditof+ uji kepekaan manual</option>
						<option value="Proses identifikasi malditof+ uji kepekaan vitek">Proses identifikasi malditof+ uji kepekaan vitek</option>
						<option value="Tidak Lanjut Identifikasi">Tidak Lanjut Identifikasi</option>
					</select>
				</div>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-primary" id="btnsimpanpertumbuhankolonicap">Simpan</button>	
				<button type="button" class="btn btn-outline pull-left" data-dismiss="modal">Close</button>	
			</div>
		</div>
	</div>
</div>
<div class="modal fade" id="modalgridmediamcconkey">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">&times;</button>
				<h4 class="modal-title">Media Mc Conkey</h4>
			</div>
			<div class="modal-body">
				<div class="form-row">
					<div class="form-group col-lg-6">
						<select class="form-control" id="id_mediamcconkeykuman">
							<option>Kuman 1</option>
							<option>Kuman 2</option>
							<option>Kuman 3</option>
							<option>Kuman 4</option>
							<option>Kuman 5</option>
						</select>
					</div>
					<div class="form-group col-lg-6">
						<select class="form-control" id="id_mediamcconkey">
							<option>Pilih Salah Satu</option>
							@if(isset($jsonmediamcconkey) && !empty($jsonmediamcconkey))
								@foreach($jsonmediamcconkey as $rows)
									<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
								@endforeach
							@endif
						</select>
					</div>
				</div>
				<div class="form-group">
					<label for="id_ujioksidasemcconkey" class="col-form-label">Oksidase</label>
					<select class="form-control ekspertiseseletc" id="id_ujioksidasemcconkey" name="id_ujioksidasemcconkey">
						<option value="">Pilih Salah Satu</option>
						<option value="POS">POS</option>
						<option value="NEG">NEG</option>
					</select>
				</div>
				<div class="form-group">
					<label for="id_ujialainnyamcconkey" class="col-form-label">Uji Lainnya</label>
					<input type="text" id="id_ujialainnyamcconkey" name="id_ujialainnyamcconkey" class="form-control ekspertiseteks">
				</div>
				
				<div class="form-group">
					<label for="id_statusmediamcconkey" class="col-form-label">Status</label>
					<select class="form-control ekspertiseseletc" id="id_statusmediamcconkey" name="id_statusmediamcconkey">
						<option value="">Pilih Salah Satu</option>
						<option value="Inkubasi Lanjutan">Inkubasi Lanjutan</option>
						<option value="Sub Kultur">Sub Kultur</option>
						<option value="Proses identifikasi dan uji kepekaan vitek">Proses identifikasi dan uji kepekaan vitek</option>
						<option value="Proses identifikasi dan uji kepekaan manual">Proses identifikasi dan uji kepekaan manual</option>
						<option value="Proses identifikasi malditof+ uji kepekaan vitek">Proses identifikasi malditof+ uji kepekaan vitek</option>
						<option value="Proses identifikasi malditof+ uji kepekaan manual">Proses identifikasi malditof+ uji kepekaan manual</option>
						<option value="Proses identifikasi malditof+ uji kepekaan vitek">Proses identifikasi malditof+ uji kepekaan vitek</option>
						<option value="Tidak Lanjut Identifikasi">Tidak Lanjut Identifikasi</option>
					</select>
				</div>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-primary" id="btnsimpanpertumbuhankolonimcconkey">Simpan</button>	
				<button type="button" class="btn btn-outline pull-left" data-dismiss="modal">Close</button>	
			</div>
		</div>
	</div>
</div>
<div class="modal fade" id="modalgridmediaselektif">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">&times;</button>
				<h4 class="modal-title">Media Selektif lainnya</h4>
			</div>
			<div class="modal-body">
				<div class="form-group">
					<input type="text" id="id_mediaselektif" name="id_mediaselektif" class="form-control ekspertiseteks">
				</div>
				<div class="form-group">
					<label for="sellainnya_pemeriksaanhemolisa" class="col-form-label">Hemolisa</label>
					<select class="form-control ekspertiseseletc" id="sellainnya_pemeriksaanhemolisa" name="sellainnya_pemeriksaanhemolisa">
						<option value="">Pilih Salah Satu</option>
						<option value="Alpha">Alpha</option>
						<option value="Beta">Beta</option>
						<option value="Gamma">Gamma</option>
					</select>
				</div>
				<div class="form-group">
					<label for="sellainnya_pemeriksaankatalase" class="col-form-label">Katalase</label>
					<select class="form-control ekspertiseseletc" id="sellainnya_pemeriksaankatalase" name="sellainnya_pemeriksaankatalase">
						<option value="">Pilih Salah Satu</option>
						<option value="POS">POS</option>
						<option value="NEG">NEG</option>
					</select>
				</div>
				<div class="form-group">
					<label for="sellainnya_pemeriksaankabulase" class="col-form-label">Koagulase</label>
					<select class="form-control ekspertiseseletc" id="sellainnya_pemeriksaankabulase" name="sellainnya_pemeriksaankabulase">
						<option value="">Pilih Salah Satu</option>
						<option value="POS">POS</option>
						<option value="NEG">NEG</option>
					</select>
				</div>
				<div class="form-group">
					<label for="id_ujioksidasesellainnya" class="col-form-label">Oksidase</label>
					<input type="text" id="id_ujioksidasesellainnya" name="id_ujioksidasesellainnya" class="form-control ekspertiseteks">
				</div>
				<div class="form-group">
					<label for="id_ujialainnyasellainnya" class="col-form-label">Uji Lainnya</label>
					<input type="text" id="id_ujialainnyasellainnya" name="id_ujialainnyasellainnya" class="form-control ekspertiseteks">
				</div>
				<div class="form-group">
					<label for="id_statusmediasellainnya" class="col-form-label">Status</label>
					<select class="form-control ekspertiseseletc" id="id_statusmediasellainnya" name="id_statusmediasellainnya">
						<option value="">Pilih Salah Satu</option>
						<option value="Inkubasi Lanjutan">Inkubasi Lanjutan</option>
						<option value="Sub Kultur">Sub Kultur</option>
						<option value="Proses identifikasi dan uji kepekaan vitek">Proses identifikasi dan uji kepekaan vitek</option>
						<option value="Proses identifikasi dan uji kepekaan manual">Proses identifikasi dan uji kepekaan manual</option>
						<option value="Proses identifikasi malditof+ uji kepekaan vitek">Proses identifikasi malditof+ uji kepekaan vitek</option>
						<option value="Proses identifikasi malditof+ uji kepekaan manual">Proses identifikasi malditof+ uji kepekaan manual</option>
						<option value="Proses identifikasi malditof+ uji kepekaan vitek">Proses identifikasi malditof+ uji kepekaan vitek</option>
						<option value="Tidak Lanjut Identifikasi">Tidak Lanjut Identifikasi</option>
					</select>
				</div>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-primary" id="btnsimpanpertumbuhankolonisellainnya">Simpan</button>	
				<button type="button" class="btn btn-outline pull-left" data-dismiss="modal">Close</button>	
			</div>
		</div>
	</div>
</div>
<div class="modal fade" id="modalgridmediatamlainnya">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">&times;</button>
				<h4 class="modal-title">Pemeriksaan Tambahan Lainnya</h4>
			</div>
			<div class="modal-body">
				<div class="form-group">
					<select class="form-control ekspertiseseletc" id="id_pemeriksaantl" name="id_pemeriksaantl">
						<option value="">Pilih Salah Satu</option>
						@if(isset($jsonpemeriksaantl) && !empty($jsonpemeriksaantl))
							@foreach($jsonpemeriksaantl as $rows)
								<option value="{!! $rows->name !!}">{!! $rows->name !!}</option>
							@endforeach
						@endif
					</select>
				</div>
				<div class="form-group">
					<label for="tamlainnya_pemeriksaanhemolisa" class="col-form-label">Hemolisa</label>
					<select class="form-control ekspertiseseletc" id="tamlainnya_pemeriksaanhemolisa" name="tamlainnya_pemeriksaanhemolisa">
						<option value="">Pilih Salah Satu</option>
						<option value="Alpha">Alpha</option>
						<option value="Beta">Beta</option>
						<option value="Gamma">Gamma</option>
					</select>
				</div>
				<div class="form-group">
					<label for="tamlainnya_pemeriksaankatalase" class="col-form-label">Katalase</label>
					<select class="form-control ekspertiseseletc" id="tamlainnya_pemeriksaankatalase" name="tamlainnya_pemeriksaankatalase">
						<option value="">Pilih Salah Satu</option>
						<option value="POS">POS</option>
						<option value="NEG">NEG</option>
					</select>
				</div>
				<div class="form-group">
					<label for="tamlainnya_pemeriksaankabulase" class="col-form-label">Koagulase</label>
					<select class="form-control ekspertiseseletc" id="tamlainnya_pemeriksaankabulase" name="tamlainnya_pemeriksaankabulase">
						<option value="">Pilih Salah Satu</option>
						<option value="POS">POS</option>
						<option value="NEG">NEG</option>
					</select>
				</div>
				<div class="form-group">
					<label for="id_ujioksidasetamlainnya" class="col-form-label">Oksidase</label>
					<input type="text" id="id_ujioksidasetamlainnya" name="id_ujioksidasetamlainnya" class="form-control ekspertiseteks">
				</div>
				<div class="form-group">
					<label for="id_ujialainnyatamlainnya" class="col-form-label">Uji Lainnya</label>
					<input type="text" id="id_ujialainnyatamlainnya" name="id_ujialainnyatamlainnya" class="form-control ekspertiseteks">
				</div>
				<div class="form-group">
					<label for="id_statusmediatamlainnya" class="col-form-label">Status</label>
					<select class="form-control ekspertiseseletc" id="id_statusmediatamlainnya" name="id_statusmediatamlainnya">
						<option value="">Pilih Salah Satu</option>
						<option value="Inkubasi Lanjutan">Inkubasi Lanjutan</option>
						<option value="Sub Kultur">Sub Kultur</option>
						<option value="Proses identifikasi dan uji kepekaan vitek">Proses identifikasi dan uji kepekaan vitek</option>
						<option value="Proses identifikasi dan uji kepekaan manual">Proses identifikasi dan uji kepekaan manual</option>
						<option value="Proses identifikasi malditof+ uji kepekaan vitek">Proses identifikasi malditof+ uji kepekaan vitek</option>
						<option value="Proses identifikasi malditof+ uji kepekaan manual">Proses identifikasi malditof+ uji kepekaan manual</option>
						<option value="Proses identifikasi malditof+ uji kepekaan vitek">Proses identifikasi malditof+ uji kepekaan vitek</option>
						<option value="Tidak Lanjut Identifikasi">Tidak Lanjut Identifikasi</option>
					</select>
				</div>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-primary" id="btnsimpanpertumbuhankolonitamlainnya">Simpan</button>	
				<button type="button" class="btn btn-outline pull-left" data-dismiss="modal">Close</button>	
			</div>
		</div>
	</div>
</div>
<div class="modal fade" id="modaltambahrekapanantibiotik" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog modal-lg">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">&times;</button>
				<h4 class="modal-title">Data Yang di Temukan</h4>
			</div>
			<div class="modal-body">
				<div class="form-group">
					<div id="griddataantibiotiklain"></div>
				</div>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-outline pull-left" data-dismiss="modal">Close</button>	
			</div>
		</div>
	</div>
</div>
<input type="hidden" id="master_judul" name="master_judul" value="{{ $lokasi }}">
<input type="hidden" id="master_lokasi" name="master_lokasi" value="{{ $master }}">
<input type="hidden" id="master_userid" name="master_userid" value="{{ Session('id') }}">
<input type="hidden" id="master_kelompok" name="master_kelompok" value="{{ Session('previlage') }}">
<input type="hidden" id="master_set01" name="master_set01" value="{{ $initialListMode ?? 'ThisDay' }}">
<input type="hidden" id="master_set02" name="master_set02" value="">
<input type="hidden" id="master_set03" name="master_set03" value="">
<input type="hidden" id="master_set04" name="master_set04" value="">
<input type="hidden" name="id_nmfile" id="id_nmfile">
<input type="hidden" name="id_ukfile" id="id_ukfile">
<input type="hidden" name="id_jnfile" id="id_jnfile">
<input type="hidden" name="dlp" id="dlp">
<input type="hidden" name="upload_idne" id="upload_idne">
<input type="hidden" name="idpertumbuhankoloni" id="idpertumbuhankoloni">
<input type="hidden" name="template_jenis" id="template_jenis">
<input type="hidden" name="_token" id="token" value="{{ csrf_token() }}">
<input type="hidden" name="focus_periksa_id" id="focus_periksa_id" value="{{ $focusPeriksaId ?? '' }}">
<input type="hidden" name="expertise_return_url" id="expertise_return_url" value="{{ $expertiseReturnUrl ?? '' }}">
<input type="hidden" name="open_expertise_on_load" id="open_expertise_on_load" value="{{ !empty($openExpertiseOnLoad) ? '1' : '0' }}">
<div style="overflow: hidden; display: none;">
	<div class="form-group">
		<select class="form-control ekspertiseseletc" id="bakterimediabap" name="bakterimediabap">
			<option value="">Pilih Salah Satu</option>
			<option value="ESBL">ESBL</option>
			<option value="MRSA">MRSA</option>
			<option value="MDR">MDR</option>
			<option value="XDR">XDR</option>
			<option value="PDR">PDR</option>
			<option value="Carbapenem Resistant">Carbapenem Resistant</option>
			<option value="MDR Carbapenem Resistant">MDR Carbapenem Resistant</option>
			<option value="XDR Carbapenem Resistant">XDR Carbapenem Resistant</option>
		</select>
	</div>
	<div class="form-group col-lg-12">
		<label for="hasilpemeriksaanttcmmtbrifxpert_pagi" class="col-form-label">Pagi</label>
		<input type="text" id="hasilpemeriksaanttcmmtbrifxpert_pagi" class="form-control ekspertiseteks">
	</div>
	<div class="form-group col-lg-12">
		<label for="hasilpemeriksaanttcmmtbrifxpert_sewaktu" class="col-form-label">Sewaktu</label>
		<input type="text" id="hasilpemeriksaanttcmmtbrifxpert_sewaktu" class="form-control ekspertiseteks">
	</div>
	<div class="form-group col-lg-12">
		<label for="hasilpemeriksaantmikroskopis_mikroskopissewaktu" class="col-form-label">Sewaktu</label>
		<input type="text" id="hasilpemeriksaantmikroskopis_mikroskopissewaktu" class="form-control ekspertiseteks">
	</div>
	<div class="form-group col-lg-12">
		<label for="hasilpemeriksaantbbiakan_mikroskopispagi" class="col-form-label">Pagi</label>
		<input type="text" id="hasilpemeriksaantbbiakan_mikroskopispagi" class="form-control ekspertiseteks">
	</div>
	<div class="form-group col-lg-12">
		<label for="hasilpemeriksaantmikroskopis_mikroskopispagi" class="col-form-label">Pagi</label>
		<input type="text" id="hasilpemeriksaantmikroskopis_mikroskopispagi" class="form-control ekspertiseteks">
	</div>
	<div class="form-group col-lg-12">
		<label for="hasilpemeriksaantbbiakan_mgitpagi" class="col-form-label">Pagi</label>
		<input type="text" id="hasilpemeriksaantbbiakan_mgitpagi" class="form-control ekspertiseteks">
	</div>
	<div class="form-group col-lg-12">
		<label for="hasilpemeriksaantbbiakan_mikroskopisswaktu" class="col-form-label">Sewaktu</label>
		<input type="text" id="hasilpemeriksaantbbiakan_mikroskopisswaktu" class="form-control ekspertiseteks">
	</div>
	<!-- End Nilai diambil dari cheklist -->

	<div class="form-group col-lg-12">
		<textarea class="form-control" id="lsg_ditemukanmorfologi" name="lsg_ditemukanmorfologi" rows="5"></textarea>
	</div>
	<div class="form-group col-lg-3">
		<select class="form-control" id="valpoli2">
			<option value="inisaja">Current Location</option>
			<option value="semua">All</option>
		</select>
	</div>
</div>
@endsection
@push('script')
<script type="text/javascript">
	const mikroMaster = @json($master);
	const mikroExpertiseBaseUrl = @json(url('/mikro'));
	document.addEventListener('DOMContentLoaded', function () {
        const refreshBtn = document.getElementById('refresh-btn');
        if (window.location.hash) {
            history.replaceState("", document.title, window.location.pathname + window.location.search);
        }
        refreshBtn.addEventListener('click', function () {
			$('#divperiksa').hide();
			$('#divreadonly').hide();
			$('#divawal').show();
        });
    });
	function resetExpertiseFormState() {
		$("#nofoto").val('');
		$("#id_mikroorganismeoptional").val('').trigger('change');

		for (var instance in CKEDITOR.instances) {
			CKEDITOR.instances[instance].setData('');
		}
		if ( $.fn.DataTable.isDataTable('#tblkumanmanual1') ) {
			$('#tblkumanmanual1').DataTable().clear().destroy();
		}
		if ( $.fn.DataTable.isDataTable('#tblkumanmanual2') ) {
			$('#tblkumanmanual2').DataTable().clear().destroy();
		}
		if ( $.fn.DataTable.isDataTable('#tblvitek') ) {
			$('#tblvitek').DataTable().clear().destroy();
		}
		$('.select2').val(null).select2().trigger('change');
		$(".isiandasar").val('');
		$(".ekspertiseteks").val('');
		$(".ekspertiseseletc").val('');
		$(".pilihankirby").val('');
		$('input[type="checkbox"], input[type="radio"]').prop('checked', false).prop('disabled', false);
	}
	function openExpertiseDataRecord(dataRecord) {
		resetExpertiseFormState();

		var goook       	= dataRecord.id;
		var nofoto      	= dataRecord.nofoto;
		var statuse     	= dataRecord.status;
		var cekuser1    	= dataRecord.excutor;
		var cekuser2    	= dataRecord.ppdssenior;
		var cekuser3    	= dataRecord.middleppds;
		var cekuser4    	= dataRecord.ppdsjunior;
		var cekuser5    	= dataRecord.iddokter;
		var cekuser6    	= dataRecord.analis;
		var set01			= dataRecord.pasien_id;
		var accnumber		= dataRecord.nofoto;
		var cekkesimpulan	= dataRecord.kesimpulan;
		var dlp				= dataRecord.dlp;
		var masteru     	= document.getElementById('master_userid').value;
		var token       	= document.getElementById('token').value;
		var sourceadendum 	= {
			datatype: "json",
			datafields: [
				{ name: 'idne',type: 'text'},
				{ name: 'tanggal',type: 'text'},
				{ name: 'inputor',type: 'text'},
				{ name: 'keterangan',type: 'text'},
				{ name: 'jawaban',type: 'text'},
			],
			type: 'POST',
			data: {	val01:accnumber, _token: '{{csrf_token()}}' },
			url: '{{ route("getadendum") }}',
		};
		var sourcedetail 	= {
			datatype: "json",
			datafields: [
				{ name: 'idne',type: 'text'},
				{ name: 'tanggal',type: 'text'},
				{ name: 'jenis',type: 'text'},
				{ name: 'nofoto',type: 'text'},
				{ name: 'jenis',type: 'text'},
				{ name: 'status',type: 'text'},
			],
			type: 'POST',
			data: {	val01:set01, _token: '{{csrf_token()}}' },
			url: '{{ route("getriwayat") }}',
		};
		var sourcesirab 	= {
			datatype: "json",
			datafields: [
				{ name: 'id',type: 'text'},
				{ name: 'family',type: 'text'},
				{ name: 'spesies',type: 'text'},
				{ name: 'antibiotikall',type: 'text'},
				{ name: 'antibiotik',type: 'text'},
				{ name: 'subantibiotik',type: 'text'},
				{ name: 'diskcontent',type: 'text'},
				{ name: 'batasatas',type: 'text'},
				{ name: 'midrange',type: 'text'},
				{ name: 'batasbawah',type: 'text'},
				{ name: 'sumber',type: 'text'},
				{ name: 'kodedok',type: 'text'},
				{ name: 'atu',type: 'text'},
				{ name: 'kelompok',type: 'text'},
			],
			type: 'POST',
			data: {	val01:'sirab', _token: '{{csrf_token()}}' },
			url: '{{ route("getriwayat") }}',
		};
		var dataadendum 	= new $.jqx.dataAdapter(sourceadendum);
		var datadetail 		= new $.jqx.dataAdapter(sourcedetail);
		var jsonSirab 		= new $.jqx.dataAdapter(sourcesirab);
		$('#btnsavedraft').show();
		$('#divadendumketerangan').hide();
		$('#divtemplate').hide();
		$('#pilihancontohuji').show();
		$('#tekscontohuji').hide();
		$('#pilihanlokasianatomi').show();
		$('#tekslokasianatomi').hide();
		$('.setelahdipilihtemplate').hide();
		$("#asalpasien").html(dataRecord.asalpasien);
		$("#modaliti").val(dataRecord.modality);
		$("#dlp").val(dataRecord.dlp);
		$("#template_jenis").val(dataRecord.dlp);
		$("#nofoto").val(dataRecord.nofoto);
		$("#norm").val(dataRecord.noregister);
		$("#nonama").val(dataRecord.nmpasien);
		$("#nokel").html(dataRecord.jkpasien);
		$("#nousia").html(dataRecord.usia);
		$("#noservis").html(dataRecord.tlsreques);
		$("#nokamar").val(dataRecord.ruangan);
		$("#nostatus").html(statuse);
		$("#alamat").html(dataRecord.alamatpasien);
		$("#tlppasien").html(dataRecord.tlppasien);
		$("#periksa_id").val(dataRecord.id);
		$("#ruangan").val(dataRecord.idruangan);
		if (dataRecord.dokter_id == '0' || dataRecord.dokter_id == null || dataRecord.dokter_id == ''){
			$("#dokter").val(masteru).select2().trigger('change');
		} else {
			$("#dokter").val(dataRecord.dokter_id).select2().trigger('change');
		}
		if (dataRecord.analis == '0' || dataRecord.analis == null || dataRecord.analis == ''){
			$("#analis").val(masteru).select2().trigger('change');
		} else {
			$("#analis").val(dataRecord.analis).select2().trigger('change');
		}
		if (dataRecord.ppdssenior == '0' || dataRecord.ppdssenior == null || dataRecord.ppdssenior == ''){
			$("#ppds3").val(masteru).select2().trigger('change');
		} else {
			$("#ppds3").val(dataRecord.ppdssenior).select2().trigger('change');
		}
		$("#diagnosa2").val(dataRecord.diagnosa2);
		$("#diagnosa").val(dataRecord.diagnosa).select2().trigger('change');
		$("#ppds1").val(dataRecord.ppdsjunior).select2().trigger('change');
		$("#ppds2").val(dataRecord.middleppds).select2().trigger('change');
		$("#otherppds").val(dataRecord.otherppds);
		$("#otheras").val(dataRecord.ppdsas);
		$("#kave").val(dataRecord.kd_spesimen);
		$("#mas").val(dataRecord.nm_spesimen);
		$("#berat").val(dataRecord.berat);
		$("#klinis").val(dataRecord.klinis);
		$("#klinisi").html(dataRecord.klinisi);
		$('#sirabketerangan').hide();
		CKEDITOR.instances['keterangan'].setData(dataRecord.keterangan)
		CKEDITOR.instances['kesimpulan'].setData(dataRecord.kesimpulan)
		$("#gridriwayat").jqxGrid({
			width					: '100%',
			enablebrowserselection	: true,
			source					: datadetail,
			columnsresize			: true,
			theme					: "energyblue",
			autoheight				: true,
			pageable				: true,
			altrows					: true,
			selectionmode			: 'multiplecellsextended',
			columns					: [
				{ text: 'Date', datafield: 'tanggal', width: '60%', cellsalign: 'left', align: 'center' },
				{ text: 'Type', datafield: 'jenis', width: '20%', cellsalign: 'left', align: 'center' },
				{ text: 'Report', filterable: false, columntype: 'button', align: 'center', width: '20%', cellsrenderer: function () {
					return "View";
					}, buttonclick: function (row) {        
						editrowjabatan  = row;   
						var offset      = $("#gridriwayat").offset();       
						var dataRecord  = $("#gridriwayat").jqxGrid('getrowdata', editrowjabatan);
						var goook       = dataRecord.idne;
						var status      = dataRecord.status;
						var nofoto      = dataRecord.nofoto;
						var masterk		= document.getElementById('master_kelompok').value;
						var token       = document.getElementById('token').value;
						var home 		= '{{URL::to("/")}}';
						if (status == 'Selesai' || status == 'Arsip') {
							var alamat		= home+'/hasil/'+dataRecord.nofoto;
							window.open(alamat,'_blank');
						} else {
							if (masterk == 'supervisor'){
								var alamat		= home+'/hasil/'+dataRecord.nofoto;
								window.open(alamat,'_blank');
							} else {
								swal({
									title	: 'Stop',
									text	: 'Cannot Print Un Verified Expertise',
									type	: 'warning',
								})
							}
						}                     
					}
				},
			]
		});
		$("#gridadendum").jqxGrid({
			width					: '100%',
			enablebrowserselection	: true,
			source					: dataadendum,
			columnsresize			: true,
			theme					: "energyblue",
			autoheight				: true,
			pageable				: true,
			altrows					: true,
			selectionmode			: 'multiplecellsextended',
			columns					: [
				{ text: 'Date', datafield: 'tanggal', width: '20%', cellsalign: 'left', align: 'center' },
				{ text: 'Excutor', datafield: 'inputor', width: '20%', cellsalign: 'left', align: 'center' },
				{ text: 'Type', datafield: 'keterangan', width: '50%', cellsalign: 'left', align: 'center' },
				{ text: 'Report', filterable: false, columntype: 'button', align: 'center', width: '10%', cellsrenderer: function () {
					return "View";
					}, buttonclick: function (row) {        
						editrowjabatan  = row;   
						var offset      = $("#gridadendum").offset();       
						var dataRecord  = $("#gridadendum").jqxGrid('getrowdata', editrowjabatan);
						var goook       = dataRecord.jawaban;
						var newWindow = window.open('', '', 'width=800, height=500'),
							document = newWindow.document.open(),
							pageContent =
								'<!DOCTYPE html>\n' +
								'<html>\n' +
								'<head>\n' +
								'<meta charset="utf-8" />\n' +
								'<title>Laboratory Information System</title>\n' +
								'</head>\n' +
								'<body>' + goook + '</body>\n</html>';
							document.write(pageContent);
							document.close();
							return false;
					}
				},
			]
		});
		$("#gridsirab").jqxGrid({
			width					: '100%',
			showfilterrow			: true,
			filterable				: true,
			source					: jsonSirab,
			columnsresize			: true,
			theme					: "energyblue",
			autoheight				: true,
			pageable				: true,
			altrows					: true,
			selectionmode			: 'multiplecellsextended',
			columns					: [
				{ text: 'Spesies', datafield: 'spesies', width: '30%', cellsalign: 'left', align: 'center' },
				{ text: 'Antibiotik', datafield: 'antibiotikall', width: '21%', cellsalign: 'left', align: 'center' },
				{ text: 'Disk Content', datafield: 'diskcontent', width: '7%', cellsalign: 'left', align: 'center' },
				{ text: 'S', datafield: 'batasatas', width: '7%', cellsalign: 'center', align: 'center' },
				{ text: 'I', datafield: 'midrange', width: '7%', cellsalign: 'center', align: 'center' },
				{ text: 'R', datafield: 'batasbawah', width: '7%', cellsalign: 'center', align: 'center' },
				{ text: 'Use S', filterable: false, columntype: 'button', cellsalign: 'center', align: 'center', width: '7%', cellsrenderer: function () {
					return "Use";
					}, buttonclick: function (row) {
						editrowpoli 	= row;
						var offset      = $("#gridsirab").offset();       
						var dataRecord  = $("#gridsirab").jqxGrid('getrowdata', editrowpoli);
						var keterangan 	= CKEDITOR.instances['keterangan'].getData();
						var form_data = new FormData();
							form_data.append('nofoto', document.getElementById('nofoto').value);
							form_data.append('tabelawal', keterangan);
							form_data.append('idtabel', dataRecord.id);
							form_data.append('setnilai', 'S');
							form_data.append('keterangan', 'addsirabketerangan');
							form_data.append('_token', '{{csrf_token()}}');
						$.ajax({
							url			: '{{ route("getResult") }}',
							data		: form_data,
							type		: 'POST',
							contentType	: false,
							processData	: false,
							success		: function (response) {
								btncreateantibiotikvitek();
							},
							error: function (xhr, status, error) {
								var response 	= xhr.responseJSON || {};
								var traceText 	= response.trace ? JSON.stringify(response.trace) : null;
								console.log(traceText);
							}
						});
					}
				},
				{ text: 'Use I', filterable: false, columntype: 'button', cellsalign: 'center', align: 'center', width: '7%', cellsrenderer: function () {
					return "Use";
					}, buttonclick: function (row) {
						editrowpoli 	= row;
						var offset      = $("#gridsirab").offset();       
						var dataRecord  = $("#gridsirab").jqxGrid('getrowdata', editrowpoli);
						var keterangan 	= CKEDITOR.instances['keterangan'].getData();
						var form_data = new FormData();
							form_data.append('nofoto', document.getElementById('nofoto').value);
							form_data.append('tabelawal', keterangan);
							form_data.append('idtabel', dataRecord.id);
							form_data.append('setnilai', 'I');
							form_data.append('keterangan', 'addsirabketerangan');
							form_data.append('_token', '{{csrf_token()}}');
						$.ajax({
							url			: '{{ route("getResult") }}',
							data		: form_data,
							type		: 'POST',
							contentType	: false,
							processData	: false,
							success		: function (response) {
								btncreateantibiotikvitek();
							},
							error: function (xhr, status, error) {
								var response 	= xhr.responseJSON || {};
								var traceText 	= response.trace ? JSON.stringify(response.trace) : null;
								console.log(traceText);
							}
						});
					}
				},
				{ text: 'Use R', filterable: false, columntype: 'button', cellsalign: 'center', align: 'center', width: '7%', cellsrenderer: function () {
					return "Use";
					}, buttonclick: function (row) {
						editrowpoli 	= row;
						var offset      = $("#gridsirab").offset();       
						var dataRecord  = $("#gridsirab").jqxGrid('getrowdata', editrowpoli);
						var keterangan 	= CKEDITOR.instances['keterangan'].getData();
						var form_data = new FormData();
							form_data.append('nofoto', document.getElementById('nofoto').value);
							form_data.append('tabelawal', keterangan);
							form_data.append('idtabel', dataRecord.id);
							form_data.append('setnilai', 'R');
							form_data.append('keterangan', 'addsirabketerangan');
							form_data.append('_token', '{{csrf_token()}}');
						$.ajax({
							url			: '{{ route("getResult") }}',
							data		: form_data,
							type		: 'POST',
							contentType	: false,
							processData	: false,
							success		: function (response) {
								btncreateantibiotikvitek();
							},
							error: function (xhr, status, error) {
								var response 	= xhr.responseJSON || {};
								var traceText 	= response.trace ? JSON.stringify(response.trace) : null;
								console.log(traceText);
							}
						});
					}
				},
			]
		});
		$.post('{{ route("exCekAksess") }}', { nofoto: 'stiker', noregister: dataRecord.noregister, daftartgl: dataRecord.daftartgl, nm_spesimen: dataRecord.nm_spesimen, _token: '{{csrf_token()}}' },
		function(data){
			
		});
		if (mikroMaster == 'buku02'){
			$("#template_jenis").val('CCI');
			$("#dlp").val('CCI');
		}
		if (statuse === null) {
			swal({
				title	: 'Sample Belum Diverifikasi',
				text	: 'Harap Verifikasi Sample Terlebih Dahulu',
				type	: 'warning',
			})
		} else if (statuse.includes("Dibatalkan")){
			swal({
				title	: 'Pemeriksaan di batalkan',
				text	: statuse,
				type	: 'warning',
			})
		} else {
			$('#divreadonly').hide();
			$('#divperiksa').show();
			$('#divawal').hide();
			if (dlp == '' || dlp == null){
				$('#divtemplate').show();
				$('.templatejawaban').hide();
				$('.setelahdipilihtemplate').hide();
			} else {
				openlamanekpertise();
			}
		}
	}
	function btnUnprintRow(id, event){
		if(event) event.preventDefault();
        $.post('{{ route("getResult") }}', { nofoto: id, komponen: '', isi: 'unprintrow', keterangan: 'printunprinttblantibiotik',  _token: '{{ csrf_token() }}' },
		function(data){
			if ( $.fn.DataTable.isDataTable('#tblvitek') ) {
				$("#tblvitek").DataTable().ajax.reload();
			}
			if ( $.fn.DataTable.isDataTable('#tblkumanmanual1') ) {
				$("#tblkumanmanual1").DataTable().ajax.reload();
			}
			if ( $.fn.DataTable.isDataTable('#tblkumanmanual2') ) {
				$("#tblkumanmanual2").DataTable().ajax.reload();
			}
		});
		return false;
    }
	function btnPrintRow(id, event){
		if(event) event.preventDefault();
        $.post('{{ route("getResult") }}', { nofoto: id, komponen: '', isi: 'printrow', keterangan: 'printunprinttblantibiotik',  _token: '{{ csrf_token() }}' },
		function(data){
			if ( $.fn.DataTable.isDataTable('#tblvitek') ) {
				$("#tblvitek").DataTable().ajax.reload();
			}
			if ( $.fn.DataTable.isDataTable('#tblkumanmanual1') ) {
				$("#tblkumanmanual1").DataTable().ajax.reload();
			}
			if ( $.fn.DataTable.isDataTable('#tblkumanmanual2') ) {
				$("#tblkumanmanual2").DataTable().ajax.reload();
			}
		});
		return false;
    }
	function btnUnprintMic(id, event){
		if(event) event.preventDefault();
        $.post('{{ route("getResult") }}', { nofoto: id, komponen: '', isi: 'unprintmic', keterangan: 'printunprinttblantibiotik',  _token: '{{ csrf_token() }}' },
		function(data){
			if ( $.fn.DataTable.isDataTable('#tblvitek') ) {
				$("#tblvitek").DataTable().ajax.reload();
			}
			if ( $.fn.DataTable.isDataTable('#tblkumanmanual1') ) {
				$("#tblkumanmanual1").DataTable().ajax.reload();
			}
			if ( $.fn.DataTable.isDataTable('#tblkumanmanual2') ) {
				$("#tblkumanmanual2").DataTable().ajax.reload();
			}
		});
		return false;
    }
	function btnPrintMic(id, event){
		if(event) event.preventDefault();
        $.post('{{ route("getResult") }}', { nofoto: id, komponen: '', isi: 'printmic', keterangan: 'printunprinttblantibiotik',  _token: '{{ csrf_token() }}' },
		function(data){
			if ( $.fn.DataTable.isDataTable('#tblvitek') ) {
				$("#tblvitek").DataTable().ajax.reload();
			}
			if ( $.fn.DataTable.isDataTable('#tblkumanmanual1') ) {
				$("#tblkumanmanual1").DataTable().ajax.reload();
			}
			if ( $.fn.DataTable.isDataTable('#tblkumanmanual2') ) {
				$("#tblkumanmanual2").DataTable().ajax.reload();
			}
		});
		return false;
    }
	function btnDeleteMic(id, event){
		if(event) event.preventDefault();
        $.post('{{ route("getResult") }}', { nofoto: id, komponen: '', isi: 'deletemic', keterangan: 'printunprinttblantibiotik',  _token: '{{ csrf_token() }}' },
		function(data){
			if ( $.fn.DataTable.isDataTable('#tblvitek') ) {
				$("#tblvitek").DataTable().ajax.reload();
			}
			if ( $.fn.DataTable.isDataTable('#tblkumanmanual1') ) {
				$("#tblkumanmanual1").DataTable().ajax.reload();
			}
			if ( $.fn.DataTable.isDataTable('#tblkumanmanual2') ) {
				$("#tblkumanmanual2").DataTable().ajax.reload();
			}
		});
		return false;
    }
	function btnEditMic(id, event){
		if(event) event.preventDefault();
		$('#micvalue_id').val(id);
		$('#modaleditormic').modal('show');
    }
	function updateValueManOne(id, value) {
		$.ajax({
			url: '{{ route("getResult") }}',
			type: 'POST',
			data: {
				nofoto: id,
				isi: 'updatevaluemic',
				keterangan: 'printunprinttblantibiotik',
				komponen: value,
				_token: '{{ csrf_token() }}'
			},
			success: function(res) {
				if ( $.fn.DataTable.isDataTable('#tblvitek') ) {
					$("#tblvitek").DataTable().ajax.reload();
				}
				if ( $.fn.DataTable.isDataTable('#tblkumanmanual1') ) {
					$("#tblkumanmanual1").DataTable().ajax.reload();
				}
				if ( $.fn.DataTable.isDataTable('#tblkumanmanual2') ) {
					$("#tblkumanmanual2").DataTable().ajax.reload();
				}
				console.log("Value updated", res);
			}
		});
	}
	function updateValueManTwo(id, value) {
		$.ajax({
			url: '{{ route("getResult") }}',
			type: 'POST',
			data: {
				nofoto: id,
				isi: 'updatevaluemic',
				keterangan: 'printunprinttblantibiotik',
				komponen: value,
				_token: '{{ csrf_token() }}'
			},
			success: function(res) {
				if ( $.fn.DataTable.isDataTable('#tblvitek') ) {
					$("#tblvitek").DataTable().ajax.reload();
				}
				if ( $.fn.DataTable.isDataTable('#tblkumanmanual1') ) {
					$("#tblkumanmanual1").DataTable().ajax.reload();
				}
				if ( $.fn.DataTable.isDataTable('#tblkumanmanual2') ) {
					$("#tblkumanmanual2").DataTable().ajax.reload();
				}
				console.log("Value updated", res);
			}
		});
	}
	function updateInterpretation(id, interpretation) {
		$.ajax({
			url: '{{ route("getResult") }}',
			type: 'POST',
			data: {
				nofoto: id,
				isi: 'updateinterpretationmic',
				keterangan: 'printunprinttblantibiotik',
				komponen: interpretation,
				_token: '{{ csrf_token() }}'
			},
			success: function(res) {
				console.log("Value updated", res);
			}
		});
	}
	function btncreateantibiotikkumanmanual1(){
		var idne	= $('#periksa_id').val();
		var kuman01	= $('#id_bakteri01').val();
		var antibio1= $('#id_antibiotikmanual1').val();
		if (kuman01 == '' || kuman01 == null) {
			return;
		}
		if ( $.fn.DataTable.isDataTable('#tblkumanmanual1') ) {
			$('#tblkumanmanual1').DataTable().destroy();
		}
		$('#tblkumanmanual1').DataTable({
			ajax: {
				url: '{{ route("getResult") }}',
				type: 'POST',
				data: function (d) {
					return {
						nofoto		: idne,
						jenis		: 'tabelvitek',
						komponen	: 'manual',
						isi			: kuman01,
						keterangan	: 'generatetabelantibiotik',
						_token		: '{{ csrf_token() }}'
					};
				},
				dataSrc: 'data'
			},
			columns: [
				{
					data: null,
					name: 'nomor',
					orderable: false,
					searchable: false,
					render: function (data, type, row, meta) {
						return meta.row + meta.settings._iDisplayStart + 1;
					}
				},
				{
					data: null,
					render: function (data, type, full) {
						let id = full.id;
						let printrow = full.printrow;
						if (printrow || printrow == 1) {
							return `<a class="btn btn-sm btn-success" href="#" title="Click to Remove Print Row" onClick="btnUnprintRow(${id}, event)"><i class="fa fa-check"></i></a>`;
						} else {
							return `<a class="btn btn-sm btn-danger" href="#" title="Click to Set Print Row" onClick="btnPrintRow(${id}, event)"><i class="fa fa-ban"></i></a>`;
						}
					}
				},
				{ data: 'antibiotic' },
				{
					data: 'value',
					render: function (data, type, full) {
						return `<input type="text" class="form-control form-control-sm"
									value="${data ?? ''}"
									onblur="updateValueManOne(${full.id}, this.value)">`;
					}
				},
				{
					data: 'interpretation',
					render: function (data, type, full) {

						let options = ['','S','I','R'];
						let html = `<select class="form-control form-control-sm"
											onchange="updateInterpretation(${full.id}, this.value)">`;

						options.forEach(op => {
							html += `<option value="${op}" ${op === data ? 'selected' : ''}>${op === '' ? 'null' : op}</option>`;
						});

						html += `</select>`;
						return html;
					}
				},
				{ data: 'batasatas' },
				{ data: 'midrange' },
				{ data: 'batasbawah' },
				{
					data: null,
					render: function (data, type, full) {
						let id = full.id;
						let printcol = full.printcol;
						if (printcol || printcol == 1) {
							return `<a class="btn btn-sm btn-success" href="#" title="Click to Remove Print MIC" onClick="btnUnprintMic(${id}, event)"><i class="fa fa-check"></i></a>`;
						} else {
							return `<a class="btn btn-sm btn-danger" href="#" title="Click to Set Print MIC" onClick="btnPrintMic(${id}, event)"><i class="fa fa-ban"></i></a>`;
						}
					}
				},
				{
					data: null,
					render: function (data, type, full) {
						return `<a class="btn btn-sm btn-warning" href="#" title="Click to Delete MIC" onClick="btnDeleteMic(${full.id}, event)"><i class="fa fa-trash"></i></a>`;
					}
				}
			],
			paging		: false,
			searching	: false,
			info		: false,
			ordering	: true,
			autoWidth	: false,
			responsive	: true,
			order		: [[1, 'asc']],
			dom			: 't',
			language	: {
				emptyTable: "Tidak ada data antibiotik yang tersedia"
			}
		});
    }
	function btncreateantibiotikkumanmanual2(){
		var idne	= $('#periksa_id').val();
		var kuman02	= $('#id_bakteri02').val();
		var antibio2= $('#id_antibiotikmanual2').val();
		if (kuman02 == '' || kuman02 == null) {
			return;
		}
		if ( $.fn.DataTable.isDataTable('#tblkumanmanual2') ) {
			$('#tblkumanmanual2').DataTable().destroy();
		}
		$('#tblkumanmanual2').DataTable({
			ajax: {
				url: '{{ route("getResult") }}',
				type: 'POST',
				data: function (d) {
					return {
						nofoto		: idne,
						jenis		: 'tabelvitek',
						komponen	: 'manual',
						isi			: kuman02,
						keterangan	: 'generatetabelantibiotik',
						_token		: '{{ csrf_token() }}'
					};
				},
				dataSrc: 'data'
			},
			columns: [
				{
					data: null,
					name: 'nomor',
					orderable: false,
					searchable: false,
					render: function (data, type, row, meta) {
						return meta.row + meta.settings._iDisplayStart + 1;
					}
				},
				{
					data: null,
					render: function (data, type, full) {
						let id = full.id;
						let printrow = full.printrow;
						if (printrow || printrow == 1) {
							return `<a class="btn btn-sm btn-success" href="#" title="Click to Remove Print Row" onClick="btnUnprintRow(${id}, event)"><i class="fa fa-check"></i></a>`;
						} else {
							return `<a class="btn btn-sm btn-danger" href="#" title="Click to Set Print Row" onClick="btnPrintRow(${id}, event)"><i class="fa fa-ban"></i></a>`;
						}
					}
				},
				{ data: 'antibiotic' },
				{
					data: 'value',
					render: function (data, type, full) {
						return `<input type="text" class="form-control form-control-sm"
									value="${data ?? ''}"
									onblur="updateValueManTwo(${full.id}, this.value)">`;
					}
				},
				{
					data: 'interpretation',
					render: function (data, type, full) {

						let options = ['','S','I','R'];
						let html = `<select class="form-control form-control-sm"
											onchange="updateInterpretation(${full.id}, this.value)">`;

						options.forEach(op => {
							html += `<option value="${op}" ${op === data ? 'selected' : ''}>${op === '' ? 'null' : op}</option>`;
						});

						html += `</select>`;
						return html;
					}
				},
				{ data: 'batasatas' },
				{ data: 'midrange' },
				{ data: 'batasbawah' },
				{
					data: null,
					render: function (data, type, full) {
						let id = full.id;
						let printcol = full.printcol;
						if (printcol || printcol == 1) {
							return `<a class="btn btn-sm btn-success" href="#" title="Click to Remove Print MIC" onClick="btnUnprintMic(${id}, event)"><i class="fa fa-check"></i></a>`;
						} else {
							return `<a class="btn btn-sm btn-danger" href="#" title="Click to Set Print MIC" onClick="btnPrintMic(${id}, event)"><i class="fa fa-ban"></i></a>`;
						}
					}
				},
				{
					data: null,
					render: function (data, type, full) {
						return `<a class="btn btn-sm btn-warning" href="#" title="Click to Delete MIC" onClick="btnDeleteMic(${full.id}, event)"><i class="fa fa-trash"></i></a>`;
					}
				}
			],
			paging		: false,
			searching	: false,
			info		: false,
			ordering	: true,
			autoWidth	: false,
			responsive	: true,
			order		: [[1, 'asc']],
			dom			: 't',
			language	: {
				emptyTable: "Tidak ada data antibiotik yang tersedia"
			}
		});
    }
	function btncreateantibiotikvitek(){
		var idne	= document.getElementById('periksa_id').value;
		var kuman	= $('#bakteri').val();
		if ( $.fn.DataTable.isDataTable('#tblvitek') ) {
			$('#tblvitek').DataTable().destroy();
		}
		$('#tblvitek').DataTable({
			ajax: {
				url: '{{ route("getResult") }}',
				type: 'POST',
				data: function (d) {
					return {
						nofoto		: idne,
						jenis		: 'tabelvitek',
						komponen	: 'otomatis',
						isi			: kuman,
						keterangan	: 'generatetabelantibiotik',
						_token		: '{{ csrf_token() }}'
					};
				},
				dataSrc: 'data'
			},
			columns: [
				{
					data: null,
					name: 'nomor',
					orderable: false,
					searchable: false,
					render: function (data, type, row, meta) {
						return meta.row + meta.settings._iDisplayStart + 1;
					}
				},
				{
					data: null,
					render: function (data, type, full) {
						let id = full.id;
						let printrow = full.printrow;
						if (printrow || printrow == 1) {
							return `<a class="btn btn-sm btn-success" href="#" title="Click to Remove Print Row" onClick="btnUnprintRow(${id}, event)"><i class="fa fa-check"></i></a>`;
						} else {
							return `<a class="btn btn-sm btn-danger" href="#" title="Click to Set Print Row" onClick="btnPrintRow(${id}, event)"><i class="fa fa-ban"></i></a>`;
						}
					}
				},
				{ data: 'antibiotic' },
				{
					data: 'value',
					render: function (data, type, full) {
						return `<input type="text" class="form-control form-control-sm"
									value="${data ?? ''}"
									onblur="updateValueManTwo(${full.id}, this.value)">`;
					}
				},
				{
					data: 'interpretation',
					render: function (data, type, full) {

						let options = ['','S','I','R','Invalid','No Result', 'Error', 'SDD'];
						let html = `<select class="form-control form-control-sm"
											onchange="updateInterpretation(${full.id}, this.value)">`;

						options.forEach(op => {
							html += `<option value="${op}" ${op === data ? 'selected' : ''}>${op === '' ? 'null' : op}</option>`;
						});

						html += `</select>`;
						return html;
					}
				},
				{
					data: null,
					render: function (data, type, full) {
						let id = full.id;
						let printcol = full.printcol;
						if (printcol || printcol == 1) {
							return `<a class="btn btn-sm btn-success" href="#" title="Click to Remove Print MIC" onClick="btnUnprintMic(${id}, event)"><i class="fa fa-check"></i></a>`;
						} else {
							return `<a class="btn btn-sm btn-danger" href="#" title="Click to Set Print MIC" onClick="btnPrintMic(${id}, event)"><i class="fa fa-ban"></i></a>`;
						}
					}
				},
				
				{
					data: null,
					render: function (data, type, full) {
						return `<a class="btn btn-sm btn-warning" href="#" title="Click to Delete MIC" onClick="btnDeleteMic(${full.id}, event)"><i class="fa fa-trash"></i></a>`;
					}
				}
			],
			paging		: false,
			searching	: false,
			info		: false,
			ordering	: true,
			autoWidth	: false,
			responsive	: true,
			order		: [[1, 'asc']],
			dom			: 't',
			language	: {
				emptyTable: "Tidak ada data antibiotik yang tersedia"
			}
		});
	}
	function jQueryCreateTabelPertumbuhanKoloni(jQuery){
		var idne			= document.getElementById('periksa_id').value;
		var nofoto			= document.getElementById('nofoto').value;
		var srcjsonbap 		= {
			datatype: "json",
			datafields: [
				{ name: 'id',type: 'text'},
				{ name: 'orderid',type: 'text'},
				{ name: 'tglpenyimpanan',type: 'text'},
				{ name: 'media',type: 'text'},
				{ name: 'kuman',type: 'text'},
				{ name: 'hemolisa',type: 'text'},
				{ name: 'katalase',type: 'text'},
				{ name: 'koagulase',type: 'text'},
				{ name: 'oksidase',type: 'text'},
				{ name: 'lainnya',type: 'text'},
				{ name: 'status',type: 'text'},
				{ name: 'tindaklanjut',type: 'text'},
				{ name: 'created_by',type: 'text'},
				{ name: 'updated_at',type: 'text'},
			],
			type: 'POST',
			data: {	nofoto: idne, komponen: 'Media BAP', keterangan:'generatetblpertumbuhankoloni', _token: '{{csrf_token()}}' },
			url: '{{ route("getResult") }}',
		};
		var srcjsoncap 		= {
			datatype: "json",
			datafields: [
				{ name: 'id',type: 'text'},
				{ name: 'orderid',type: 'text'},
				{ name: 'tglpenyimpanan',type: 'text'},
				{ name: 'media',type: 'text'},
				{ name: 'kuman',type: 'text'},
				{ name: 'hemolisa',type: 'text'},
				{ name: 'katalase',type: 'text'},
				{ name: 'koagulase',type: 'text'},
				{ name: 'oksidase',type: 'text'},
				{ name: 'lainnya',type: 'text'},
				{ name: 'status',type: 'text'},
				{ name: 'tindaklanjut',type: 'text'},
				{ name: 'created_by',type: 'text'},
				{ name: 'updated_at',type: 'text'},
			],
			type: 'POST',
			data: {	nofoto: idne, komponen: 'Media CAP', keterangan:'generatetblpertumbuhankoloni', _token: '{{csrf_token()}}' },
			url: '{{ route("getResult") }}',
		};
		var srcjsonmcconkey	= {
			datatype: "json",
			datafields: [
				{ name: 'id',type: 'text'},
				{ name: 'orderid',type: 'text'},
				{ name: 'tglpenyimpanan',type: 'text'},
				{ name: 'media',type: 'text'},
				{ name: 'kuman',type: 'text'},
				{ name: 'hemolisa',type: 'text'},
				{ name: 'katalase',type: 'text'},
				{ name: 'koagulase',type: 'text'},
				{ name: 'oksidase',type: 'text'},
				{ name: 'lainnya',type: 'text'},
				{ name: 'status',type: 'text'},
				{ name: 'tindaklanjut',type: 'text'},
				{ name: 'created_by',type: 'text'},
				{ name: 'updated_at',type: 'text'},
			],
			type: 'POST',
			data: {	nofoto: idne, komponen: 'Media Mc Conkey', keterangan:'generatetblpertumbuhankoloni', _token: '{{csrf_token()}}' },
			url: '{{ route("getResult") }}',
		};
		var srcjsonsdar1	= {
			datatype: "json",
			datafields: [
				{ name: 'id',type: 'text'},
				{ name: 'orderid',type: 'text'},
				{ name: 'tglpenyimpanan',type: 'text'},
				{ name: 'media',type: 'text'},
				{ name: 'kuman',type: 'text'},
				{ name: 'hemolisa',type: 'text'},
				{ name: 'katalase',type: 'text'},
				{ name: 'koagulase',type: 'text'},
				{ name: 'oksidase',type: 'text'},
				{ name: 'lainnya',type: 'text'},
				{ name: 'status',type: 'text'},
				{ name: 'tindaklanjut',type: 'text'},
				{ name: 'created_by',type: 'text'},
				{ name: 'updated_at',type: 'text'},
			],
			type: 'POST',
			data: {	nofoto: idne, komponen: 'Media SDA R1', keterangan:'generatetblpertumbuhankoloni', _token: '{{csrf_token()}}' },
			url: '{{ route("getResult") }}',
		};
		var srcjsonsdar2	= {
			datatype: "json",
			datafields: [
				{ name: 'id',type: 'text'},
				{ name: 'orderid',type: 'text'},
				{ name: 'tglpenyimpanan',type: 'text'},
				{ name: 'media',type: 'text'},
				{ name: 'kuman',type: 'text'},
				{ name: 'hemolisa',type: 'text'},
				{ name: 'katalase',type: 'text'},
				{ name: 'koagulase',type: 'text'},
				{ name: 'oksidase',type: 'text'},
				{ name: 'lainnya',type: 'text'},
				{ name: 'status',type: 'text'},
				{ name: 'tindaklanjut',type: 'text'},
				{ name: 'created_by',type: 'text'},
				{ name: 'updated_at',type: 'text'},
			],
			type: 'POST',
			data: {	nofoto: idne, komponen: 'Media SDA R2', keterangan:'generatetblpertumbuhankoloni', _token: '{{csrf_token()}}' },
			url: '{{ route("getResult") }}',
		};
		var srcjsonsdai1	= {
			datatype: "json",
			datafields: [
				{ name: 'id',type: 'text'},
				{ name: 'orderid',type: 'text'},
				{ name: 'tglpenyimpanan',type: 'text'},
				{ name: 'media',type: 'text'},
				{ name: 'kuman',type: 'text'},
				{ name: 'hemolisa',type: 'text'},
				{ name: 'katalase',type: 'text'},
				{ name: 'koagulase',type: 'text'},
				{ name: 'oksidase',type: 'text'},
				{ name: 'lainnya',type: 'text'},
				{ name: 'status',type: 'text'},
				{ name: 'tindaklanjut',type: 'text'},
				{ name: 'created_by',type: 'text'},
				{ name: 'updated_at',type: 'text'},
			],
			type: 'POST',
			data: {	nofoto: idne, komponen: 'Media SDA I1', keterangan:'generatetblpertumbuhankoloni', _token: '{{csrf_token()}}' },
			url: '{{ route("getResult") }}',
		};
		var srcjsonsdai2	= {
			datatype: "json",
			datafields: [
				{ name: 'id',type: 'text'},
				{ name: 'orderid',type: 'text'},
				{ name: 'tglpenyimpanan',type: 'text'},
				{ name: 'media',type: 'text'},
				{ name: 'kuman',type: 'text'},
				{ name: 'hemolisa',type: 'text'},
				{ name: 'katalase',type: 'text'},
				{ name: 'koagulase',type: 'text'},
				{ name: 'oksidase',type: 'text'},
				{ name: 'lainnya',type: 'text'},
				{ name: 'status',type: 'text'},
				{ name: 'tindaklanjut',type: 'text'},
				{ name: 'created_by',type: 'text'},
				{ name: 'updated_at',type: 'text'},
			],
			type: 'POST',
			data: {	nofoto: idne, komponen: 'Media SDA I2', keterangan:'generatetblpertumbuhankoloni', _token: '{{csrf_token()}}' },
			url: '{{ route("getResult") }}',
		};
		var srcjsonselainnya= {
			datatype: "json",
			datafields: [
				{ name: 'id',type: 'text'},
				{ name: 'orderid',type: 'text'},
				{ name: 'tglpenyimpanan',type: 'text'},
				{ name: 'media',type: 'text'},
				{ name: 'kuman',type: 'text'},
				{ name: 'hemolisa',type: 'text'},
				{ name: 'katalase',type: 'text'},
				{ name: 'koagulase',type: 'text'},
				{ name: 'oksidase',type: 'text'},
				{ name: 'lainnya',type: 'text'},
				{ name: 'status',type: 'text'},
				{ name: 'tindaklanjut',type: 'text'},
				{ name: 'created_by',type: 'text'},
				{ name: 'updated_at',type: 'text'},
			],
			type: 'POST',
			data: {	nofoto: idne, komponen: 'Media Selektif lainnya', keterangan:'generatetblpertumbuhankoloni', _token: '{{csrf_token()}}' },
			url: '{{ route("getResult") }}',
		};
		var srcjsontalainnya= {
			datatype: "json",
			datafields: [
				{ name: 'id',type: 'text'},
				{ name: 'orderid',type: 'text'},
				{ name: 'tglpenyimpanan',type: 'text'},
				{ name: 'media',type: 'text'},
				{ name: 'kuman',type: 'text'},
				{ name: 'hemolisa',type: 'text'},
				{ name: 'katalase',type: 'text'},
				{ name: 'koagulase',type: 'text'},
				{ name: 'oksidase',type: 'text'},
				{ name: 'lainnya',type: 'text'},
				{ name: 'status',type: 'text'},
				{ name: 'tindaklanjut',type: 'text'},
				{ name: 'created_by',type: 'text'},
				{ name: 'updated_at',type: 'text'},
			],
			type: 'POST',
			data: {	nofoto: idne, komponen: 'Media Tambahan Lainnya', keterangan:'generatetblpertumbuhankoloni', _token: '{{csrf_token()}}' },
			url: '{{ route("getResult") }}',
		};
		$("#gridmediabap").jqxGrid({
			width					: '100%',
			source					: srcjsonbap,
			columnsresize			: true,
			theme					: "energyblue",
			autoheight				: true,
			pageable				: true,
			altrows					: true,
			columns					: [
				{ text: 'Tanggal', datafield: 'tglpenyimpanan', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Petugas', datafield: 'created_by', width: '11%', cellsalign: 'left', align: 'center' },
				{ text: 'Kuman', datafield: 'tindaklanjut', width: '9%', cellsalign: 'left', align: 'center' },
				{ text: 'Media', datafield: 'kuman', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Hemolisa', datafield: 'hemolisa', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Katalase', datafield: 'katalase', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Koagulase', datafield: 'koagulase', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Lainnya', datafield: 'lainnya', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Status', datafield: 'status', width: '15%', cellsalign: 'left', align: 'center' },
				{ text: 'Edit', filterable: false, columntype: 'button', align: 'center', width: '7%', cellsrenderer: function () {
					return "Edit";
					}, buttonclick: function (row) {        
						editrowjabatan  = row;   
						var offset      = $("#gridmediabap").offset();       
						var dataRecord  = $("#gridmediabap").jqxGrid('getrowdata', editrowjabatan);
						var tanggal   = dataRecord.tglpenyimpanan;
						if (tanggal == '{{date("Y-m-d")}}') {
							$('#idpertumbuhankoloni').val(dataRecord.id);
							$('#id_mediabap').val(dataRecord.kuman);
							$('#id_pemeriksaanhemolisa').val(dataRecord.hemolisa);
							$('#id_pemeriksaankatalase').val(dataRecord.katalase);
							$('#id_pemeriksaankabulase').val(dataRecord.koagulase);
							$('#id_ujialainnyabap').val(dataRecord.lainnya);
							$('#id_statusmediabap').val(dataRecord.status);
							$('#modalgridmediabap').modal('show');
						} else {
							swal({
								title	: 'Maaf',
								text	: 'Data hanya bisa di edit pada hari yang sama',
								type	: 'warning',
							})
						}
						
					}
				},
				{ text: 'Del', editable: false, sortable: false, filterable: false, columntype: 'button', width: '7%', cellsrenderer: function () {
                    return "Del";
                    }, buttonclick: function (row) {
                        editrow = row;	
                        var offset 		= $("#gridmediabap").offset();		
                        var dataRecord 	= $("#gridmediabap").jqxGrid('getrowdata', editrow);
                        swal({
                            title: 'Apakah anda yakin ?',
                            text: "Perhatian, data yang sudah di hapus tidak bisa di Undo, apakah anda yakin ingin menghapus",
                            type: 'warning',
                            showCancelButton: true,
                            confirmButtonClass: 'btn btn-confirm mt-2',
                            cancelButtonClass: 'btn btn-cancel ml-2 mt-2',
                            confirmButtonText: 'Yes'
                        }).then(function () {
							$.post('{{ route("getResult") }}', { 
								id: dataRecord.id,
								nofoto: nofoto,
								keterangan: 'hapusdatapertumbuhankoloni',
								_token: '{{ csrf_token() }}' },
							function(data){
								$("#gridmediabap").jqxGrid('updatebounddata','filter');
							});
                        });
                    }
                },
				{ text: 'Next', filterable: false, columntype: 'button', align: 'center', width: '7%', cellsrenderer: function () {
					return "Next";
					}, buttonclick: function (row) {        
						editrowjabatan  = row;   
						var offset      = $("#gridmediabap").offset();       
						var dataRecord  = $("#gridmediabap").jqxGrid('getrowdata', editrowjabatan);
						var tanggal   = dataRecord.tglpenyimpanan;
						if (tanggal == '{{date("Y-m-d")}}') {
							swal({
								title	: 'Maaf',
								text	: 'Data hanya bisa di edit pada hari berikutnya',
								type	: 'warning',
							})
						} else {
							$('#idpertumbuhankoloni').val('new');
							$('#id_mediabap').val(dataRecord.kuman);
							$('#id_pemeriksaanhemolisa').val(dataRecord.hemolisa);
							$('#id_pemeriksaankatalase').val(dataRecord.katalase);
							$('#id_pemeriksaankabulase').val(dataRecord.koagulase);
							$('#id_ujialainnyabap').val(dataRecord.lainnya);
							$('#id_statusmediabap').val(dataRecord.status);
							$('#modalgridmediabap').modal('show');
						}
						
					}
				},
			]
		});
		$("#gridmediacap").jqxGrid({
			width					: '100%',
			source					: srcjsoncap,
			columnsresize			: true,
			theme					: "energyblue",
			autoheight				: true,
			pageable				: true,
			altrows					: true,
			columns					: [
				{ text: 'Tanggal', datafield: 'tglpenyimpanan', width: '9%', cellsalign: 'left', align: 'center' },
				{ text: 'Petugas', datafield: 'created_by', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Kuman', datafield: 'tindaklanjut', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Media', datafield: 'kuman', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Katalase', datafield: 'katalase', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Koagulase', datafield: 'koagulase', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Lainnya', datafield: 'lainnya', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Status', datafield: 'status', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Edit', filterable: false, columntype: 'button', align: 'center', width: '7%', cellsrenderer: function () {
					return "Edit";
					}, buttonclick: function (row) {        
						editrowjabatan  = row;   
						var offset      = $("#gridmediacap").offset();       
						var dataRecord  = $("#gridmediacap").jqxGrid('getrowdata', editrowjabatan);
						var tanggal   = dataRecord.tglpenyimpanan;
						if (tanggal == '{{date("Y-m-d")}}') {
							$('#idpertumbuhankoloni').val(dataRecord.id);
							$('#id_mediacap').val(dataRecord.kuman);
							$('#cap_pemeriksaankatalase').val(dataRecord.katalase);
							$('#cap_pemeriksaankabulase').val(dataRecord.koagulase);
							$('#id_ujialainnyacap').val(dataRecord.lainnya);
							$('#id_statusmediacap').val(dataRecord.status);
							$('#modalgridmediacap').modal('show');
						} else {
							swal({
								title	: 'Maaf',
								text	: 'Data hanya bisa di edit pada hari yang sama',
								type	: 'warning',
							})
						}
						
					}
				},
				{ text: 'Del', editable: false, sortable: false, filterable: false, columntype: 'button', width: '7%', cellsrenderer: function () {
                    return "Del";
                    }, buttonclick: function (row) {
                        editrow = row;	
                        var offset 		= $("#gridmediacap").offset();		
                        var dataRecord 	= $("#gridmediacap").jqxGrid('getrowdata', editrow);
                        swal({
                            title: 'Apakah anda yakin ?',
                            text: "Perhatian, data yang sudah di hapus tidak bisa di Undo, apakah anda yakin ingin menghapus",
                            type: 'warning',
                            showCancelButton: true,
                            confirmButtonClass: 'btn btn-confirm mt-2',
                            cancelButtonClass: 'btn btn-cancel ml-2 mt-2',
                            confirmButtonText: 'Yes'
                        }).then(function () {
							$.post('{{ route("getResult") }}', { 
								id: dataRecord.id,
								nofoto: nofoto,
								keterangan: 'hapusdatapertumbuhankoloni',
								_token: '{{ csrf_token() }}' },
							function(data){
								$("#gridmediacap").jqxGrid('updatebounddata','filter');
							});
                        });
                    }
                },
				{ text: 'Next', filterable: false, columntype: 'button', align: 'center', width: '7%', cellsrenderer: function () {
					return "Next";
					}, buttonclick: function (row) {        
						editrowjabatan  = row;   
						var offset      = $("#gridmediacap").offset();       
						var dataRecord  = $("#gridmediacap").jqxGrid('getrowdata', editrowjabatan);
						var tanggal   = dataRecord.tglpenyimpanan;
						if (tanggal == '{{date("Y-m-d")}}') {
							swal({
								title	: 'Maaf',
								text	: 'Data hanya bisa di edit pada hari berikutnya',
								type	: 'warning',
							})
						} else {
							$('#idpertumbuhankoloni').val('new');
							$('#id_mediacap').val(dataRecord.kuman);
							$('#cap_pemeriksaankatalase').val(dataRecord.katalase);
							$('#cap_pemeriksaankabulase').val(dataRecord.koagulase);
							$('#id_ujialainnyacap').val(dataRecord.lainnya);
							$('#id_statusmediacap').val(dataRecord.status);
							$('#modalgridmediacap').modal('show');
						}
						
					}
				},
			]
		});
		$("#gridmediamcconkey").jqxGrid({
			width					: '100%',
			source					: srcjsonmcconkey,
			columnsresize			: true,
			theme					: "energyblue",
			autoheight				: true,
			pageable				: true,
			altrows					: true,
			columns					: [
				{ text: 'Tanggal', datafield: 'tglpenyimpanan', width: '9%', cellsalign: 'left', align: 'center' },
				{ text: 'Petugas', datafield: 'created_by', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Kuman', datafield: 'tindaklanjut', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Media', datafield: 'kuman', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Oksidase', datafield: 'oksidase', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Lainnya', datafield: 'lainnya', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Status', datafield: 'status', width: '20%', cellsalign: 'left', align: 'center' },
				{ text: 'Edit', filterable: false, columntype: 'button', align: 'center', width: '7%', cellsrenderer: function () {
					return "Edit";
					}, buttonclick: function (row) {        
						editrowjabatan  = row;
						var offset      = $("#gridmediamcconkey").offset();       
						var dataRecord  = $("#gridmediamcconkey").jqxGrid('getrowdata', editrowjabatan);
						var tanggal   = dataRecord.tglpenyimpanan;
						if (tanggal == '{{date("Y-m-d")}}') {
							$('#idpertumbuhankoloni').val(dataRecord.id);
							$('#id_mediamcconkey').val(dataRecord.kuman);
							$('#id_ujialainnyamcconkey').val(dataRecord.lainnya);
							$('#id_ujioksidasemcconkey').val(dataRecord.oksidase);
							$('#id_statusmediamcconkey').val(dataRecord.status);
							$('#modalgridmediamcconkey').modal('show');
						} else {
							swal({
								title	: 'Maaf',
								text	: 'Data hanya bisa di edit pada hari yang sama',
								type	: 'warning',
							})
						}
					}
				},
				{ text: 'Del', editable: false, sortable: false, filterable: false, columntype: 'button', width: '7%', cellsrenderer: function () {
                    return "Del";
                    }, buttonclick: function (row) {
                        editrow = row;	
                        var offset 		= $("#gridmediamcconkey").offset();		
                        var dataRecord 	= $("#gridmediamcconkey").jqxGrid('getrowdata', editrow);
                        swal({
                            title: 'Apakah anda yakin ?',
                            text: "Perhatian, data yang sudah di hapus tidak bisa di Undo, apakah anda yakin ingin menghapus",
                            type: 'warning',
                            showCancelButton: true,
                            confirmButtonClass: 'btn btn-confirm mt-2',
                            cancelButtonClass: 'btn btn-cancel ml-2 mt-2',
                            confirmButtonText: 'Yes'
                        }).then(function () {
							$.post('{{ route("getResult") }}', { 
								id: dataRecord.id,
								nofoto: nofoto,
								keterangan: 'hapusdatapertumbuhankoloni',
								_token: '{{ csrf_token() }}' },
							function(data){
								$("#gridmediamcconkey").jqxGrid('updatebounddata','filter');
							});
                        });
                    }
                },
				{ text: 'Next', editable: false, sortable: false, filterable: false, columntype: 'button', width: '7%', cellsrenderer: function () {
                    return "Next";
                    }, buttonclick: function (row) {
                        editrow 		= row;
                        var offset 		= $("#gridmediamcconkey").offset();		
                        var dataRecord 	= $("#gridmediamcconkey").jqxGrid('getrowdata', editrow);
						var tanggal   = dataRecord.tglpenyimpanan;
						if (tanggal == '{{date("Y-m-d")}}') {
							swal({
								title	: 'Maaf',
								text	: 'Data hanya bisa di edit pada hari berikutnya',
								type	: 'warning',
							})
						} else {
							$('#idpertumbuhankoloni').val('new');
							$('#id_mediamcconkey').val(dataRecord.kuman);
							$('#id_ujialainnyamcconkey').val(dataRecord.lainnya);
							$('#id_ujioksidasemcconkey').val(dataRecord.oksidase);
							$('#id_statusmediamcconkey').val(dataRecord.status);
							$('#modalgridmediamcconkey').modal('show');
						}
						
                    }
                },
			]
		});
		$("#gridmediasdar1").jqxGrid({
			width					: '100%',
			source					: srcjsonsdar1,
			columnsresize			: true,
			theme					: "energyblue",
			autoheight				: true,
			pageable				: true,
			altrows					: true,
			columns					: [
				{ text: 'Tanggal', datafield: 'tglpenyimpanan', width: '9%', cellsalign: 'left', align: 'center' },
				{ text: 'Petugas', datafield: 'created_by', width: '15%', cellsalign: 'left', align: 'center' },
				{ text: 'Kuman', datafield: 'tindaklanjut', width: '15%', cellsalign: 'left', align: 'center' },
				{ text: 'Media', datafield: 'kuman', width: '15%', cellsalign: 'left', align: 'center' },
				{ text: 'Inokulasi', datafield: 'hemolisa', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Status', datafield: 'status', width: '15%', cellsalign: 'left', align: 'center' },
				{ text: 'Edit', filterable: false, columntype: 'button', align: 'center', width: '7%', cellsrenderer: function () {
					return "Edit";
					}, buttonclick: function (row) {        
						editrowjabatan  = row;   
						var offset      = $("#gridmediasdar1").offset();       
						var dataRecord  = $("#gridmediasdar1").jqxGrid('getrowdata', editrowjabatan);
						$('#idpertumbuhankoloni').val(dataRecord.id);
						$('#sdar1_media').val(dataRecord.kuman);
						$('#sdar1_pemeriksaanhemolisa').val(dataRecord.hemolisa);
						$('#sdar1_mediakuman').val(dataRecord.tindaklanjut);
						$('#sdar1_status').val(dataRecord.status);
						$('#modalgridmediasdar1').modal('show');
					}
				},
				{ text: 'Del', editable: false, sortable: false, filterable: false, columntype: 'button', width: '7%', cellsrenderer: function () {
                    return "Del";
                    }, buttonclick: function (row) {
                        editrow = row;	
                        var offset 		= $("#gridmediasdar1").offset();		
                        var dataRecord 	= $("#gridmediasdar1").jqxGrid('getrowdata', editrow);
                        swal({
                            title: 'Apakah anda yakin ?',
                            text: "Perhatian, data yang sudah di hapus tidak bisa di Undo, apakah anda yakin ingin menghapus",
                            type: 'warning',
                            showCancelButton: true,
                            confirmButtonClass: 'btn btn-confirm mt-2',
                            cancelButtonClass: 'btn btn-cancel ml-2 mt-2',
                            confirmButtonText: 'Yes'
                        }).then(function () {
							$.post('{{ route("getResult") }}', { 
								id: dataRecord.id,
								nofoto: nofoto,
								keterangan: 'hapusdatapertumbuhankoloni',
								_token: '{{ csrf_token() }}' },
							function(data){
								$("#gridmediasdar1").jqxGrid('updatebounddata','filter');
							});
                        });
                    }
                },
				{ text: 'Next', filterable: false, columntype: 'button', align: 'center', width: '7%', cellsrenderer: function () {
					return "Next";
					}, buttonclick: function (row) {        
						editrowjabatan  = row;   
						var offset      = $("#gridmediasdar1").offset();       
						var dataRecord  = $("#gridmediasdar1").jqxGrid('getrowdata', editrowjabatan);
						var tanggal   = dataRecord.tglpenyimpanan;
						if (tanggal == '{{date("Y-m-d")}}') {
							swal({
								title	: 'Maaf',
								text	: 'Data hanya bisa di edit pada hari berikutnya',
								type	: 'warning',
							})
						} else {
							$('#idpertumbuhankoloni').val('new');
							$('#sdar1_media').val(dataRecord.kuman);
							$('#sdar1_mediakuman').val(dataRecord.tindaklanjut);
							$('#sdar1_pemeriksaanhemolisa').val(dataRecord.hemolisa);
							$('#sdar1_status').val(dataRecord.status);
							$('#modalgridmediasdar1').modal('show');
						}
						
					}
				},
			]
		});
		$("#gridmediasdar2").jqxGrid({
			width					: '100%',
			source					: srcjsonsdar2,
			columnsresize			: true,
			theme					: "energyblue",
			autoheight				: true,
			pageable				: true,
			altrows					: true,
			columns					: [
				{ text: 'Tanggal', datafield: 'tglpenyimpanan', width: '9%', cellsalign: 'left', align: 'center' },
				{ text: 'Petugas', datafield: 'created_by', width: '15%', cellsalign: 'left', align: 'center' },
				{ text: 'Kuman', datafield: 'tindaklanjut', width: '15%', cellsalign: 'left', align: 'center' },
				{ text: 'Media', datafield: 'kuman', width: '15%', cellsalign: 'left', align: 'center' },
				{ text: 'Inokulasi', datafield: 'hemolisa', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Status', datafield: 'status', width: '15%', cellsalign: 'left', align: 'center' },
				{ text: 'Edit', filterable: false, columntype: 'button', align: 'center', width: '7%', cellsrenderer: function () {
					return "Edit";
					}, buttonclick: function (row) {        
						editrowjabatan  = row;   
						var offset      = $("#gridmediasdar2").offset();       
						var dataRecord  = $("#gridmediasdar2").jqxGrid('getrowdata', editrowjabatan);
						$('#idpertumbuhankoloni').val(dataRecord.id);
						$('#sdar2_media').val(dataRecord.kuman);
						$('#sdar2_pemeriksaanhemolisa').val(dataRecord.hemolisa);
						$('#sdar2_mediakuman').val(dataRecord.tindaklanjut);
						$('#sdar2_status').val(dataRecord.status);
						$('#modalgridmediasdar2').modal('show');
					}
				},
				{ text: 'Del', editable: false, sortable: false, filterable: false, columntype: 'button', width: '7%', cellsrenderer: function () {
                    return "Del";
                    }, buttonclick: function (row) {
                        editrow = row;	
                        var offset 		= $("#gridmediasdar2").offset();		
                        var dataRecord 	= $("#gridmediasdar2").jqxGrid('getrowdata', editrow);
                        swal({
                            title: 'Apakah anda yakin ?',
                            text: "Perhatian, data yang sudah di hapus tidak bisa di Undo, apakah anda yakin ingin menghapus",
                            type: 'warning',
                            showCancelButton: true,
                            confirmButtonClass: 'btn btn-confirm mt-2',
                            cancelButtonClass: 'btn btn-cancel ml-2 mt-2',
                            confirmButtonText: 'Yes'
                        }).then(function () {
							$.post('{{ route("getResult") }}', { 
								id: dataRecord.id,
								nofoto: nofoto,
								keterangan: 'hapusdatapertumbuhankoloni',
								_token: '{{ csrf_token() }}' },
							function(data){
								$("#gridmediasdar2").jqxGrid('updatebounddata','filter');
							});
                        });
                    }
                },
				{ text: 'Next', filterable: false, columntype: 'button', align: 'center', width: '7%', cellsrenderer: function () {
					return "Next";
					}, buttonclick: function (row) {        
						editrowjabatan  = row;   
						var offset      = $("#gridmediasdar2").offset();       
						var dataRecord  = $("#gridmediasdar2").jqxGrid('getrowdata', editrowjabatan);
						var tanggal   = dataRecord.tglpenyimpanan;
						if (tanggal == '{{date("Y-m-d")}}') {
							swal({
								title	: 'Maaf',
								text	: 'Data hanya bisa di edit pada hari berikutnya',
								type	: 'warning',
							})
						} else {
							$('#idpertumbuhankoloni').val('new');
							$('#sdar2_media').val(dataRecord.kuman);
							$('#sdar2_mediakuman').val(dataRecord.tindaklanjut);
							$('#sdar2_pemeriksaanhemolisa').val(dataRecord.hemolisa);
							$('#sdar2_status').val(dataRecord.status);
							$('#modalgridmediasdar2').modal('show');
						}
						
					}
				},
			]
		});
		$("#gridmediasdai1").jqxGrid({
			width					: '100%',
			source					: srcjsonsdai1,
			columnsresize			: true,
			theme					: "energyblue",
			autoheight				: true,
			pageable				: true,
			altrows					: true,
			columns					: [
				{ text: 'Tanggal', datafield: 'tglpenyimpanan', width: '9%', cellsalign: 'left', align: 'center' },
				{ text: 'Petugas', datafield: 'created_by', width: '15%', cellsalign: 'left', align: 'center' },
				{ text: 'Kuman', datafield: 'tindaklanjut', width: '15%', cellsalign: 'left', align: 'center' },
				{ text: 'Media', datafield: 'kuman', width: '15%', cellsalign: 'left', align: 'center' },
				{ text: 'Inokulasi', datafield: 'hemolisa', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Status', datafield: 'status', width: '15%', cellsalign: 'left', align: 'center' },
				{ text: 'Edit', filterable: false, columntype: 'button', align: 'center', width: '7%', cellsrenderer: function () {
					return "Edit";
					}, buttonclick: function (row) {        
						editrowjabatan  = row;   
						var offset      = $("#gridmediasdai1").offset();       
						var dataRecord  = $("#gridmediasdai1").jqxGrid('getrowdata', editrowjabatan);
						$('#idpertumbuhankoloni').val(dataRecord.id);
						$('#sdai1_media').val(dataRecord.kuman);
						$('#sdai1_pemeriksaanhemolisa').val(dataRecord.hemolisa);
						$('#sdai1_mediakuman').val(dataRecord.tindaklanjut);
						$('#sdai1_status').val(dataRecord.status);
						$('#modalgridmediasdai1').modal('show');
					}
				},
				{ text: 'Del', editable: false, sortable: false, filterable: false, columntype: 'button', width: '7%', cellsrenderer: function () {
                    return "Del";
                    }, buttonclick: function (row) {
                        editrow = row;	
                        var offset 		= $("#gridmediasdai1").offset();		
                        var dataRecord 	= $("#gridmediasdai1").jqxGrid('getrowdata', editrow);
                        swal({
                            title: 'Apakah anda yakin ?',
                            text: "Perhatian, data yang sudah di hapus tidak bisa di Undo, apakah anda yakin ingin menghapus",
                            type: 'warning',
                            showCancelButton: true,
                            confirmButtonClass: 'btn btn-confirm mt-2',
                            cancelButtonClass: 'btn btn-cancel ml-2 mt-2',
                            confirmButtonText: 'Yes'
                        }).then(function () {
							$.post('{{ route("getResult") }}', { 
								id: dataRecord.id,
								nofoto: nofoto,
								keterangan: 'hapusdatapertumbuhankoloni',
								_token: '{{ csrf_token() }}' },
							function(data){
								$("#gridmediasdai1").jqxGrid('updatebounddata','filter');
							});
                        });
                    }
                },
				{ text: 'Next', filterable: false, columntype: 'button', align: 'center', width: '7%', cellsrenderer: function () {
					return "Next";
					}, buttonclick: function (row) {        
						editrowjabatan  = row;   
						var offset      = $("#gridmediasdai1").offset();       
						var dataRecord  = $("#gridmediasdai1").jqxGrid('getrowdata', editrowjabatan);
						var tanggal   = dataRecord.tglpenyimpanan;
						if (tanggal == '{{date("Y-m-d")}}') {
							swal({
								title	: 'Maaf',
								text	: 'Data hanya bisa di edit pada hari berikutnya',
								type	: 'warning',
							})
						} else {
							$('#idpertumbuhankoloni').val('new');
							$('#sdai1_media').val(dataRecord.kuman);
							$('#sdai1_mediakuman').val(dataRecord.tindaklanjut);
							$('#sdai1_pemeriksaanhemolisa').val(dataRecord.hemolisa);
							$('#sdai1_status').val(dataRecord.status);
							$('#modalgridmediasdai1').modal('show');
						}
						
					}
				},
			]
		});
		$("#gridmediasdai2").jqxGrid({
			width					: '100%',
			source					: srcjsonsdai2,
			columnsresize			: true,
			theme					: "energyblue",
			autoheight				: true,
			pageable				: true,
			altrows					: true,
			columns					: [
				{ text: 'Tanggal', datafield: 'tglpenyimpanan', width: '9%', cellsalign: 'left', align: 'center' },
				{ text: 'Petugas', datafield: 'created_by', width: '15%', cellsalign: 'left', align: 'center' },
				{ text: 'Kuman', datafield: 'tindaklanjut', width: '15%', cellsalign: 'left', align: 'center' },
				{ text: 'Media', datafield: 'kuman', width: '15%', cellsalign: 'left', align: 'center' },
				{ text: 'Inokulasi', datafield: 'hemolisa', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Status', datafield: 'status', width: '15%', cellsalign: 'left', align: 'center' },
				{ text: 'Edit', filterable: false, columntype: 'button', align: 'center', width: '7%', cellsrenderer: function () {
					return "Edit";
					}, buttonclick: function (row) {        
						editrowjabatan  = row;   
						var offset      = $("#gridmediasdai2").offset();       
						var dataRecord  = $("#gridmediasdai2").jqxGrid('getrowdata', editrowjabatan);
						$('#idpertumbuhankoloni').val(dataRecord.id);
						$('#sdai2_media').val(dataRecord.kuman);
						$('#sdai2_pemeriksaanhemolisa').val(dataRecord.hemolisa);
						$('#sdai2_mediakuman').val(dataRecord.tindaklanjut);
						$('#sdai2_status').val(dataRecord.status);
						$('#modalgridmediasdai2').modal('show');
					}
				},
				{ text: 'Del', editable: false, sortable: false, filterable: false, columntype: 'button', width: '7%', cellsrenderer: function () {
                    return "Del";
                    }, buttonclick: function (row) {
                        editrow = row;	
                        var offset 		= $("#gridmediasdai2").offset();		
                        var dataRecord 	= $("#gridmediasdai2").jqxGrid('getrowdata', editrow);
                        swal({
                            title: 'Apakah anda yakin ?',
                            text: "Perhatian, data yang sudah di hapus tidak bisa di Undo, apakah anda yakin ingin menghapus",
                            type: 'warning',
                            showCancelButton: true,
                            confirmButtonClass: 'btn btn-confirm mt-2',
                            cancelButtonClass: 'btn btn-cancel ml-2 mt-2',
                            confirmButtonText: 'Yes'
                        }).then(function () {
							$.post('{{ route("getResult") }}', { 
								id: dataRecord.id,
								nofoto: nofoto,
								keterangan: 'hapusdatapertumbuhankoloni',
								_token: '{{ csrf_token() }}' },
							function(data){
								$("#gridmediasdai2").jqxGrid('updatebounddata','filter');
							});
                        });
                    }
                },
				{ text: 'Next', filterable: false, columntype: 'button', align: 'center', width: '7%', cellsrenderer: function () {
					return "Next";
					}, buttonclick: function (row) {        
						editrowjabatan  = row;   
						var offset      = $("#gridmediasdai2").offset();       
						var dataRecord  = $("#gridmediasdai2").jqxGrid('getrowdata', editrowjabatan);
						var tanggal   = dataRecord.tglpenyimpanan;
						if (tanggal == '{{date("Y-m-d")}}') {
							swal({
								title	: 'Maaf',
								text	: 'Data hanya bisa di edit pada hari berikutnya',
								type	: 'warning',
							})
						} else {
							$('#idpertumbuhankoloni').val('new');
							$('#sdai2_media').val(dataRecord.kuman);
							$('#sdai2_mediakuman').val(dataRecord.tindaklanjut);
							$('#sdai2_pemeriksaanhemolisa').val(dataRecord.hemolisa);
							$('#sdai2_status').val(dataRecord.status);
							$('#modalgridmediasdai2').modal('show');
						}
						
					}
				},
			]
		});
		$("#gridmediasellainnya").jqxGrid({
			width					: '100%',
			source					: srcjsonselainnya,
			columnsresize			: true,
			theme					: "energyblue",
			autoheight				: true,
			pageable				: true,
			altrows					: true,
			columns					: [
				{ text: 'Tanggal', datafield: 'tglpenyimpanan', width: '8%', cellsalign: 'left', align: 'center' },
				{ text: 'Petugas', datafield: 'created_by', width: '8%', cellsalign: 'left', align: 'center' },
				{ text: 'Kuman', datafield: 'kuman', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Hemolisa', datafield: 'hemolisa', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Katalase', datafield: 'katalase', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Koagulase', datafield: 'koagulase', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Oksidase', datafield: 'oksidase', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Lainnya', datafield: 'lainnya', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Status', datafield: 'status', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Edit', filterable: false, columntype: 'button', align: 'center', width: '7%', cellsrenderer: function () {
					return "Edit";
					}, buttonclick: function (row) {        
						editrowjabatan  = row;   
						var offset      = $("#gridmediasellainnya").offset();       
						var dataRecord  = $("#gridmediasellainnya").jqxGrid('getrowdata', editrowjabatan);
						$('#idpertumbuhankoloni').val(dataRecord.id);
						$('#id_mediaselektif').val(dataRecord.kuman);
						$('#sellainnya_pemeriksaanhemolisa').val(dataRecord.hemolisa);
						$('#sellainnya_pemeriksaankatalase').val(dataRecord.katalase);
						$('#sellainnya_pemeriksaankabulase').val(dataRecord.koagulase);
						$('#id_ujialainnyasellainnya').val(dataRecord.lainnya);
						$('#id_ujioksidasesellainnya').val(dataRecord.oksidase);
						$('#id_statusmediasellainnya').val(dataRecord.status);
						$('#modalgridmediaselektif').modal('show');
					}
				},
				{ text: 'Del', editable: false, sortable: false, filterable: false, columntype: 'button', width: '7%', cellsrenderer: function () {
                    return "Del";
                    }, buttonclick: function (row) {
                        editrow = row;	
                        var offset 		= $("#gridmediasellainnya").offset();		
                        var dataRecord 	= $("#gridmediasellainnya").jqxGrid('getrowdata', editrow);
                        swal({
                            title: 'Apakah anda yakin ?',
                            text: "Perhatian, data yang sudah di hapus tidak bisa di Undo, apakah anda yakin ingin menghapus",
                            type: 'warning',
                            showCancelButton: true,
                            confirmButtonClass: 'btn btn-confirm mt-2',
                            cancelButtonClass: 'btn btn-cancel ml-2 mt-2',
                            confirmButtonText: 'Yes'
                        }).then(function () {
							$.post('{{ route("getResult") }}', { 
								id: dataRecord.id,
								nofoto: nofoto,
								keterangan: 'hapusdatapertumbuhankoloni',
								_token: '{{ csrf_token() }}' },
							function(data){
								$("#gridmediasellainnya").jqxGrid('updatebounddata','filter');
							});
                        });
                    }
                },
			]
		});
		$("#gridmediatamlainnya").jqxGrid({
			width					: '100%',
			source					: srcjsontalainnya,
			columnsresize			: true,
			theme					: "energyblue",
			autoheight				: true,
			pageable				: true,
			altrows					: true,
			columns					: [
				{ text: 'Tanggal', datafield: 'tglpenyimpanan', width: '8%', cellsalign: 'left', align: 'center' },
				{ text: 'Petugas', datafield: 'created_by', width: '8%', cellsalign: 'left', align: 'center' },
				{ text: 'Kuman', datafield: 'kuman', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Hemolisa', datafield: 'hemolisa', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Katalase', datafield: 'katalase', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Koagulase', datafield: 'koagulase', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Oksidase', datafield: 'oksidase', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Lainnya', datafield: 'lainnya', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Status', datafield: 'status', width: '10%', cellsalign: 'left', align: 'center' },
				{ text: 'Edit', filterable: false, columntype: 'button', align: 'center', width: '7%', cellsrenderer: function () {
					return "Edit";
					}, buttonclick: function (row) {        
						editrowjabatan  = row;   
						var offset      = $("#gridmediatamlainnya").offset();       
						var dataRecord  = $("#gridmediatamlainnya").jqxGrid('getrowdata', editrowjabatan);
						$('#idpertumbuhankoloni').val(dataRecord.id);
						$('#id_pemeriksaantl').val(dataRecord.kuman);
						$('#tamlainnya_pemeriksaanhemolisa').val(dataRecord.hemolisa);
						$('#tamlainnya_pemeriksaankatalase').val(dataRecord.katalase);
						$('#tamlainnya_pemeriksaankabulase').val(dataRecord.koagulase);
						$('#id_ujialainnyatamlainnya').val(dataRecord.lainnya);
						$('#id_ujioksidasetamlainnya').val(dataRecord.oksidase);
						$('#id_statusmediatamlainnya').val(dataRecord.status);
						$('#modalgridmediatamlainnya').modal('show');
					}
				},
				{ text: 'Del', editable: false, sortable: false, filterable: false, columntype: 'button', width: '7%', cellsrenderer: function () {
                    return "Del";
                    }, buttonclick: function (row) {
                        editrow = row;	
                        var offset 		= $("#gridmediatamlainnya").offset();		
                        var dataRecord 	= $("#gridmediatamlainnya").jqxGrid('getrowdata', editrow);
                        swal({
                            title: 'Apakah anda yakin ?',
                            text: "Perhatian, data yang sudah di hapus tidak bisa di Undo, apakah anda yakin ingin menghapus",
                            type: 'warning',
                            showCancelButton: true,
                            confirmButtonClass: 'btn btn-confirm mt-2',
                            cancelButtonClass: 'btn btn-cancel ml-2 mt-2',
                            confirmButtonText: 'Yes'
                        }).then(function () {
							$.post('{{ route("getResult") }}', { 
								id: dataRecord.id,
								nofoto: nofoto,
								keterangan: 'hapusdatapertumbuhankoloni',
								_token: '{{ csrf_token() }}' },
							function(data){
								$("#gridmediatamlainnya").jqxGrid('updatebounddata','filter');
							});
                        });
                    }
                },
			]
		});
	}
	function openlamanekpertise( jQuery ){
		var dlp		= document.getElementById('dlp').value;
		var nofoto	= document.getElementById('nofoto').value;
		var idne	= document.getElementById('periksa_id').value;
		$('#template_jenis').val(dlp);
		$('#divtemplate').hide();
		$('.templatejawaban').hide();
		$('.setelahdipilihtemplate').show();
		$('#id_bakterihitungkolselect').show();
		$('#id_bakterihitungkolteks').hide();
		$('#id_bakterihitungkol01select').show();
		$('#id_bakterihitungkol01teks').hide();
		$('#id_bakterihitungkol02select').show();
		$('#id_bakterihitungkol02teks').hide();
		$('#id_bakterimediabapselect').show();
		$('#id_bakterimediabapteks').hide();
		$('#vl_hasildiv1select').show();
		$('#vl_hasildiv1teks').hide();
		$('#vl_hasildiv2select').show();
		$('#vl_hasildiv2teks').hide();
		$('input[type="checkbox"]').prop('disabled', false);
		console.log('Loading komponen jawaban for DLP: '+dlp+' | No.Foto: '+nofoto+' | ID Periksa: '+idne);
		var form_data = new FormData();
			form_data.append('nofoto', nofoto);
			form_data.append('ruangan', dlp);
			form_data.append('keterangan', 'getkomponenjawaban');
			form_data.append('_token', '{{csrf_token()}}');
		$.ajax({
			url			: '{{ route("getResult") }}',
			data		: form_data,
			type		: 'POST',
			contentType	: false,
			processData	: false,
			success		: function (response) {
				var komponens = response.komponens || JSON.parse(response);
				komponens.forEach(function(rows) {
					console.log(rows.komponen+' | '+rows.isidata);
					if (rows.komponen === 'lsg_pewarnaanlain') {
						CKEDITOR.instances['lsg_pewarnaanlain'].setData(rows.isidata);
					} else if (rows.komponen === 'lsg_ditemukanmorfologi') {
						CKEDITOR.instances['lsg_ditemukanmorfologi'].setData(rows.isidata);
					} else if (rows.komponen === 'keterangan') {
						CKEDITOR.instances['keterangan'].setData(rows.isidata);
					} else if (rows.komponen === 'viralload') {
						CKEDITOR.instances['viralload'].setData(rows.isidata);
					} else if (rows.komponen.includes("id_mikroorganismeoptional") || rows.komponen.includes("id_biakankulturoptional") || rows.komponen.includes("lsg_mikroorganismeoptional") || rows.komponen.includes("id_mediabap") || rows.komponen.includes("id_mediacap") || rows.komponen.includes("id_mediamcconkey")) {
						var isidataString 	= rows.isidata;
						var isidataArray 	= JSON.parse(isidataString);
						$("#"+rows.komponen).val(isidataArray).select2().trigger('change');
					} else if (rows.komponen.includes("id_bakteri01") || rows.komponen.includes("id_bakteri02")) {
						var isidataString 	= rows.isidata;
						$("#"+rows.komponen).val(isidataString).select2().trigger('change');
						if (rows.komponen === 'id_bakteri01') {
							$("#id_bakteri01cetakket").html(isidataString);
							btncreateantibiotikkumanmanual1();
						}
						if (rows.komponen === 'id_bakteri02') {
							btncreateantibiotikkumanmanual2();
						}
					} else if (rows.komponen.includes("inlineCheckbox")) {
						if (rows.isidata === '' || rows.isidata === null) {
							$("#" + rows.komponen).prop('checked', false);
						} else {
							$("#" + rows.komponen).prop('checked', true);
							if (rows.komponen == 'inlineCheckbox16'){
								$('input[type="checkbox"].chekbox1216').prop('disabled', true);
							} else if (rows.komponen == 'inlineCheckbox21'){
								$('input[type="checkbox"].chekbox1721').prop('disabled', true);
							} else if (rows.komponen == 'inlineCheckbox23'){
								$('input[type="checkbox"].chekbox2226').prop('disabled', true);
							} else if (rows.komponen == 'inlineCheckbox31'){
								$('input[type="checkbox"].chekbox2734').prop('disabled', true);
							} else if (rows.komponen == 'inlineCheckbox39'){
								$('input[type="checkbox"].chekbox3539').prop('disabled', true);
							} else if (rows.komponen == 'inlineCheckbox45'){
								$('input[type="checkbox"].chekbox4045').prop('disabled', true);
							} else if (rows.komponen == 'inlineCheckbox46'){
								$('input[type="checkbox"].chekbox4652').prop('disabled', true);
							} else if (rows.komponen == 'inlineCheckbox53'){
								$('input[type="checkbox"].chekbox5359').prop('disabled', true);
							} else {
								$('input[type="checkbox"]').prop('disabled', false);
							}
						}
					} else {
						$("#" + rows.komponen).val(rows.isidata);
						if (rows.komponen === 'bakteri'){
							btncreateantibiotikvitek();
						}
						if (rows.komponen === 'id_jenispemeriksaantb') {
							if (rows.isidata === 'TCM MTB Rif (Xpert)' || rows.isidata === 'TCM MTB Rif (Truenat)' || rows.isidata === 'TCM MTB Rif INH (BDMAX)' || rows.isidata === 'LPA lini 2' || rows.isidata === 'LPA lini 1') {
								$('#hasilpemeriksaanttcmmtbrifxpert').show();
							} else if (rows.isidata == 'TCM XDR (Xpert)'){
								$('#hasilpemeriksaanttcmmtbxdrxpert').show();
							} else if (rows.isidata == 'Biakan'){
								$('#hasilpemeriksaantbbiakan').show();
							} else {
								$('#hasilpemeriksaantmikroskopis').show();
							}
						}
						if (rows.komponen === 'id_bakterihitungkolmediabap' && rows.isidata === 'lainnya'){
							$('#id_bakterimediabapselect').hide();
							$('#id_bakterimediabapteks').show();
						}
						if (rows.komponen === 'id_pewarnaangiesma' && rows.isidata === 'lainnya'){
							$('#pewarnaangiemsaselect').hide();
							$('#pewarnaangiemsateks').show();
						}
						if (rows.komponen === 'id_pewarnaankoh' && rows.isidata === 'lainnya'){
							$('#pewarnaankohselect').hide();
							$('#pewarnaankohteks').show();
						}
						if (rows.komponen === 'lsg_pewarnaankoh' && rows.isidata === 'lainnya'){
							$('#lsg_pewarnaankohselect').hide();
							$('#lsg_pewarnaankohteks').show();
						}
						if (rows.komponen === 'lsg_pewarnaangiesma' && rows.isidata === 'lainnya'){
							$('#lsg_pewarnaangiesmaselect').hide();
							$('#lsg_pewarnaangiesmateks').show();
						}
						if (rows.komponen === 'id_bakterihitungkol' && rows.isidata === 'lainnya'){
							$('#id_bakterihitungkolselect').hide();
							$('#id_bakterihitungkolteks').show();
						}
						if (rows.komponen === 'id_bakterihitungkol01' && rows.isidata === 'lainnya'){
							$('#id_bakterihitungkol01select').hide();
							$('#id_bakterihitungkol01teks').show();
						}
						if (rows.komponen === 'id_bakterihitungkol02' && rows.isidata === 'lainnya'){
							$('#id_bakterihitungkol02select').hide();
							$('#id_bakterihitungkol02teks').show();
						}
						if (rows.komponen === 'vl_hasil01' && rows.isidata === 'lainnya'){
							$('#vl_hasildiv1select').hide();
            				$('#vl_hasildiv1teks').show();
						}
						if (rows.komponen === 'vl_hasil02' && rows.isidata === 'lainnya'){
							$('#vl_hasildiv2select').hide();
            				$('#vl_hasildiv2teks').show();
						}
					}
				});
			},
			error: function (xhr, status, error) {
				var response = xhr.responseJSON || {};
				var traceText = response.trace ? JSON.stringify(response.trace) : null;
				console.log(traceText);
			}
		});
		console.log('Displaying template for DLP: '+dlp);
		if (dlp == 'CCI'){
			$('#templatecci').show();
		} else if (dlp == 'Kultur'){
			$('#templatekultur').show();
			$('#pewarnaangiemsaselect').show();
			$('#pewarnaangiemsateks').hide();
			$('#pewarnaankohselect').show();
			$('#pewarnaankohteks').hide();
			jQueryCreateTabelPertumbuhanKoloni();
		} else if (dlp == 'Pewarna Langsung'){
			$('#lsg_pewarnaankohselect').show();
			$('#lsg_pewarnaankohteks').hide();
			$('#lsg_pewarnaangiesmaselect').show();
			$('#lsg_pewarnaangiesmateks').hide();
			$('#templatepewarnaanlangsung').show();
		} else if (dlp == 'TBC'){
			$('#templatetbc').show();
			$('.hasilpemeriksaantb').hide();
		} else if (dlp == 'Viral Load'){
			$('#templateviralload').show();
		} else if (dlp == 'IgM IgG Leptospira'){
			$('#templateleptospira').show();
		} else if (dlp == 'PCR COVID'){
			$('#templatecovid').show();
		}
		console.log('Finished loading komponen jawaban for DLP: '+dlp+' | No.Foto: '+nofoto+' | ID Periksa: '+idne);
	}
	function openedpage( jQuery ){
		var jenis	= document.getElementById('master_set01').value;
		var mulai	= document.getElementById('mulai').value;
		var akhir	= document.getElementById('akhir').value;
		var valcari	= document.getElementById('valcari').value;
		var master	= document.getElementById('master_lokasi').value;
		var poli	= document.getElementById('valpoli2').value;
		var set06	= document.getElementById('master_judul').value;
		var token	= document.getElementById('token').value;
		if (jenis == 'ThisDay'){
			$("#mulai").val('');
			$("#akhir").val('');
			var judul='Patient Queue This Day on '+set06;
			$("#judul").html(judul);
		} else if (jenis == 'mundur2'){
			$("#mulai").val('');
			$("#akhir").val('');
			var judul='Patient Queue Last 2 Day on '+set06;
			$("#judul").html(judul);
		} else if (jenis == 'mundur3'){
			$("#mulai").val('');
			$("#akhir").val('');
			var judul='Patient Queue Last 3 Day on '+set06;
			$("#judul").html(judul);
		} else if (jenis == 'searchbydate'){
			if (poli == 'inisaja'){
				var judul='Patient From '+mulai+' until '+akhir+' on '+set06;
			} else {
				var judul='Patient From '+mulai+' until '+akhir+' All Poli';
			}
			$("#judul").html(judul);
		} else {
			if (poli == 'inisaja'){
				var judul='Search Result by key: '+valcari+' on '+set06;
				$("#judul").html(judul);
			} else if (poli == 'semua') {
				var judul='Search Result by key: '+valcari+' All Poli ';
				$("#judul").html(judul);
			} else {
				var judul='Search Result by key: '+valcari+'';
				$("#judul").html(judul);
			}
		}
		var sourcepasiencari = {
			datatype: "json",
			datafields: [
				{ name: 'id'},
				{ name: 'pasien_id', type: 'text'},
				{ name: 'nofoto', type: 'text'},
				{ name: 'noregister', type: 'text'},
				{ name: 'nmpasien', type: 'text'},
				{ name: 'jkpasien', type: 'text'},
				{ name: 'usia', type: 'text'},
				{ name: 'urgensi', type: 'text'},
				{ name: 'tlsnofoto', type: 'text'},
				{ name: 'tlsnoregister', type: 'text'},
				{ name: 'tlsnama', type: 'text'},
				{ name: 'tlsjk', type: 'text'},
				{ name: 'tlsusia', type: 'text'},
				{ name: 'tlsurgensi', type: 'text'},
				{ name: 'tlsreques', type: 'text'},
				{ name: 'tlsruangan', type: 'text'},
				{ name: 'tlsdaftar', type: 'text'},
				{ name: 'tlsstatus', type: 'text'},
				{ name: 'poli', type: 'text'},
				{ name: 'ruangan', type: 'text'},
				{ name: 'daftartgl', type: 'text'},
				{ name: 'daftarjam', type: 'text'},
				{ name: 'status', type: 'text'},
				{ name: 'keterangan', type: 'text'},
				{ name: 'kesimpulan', type: 'text'},
				{ name: 'idruangan', type: 'text'},
				{ name: 'iddokter', type: 'text'},
				{ name: 'dokter_id', type: 'text'},
				{ name: 'ppdssenior', type: 'text'},
				{ name: 'middleppds', type: 'text'},
				{ name: 'ppdsjunior', type: 'text'},
				{ name: 'diagnosa', type: 'text'},
				{ name: 'diagnosa2', type: 'text'},
				{ name: 'kd_spesimen', type: 'text'},
				{ name: 'nm_spesimen', type: 'text'},
				{ name: 'asalpasien', type: 'text'},
				{ name: 'klinis', type: 'text'},
				{ name: 'klinisi', type: 'text'},
				{ name: 'berat', type: 'text'},
				{ name: 'tlppasien', type: 'text'},
				{ name: 'dlp', type: 'text'},
				{ name: 'excutor', type: 'text'},
				{ name: 'analis', type: 'text'},
				{ name: 'nmexcutor', type: 'text'},
				{ name: 'nmanalis', type: 'text'},
				{ name: 'modality', type: 'text'},
				{ name: 'dokter', type: 'text'},
				{ name: 'ppds1', type: 'text'},
				{ name: 'ppds2', type: 'text'},
				{ name: 'updated_at', type: 'date'},
				{ name: 'daftar', type: 'text'},
				{ name: 'verifikasi', type: 'text'},
				{ name: 'otherppds', type: 'text'},
				{ name: 'nmpendaftar', type: 'text'},
				{ name: 'alamatpasien', type: 'text'},
			],
			type		: 'GET',
			data		: {jenis:jenis, mulai:mulai, akhir:akhir, valcari:valcari, poli:poli, master:master, _token: '{{csrf_token()}}'},
			url			: '{{ route("getList") }}',
		};
		var dataAdapter = new $.jqx.dataAdapter(sourcepasiencari);
		var tlsdurasi = function (row, column, value) {
			var verifikasi 	= $('#gridpemeriksaan').jqxGrid('getrowdata', row).verifikasi;
			var daftar 		= $('#gridpemeriksaan').jqxGrid('getrowdata', row).daftar;
			var from 		= moment(daftar);
			var to 			= moment(verifikasi);
			if (to.isValid()) {
				var duration 	= moment.duration(to.diff(from));
				var years 		= duration.years();
				var months 		= duration.months();
				var days 		= duration.days();
				var hours 		= duration.hours();
				var minutes 	= duration.minutes();
				var seconds 	= duration.seconds();
				var result 		= '';
				if (years > 0) {
					result += years + ' tahun ';
				}
				if (months > 0) {
					result += months + ' bulan ';
				}
				if (days > 0) {
					result += days + ' hari ';
				}
				if (hours > 0) {
					result += hours + ' jam ';
				}
				if (minutes > 0) {
					result += minutes + ' menit ';
				}
				if (seconds > 0) {
					result += seconds + ' detik';
				}
				return result;
			} else {
				return 'On Progress';
			}
		};
		$("#gridpemeriksaan").jqxGrid({
			width			: '100%',
			filterable		: true,
			showfilterrow	: true,
			columnsresize	: true,
			pageable		: true,
			sortable		: true,
			autoheight		: true,
			source			: dataAdapter,
			theme			: "energyblue",
			selectionmode	: 'checkbox',
			altrows			: true,
			columns: [
				{ text: 'Expertise', filterable: false, columntype: 'button', align: 'center', width: 70, cellsrenderer: function () {
					return "Expertise";
					}, buttonclick: function (row) {
						editrow         	= row;
						var dataRecord  	= $("#gridpemeriksaan").jqxGrid('getrowdata', editrow);
						var statuse     	= dataRecord.status;
						if (statuse === null) {
							swal({
								title	: 'Sample Belum Diverifikasi',
								text	: 'Harap Verifikasi Sample Terlebih Dahulu',
								type	: 'warning',
							})
						} else if (statuse.includes("Dibatalkan")){
							swal({
								title	: 'Pemeriksaan di batalkan',
								text	: statuse,
								type	: 'warning',
							})
						} else {
							window.location.href = mikroExpertiseBaseUrl + '/' + dataRecord.id + '/expertise?from=' + encodeURIComponent(mikroMaster);
						}
					}
				},
				{ text: 'Report', filterable: false, columntype: 'button', align: 'center', width: 50, cellsrenderer: function () {
					return "Print";
					}, buttonclick: function (row) {
						editrowjabatan 	= row;
						var offset      = $("#gridpemeriksaan").offset();
						var dataRecord  = $("#gridpemeriksaan").jqxGrid('getrowdata', editrowjabatan);
						var goook       = dataRecord.id;
						var status      = dataRecord.status;
						var nofoto      = dataRecord.nofoto;
						var asalpasien 	= dataRecord.asalpasien;
						var token       = document.getElementById('token').value;
						var masterk		= document.getElementById('master_kelompok').value;
						var home 		= '{{URL::to("/")}}';
						var alamat		= home+'/hasil/'+dataRecord.nofoto;
						window.open(alamat,'_blank');
					}
				},
				{ text: 'Acc.No', datafield: 'tlsnofoto', width: 100, align: 'center', cellsalign: 'center'},
				{ text: 'Asal Sample', datafield: 'modality', width: 100, align: 'center', cellsalign: 'center'},
				{ text: 'No.RM', datafield: 'tlsnoregister', width: 100, cellsalign: 'left', align: 'center'},
				{ text: 'Name', datafield: 'tlsnama', width: 150, cellsalign: 'left', align: 'center'},
				{ text: 'Date', datafield: 'daftartgl', width: 80, cellsalign: 'center', align: 'center'},
				{ text: 'Time', datafield: 'daftarjam', width: 80, cellsalign: 'center', align: 'center'},
				{ text: 'Inputor', filtertype: 'checkedlist', datafield: 'nmpendaftar', width: 110, cellsalign: 'left', align: 'center'},
				{ text: 'Comming From', filtertype: 'checkedlist', datafield: 'asalpasien', width: 120, cellsalign: 'left', align: 'center'},
				{ text: 'Service', datafield: 'tlsreques', width: 150, cellsalign: 'left', align: 'center'},
				{ text: 'Status', filtertype: 'checkedlist', datafield: 'tlsstatus', width: 150, cellsalign: 'left', align: 'center'},
				{ text: 'Themeplate', filtertype: 'checkedlist', datafield: 'dlp', width: 75, cellsalign: 'left', align: 'center'},
				{ text: 'Jenis', filtertype: 'checkedlist', datafield: 'diagnosa2', width: 75, cellsalign: 'left', align: 'center'},
				{ text: 'Specimen', filtertype: 'checkedlist', datafield: 'nm_spesimen', width: 230, cellsalign: 'left', align: 'center'},
				{ text: 'Updated_at', datafield: 'updated_at', filtertype: 'date', width: 150, cellsalign: 'left', align: 'center'},
				{ text: 'Duration',  cellsrenderer: tlsdurasi, width: 100, cellsalign: 'left', align: 'center'  },
			]
		});
		let hasOpenedExpertiseOnLoad = false;
		$("#gridpemeriksaan").off('bindingcomplete.autoExpertise').on('bindingcomplete.autoExpertise', function () {
			var focusPeriksaId = $('#focus_periksa_id').val();
			var shouldOpenExpertise = $('#open_expertise_on_load').val() === '1';
			if (!shouldOpenExpertise || hasOpenedExpertiseOnLoad || !focusPeriksaId) {
				return;
			}

			var rows = $("#gridpemeriksaan").jqxGrid('getrows') || [];
			var targetRecord = null;
			$.each(rows, function (_, row) {
				if (String(row.id) === String(focusPeriksaId)) {
					targetRecord = row;
					return false;
				}
			});

			hasOpenedExpertiseOnLoad = true;
			if (targetRecord) {
				openExpertiseDataRecord(targetRecord);
				return;
			}

			swal({
				title	: 'Data tidak ditemukan',
				text	: 'Sample expertise tidak ditemukan pada daftar asal.',
				type	: 'warning',
			});
		});
		$("html, body").animate({ scrollTop: 0 }, "slow");
	}
	$(window).on('load', function () {
		openedpage();
	});
    var start = new Date();
	CountDownTimer(start, 'timeremaining');
	function CountDownTimer(dt, id) {
		var end 	= new Date(dt.getTime() + 6000000);
		var _second = 1000;
		var _minute = _second * 60;
		var _hour 	= _minute * 60;
		var _day 	= _hour * 24;
		var timer;
		function showRemaining() {
			var now = new Date();
			var distance = end - now;
			if (distance < 0) {
				clearInterval(timer);
				var start = new Date();
				CountDownTimer(start, 'timeremaining');
				$("#gridpemeriksaan").jqxGrid('updatebounddata','filter');
				return;
			}
			var days = Math.floor(distance / _day);
			var hours = Math.floor((distance % _day) / _hour);
			var minutes = Math.floor((distance % _hour) / _minute);
			var seconds = Math.floor((distance % _minute) / _second);
			document.getElementById(id).innerHTML ='Refresh in ';
			document.getElementById(id).innerHTML += seconds + 'secs';
		}
		timer = setInterval(showRemaining, 1000);
	}
    $(function() {
        CKEDITOR.env.isCompatible = true;
        CKEDITOR.replace( 'keterangan');
		CKEDITOR.replace( 'kesimpulan');
		CKEDITOR.replace( 'lsg_ditemukanmorfologi');
		CKEDITOR.replace( 'lsg_pewarnaanlain');
		CKEDITOR.replace( 'viralload');
		CKEDITOR.replace( 'iggigm_interpretasi');
		CKEDITOR.replace( 'addendumketerangan');
		$("#mulai").datepicker({format: 'yyyy-mm-dd', autoclose: true});
		$("#akhir").datepicker({format: 'yyyy-mm-dd', autoclose: true});
		$("#id_tanggalpengambilancontohuji").datepicker({format: 'yyyy-mm-dd', autoclose: true});
		$("#id_tanggalpengirimancontohuji").datepicker({format: 'yyyy-mm-dd', autoclose: true});
		$("#hasilpemeriksaantbbiakan_tgl").datepicker({format: 'yyyy-mm-dd', autoclose: true});
		$("#hasilpemeriksaantbbiakan_tglbiakan").datepicker({format: 'yyyy-mm-dd', autoclose: true});
		$("#hasilpemeriksaantmikroskopis_tglsewaktu").datepicker({format: 'yyyy-mm-dd', autoclose: true});
		$("#hasilpemeriksaantmikroskopis_tglpagi").datepicker({format: 'yyyy-mm-dd', autoclose: true});
		$("#hasilpemeriksaanttcmmtbxdrxpert_tglpagi").datepicker({format: 'yyyy-mm-dd', autoclose: true});
		$("#hasilpemeriksaanttcmmtbxdrxpert_tglsewaktu").datepicker({format: 'yyyy-mm-dd', autoclose: true});
		$("#hasilpemeriksaanttcmmtbrifxpert_tglsewaktu").datepicker({format: 'yyyy-mm-dd', autoclose: true});
		$("#hasilpemeriksaanttcmmtbrifxpert_tglpagi").datepicker({format: 'yyyy-mm-dd', autoclose: true});
    });
	$(document).ready(function () {
		$('.select2').select2();
		$('#divviewpacs').hide();
		$('#divtemplate').hide();
		$('#divperiksa').hide();
		$('#divreadonly').hide();
		$('#divharibytanggal').hide();
		$("#btnuntukgridmediabap").click(function() {
			$('#modalgridmediabap').modal('show');
			$('#idpertumbuhankoloni').val('new');
		});
		$("#btnuntukgridmediacap").click(function() {
			$('#modalgridmediacap').modal('show');
			$('#idpertumbuhankoloni').val('new');
		});
		$("#btnuntukgridmediamcconkey").click(function() {
			$('#modalgridmediamcconkey').modal('show');
			$('#idpertumbuhankoloni').val('new');
		});
		$("#btnuntukgridmediasda").click(function() {
			$('#modalgridmediasda').modal('show');
			$('#idpertumbuhankoloni').val('new');
		});
		$("#btnuntukgridmediasellainnya").click(function() {
			$('#modalgridmediaselektif').modal('show');
			$('#idpertumbuhankoloni').val('new');
		});
		$("#btnuntukgridmediatamlainnya").click(function() {
			$('#modalgridmediatamlainnya').modal('show');
			$('#idpertumbuhankoloni').val('new');
		});
		$("#btnbapkosong").click(function() {
			var id 			= document.getElementById('periksa_id').value;
			var idtabel 	= 'new';
			var media 		= 'Media BAP';
			var kuman 		= '';
			var hemolisa 	= '';
			var katalase 	= '';
			var koagulase 	= '';
			var ujilainnya 	= '';
			var status 		= 'Tidak ada pertumbuhan';
			$.post('{{ route("getResult") }}', { 
				nofoto: id,
				komponen: media,
				isi: idtabel,
				kuman: kuman,
				hemolisa: hemolisa,
				katalase: katalase,
				koagulase: koagulase,
				ujilainnya: ujilainnya,
				status: status,
				keterangan: 'pertumbuhankoloni',
				_token: '{{ csrf_token() }}' },
			function(data){
				$("#gridmediabap").jqxGrid('updatebounddata','filter');
			});
		});
		$("#btnsimpanpertumbuhankolonibap").click(function() {
			$('#modalgridmediabap').modal('hide');
			var id 			= document.getElementById('periksa_id').value;
			var idtabel 	= document.getElementById('idpertumbuhankoloni').value;
			var media 		= 'Media BAP';
			var kuman 		= document.getElementById('id_mediabap').value;
			var hemolisa 	= document.getElementById('id_pemeriksaanhemolisa').value;
			var katalase 	= document.getElementById('id_pemeriksaankatalase').value;
			var koagulase 	= document.getElementById('id_pemeriksaankabulase').value;
			var ujilainnya 	= document.getElementById('id_ujialainnyabap').value;
			var status 		= document.getElementById('id_statusmediabap').value;
			var tindaklanjut= document.getElementById('id_mediabapkuman').value;
			$.post('{{ route("getResult") }}', { 
				nofoto: id,
				komponen: media,
				isi: idtabel,
				kuman: kuman,
				hemolisa: hemolisa,
				katalase: katalase,
				koagulase: koagulase,
				ujilainnya: ujilainnya,
				status: status,
				tindaklanjut: tindaklanjut,
				keterangan: 'pertumbuhankoloni',
				_token: '{{ csrf_token() }}' },
			function(data){
				$("#gridmediabap").jqxGrid('updatebounddata','filter');
			});
		});
		$("#btncapkosong").click(function() {
			var id 			= document.getElementById('periksa_id').value;
			var idtabel 	= 'new';
			var media 		= 'Media CAP';
			var kuman 		= '';
			var hemolisa 	= '';
			var katalase 	= '';
			var koagulase 	= '';
			var ujilainnya 	= '';
			var status 		= 'Tidak ada pertumbuhan';
			$.post('{{ route("getResult") }}', { 
				nofoto: id,
				komponen: media,
				isi: idtabel,
				kuman: kuman,
				hemolisa: hemolisa,
				katalase: katalase,
				koagulase: koagulase,
				ujilainnya: ujilainnya,
				status: status,
				keterangan: 'pertumbuhankoloni',
				_token: '{{ csrf_token() }}' },
			function(data){
				$("#gridmediacap").jqxGrid('updatebounddata','filter');
			});
		});
		$("#btnmckonkeykosong").click(function() {
			var id 			= document.getElementById('periksa_id').value;
			var idtabel 	= 'new';
			var media 		= 'Media Mc Conkey';
			var kuman 		= '';
			var hemolisa 	= '';
			var katalase 	= '';
			var koagulase 	= '';
			var ujilainnya 	= '';
			var status 		= 'Tidak ada pertumbuhan';
			$.post('{{ route("getResult") }}', { 
				nofoto: id,
				komponen: media,
				isi: idtabel,
				kuman: kuman,
				hemolisa: hemolisa,
				katalase: katalase,
				koagulase: koagulase,
				ujilainnya: ujilainnya,
				status: status,
				keterangan: 'pertumbuhankoloni',
				_token: '{{ csrf_token() }}' },
			function(data){
				$("#gridmediamcconkey").jqxGrid('updatebounddata','filter');
			});
		});
		$("#btnsimpanpertumbuhankolonicap").click(function() {
			$('#modalgridmediacap').modal('hide');
			var id 			= document.getElementById('periksa_id').value;
			var idtabel 	= document.getElementById('idpertumbuhankoloni').value;
			var media 		= 'Media CAP';
			var kuman 		= document.getElementById('id_mediacap').value;
			var hemolisa 	= '';
			var katalase 	= document.getElementById('cap_pemeriksaankatalase').value;
			var koagulase 	= document.getElementById('cap_pemeriksaankabulase').value;
			var ujilainnya 	= document.getElementById('id_ujialainnyacap').value;
			var status 		= document.getElementById('id_statusmediacap').value;
			var tindaklanjut= document.getElementById('id_mediacapkuman').value;
			$.post('{{ route("getResult") }}', { 
				nofoto: id,
				komponen: media,
				isi: idtabel,
				kuman: kuman,
				hemolisa: hemolisa,
				katalase: katalase,
				koagulase: koagulase,
				ujilainnya: ujilainnya,
				status: status,
				keterangan: 'pertumbuhankoloni',
				tindaklanjut: tindaklanjut,
				_token: '{{ csrf_token() }}' },
			function(data){
				$("#gridmediacap").jqxGrid('updatebounddata','filter');
			});
		});
		$("#btnsimpanpertumbuhankolonimcconkey").click(function() {
			$('#modalgridmediamcconkey').modal('hide');
			var id 			= document.getElementById('periksa_id').value;
			var idtabel 	= document.getElementById('idpertumbuhankoloni').value;
			var media 		= 'Media Mc Conkey';
			var kuman 		= document.getElementById('id_mediamcconkey').value;
			var hemolisa 	= '';
			var katalase 	= '';
			var koagulase 	= '';
			var ujilainnya 	= document.getElementById('id_ujialainnyamcconkey').value;
			var oksidase 	= document.getElementById('id_ujioksidasemcconkey').value;
			var status 		= document.getElementById('id_statusmediamcconkey').value;
			var tindaklanjut= document.getElementById('id_mediamcconkeykuman').value;
			$.post('{{ route("getResult") }}', { 
				nofoto: id,
				komponen: media,
				isi: idtabel,
				kuman: kuman,
				hemolisa: hemolisa,
				katalase: katalase,
				koagulase: koagulase,
				ujilainnya: ujilainnya,
				oksidase: oksidase,
				status: status,
				keterangan: 'pertumbuhankoloni',
				tindaklanjut: tindaklanjut,
				_token: '{{ csrf_token() }}' },
			function(data){
				$("#gridmediamcconkey").jqxGrid('updatebounddata','filter');
			});
		});
		$("#btnuntukgridmediasdar1").click(function() {
			$('#modalgridmediasdar1').modal('show');
			$('#idpertumbuhankoloni').val('new');
		});
		$("#btnuntukgridmediasdar2").click(function() {
			$('#modalgridmediasdar2').modal('show');
			$('#idpertumbuhankoloni').val('new');
		});
		$("#btnuntukgridmediasdai1").click(function() {
			$('#modalgridmediasdai1').modal('show');
			$('#idpertumbuhankoloni').val('new');
		});
		$("#btnuntukgridmediasdai2").click(function() {
			$('#modalgridmediasdai2').modal('show');
			$('#idpertumbuhankoloni').val('new');
		});
		$("#btnsdakosongr1").click(function() {
			var id 			= document.getElementById('periksa_id').value;
			var idtabel 	= 'new';
			var media 		= 'Media SDA R1';
			var kuman 		= '';
			var hemolisa 	= '';
			var katalase 	= '';
			var koagulase 	= '';
			var ujilainnya 	= '';
			var status 		= 'Tidak ada pertumbuhan';
			$.post('{{ route("getResult") }}', { 
				nofoto: id,
				komponen: media,
				isi: idtabel,
				kuman: kuman,
				hemolisa: hemolisa,
				katalase: katalase,
				koagulase: koagulase,
				ujilainnya: ujilainnya,
				status: status,
				keterangan: 'pertumbuhankoloni',
				_token: '{{ csrf_token() }}' },
			function(data){
				$("#gridmediasdar1").jqxGrid('updatebounddata','filter');
			});
		});
		$("#btnsdakosongr2").click(function() {
			var id 			= document.getElementById('periksa_id').value;
			var idtabel 	= 'new';
			var media 		= 'Media SDA R2';
			var kuman 		= '';
			var hemolisa 	= '';
			var katalase 	= '';
			var koagulase 	= '';
			var ujilainnya 	= '';
			var status 		= 'Tidak ada pertumbuhan';
			$.post('{{ route("getResult") }}', { 
				nofoto: id,
				komponen: media,
				isi: idtabel,
				kuman: kuman,
				hemolisa: hemolisa,
				katalase: katalase,
				koagulase: koagulase,
				ujilainnya: ujilainnya,
				status: status,
				keterangan: 'pertumbuhankoloni',
				_token: '{{ csrf_token() }}' },
			function(data){
				$("#gridmediasdar2").jqxGrid('updatebounddata','filter');
			});
		});
		$("#btnsdakosongi1").click(function() {
			var id 			= document.getElementById('periksa_id').value;
			var idtabel 	= 'new';
			var media 		= 'Media SDA I1';
			var kuman 		= '';
			var hemolisa 	= '';
			var katalase 	= '';
			var koagulase 	= '';
			var ujilainnya 	= '';
			var status 		= 'Tidak ada pertumbuhan';
			$.post('{{ route("getResult") }}', { 
				nofoto: id,
				komponen: media,
				isi: idtabel,
				kuman: kuman,
				hemolisa: hemolisa,
				katalase: katalase,
				koagulase: koagulase,
				ujilainnya: ujilainnya,
				status: status,
				keterangan: 'pertumbuhankoloni',
				_token: '{{ csrf_token() }}' },
			function(data){
				$("#gridmediasdai1").jqxGrid('updatebounddata','filter');
			});
		});
		$("#btnsdakosongi2").click(function() {
			var id 			= document.getElementById('periksa_id').value;
			var idtabel 	= 'new';
			var media 		= 'Media SDA I2';
			var kuman 		= '';
			var hemolisa 	= '';
			var katalase 	= '';
			var koagulase 	= '';
			var ujilainnya 	= '';
			var status 		= 'Tidak ada pertumbuhan';
			$.post('{{ route("getResult") }}', { 
				nofoto: id,
				komponen: media,
				isi: idtabel,
				kuman: kuman,
				hemolisa: hemolisa,
				katalase: katalase,
				koagulase: koagulase,
				ujilainnya: ujilainnya,
				status: status,
				keterangan: 'pertumbuhankoloni',
				_token: '{{ csrf_token() }}' },
			function(data){
				$("#gridmediasdai2").jqxGrid('updatebounddata','filter');
			});
		});
		$("#btnsimpanpertumbuhankolonisdar1").click(function() {
			$('#modalgridmediasdar1').modal('hide');
			var id 			= document.getElementById('periksa_id').value;
			var idtabel 	= document.getElementById('idpertumbuhankoloni').value;
			var media 		= 'Media SDA R1';
			var kuman 		= document.getElementById('sdar1_media').value;
			var hemolisa 	= document.getElementById('sdar1_pemeriksaanhemolisa').value;
			var katalase 	= '';
			var koagulase 	= '';
			var ujilainnya 	= '';
			var oksidase 	= '';
			var status 		= document.getElementById('sdar1_status').value;
			var tindaklanjut= document.getElementById('sdar1_mediakuman').value;
			$.post('{{ route("getResult") }}', { 
				nofoto: id,
				komponen: media,
				isi: idtabel,
				kuman: kuman,
				hemolisa: hemolisa,
				katalase: katalase,
				koagulase: koagulase,
				ujilainnya: ujilainnya,
				oksidase: oksidase,
				status: status,
				tindaklanjut: tindaklanjut,
				keterangan: 'pertumbuhankoloni',
				_token: '{{ csrf_token() }}' },
			function(data){
				$("#gridmediasdar1").jqxGrid('updatebounddata','filter');
			});
		});
		$("#btnsimpanpertumbuhankolonisdar2").click(function() {
			$('#modalgridmediasdar2').modal('hide');
			var id 			= document.getElementById('periksa_id').value;
			var idtabel 	= document.getElementById('idpertumbuhankoloni').value;
			var media 		= 'Media SDA R2';
			var kuman 		= document.getElementById('sdar2_media').value;
			var hemolisa 	= document.getElementById('sdar2_pemeriksaanhemolisa').value;
			var katalase 	= '';
			var koagulase 	= '';
			var ujilainnya 	= '';
			var oksidase 	= '';
			var status 		= document.getElementById('sdar2_status').value;
			var tindaklanjut= document.getElementById('sdar2_mediakuman').value;
			$.post('{{ route("getResult") }}', { 
				nofoto: id,
				komponen: media,
				isi: idtabel,
				kuman: kuman,
				hemolisa: hemolisa,
				katalase: katalase,
				koagulase: koagulase,
				ujilainnya: ujilainnya,
				oksidase: oksidase,
				status: status,
				tindaklanjut: tindaklanjut,
				keterangan: 'pertumbuhankoloni',
				_token: '{{ csrf_token() }}' },
			function(data){
				$("#gridmediasdar2").jqxGrid('updatebounddata','filter');
			});
		});
		$("#btnsimpanpertumbuhankolonisdai1").click(function() {
			$('#modalgridmediasdai1').modal('hide');
			var id 			= document.getElementById('periksa_id').value;
			var idtabel 	= document.getElementById('idpertumbuhankoloni').value;
			var media 		= 'Media SDA I1';
			var kuman 		= document.getElementById('sdai1_media').value;
			var hemolisa 	= document.getElementById('sdai1_pemeriksaanhemolisa').value;
			var katalase 	= '';
			var koagulase 	= '';
			var ujilainnya 	= '';
			var oksidase 	= '';
			var status 		= document.getElementById('sdai1_status').value;
			var tindaklanjut= document.getElementById('sdai1_mediakuman').value;
			$.post('{{ route("getResult") }}', { 
				nofoto: id,
				komponen: media,
				isi: idtabel,
				kuman: kuman,
				hemolisa: hemolisa,
				katalase: katalase,
				koagulase: koagulase,
				ujilainnya: ujilainnya,
				oksidase: oksidase,
				status: status,
				tindaklanjut: tindaklanjut,
				keterangan: 'pertumbuhankoloni',
				_token: '{{ csrf_token() }}' },
			function(data){
				$("#gridmediasdai1").jqxGrid('updatebounddata','filter');
			});
		});
		$("#btnsimpanpertumbuhankolonisdai2").click(function() {
			$('#modalgridmediasdai2').modal('hide');
			var id 			= document.getElementById('periksa_id').value;
			var idtabel 	= document.getElementById('idpertumbuhankoloni').value;
			var media 		= 'Media SDA I2';
			var kuman 		= document.getElementById('sdai2_media').value;
			var hemolisa 	= document.getElementById('sdai2_pemeriksaanhemolisa').value;
			var katalase 	= '';
			var koagulase 	= '';
			var ujilainnya 	= '';
			var oksidase 	= '';
			var status 		= document.getElementById('sdai2_status').value;
			var tindaklanjut= document.getElementById('sdai2_mediakuman').value;
			$.post('{{ route("getResult") }}', { 
				nofoto: id,
				komponen: media,
				isi: idtabel,
				kuman: kuman,
				hemolisa: hemolisa,
				katalase: katalase,
				koagulase: koagulase,
				ujilainnya: ujilainnya,
				oksidase: oksidase,
				status: status,
				tindaklanjut: tindaklanjut,
				keterangan: 'pertumbuhankoloni',
				_token: '{{ csrf_token() }}' },
			function(data){
				$("#gridmediasdai2").jqxGrid('updatebounddata','filter');
			});
		});
		$("#btnsimpanpertumbuhankolonisellainnya").click(function() {
			$('#modalgridmediaselektif').modal('hide');
			var id 			= document.getElementById('periksa_id').value;
			var idtabel 	= document.getElementById('idpertumbuhankoloni').value;
			var media 		= 'Media Selektif lainnya';
			var kuman 		= document.getElementById('id_mediaselektif').value;
			var hemolisa 	= document.getElementById('sellainnya_pemeriksaanhemolisa').value;
			var katalase 	= document.getElementById('sellainnya_pemeriksaankatalase').value;
			var koagulase 	= document.getElementById('sellainnya_pemeriksaankabulase').value;
			var ujilainnya 	= document.getElementById('id_ujialainnyasellainnya').value;
			var oksidase 	= document.getElementById('id_ujioksidasesellainnya').value;
			var status 		= document.getElementById('id_statusmediasellainnya').value;
			$.post('{{ route("getResult") }}', { 
				nofoto: id,
				komponen: media,
				isi: idtabel,
				kuman: kuman,
				hemolisa: hemolisa,
				katalase: katalase,
				koagulase: koagulase,
				ujilainnya: ujilainnya,
				oksidase: oksidase,
				status: status,
				keterangan: 'pertumbuhankoloni',
				_token: '{{ csrf_token() }}' },
			function(data){
				$("#gridmediasellainnya").jqxGrid('updatebounddata','filter');
			});
		});
		$("#btnsimpanpertumbuhankolonitamlainnya").click(function() {
			$('#modalgridmediatamlainnya').modal('hide');
			var id 			= document.getElementById('periksa_id').value;
			var idtabel 	= document.getElementById('idpertumbuhankoloni').value;
			var media 		= 'Media Tambahan Lainnya';
			var kuman 		= document.getElementById('id_pemeriksaantl').value;
			var hemolisa 	= document.getElementById('tamlainnya_pemeriksaanhemolisa').value;
			var katalase 	= document.getElementById('tamlainnya_pemeriksaankatalase').value;
			var koagulase 	= document.getElementById('tamlainnya_pemeriksaankabulase').value;
			var ujilainnya 	= document.getElementById('id_ujialainnyatamlainnya').value;
			var oksidase 	= document.getElementById('id_ujioksidasetamlainnya').value;
			var status 		= document.getElementById('id_statusmediatamlainnya').value;
			$.post('{{ route("getResult") }}', { 
				nofoto: id,
				komponen: media,
				isi: idtabel,
				kuman: kuman,
				hemolisa: hemolisa,
				katalase: katalase,
				koagulase: koagulase,
				ujilainnya: ujilainnya,
				oksidase: oksidase,
				status: status,
				keterangan: 'pertumbuhankoloni',
				_token: '{{ csrf_token() }}' },
			function(data){
				$("#gridmediatamlainnya").jqxGrid('updatebounddata','filter');
			});
		});
		$("#btnopenviteklain").click(function() {
			var norm 	= document.getElementById('norm').value;
			var nofoto 	= document.getElementById('nofoto').value;
			var sdvitek = {
				datatype: "json",
				datafields: [
					{ name: 'id',type: 'text'},
					{ name: 'isolate_number',type: 'text'},
					{ name: 'organism',type: 'text'},
					{ name: 'specimen_type',type: 'text'},
					{ name: 'accession_number',type: 'text'},
					{ name: 'message_datetime',type: 'text'},
				],
				type: 'POST',
				data: {	nofoto:nofoto, norm:norm, keterangan:'getothervitek', _token: '{{csrf_token()}}' },
				url: '{{ route("getResult") }}',
			};
			var datasdvitek 	= new $.jqx.dataAdapter(sdvitek);
			$("#griddataantibiotiklain").jqxGrid({
				width					: '100%',
				enablebrowserselection	: true,
				source					: datasdvitek,
				columnsresize			: true,
				theme					: "energyblue",
				autoheight				: true,
				pageable				: true,
				altrows					: true,
				selectionmode			: 'multiplecellsextended',
				columns					: [
					{ text: 'Accession No', datafield: 'accession_number', width: '15%', cellsalign: 'left', align: 'center' },
					{ text: 'Date', datafield: 'message_datetime', width: '15%', cellsalign: 'left', align: 'center' },
					{ text: 'Isolate Number', datafield: 'isolate_number', width: '15%', cellsalign: 'left', align: 'center' },
					{ text: 'Organism', datafield: 'organism', width: '30%', cellsalign: 'left', align: 'center' },
					{ text: 'Specimen Type', datafield: 'specimen_type', width: '15%', cellsalign: 'left', align: 'center' },
					{ text: 'Import', filterable: false, columntype: 'button', align: 'center', width: '10%', cellsrenderer: function () {
						return "Import";
						}, buttonclick: function (row) {
							editrowjabatan  = row;
							var offset      = $("#griddataantibiotiklain").offset();
							var dataRecord  = $("#griddataantibiotiklain").jqxGrid('getrowdata', editrowjabatan);
							var id 			= dataRecord.id;
							$.post('{{ route("getResult") }}', { nofoto: nofoto, komponen: id, isi: 'updateallmic', keterangan: 'printunprinttblantibiotik',  _token: '{{ csrf_token() }}' },
							function(data){
								$("#tblvitek").DataTable().ajax.reload();
							});
							$('#modaltambahrekapanantibiotik').modal('hide');
						}
					},
				]
			});
			$('#modaltambahrekapanantibiotik').modal('show');
		});
		$("#btneditmicvalue").click(function() {
			$('#modaleditormic').modal('hide');
			var id 		= document.getElementById('micvalue_id').value;
			var micval 	= document.getElementById('micvalue_editor').value;
			var isi 	= document.getElementById('micinterpretatition_editor').value;
			
			$.post('{{ route("getResult") }}', { nofoto: id, komponen: isi, micval: micval, isi: 'updatemic', keterangan: 'printunprinttblantibiotik',  _token: '{{ csrf_token() }}' },
			function(data){
				$("#tblvitek").DataTable().ajax.reload();
				$("#tblkumanmanual1").DataTable().ajax.reload();
				$("#tblkumanmanual2").DataTable().ajax.reload();
			});
			return false;
		});
		$("#btnunprintall").click(function() {
			var nofoto          =   document.getElementById('nofoto').value;
			var periksa_id      =   document.getElementById('periksa_id').value;
			$.post('{{ route("getResult") }}', { nofoto: nofoto, komponen: periksa_id, isi: 'unprintall', keterangan: 'printunprinttblantibiotik',  _token: '{{ csrf_token() }}' },
			function(data){
				$("#tblvitek").DataTable().ajax.reload();
			});
			return false;
		});
		$("#btnhariinidoank").click(function() {
			$("#master_set01").val('ThisDay');
			$("#master_set02").val('');
			$("#master_set03").val('');
			$("#master_set04").val('');
			var set01=document.getElementById('master_judul').value;
			var judul='Patient Queue This Day on '+set01;
			$("#judul").html(judul);
			$("#valcari").val('');
			$("#mulai").val('');
			$("#akhir").val('');
			$("#valjenis").val('searchbydate');
			openedpage();
		});
		$("#btnmundur2").click(function() {
			$("#master_set01").val('mundur2');
			$("#master_set02").val('');
			$("#master_set03").val('');
			$("#master_set04").val('');
			$("#valcari").val('');
			$("#mulai").val('');
			$("#akhir").val('');
			$("#valjenis").val('searchbydate');
			openedpage();
		});
		$("#btnmundur3").click(function() {
			$("#master_set01").val('mundur3');
			$("#master_set02").val('');
			$("#master_set03").val('');
			$("#master_set04").val('');
			$("#valcari").val('');
			$("#mulai").val('');
			$("#akhir").val('');
			$("#valjenis").val('searchbydate');
			openedpage();
		});
		$("#btnkembali").click(function() {
			var returnUrl = $('#expertise_return_url').val();
			if (returnUrl) {
				window.location.href = returnUrl;
				return;
			}
			$('#divperiksa').hide();
			$('#divreadonly').hide();
			$('#divawal').show();
		});
		$("#btncancel").click(function() {
			var set01	= document.getElementById('id_alasanpembatan').value;
			var set05	= document.getElementById('periksa_id').value;
			var token	= document.getElementById('token').value;
			if (set01 == ''){
				swal({
					title	: 'Mohon Di Isi?',
					text	: "Alasan Wajib di Isi",
					type	: 'warning',
				});
			} else {
				$("#modalpembatalan").modal('hide'); 
				$.post('{{ route("cancelPACSorder") }}', { val01: set01, val05: set05,  _token: '{{csrf_token()}}' },
				function(data){ 
					var status  = data.status;
					var message = data.message;
					$('#divperiksa').hide(); 
					$('#divawal').show();
					$("#gridpemeriksaan").jqxGrid('updatebounddata', 'filter');
					$.toast({
						heading		: status,
						text		: message,
						position	: 'top-right',
						loaderBg	: warna,
						icon		: icon,
						hideAfter	: 5000,
						stack		: 1
					});
				});
			}
		});
		$("#btnopenmodalcancel").click(function() {
			$("#modalpembatalan").modal('show'); 
		});
		$("#btnshowtemplate").click(function() {
			$('#divtemplate').show();
		});
		$("#btnsendexpertisetopacs").click(function(){
			var keterangan      	=   CKEDITOR.instances['keterangan'].getData();
			var lsg_pewarnaanlain	=   CKEDITOR.instances['lsg_pewarnaanlain'].getData();
			var viralload			=   CKEDITOR.instances['viralload'].getData();
			var periksa_id      	=   document.getElementById('periksa_id').value;
			var template_jenis		= 	document.getElementById('template_jenis').value;
			var id_dokter			= 	document.getElementById('dokter').value;
			var acc_number			= 	document.getElementById('nofoto').value;
			var nostatus			= 	document.getElementById('nostatus').value;
			var addendumketerangan	=   CKEDITOR.instances['addendumketerangan'].getData();
			if (id_dokter == 'Pilih' || id_dokter == '' || id_dokter == '0' || id_dokter == null){
				swal({
					title	: 'Stop',
					text	: 'Please Select SPV',
					type	: 'warning',
				})
				return false;
			} else if (addendumketerangan == '' && nostatus == 'Selesai'){
				swal({
					title	: 'Stop',
					text	: 'Addendum Keterangan Wajib Di Isi',
					type	: 'warning',
				})
				return false;
			} else if (addendumketerangan == '' && nostatus == 'Arsip'){
				swal({
					title	: 'Stop',
					text	: 'Addendum Keterangan Wajib Di Isi',
					type	: 'warning',
				})
				return false;
			} else {
				const checkboxMap 		= {
					inlineCheckbox1: 'TBC SO',
					inlineCheckbox2: 'TBC RO',
					inlineCheckbox3: 'Anak',
					inlineCheckbox4: 'HIV',
					inlineCheckbox5: 'DM',
					inlineCheckbox6: 'Nanah Lendir',
					inlineCheckbox7: 'Bercak darah',
					inlineCheckbox8: 'Air liur',
					inlineCheckbox9: 'Nanah Lendir',
					inlineCheckbox10: 'Bercak darah',
					inlineCheckbox11: 'Air liur',
				};
				const checkboxValues = {};
				$.each(checkboxMap, function (id, label) {
					checkboxValues[id] = $(`#${id}`).is(':checked') ? label : '';
				});
				var formdata = new FormData($('#kt_form')[0]);
					formdata.set('periksa_id', periksa_id);
					formdata.set('acc_number', acc_number);
					formdata.set('val01', 'verifikasi');
					formdata.set('val10', template_jenis);
					formdata.set('keterangan', keterangan);
					formdata.set('addendumketerangan', addendumketerangan);
					formdata.set('lsg_pewarnaanlain', lsg_pewarnaanlain);
					formdata.set('viralload', viralload);
					formdata.set('nilai_kritis', $('#nilai_kritis').is(':checked') ? '1' : '0');
					formdata.set('master_mikro', $('#master_lokasi').val());
					formdata.set('_token', '{{ csrf_token() }}');
				$.each(checkboxValues, (key, val) => formdata.set(key, val));
				$.ajax({
					url         : '{{ route("exexpertisepacs") }}',
					data        : formdata,
					type        : 'POST',
					contentType : false,
					processData : false,
					success: function (data) {
						$("#gridpemeriksaan").jqxGrid('updatebounddata','filter');
						$("#gridadendum").jqxGrid('updatebounddata','filter');
						var status  = data.status;
						var message = data.message;
						var warna 	= data.warna;
						var icon 	= data.icon;
						$.toast({
							heading		: status,
							text		: message,
							position	: 'top-right',
							loaderBg	: warna,
							icon		: icon,
							hideAfter	: 5000,
							stack		: 1
						});
						//window.location.href = "{{ url('/mikro') }}";
						return false;
					},
					error: function (xhr, status, error) {
						swal({
							title	: 'Stop',
							text	: xhr.responseText,
							type	: 'warning',
						})
					}
				});
			}
		});
		$("#btnsavepreliminary").click(function(){
			var keterangan      	=   CKEDITOR.instances['keterangan'].getData();
			var lsg_pewarnaanlain	=   CKEDITOR.instances['lsg_pewarnaanlain'].getData();
			var viralload			=   CKEDITOR.instances['viralload'].getData();
			var periksa_id      	=   document.getElementById('periksa_id').value;
			var template_jenis		= 	document.getElementById('template_jenis').value;
			var id_dokter			= 	document.getElementById('dokter').value;
			var acc_number			= 	document.getElementById('nofoto').value;
			var nostatus			= 	document.getElementById('nostatus').value;
			var addendumketerangan	=   CKEDITOR.instances['addendumketerangan'].getData();
			if (id_dokter == 'Pilih' || id_dokter == '' || id_dokter == '0' || id_dokter == null){
				swal({
					title	: 'Stop',
					text	: 'Please Select SPV',
					type	: 'warning',
				})
				return false;
			} else if (addendumketerangan == '' && nostatus == 'Selesai'){
				swal({
					title	: 'Stop',
					text	: 'Addendum Keterangan Wajib Di Isi',
					type	: 'warning',
				})
				return false;
			} else if (addendumketerangan == '' && nostatus == 'Arsip'){
				swal({
					title	: 'Stop',
					text	: 'Addendum Keterangan Wajib Di Isi',
					type	: 'warning',
				})
				return false;
			} else {
				const checkboxMap 		= {
					inlineCheckbox1: 'TBC SO',
					inlineCheckbox2: 'TBC RO',
					inlineCheckbox3: 'Anak',
					inlineCheckbox4: 'HIV',
					inlineCheckbox5: 'DM',
					inlineCheckbox6: 'Nanah Lendir',
					inlineCheckbox7: 'Bercak darah',
					inlineCheckbox8: 'Air liur',
					inlineCheckbox9: 'Nanah Lendir',
					inlineCheckbox10: 'Bercak darah',
					inlineCheckbox11: 'Air liur',
				};
				const checkboxValues = {};
				$.each(checkboxMap, function (id, label) {
					checkboxValues[id] = $(`#${id}`).is(':checked') ? label : '';
				});
				var formdata = new FormData($('#kt_form')[0]);
					formdata.set('periksa_id', periksa_id);
					formdata.set('acc_number', acc_number);
					formdata.set('val01', 'preliminary');
					formdata.set('val10', template_jenis);
					formdata.set('keterangan', keterangan);
					formdata.set('addendumketerangan', addendumketerangan);
					formdata.set('lsg_pewarnaanlain', lsg_pewarnaanlain);
					formdata.set('viralload', viralload);
					formdata.set('nilai_kritis', $('#nilai_kritis').is(':checked') ? '1' : '0');
					formdata.set('master_mikro', $('#master_lokasi').val());
					formdata.set('_token', '{{ csrf_token() }}');
				$.each(checkboxValues, (key, val) => formdata.set(key, val));
				$.ajax({
					url         : '{{ route("exexpertisepacs") }}',
					data        : formdata,
					type        : 'POST',
					contentType : false,
					processData : false,
					success: function (data) {
						$("#gridpemeriksaan").jqxGrid('updatebounddata','filter');
						$("#gridadendum").jqxGrid('updatebounddata','filter');
						var status  = data.status;
						var message = data.message;
						var warna 	= data.warna;
						var icon 	= data.icon;
						$.toast({
							heading		: status,
							text		: message,
							position	: 'top-right',
							loaderBg	: warna,
							icon		: icon,
							hideAfter	: 5000,
							stack		: 1
						});
						//window.location.href = "{{ url('/mikro') }}";
						return false;
					},
					error: function (xhr, status, error) {
						swal({
							title	: 'Stop',
							text	: xhr.responseText,
							type	: 'warning',
						})
					}
				});
			}
		});
		$("#btnSavePeriksa").click(function(){
			var keterangan      	=   CKEDITOR.instances['keterangan'].getData();
			var lsg_pewarnaanlain	=   CKEDITOR.instances['lsg_pewarnaanlain'].getData();
			var viralload			=   CKEDITOR.instances['viralload'].getData();
			var periksa_id      	=   document.getElementById('periksa_id').value;
			var template_jenis		= 	document.getElementById('template_jenis').value;
			var id_dokter			= 	document.getElementById('dokter').value;
			var acc_number			= 	document.getElementById('nofoto').value;
			if (id_dokter == 'Pilih' || id_dokter == '' || id_dokter == '0' || id_dokter == null){
				swal({
					title	: 'Stop',
					text	: 'Please Select SPV',
					type	: 'warning',
				})
				return false;
			} else {
				const checkboxMap 		= {
					inlineCheckbox1: 'TBC SO',
					inlineCheckbox2: 'TBC RO',
					inlineCheckbox3: 'Anak',
					inlineCheckbox4: 'HIV',
					inlineCheckbox5: 'DM',
					inlineCheckbox6: 'Nanah Lendir',
					inlineCheckbox7: 'Bercak darah',
					inlineCheckbox8: 'Air liur',
					inlineCheckbox9: 'Nanah Lendir',
					inlineCheckbox10: 'Bercak darah',
					inlineCheckbox11: 'Air liur',
				};
				const checkboxValues = {};
				$.each(checkboxMap, function (id, label) {
					checkboxValues[id] = $(`#${id}`).is(':checked') ? label : '';
				});
				var formdata = new FormData($('#kt_form')[0]);
					formdata.set('periksa_id', periksa_id);
					formdata.set('acc_number', acc_number);
					formdata.set('val01', 'Permohonan Verifikasi');
					formdata.set('val10', template_jenis);
					formdata.set('keterangan', keterangan);
					formdata.set('lsg_pewarnaanlain', lsg_pewarnaanlain);
					formdata.set('viralload', viralload);
					formdata.set('_token', '{{ csrf_token() }}');
				$.each(checkboxValues, (key, val) => formdata.set(key, val));
				$.ajax({
					url         : '{{ route("exexpertisepacs") }}',
					data        : formdata,
					type        : 'POST',
					contentType : false,
					processData : false,
					success: function (data) {
						var status  = data.status;
						var message = data.message;
						var warna 	= data.warna;
						var icon 	= data.icon;
						$.toast({
							heading		: status,
							text		: message,
							position	: 'top-right',
							loaderBg	: warna,
							icon		: icon,
							hideAfter	: 5000,
							stack		: 1
						});
						return false;
					},
					error: function (xhr, status, error) {
						swal({
							title	: 'Stop',
							text	: xhr.responseText,
							type	: 'warning',
						})
					}
				});
			}
		});
		$("#btnsavedraft").click(function(){
			var keterangan      	=   CKEDITOR.instances['keterangan'].getData();
			var lsg_pewarnaanlain	=   CKEDITOR.instances['lsg_pewarnaanlain'].getData();
			var viralload			=   CKEDITOR.instances['viralload'].getData();
			var periksa_id      	=   document.getElementById('periksa_id').value;
			var template_jenis		= 	document.getElementById('template_jenis').value;
			var id_dokter			= 	document.getElementById('dokter').value;
			var acc_number			= 	document.getElementById('nofoto').value;
			const checkboxMap 		= {
				inlineCheckbox1: 'TBC SO',
				inlineCheckbox2: 'TBC RO',
				inlineCheckbox3: 'Anak',
				inlineCheckbox4: 'HIV',
				inlineCheckbox5: 'DM',
				inlineCheckbox6: 'Nanah Lendir',
				inlineCheckbox7: 'Bercak darah',
				inlineCheckbox8: 'Air liur',
				inlineCheckbox9: 'Nanah Lendir',
				inlineCheckbox10: 'Bercak darah',
				inlineCheckbox11: 'Air liur',
			};
			const checkboxValues = {};
			$.each(checkboxMap, function (id, label) {
				checkboxValues[id] = $(`#${id}`).is(':checked') ? label : '';
			});
			var formdata = new FormData($('#kt_form')[0]);
                formdata.set('periksa_id', periksa_id);
				formdata.set('acc_number', acc_number);
				formdata.set('val01', 'Draft');
				formdata.set('val10', template_jenis);
				formdata.set('keterangan', keterangan);
				formdata.set('lsg_pewarnaanlain', lsg_pewarnaanlain);
				formdata.set('viralload', viralload);
				formdata.set('_token', '{{ csrf_token() }}');
			$.each(checkboxValues, (key, val) => formdata.set(key, val));
            $.ajax({
                url         : '{{ route("exexpertisepacs") }}',
                data        : formdata,
                type        : 'POST',
                contentType : false,
                processData : false,
                success: function (data) {
                    var status  = data.status;
					var message = data.message;
					var warna 	= data.warna;
					var icon 	= data.icon;
					$.toast({
						heading		: status,
						text		: message,
						position	: 'top-right',
						loaderBg	: warna,
						icon		: icon,
						hideAfter	: 5000,
						stack		: 1
					});
					$("#gridadendum").jqxGrid('updatebounddata','filter');
                    return false;
                },
                error: function (xhr, status, error) {
                    swal({
                        title	: 'Stop',
                        text	: xhr.responseText,
                        type	: 'warning',
                    })
                }
            });
		});
		$("#btnopensiarb").click(function() {
			$('#sirabketerangan').show();
		});
		var sourcetemplate = {
			datatype: "json",
			datafields: [
				{ name: 'id'},
				{ name: 'kategori', type: 'text'},
				{ name: 'judul', type: 'text'},
				{ name: 'isine', type: 'text'},
				{ name: 'kesimpulan', type: 'text'},
			],
			updaterow: function (rowid, rowdata, commit) {
				commit(true);
			},
			url		: '{{ route("getListTemplate") }}',
			cache	: false
		};      
		var dataAdaptertemplate = new $.jqx.dataAdapter(sourcetemplate);
		$("#gridtemplate").jqxGrid({
			width					: '100%',
			enablebrowserselection	: true,
			filterable				: true,
			showfilterrow			: true,
			pageable				: true,
			autoheight				: true,
			source					: dataAdaptertemplate,
			theme					: "energyblue",
			selectionmode			: 'multiplecellsextended',
			columns					: [
				{ text: 'Category', datafield: 'kategori', width: '20%', cellsalign: 'left', align: 'center'  },
				{ text: 'Title', datafield: 'judul', width: '70%', cellsalign: 'left', align: 'center'  },
				{ text: 'Use', filterable: false, columntype: 'button', align: 'center', width: '10%', cellsrenderer: function () {
					return "Use";
					}, buttonclick: function (row) {
						editrowpoli 	= row;
						var offset      = $("#gridtemplate").offset();       
						var dataRecord  = $("#gridtemplate").jqxGrid('getrowdata', editrowpoli);
						$("#template_jenis").val(dataRecord.judul);
						$("#dlp").val(dataRecord.judul);
						openlamanekpertise();
					}
				},
			]
		});
		$("#btnmultisendsitu").click(function(){
			var rowsgridcetak = $("#gridpemeriksaan").jqxGrid('selectedrowindexes');
			var selectedRecords = new Array();
			for (var m = 0; m < rowsgridcetak.length; m++) {
				var row = $("#gridpemeriksaan").jqxGrid('getrowdata', rowsgridcetak[m]);
				selectedRecords.push(row.id);
			}
			if (m == '0'){
				swal({
					title: 'Stop',
					text: 'Please Select Patient First',
					type: 'warning',
				})
			} else {
				var token	= 	document.getElementById('token').value;
				$.post('{{ route("exsendtoinsitu") }}', { set01: selectedRecords,  _token: '{{csrf_token()}}' },
				function(data){
					var status  = data.status;
					var message = data.message;
					var warna 	= data.warna;
					var icon 	= data.icon;
					$.toast({
						heading: status,
						text: message,
						position: 'top-right',
						loaderBg: warna,
						icon: icon,
						hideAfter: 3000,
						stack: 1
					});
					setTimeout(function () { 
						location.reload();
						}, 3000);
					return false; 
				});
			}
		});
		$("#btnviewcustom").click(function() {
			var mulai=document.getElementById('mulai').value;
			var akhir=document.getElementById('akhir').value;
			if (mulai == ''){
				$("#err_text").val('Start Date Cannot Empty'); 
				$("#modalerror").modal('show'); 
			} else if (akhir == ''){
				$("#err_text").val('End Date Cannot Empty'); 
				$("#modalerror").modal('show'); 
			} else {
				$("#master_set01").val('searchbydate');
				$("#valjenis").val('searchbydate');
				$("#valcari").val('');
				openedpage();
			}
		});
		$("#btnpencarian").click(function() {
			var set01=document.getElementById('valcari').value;
			var set02=document.getElementById('valjenis').value;
			var set03=document.getElementById('valpoli2').value;
			if (set02 == 'kesimpulan'){
				var mulai=document.getElementById('mulai').value;
				var akhir=document.getElementById('akhir').value;
				if (mulai == ''){
					$("#err_text").val('Start Date Cannot Empty'); 
					$("#modalerror").modal('show'); 
				} else if (akhir == ''){
					$("#err_text").val('End Date Cannot Empty');
					$("#modalerror").modal('show');
				} else {
					if (set03 == 'inisaja'){
						var judul='Search Result by key: '+set01+' Patient From '+mulai+' until '+akhir+' on '+set04;
					} else {
						var judul='Search Result by key: '+set01+' Patient From '+mulai+' until '+akhir+' All Poli';
					}
					$("#master_set01").val(set02);
					$("#judul").html(judul);
					openedpage();
					
				}
			} else if (set02 == 'searchbydate'){
				var mulai=document.getElementById('mulai').value;
				var akhir=document.getElementById('akhir').value;
				if (mulai == ''){
					$("#err_text").val('Start Date Cannot Empty'); 
					$("#modalerror").modal('show'); 
				} else if (akhir == ''){
					$("#err_text").val('End Date Cannot Empty'); 
					$("#modalerror").modal('show'); 
				} else {
					if (set03 == 'inisaja'){
						var judul='Search Result by key: '+set01+' Patient From '+mulai+' until '+akhir+' on '+set04;
					} else {
						var judul='Search Result by key: '+set01+' Patient From '+mulai+' until '+akhir+' All Poli';
					}
					$("#valcari").val('');
					$("#valjenis").val(set02);
					$("#master_set01").val(set02);
					$("#judul").html(judul);
					openedpage();
					
				}
			} else {
				if (set03 == 'inisaja'){
					var judul='Search Result by key: '+set01+' on '+set03;
				} else {
					var judul='Search Result by key: '+set01+' All Poli ';
				}
				$("#valjenis").val(set02);
				$("#master_set01").val(set02);
				$("#judul").html(judul);
				openedpage();
				
			}
		});
		$("#btnviewvitek").click(function() {
			var editorValue = CKEDITOR.instances['keterangan'].getData();
			var jenis 		= document.getElementById('template_jenis').value;
			var form_data = new FormData();
				form_data.append('nofoto', document.getElementById('nofoto').value);
				form_data.append('jenis', jenis);
				form_data.append('komponen', 'keterangan');
				form_data.append('isi', editorValue);
				form_data.append('keterangan', 'getvitek');
				form_data.append('_token', '{{csrf_token()}}');
			$.ajax({
				url			: '{{ route("getResult") }}',
				data		: form_data,
				type		: 'POST',
				contentType	: false,
				processData	: false,
				success		: function (response) {
					$("#id_bakteri01").val(response.organism);
					CKEDITOR.instances['keterangan'].setData(response.pesan);
				},
				error: function (xhr, status, error) {
					var response 	= xhr.responseJSON || {};
					var traceText 	= response.trace ? JSON.stringify(response.trace) : null;
					console.log(traceText);
				}
			});
		});
		$("#btnbachtect").click(function() {
			var editorValue = CKEDITOR.instances['keterangan'].getData();
			var jenis 		= document.getElementById('template_jenis').value;
			var form_data = new FormData();
				form_data.append('nofoto', document.getElementById('nofoto').value);
				form_data.append('jenis', jenis);
				form_data.append('komponen', 'keterangan');
				form_data.append('isi', editorValue);
				form_data.append('keterangan', 'getbbachtect');
				form_data.append('_token', '{{csrf_token()}}');
			$.ajax({
				url			: '{{ route("getResult") }}',
				data		: form_data,
				type		: 'POST',
				contentType	: false,
				processData	: false,
				success		: function (response) {
					CKEDITOR.instances['keterangan'].setData(response);
				},
				error: function (xhr, status, error) {
					var response 	= xhr.responseJSON || {};
					var traceText 	= response.trace ? JSON.stringify(response.trace) : null;
					console.log(traceText);
				}
			});
		});
		$("#btnmgit").click(function() {
			var editorValue = CKEDITOR.instances['keterangan'].getData();
			var jenis 		= document.getElementById('template_jenis').value;
			var form_data = new FormData();
				form_data.append('nofoto', document.getElementById('nofoto').value);
				form_data.append('jenis', jenis);
				form_data.append('komponen', 'keterangan');
				form_data.append('isi', editorValue);
				form_data.append('keterangan', 'getmgit');
				form_data.append('_token', '{{csrf_token()}}');
			$.ajax({
				url			: '{{ route("getResult") }}',
				data		: form_data,
				type		: 'POST',
				contentType	: false,
				processData	: false,
				success		: function (response) {
					CKEDITOR.instances['keterangan'].setData(response);
				},
				error: function (xhr, status, error) {
					var response 	= xhr.responseJSON || {};
					var traceText 	= response.trace ? JSON.stringify(response.trace) : null;
					console.log(traceText);
				}
			});
		});
		$("#btngenexpert").click(function() {
			var editorValue = CKEDITOR.instances['keterangan'].getData();
			var jenis 		= document.getElementById('template_jenis').value;
			var form_data = new FormData();
				form_data.append('nofoto', document.getElementById('nofoto').value);
				form_data.append('jenis', jenis);
				form_data.append('komponen', 'keterangan');
				form_data.append('isi', editorValue);
				form_data.append('keterangan', 'getgenexpert');
				form_data.append('_token', '{{csrf_token()}}');
			$.ajax({
				url			: '{{ route("getResult") }}',
				data		: form_data,
				type		: 'POST',
				contentType	: false,
				processData	: false,
				success		: function (response) {
					CKEDITOR.instances['keterangan'].setData(response);
				},
				error: function (xhr, status, error) {
					var response 	= xhr.responseJSON || {};
					var traceText 	= response.trace ? JSON.stringify(response.trace) : null;
					console.log(traceText);
				}
			});
		});
		$("#btnabbot").click(function() {
			var editorValue = CKEDITOR.instances['keterangan'].getData();
			var jenis 		= document.getElementById('template_jenis').value;
			var form_data = new FormData();
				form_data.append('nofoto', document.getElementById('nofoto').value);
				form_data.append('jenis', jenis);
				form_data.append('komponen', 'keterangan');
				form_data.append('isi', editorValue);
				form_data.append('keterangan', 'getabbot');
				form_data.append('_token', '{{csrf_token()}}');
			$.ajax({
				url			: '{{ route("getResult") }}',
				data		: form_data,
				type		: 'POST',
				contentType	: false,
				processData	: false,
				success		: function (response) {
					CKEDITOR.instances['keterangan'].setData(response);
				},
				error: function (xhr, status, error) {
					var response 	= xhr.responseJSON || {};
					var traceText 	= response.trace ? JSON.stringify(response.trace) : null;
					console.log(traceText);
				}
			});
		});
		$("#id_lokasianatomi").on('change', function() {
			if ($(this).val() == 'Ekstraparu') {
				$('#pilihanlokasianatomi').hide();
				$('#tekslokasianatomi').show();
			}
		});
		$("#id_bakterihitungkolmediabap").on('change', function() {
			if ($(this).val() == 'lainnya') {
				$('#id_bakterimediabapselect').hide();
				$('#id_bakterimediabapteks').show();
			}
		});
		$("#id_contohuji").on('change', function() {
			if ($(this).val() == 'Lainnya') {
				$('#pilihancontohuji').hide();
				$('#tekscontohuji').show();
			}
		});
		$("#id_jenispemeriksaantb").on('change', function() {
			$('.hasilpemeriksaantb').hide();
			if ($(this).val() === 'TCM MTB Rif (Xpert)' || $(this).val() === 'TCM MTB Rif (Truenat)' || $(this).val() === 'TCM MTB Rif INH (BDMAX)' || $(this).val() === 'LPA lini 2' || $(this).val() === 'LPA lini 1') {
				$('#hasilpemeriksaanttcmmtbrifxpert').show();
			} else if ($(this).val() == 'TCM XDR (Xpert)'){
				$('#hasilpemeriksaanttcmmtbxdrxpert').show();
			} else if ($(this).val() == 'Biakan'){
				$('#hasilpemeriksaantbbiakan').show();
			} else {
				$('#hasilpemeriksaantmikroskopis').show();
			}
		});
		$(".ekspertiseseletc").on('change', function() {
			var nofoto 		= document.getElementById('nofoto').value;
			var jenis 		= document.getElementById('template_jenis').value;
			var komponen 	= $(this).attr('id');
			var isi 		= $(this).val();
			if (nofoto == '' || nofoto == null){
				
			} else {
				if (komponen == 'id_pewarnaangiesma' && isi == 'lainnya'){
					$('#pewarnaangiemsaselect').hide();
					$('#pewarnaangiemsateks').show();
				} else if (komponen == 'id_bakterihitungkol02' && isi == 'lainnya'){
					$('#id_bakterihitungkol02select').hide();
					$('#id_bakterihitungkol02teks').show();
				} else if (komponen == 'id_pewarnaankoh' && isi == 'lainnya'){
					$('#pewarnaankohselect').hide();
					$('#pewarnaankohteks').show();
				} else if (komponen == 'id_bakterihitungkol' && isi == 'lainnya'){
					$('#id_bakterihitungkolselect').hide();
					$('#id_bakterihitungkolteks').show();
				} else if (komponen == 'id_bakterihitungkol01' && isi == 'lainnya'){
					$('#id_bakterihitungkol01select').hide();
					$('#id_bakterihitungkol01teks').show();
				} else if (komponen == 'id_bakterihitungkol02' && isi == 'lainnya'){
					$('#id_bakterihitungkol02select').hide();
					$('#id_bakterihitungkol02teks').show();
				} else if (komponen == 'lsg_pewarnaankoh' && isi == 'lainnya'){
					$('#lsg_pewarnaankohselect').hide();
					$('#lsg_pewarnaankohteks').show();
				} else if (komponen == 'lsg_pewarnaangiesma' && isi == 'lainnya'){
					$('#lsg_pewarnaangiesmaselect').hide();
					$('#lsg_pewarnaangiesmateks').show();
				} else if (komponen == 'vl_hasil01' && isi == 'lainnya'){
					$('#vl_hasildiv1select').hide();
					$('#vl_hasildiv1teks').show();
				} else if (komponen == 'vl_hasil02' && isi == 'lainnya'){
					$('#vl_hasildiv2select').hide();
					$('#vl_hasildiv2teks').show();
				} else {
					
				}
			}
			
		});
		$(".pilihankirby").on('change', function() {
			var komponen 	= $(this).attr('id');
			var isi 		= $(this).val();
			var jenis 		= document.getElementById('dlp').value;
			var idne		= document.getElementById('periksa_id').value;
			var bakteri		= document.getElementById('bakteri').value;
			if (bakteri == ''){
				swal({
					title	: 'Stop',
					text	: 'Nama Kuman Otomatis tidak boleh kosong',
					type	: 'warning',
				})
			} else {
				var form_data = new FormData();
					form_data.append('nofoto', document.getElementById('nofoto').value);
					form_data.append('kuman', document.getElementById('bakteri').value);
					form_data.append('val10', jenis);
					form_data.append('komponen', komponen);
					form_data.append('isi', isi);
					form_data.append('periksa_id', idne);
					form_data.append('keterangan', 'isitabelantibiotik');
					form_data.append('_token', '{{csrf_token()}}');
				$.ajax({
					url			: '{{ route("getResult") }}',
					data		: form_data,
					type		: 'POST',
					contentType	: false,
					processData	: false,
					success		: function (response) {
						console.log(response);
						btncreateantibiotikvitek();
					},
					error: function (xhr, status, error) {
						var response 	= xhr.responseJSON || {};
						var traceText 	= response.trace ? JSON.stringify(response.trace) : null;
						console.log(traceText);
					}
				});
			}
		});
		$("#btnsimpannewkumanmanual1").click(function() {
			var komponen 	= 'id_bakteri01';
			var isi 		= document.getElementById('id_bakteri01').value;
			var jenis 		= document.getElementById('dlp').value;
			var idne		= document.getElementById('periksa_id').value;
			var astmanual	= document.getElementById('id_antibiotikmanual1').value;
			var form_data = new FormData();
				form_data.append('nofoto', document.getElementById('nofoto').value);
				form_data.append('val10', jenis);
				form_data.append('komponen', komponen);
				form_data.append('isi', isi);
				form_data.append('periksa_id', idne);
				form_data.append('astmanual', astmanual);
				form_data.append('keterangan', 'kumanmanual');
				form_data.append('_token', '{{csrf_token()}}');
			$.ajax({
				url			: '{{ route("getResult") }}',
				data		: form_data,
				type		: 'POST',
				contentType	: false,
				processData	: false,
				success		: function (response) {
					var status  = response.status;
					var message = response.message;
					var warna 	= response.warna;
					var icon 	= response.icon;
					$.toast({
						heading: status,
						text: message,
						position: 'top-right',
						loaderBg: warna,
						icon: icon,
						hideAfter: 3000,
						stack: 1
					});
					btncreateantibiotikkumanmanual1();
				},
				error: function (xhr, status, error) {
					var response 	= xhr.responseJSON || {};
					var traceText 	= response.trace ? JSON.stringify(response.trace) : null;
					console.log(traceText);
				}
			});
		});
		$("#btnsimpannewkumanmanual2").click(function() {
			var komponen 	= 'id_bakteri02';
			var isi 		= document.getElementById('id_bakteri02').value;
			var jenis 		= document.getElementById('dlp').value;
			var idne		= document.getElementById('periksa_id').value;
			var astmanual	= document.getElementById('id_antibiotikmanual2').value;
			var form_data = new FormData();
				form_data.append('nofoto', document.getElementById('nofoto').value);
				form_data.append('val10', jenis);
				form_data.append('komponen', komponen);
				form_data.append('isi', isi);
				form_data.append('periksa_id', idne);
				form_data.append('astmanual', astmanual);
				form_data.append('keterangan', 'kumanmanual');
				form_data.append('_token', '{{csrf_token()}}');
			$.ajax({
				url			: '{{ route("getResult") }}',
				data		: form_data,
				type		: 'POST',
				contentType	: false,
				processData	: false,
				success		: function (response) {
					var status  = response.status;
					var message = response.message;
					var warna 	= response.warna;
					var icon 	= response.icon;
					$.toast({
						heading: status,
						text: message,
						position: 'top-right',
						loaderBg: warna,
						icon: icon,
						hideAfter: 3000,
						stack: 1
					});
					btncreateantibiotikkumanmanual2();
				},
				error: function (xhr, status, error) {
					var response 	= xhr.responseJSON || {};
					var traceText 	= response.trace ? JSON.stringify(response.trace) : null;
					console.log(traceText);
				}
			});
		});
		$("#id_bakteri01").on('change', function(){
			$.toast({
				heading: 'Bakteri Manual diUbah',
				text: 'Jangan lupa untuk memilih kembali kelompok antibiotik manual dan menyimpannya (click tombol plus)',
				position: 'top-right',
				loaderBg: '#ff6849',
				icon: 'info',
				hideAfter: 3000,
				stack: 1
			});
		});
		$("#id_bakteri02").on('change', function(){
			$.toast({
				heading: 'Bakteri Manual diUbah',
				text: 'Jangan lupa untuk memilih kembali kelompok antibiotik manual dan menyimpannya (click tombol plus)',
				position: 'top-right',
				loaderBg: '#ff6849',
				icon: 'info',
				hideAfter: 3000,
				stack: 1
			});
		});
	});
</script>
@endpush
