@extends('base.layout')

@section('content')
<div class="wrapper">
	<div class="container-fluid">
		<div id="divawal">
			<div class="row">
				<div class="col-lg-12">
					<div class="card-box ribbon-box">
						<div class="ribbon ribbon-primary" id="judul">Verification</div>
						<p class="m-b-0"></p>
						<button type="button" class="btn btn-danger pull-left" id="btnpunyaku">Show Only For Me</button>
						<button type="button" class="btn btn-success pull-left" id="btnallspv">Show All SPV</button>
						<div id="gridpemeriksaan"></div>
					</div>
				</div>
			</div>
		</div>
		<div id="divperiksa">
			<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>Dokter Pengirim</td>
										<td><input type="text" class="form-control" id="klinisi" readonly></td>
									</tr>
									<tr>
										<td>Asal Pasien</td>
										<td><input type="text" class="form-control" id="asalpasien" readonly></td>
									</tr>
									<tr>
										<td>Accession Number</td>
										<td><input type="text" id="nofoto" class="form-control" readonly></td>
									</tr>
									<tr>
										<td>Register Number</td>
										<td><input type="text" id="norm" class="form-control" readonly></td>
									</tr>
									<tr>
										<td>Name</td>
										<td><input type="text" id="nonama" class="form-control" readonly></td>
									</tr>
									<tr>
										<td>Gender</td>
										<td><input type="text" id="nokel" class="form-control" readonly></td>
									</tr>
									<tr>
										<td>Age</td>
										<td><input type="text" id="nousia" class="form-control" readonly></td>
									</tr>								
									<tr>
										<td>Status</td>
										<td><input type="text" id="nostatus" class="form-control" readonly></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 isiandasar" 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 isiandasar" 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 isiandasar" 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="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 class="form-group col-lg-2">
								<label for="id_esbl" class="col-form-label">ESBL</label>
								<select class="form-control isiandasar" id="id_esbl" name="id_esbl">
									<option value="">Pilih Salah Satu</option>
									<option value="YES">YES</option>
									<option value="NO">NO</option>
								</select>
							</div>
							<div class="form-group col-lg-2">
								<label for="id_mrsa" class="col-form-label">MRSA</label>
								<select class="form-control isiandasar" id="id_mrsa" name="id_mrsa">
									<option value="">Pilih Salah Satu</option>
									<option value="YES">YES</option>
									<option value="NO">NO</option>
								</select>
							</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 value="">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</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" 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>
									<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>
									<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" 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>
									<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>
									<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" 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">
								<label class="col-form-label">Pertumbuhan Koloni:</label>
								<div class="form-row">
									<div class="form-group col-lg-4">
										<label for="id_mediabap" class="col-form-label">Media BAP</label>
										<select class="form-control select2" id="id_mediabap" name="id_mediabap[]"  style="width: 100%;" multiple="multiple">
											<option value="">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 class="form-group col-lg-4">
										<label for="id_mediacap" class="col-form-label">Media CAP</label>
										<select class="form-control select2" id="id_mediacap" name="id_mediacap[]"  style="width: 100%;" multiple="multiple">
											<option value="">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 class="form-group col-lg-4">
										<label for="id_mediamcconkey" class="col-form-label">Media Mc Conkey</label>
										<select class="form-control select2" id="id_mediamcconkey" name="id_mediamcconkey[]" style="width: 100%;" multiple="multiple">
											<option value="">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 class="form-group col-lg-6">
										<label for="id_mediasda" class="col-form-label">Media SDA</label>
										<input type="text" id="id_mediasda" class="form-control ekspertiseteks">
									</div>
									<div class="form-group col-lg-6">
										<label for="id_mediaselektif" class="col-form-label">Media Selektif lainnya</label>
										<input type="text" id="id_mediaselektif" class="form-control ekspertiseteks">
									</div>
								</div>
							</div>
							<div class="form-group col-lg-3">
								<label for="id_pemeriksaantl" class="col-form-label">Pemeriksaan Tambahan Lainnya</label>
								<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 col-lg-3">
								<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="&#646; hemolisa">&#646; hemolisa</option>
									<option value="&#946; hemolisa">&#946; hemolisa</option>
								</select>
							</div>
							<div class="form-group col-lg-3">
								<label for="id_pemeriksaankatalase" class="col-form-label">Tes Katalase</label>
								<select class="form-control ekspertiseseletc" id="id_pemeriksaankatalase" name="id_pemeriksaankatalase">
									<option value="">Pilih Salah Satu</option>
									<option value="Katalase +">Katalase +</option>
									<option value="Katalase -">Katalase -</option>
								</select>
							</div>
							<div class="form-group col-lg-3">
								<label for="id_pemeriksaankabulase" class="col-form-label">Tes Koagulase</label>
								<select class="form-control ekspertiseseletc" id="id_pemeriksaankabulase" name="id_pemeriksaankabulase">
									<option value="">Pilih Salah Satu</option>
									<option value="Koagulase +">Koagulase +</option>
									<option value="Koagulase -">Koagulase -</option>
								</select>
							</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 ekspertiseseletc" 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 ekspertiseseletc" 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 class="form-group col-lg-4">
										<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 ekspertiseseletc" 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 ekspertiseseletc" 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_kbfos" class="col-form-label">FOS</label>
										<div class="form-row">
											<div class="form-group col-lg-6">
												<select class="form-control ekspertiseseletc" 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 ekspertiseseletc" 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 ekspertiseseletc" 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 ekspertiseseletc" 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 col-lg-12">
								<div class="form-row">
									<div class="form-group col-lg-6">
										<div class="form-row">
											<div class="form-group col-lg-5">
												<label for="id_bakteri01" class="col-form-label">Bakteri I</label>
												<select class="form-control ekspertiseseletc" id="id_bakteri01" name="id_bakteri01">
													<option value="">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">
												<label for="id_bakterisir01" class="col-form-label">S/I/R I</label>
												<select class="form-control ekspertiseseletc" id="id_bakterisir01" name="id_bakterisir01">
													<option value="">Pilih Salah Satu</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-4" id="id_bakterihitungkol01select">
												<label for="id_bakterihitungkol01" class="col-form-label">Hitung Koloni I</label>
												<select class="form-control ekspertiseseletc" id="id_bakterihitungkol01" name="id_bakterihitungkol01">
													<option value="">Pilih Salah Satu</option>
													<option value="&ge; 10<sup>5</sup>CFU/ml Urine (Bakteriauria bermakna)">&ge; 10<sup>5</sup>CFU/ml Urine (Bakteriauria bermakna)</option>
													<option value="&ge; 10<sup>5</sup>CFU/ml Urine (Candidauria bermakna)">&ge; 10<sup>5</sup>CFU/ml Urine (Candidauria bermakna)</option>
													<option value="&ge; 10<sup>3</sup>CFU/ml Urine (Bakteriauria bermakna)">&ge; 10<sup>3</sup>CFU/ml Urine (Bakteriauria bermakna)</option>
													<option value="lainnya">lainnya</option>
												</select>
											</div>
											<div class="form-group col-lg-4" id="id_bakterihitungkol01teks">
												<label for="id_bakterihitungkolteks01" class="col-form-label">Hitung Koloni I</label>
												<input type="text" id="id_bakterihitungkolteks01" class="form-control ekspertiseteks">
											</div>
										</div>
									</div>
									<div class="form-group col-lg-6">
										<div class="form-row">
											<div class="form-group col-lg-5">
												<label for="id_bakteri02" class="col-form-label">Bakteri II</label>
												<select class="form-control ekspertiseseletc" id="id_bakteri02" name="id_bakteri02">
													<option value="">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">
												<label for="id_bakterisir02" class="col-form-label">S/I/R II</label>
												<select class="form-control ekspertiseseletc" id="id_bakterisir02" name="id_bakterisir02">
													<option value="">Pilih Salah Satu</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-4" id="id_bakterihitungkol02select">
												<label for="id_bakterihitungkol02" class="col-form-label">Hitung Koloni II</label>
												<select class="form-control ekspertiseseletc" id="id_bakterihitungkol02" name="id_bakterihitungkol02">
													<option value="">Pilih Salah Satu</option>
													<option value="&ge; 10<sup>5</sup>CFU/ml Urine (Bakteriauria bermakna)">&ge; 10<sup>5</sup>CFU/ml Urine (Bakteriauria bermakna)</option>
													<option value="&ge; 10<sup>5</sup>CFU/ml Urine (Candidauria bermakna)">&ge; 10<sup>5</sup>CFU/ml Urine (Candidauria bermakna)</option>
													<option value="&ge; 10<sup>3</sup>CFU/ml Urine (Bakteriauria bermakna)">&ge; 10<sup>3</sup>CFU/ml Urine (Bakteriauria bermakna)</option>
													<option value="lainnya">lainnya</option>
												</select>
											</div>
											<div class="form-group col-lg-4" id="id_bakterihitungkol02teks">
												<label for="id_bakterihitungkolteks02" class="col-form-label">Hitung Koloni II</label>
												<input type="text" id="id_bakterihitungkolteks02" class="form-control ekspertiseteks">
											</div>
										</div>
									</div>
								</div>
							</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>
						<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 value="">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</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"  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>
									<option value="Ditemukan morfologi Hifa">Ditemukan morfologi Hifa</option>
									<option value="Ditemukan morfologi Budding Cell">Ditemukan morfologi Budding Cell </option>
									<option value="Ditemukan morfologi Conidia">Ditemukan morfologi Conidia</option>
									<option value="Ditemukan morfologi Hifa dan Budding Cell">Ditemukan morfologi Hifa dan Budding Cell</option>
									<option value="Ditemukan morfologi Hifa dan Conidia">Ditemukan morfologi Hifa dan Conidia</option>
									<option value="Ditemukan morfologi Budding Cell dan Conidia">Ditemukan morfologi Budding Cell dan Conidia</option>
									<option value="Tidak ditemukan morfologi Budding Cell, Hifa dan Conidia">Tidak ditemukan morfologi Budding Cell, Hifa dan Conidia</option>
									<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" 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>
									<option value="Ditemukan morfologi Inclusion <i>Bodies</i> dan <i>Reticulate Bodies</i>">Ditemukan morfologi Inclusion <i>Bodies</i> dan <i>Reticulate Bodies</i></option>
									<option value="Tidak ditemukan morfologi <i>Inclusion Bodies</i> dan <i>Reticulate Bodies</i>">Tidak ditemukan morfologi <i>Inclusion Bodies</i> dan <i>Reticulate Bodies</i></option>
									<option value="Ditemukan morfologi kista <i>tropozoid</i>">Ditemukan morfologi kista <i>tropozoid</i></option>
									<option value="Tidak ditemukan morfologi kista <i>tropozoid</i>">Tidak ditemukan morfologi kista <i>tropozoid</i></option>
									<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" 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>
						<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" 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" 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" 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" 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 TBS">Diagnosis TBS</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" 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" 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" 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" 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" 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" 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" class="form-control ekspertiseteks">
									</div>
									<div class="form-group col-lg-8">
										<div class="form-group">
											<div class="mt-12">
												<p class="sub-header mb-2">Hasil Pemeriksaan Mikroskopis (BTA/lainnya) (Pagi)</p>
												<div class="checkbox form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox1216" id="inlineCheckbox12" value="+++">
													<label for="inlineCheckbox12"> +++ </label>
												</div>
												<div class="checkbox checkbox-success form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox1216" id="inlineCheckbox13" value="++">
													<label for="inlineCheckbox13"> ++ </label>
												</div>
												<div class="checkbox checkbox-pink form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox1216" id="inlineCheckbox14" value="+">
													<label for="inlineCheckbox14"> + </label>
												</div>
												<div class="checkbox checkbox-pink form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox1216" id="inlineCheckbox15" value="1-9 ***)">
													<label for="inlineCheckbox15"> 1-9 ***) </label>
												</div>
												<div class="checkbox checkbox-pink form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox1216" id="inlineCheckbox16" value="Neg">
													<label for="inlineCheckbox16"> Neg</label>
												</div>
											</div>
										</div>
										<div class="form-group">
											<div class="mt-12">
												<p class="sub-header mb-2">Hasil Pemeriksaan Mikroskopis (BTA/lainnya) (Sewaktu)</p>
												<div class="checkbox form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox1721" id="inlineCheckbox17" value="+++">
													<label for="inlineCheckbox17"> +++ </label>
												</div>
												<div class="checkbox checkbox-success form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox1721" id="inlineCheckbox18" value="++">
													<label for="inlineCheckbox18"> ++ </label>
												</div>
												<div class="checkbox checkbox-pink form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox1721" id="inlineCheckbox19" value="+">
													<label for="inlineCheckbox19"> + </label>
												</div>
												<div class="checkbox checkbox-pink form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox1721" id="inlineCheckbox20" value="1-9 ***)">
													<label for="inlineCheckbox20"> 1-9 ***) </label>
												</div>
												<div class="checkbox checkbox-pink form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox1721" id="inlineCheckbox21" value="Neg">
													<label for="inlineCheckbox21"> Neg</label>
												</div>
											</div>
										</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" class="form-control ekspertiseteks">
									</div>
									<div class="form-group col-lg-8">
										<div class="form-group">
											<div class="mt-12">
												<p class="sub-header mb-2">Hasil Biakan (MGIT)</p>
												<div class="checkbox form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox2226" id="inlineCheckbox22" value="Pos">
													<label for="inlineCheckbox22"> Pos </label>
												</div>
												<div class="checkbox checkbox-success form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox2226" id="inlineCheckbox23" value="Neg">
													<label for="inlineCheckbox23"> Neg </label>
												</div>
												<div class="checkbox checkbox-pink form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox2226" id="inlineCheckbox24" value="NTM">
													<label for="inlineCheckbox24"> NTM </label>
												</div>
												<div class="checkbox checkbox-pink form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox2226" id="inlineCheckbox25" value="KTM">
													<label for="inlineCheckbox25"> KTM </label>
												</div>
												<div class="checkbox checkbox-pink form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox2226" id="inlineCheckbox26" value="TDL">
													<label for="inlineCheckbox26"> TDL</label>
												</div>
											</div>
										</div>
										<div class="form-group">
											<div class="mt-12">
												<p class="sub-header mb-2">Hasil Biakan (LJ)</p>
												<div class="checkbox form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox2734" id="inlineCheckbox27" value="3+">
													<label for="inlineCheckbox27"> 3+ </label>
												</div>
												<div class="checkbox checkbox-success form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox2734" id="inlineCheckbox28" value="2+">
													<label for="inlineCheckbox28"> 2+ </label>
												</div>
												<div class="checkbox checkbox-pink form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox2734" id="inlineCheckbox29" value="1+">
													<label for="inlineCheckbox29"> 1+ </label>
												</div>
												<div class="checkbox checkbox-pink form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox2734" id="inlineCheckbox30" value="1-9 ***)">
													<label for="inlineCheckbox30"> 1-9 ***) </label>
												</div>
												<div class="checkbox checkbox-pink form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox2734" id="inlineCheckbox31" value="Neg">
													<label for="inlineCheckbox31"> Neg</label>
												</div>
												<div class="checkbox checkbox-pink form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox2734" id="inlineCheckbox32" value="NTM">
													<label for="inlineCheckbox32"> NTM </label>
												</div>
												<div class="checkbox checkbox-pink form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox2734" id="inlineCheckbox33" value="KTM">
													<label for="inlineCheckbox33"> KTM </label>
												</div>
												<div class="checkbox checkbox-pink form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox2734" id="inlineCheckbox34" value="TDL">
													<label for="inlineCheckbox34"> TDL</label>
												</div>
											</div>
										</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" class="form-control ekspertiseteks">
									</div>
									<div class="form-group col-lg-8">
										<div class="form-group">
											<div class="mt-12">
												<p class="sub-header mb-2">Hasil Pemeriksaan Mikroskopis (BTA/lainnya) (Sewaktu)</p>
												<div class="checkbox form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox3539" id="inlineCheckbox35" value="+++">
													<label for="inlineCheckbox35"> +++ </label>
												</div>
												<div class="checkbox checkbox-success form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox3539" id="inlineCheckbox36" value="++">
													<label for="inlineCheckbox36"> ++ </label>
												</div>
												<div class="checkbox checkbox-pink form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox3539" id="inlineCheckbox37" value="+">
													<label for="inlineCheckbox37"> + </label>
												</div>
												<div class="checkbox checkbox-pink form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox3539" id="inlineCheckbox38" value="1-9 ***)">
													<label for="inlineCheckbox38"> 1-9 ***) </label>
												</div>
												<div class="checkbox checkbox-pink form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox3539" id="inlineCheckbox39" value="Neg">
													<label for="inlineCheckbox39"> Neg</label>
												</div>
											</div>
										</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">
											<div class="mt-12">
												<p class="sub-header mb-2">Hasil Pemeriksaan Mikroskopis (BTA/lainnya) (Pagi)</p>
												<div class="checkbox form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox4045" id="inlineCheckbox40" value="+++">
													<label for="inlineCheckbox40"> +++ </label>
												</div>
												<div class="checkbox checkbox-success form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox4045" id="inlineCheckbox41" value="++">
													<label for="inlineCheckbox41"> ++ </label>
												</div>
												<div class="checkbox checkbox-pink form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox4045" id="inlineCheckbox42" value="+">
													<label for="inlineCheckbox42"> + </label>
												</div>
												<div class="checkbox checkbox-pink form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox4045" id="inlineCheckbox43" value="1-9 ***)">
													<label for="inlineCheckbox43"> 1-9 ***) </label>
												</div>
												<div class="checkbox checkbox-pink form-check-inline">
													<input type="checkbox" class="ekspertisecheckbox chekbox4045" id="inlineCheckbox45" value="Neg">
													<label for="inlineCheckbox45"> Neg</label>
												</div>
											</div>
										</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" 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" 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 MTB Rif (Xpert) (Sewaktu)</p>
											<div class="checkbox form-check-inline">
												<input type="checkbox" class="ekspertisecheckbox chekbox4652" id="inlineCheckbox46" value="Neg">
												<label for="inlineCheckbox46"> Neg </label>
											</div>
											<div class="checkbox checkbox-success form-check-inline">
												<input type="checkbox" class="ekspertisecheckbox chekbox4652" id="inlineCheckbox47" value="Rif Sen">
												<label for="inlineCheckbox47"> Rif Sen </label>
											</div>
											<div class="checkbox checkbox-pink form-check-inline">
												<input type="checkbox" class="ekspertisecheckbox chekbox4652" id="inlineCheckbox48" value="Rif Res">
												<label for="inlineCheckbox48"> Rif Res </label>
											</div>
											<div class="checkbox checkbox-pink form-check-inline">
												<input type="checkbox" class="ekspertisecheckbox chekbox4652" id="inlineCheckbox49" value="Rif Indet">
												<label for="inlineCheckbox49"> Rif Indet </label>
											</div>
											<div class="checkbox checkbox-pink form-check-inline">
												<input type="checkbox" class="ekspertisecheckbox chekbox4652" id="inlineCheckbox50" value="Invalid">
												<label for="inlineCheckbox50"> Invalid </label>
											</div>
											<div class="checkbox checkbox-pink form-check-inline">
												<input type="checkbox" class="ekspertisecheckbox chekbox4652" id="inlineCheckbox51" value="Error">
												<label for="inlineCheckbox51"> Error </label>
											</div>
											<div class="checkbox checkbox-pink form-check-inline">
												<input type="checkbox" class="ekspertisecheckbox chekbox4652" id="inlineCheckbox52" value="No result">
												<label for="inlineCheckbox52"> No result </label>
											</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="hasilpemeriksaanttcmmtbrifxpert_tglpagi" class="col-form-label">Tanggal Hasil di Laporkan</label>
												<input type="text" id="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" 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 MTB Rif (Xpert) (Pagi)</p>
											<div class="checkbox form-check-inline">
												<input type="checkbox" class="ekspertisecheckbox chekbox5359" id="inlineCheckbox53" value="Neg">
												<label for="inlineCheckbox53"> Neg </label>
											</div>
											<div class="checkbox checkbox-success form-check-inline">
												<input type="checkbox" class="ekspertisecheckbox chekbox5359" id="inlineCheckbox54" value="Rif Sen">
												<label for="inlineCheckbox54"> Rif Sen </label>
											</div>
											<div class="checkbox checkbox-pink form-check-inline">
												<input type="checkbox" class="ekspertisecheckbox chekbox5359" id="inlineCheckbox55" value="Rif Res">
												<label for="inlineCheckbox55"> Rif Res </label>
											</div>
											<div class="checkbox checkbox-pink form-check-inline">
												<input type="checkbox" class="ekspertisecheckbox chekbox5359" id="inlineCheckbox56" value="Rif Indet">
												<label for="inlineCheckbox56"> Rif Indet </label>
											</div>
											<div class="checkbox checkbox-pink form-check-inline">
												<input type="checkbox" class="ekspertisecheckbox chekbox5359" id="inlineCheckbox57" value="Invalid">
												<label for="inlineCheckbox57"> Invalid </label>
											</div>
											<div class="checkbox checkbox-pink form-check-inline">
												<input type="checkbox" class="ekspertisecheckbox chekbox5359" id="inlineCheckbox58" value="Error">
												<label for="inlineCheckbox58"> Error </label>
											</div>
											<div class="checkbox checkbox-pink form-check-inline">
												<input type="checkbox" class="ekspertisecheckbox chekbox5359" id="inlineCheckbox59" value="No result">
												<label for="inlineCheckbox59"> No result </label>
											</div>
										</div>
									</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" 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" 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 MTB Rif (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">Neg</div>
														<div class="form-group col-lg-4">
															<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbxdrxpert_pagineg" name="hasilpemeriksaanttcmmtbxdrxpert_pagineg">
																<option value=""></option>
																<option value="S">S</option>
																<option value="I">I</option>
																<option value="R">R</option>
																<option value="Negatif">Negatif</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 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 class="form-row">
														<div class="form-group col-lg-8">Invalid</div>
														<div class="form-group col-lg-4">
															<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbxdrxpert_pagiinvalid" name="hasilpemeriksaanttcmmtbxdrxpert_pagiinvalid">
																<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 class="form-row">
														<div class="form-group col-lg-8">Error</div>
														<div class="form-group col-lg-4">
															<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbxdrxpert_pagierror" name="hasilpemeriksaanttcmmtbxdrxpert_pagierror">
																<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">No Result</div>
														<div class="form-group col-lg-4">
															<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbxdrxpert_paginoresult" name="hasilpemeriksaanttcmmtbxdrxpert_paginoresult">
																<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 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" 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" 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 MTB Rif (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">Neg</div>
														<div class="form-group col-lg-4">
															<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbxdrxpert_sewaktuneg" name="hasilpemeriksaanttcmmtbxdrxpert_sewaktuneg">
																<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 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 class="form-row">
														<div class="form-group col-lg-8">Invalid</div>
														<div class="form-group col-lg-4">
															<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbxdrxpert_sewaktuinvalid" name="hasilpemeriksaanttcmmtbxdrxpert_sewaktuinvalid">
																<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 class="form-row">
														<div class="form-group col-lg-8">Error</div>
														<div class="form-group col-lg-4">
															<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbxdrxpert_sewaktuerror" name="hasilpemeriksaanttcmmtbxdrxpert_sewaktuerror">
																<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">No Result</div>
														<div class="form-group col-lg-4">
															<select class="form-control ekspertiseseletc" id="hasilpemeriksaanttcmmtbxdrxpert_sewaktunoresult" name="hasilpemeriksaanttcmmtbxdrxpert_sewaktunoresult">
																<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>
									<option value="TCM-RNA HIV">TCM-RNA HIV</option>
									<option value="TCM-HCV VL">TCM-HCV VL</option>
								</select>
							</div>
							<div class="form-group col-lg-3">
								<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="...">...</option>
								</select>
							</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">
								<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="...">...</option>
								</select>
							</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-group setelahdipilihtemplate">
							<div class="form-group account-btn text-center m-t-10">
								<button type="button" class="btn btn-light waves-effect" id="btnviewvitek">
									<i class="mdi mdi-alpha-v-box mr-1"></i> Vitek
								</button>
								<button type="button" class="btn btn-light waves-effect" id="btnbachtect">
									<i class="mdi mdi-alpha-b-box mr-1"></i> BachTech
								</button>
								<button type="button" class="btn btn-light waves-effect" id="btnmgit">
									<i class="mdi mdi-alpha-m-box mr-1"></i> MGIT
								</button>
								<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>
							<div class="form-group col-lg-12" id="sirabketerangan">
								<div id="gridsirab"></div>
							</div>
							<div class="form-group col-lg-12">
								<textarea id="keterangan" style="width: 100%; height: 300px;"></textarea>
							</div>
						</div>
						<div class="form-group setelahdipilihtemplate">
							<input type="hidden" id="periksa_id" name="periksa_id">
							<button type="button" id="btnkembali" class="btn btn-primary">Back</button>
							<button type="button" id="btnsendexpertisetopacs" class="btn btn-warning pull-right">Final Expertise</button>
							<button type="button" id="btnsavedraft" class="btn btn-success pull-right">Save as Draft</button>
						</div>
						<div class="form-group setelahdipilihtemplate">
							<div id="gridadendum"></div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div> <!-- end container -->
</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><!-- /input-group -->
		</div>
		<div class="modal-footer">
			<button type="button" class="btn btn-outline pull-left" data-dismiss="modal">Close</button>	
		</div>
	</div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<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 id="timeremaining"></div>
			</div><!-- /input-group -->
		</div>
		<div class="modal-footer">
			<button type="button" class="btn btn-outline pull-left" data-dismiss="modal">Close</button>	
		</div>
	</div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<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="verificationppds">
<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="upload_idne" id="upload_idne">
<input type="hidden" name="template_jenis" id="template_jenis">
<input type="hidden" name="_token" id="token" value="{{ csrf_token() }}">
<div style="overflow: hidden; display: none;">
	<table>
		<tr>
			<td width="40%">Kv</td>
			<td width="60%"><input type="text" class="form-control" id="kave"></td>
		</tr>
		<tr>
			<td>mAs</td>
			<td><input type="text" class="form-control" id="mas"></td>
		</tr>
		<tr>
			<td>DLP</td>
			<td><input type="text" class="form-control" id="dlp"></td>
		</tr>
		<tr>
			<td>Weight</td>
			<td><input type="text" class="form-control" id="berat"></td>
		</tr>
		<tr>
			<td>Rooms Update</td>
			<td>
				<select class="form-control" id="ruangan" name="ruangan">
					<option value="">Pilih Salah Satu</option>
					
				</select>
			</td>
		</tr>
		
		<tr>
			<td width="40%">Kv</td>
			<td width="60%"><input type="text" class="form-control" id="read_kave" readonly></td>
		</tr>
		<tr>
			<td>mAs</td>
			<td><input type="text" class="form-control" id="read_mas" readonly></td>
		</tr>
		<tr>
			<td>DLP</td>
			<td><input type="text" class="form-control" id="read_dlp" readonly></td>
		</tr>
		<tr>
			<td>Modality</td>
			<td><input type="text" class="form-control" id="read_modality" readonly></td>
		</tr>									
		<tr>
			<td>Stase / Disease</td>
			<td>
				<select class="form-control" id="read_stase" disabled="disable">
				<option value="">Pilih Salah Satu</option>
				</select>
			</td>
		</tr>
		<tr>
			<td>Stase Sistem Organ</td>
			<td><input type="text" class="form-control" id="read_diagnosa2" readonly></td>
		</tr>
		<tr>
			<td>Weight</td>
			<td><input type="text" class="form-control" id="read_berat" readonly></td>
		</tr>
		<tr>
			<td>Rooms</td>
			<td><input type="text" class="form-control" id="read_ruangan" readonly></td>
		</tr>
		<tr>
			<td>Device</td>
			<td>
				<select class="form-control" id="modaliti" name="modaliti" >
					<option value="">Pilih</option>                               
					<option value="vitek01">Vitek 01</option>
					<option value="vitek02">Vitek 02</option>
					<option value="genexpert01">GeneXpert 01</option>
					<option value="genexpert02">GeneXpert 02</option>
					<option value="genexpert03">GeneXpert 03</option>
					<option value="abbotm2000">Abbot M2000</option>
					<option value="bd01">B D 01</option>
					<option value="bd02">B D 02</option>
				</select>
			</td>
		</tr>
		<button type="button" class="btn btn-facebook waves-effect waves-light" id="btngetbyaccnum"><i class="fa fa-search"></i> View</button>
	</table>
	<div class="form-group col-lg-6">
		<label for="diagnosa2" class="col-form-label">Stase Sistem Organ<font color="red">*</font></label>
		<select class="form-control" id="diagnosa2" name="diagnosa2">
			<option value="">Pilih Salah Satu</option>
		</select>
	</div>
	<div class="form-group col-lg-6">
		<label for="diagnosa" class="col-form-label">VINDICATE <font color="red">*</font></label>
		<select class="form-control select2" id="diagnosa" name="diagnosa">
			<option value="">Pilih Salah Satu</option>
		</select>
	</div>
	<div class="form-group col-lg-3">
		<label for="ppds1" class="col-form-label">Junior PPDS</label>
		<select class="form-control select2" id="ppds1" name="ppds1">
			<option value="0">Pilih</option>
			@foreach($allppds as $rppds)
				<option value="{{ $rppds->id }}">{{ $rppds->nama }}</option>
			@endforeach
		</select>
	</div>
	<div class="form-group col-lg-3">
		<label for="ppds2" class="col-form-label">Middle PPDS</label>
		<select class="form-control select2" id="ppds2" name="ppds2">
			<option value="0">Pilih</option>
			@foreach($allppds as $rppds)
				<option value="{{ $rppds->id }}">{{ $rppds->nama }}</option>
			@endforeach
		</select>
	</div>
	<div class="form-group col-lg-6">
		<label for="otheras" class="col-form-label">Other PPDS (if Any, Select Junior / Middle First)</label>
		<div class="form-row">
			<div class="form-group col-lg-5">
				<select class="form-control" id="otheras" name="otheras">
					<option value="Junior">Junior PPDS</option>
					<option value="Middle">Middle PPDS</option>
				</select>
			</div>
			<div class="form-group col-lg-7">
				<select class="form-control select2" id="otherppds" name="otherppds">
					<option value="0">Pilih</option>
					@foreach($allppds as $rppds)
						<option value="{{ $rppds->nama }}">{{ $rppds->nama }}</option>
					@endforeach
				</select>
			</div>
		</div>
	</div>
	<!-- Start Nilai diambil dari cheklist -->
	<div class="form-group col-lg-12">
		<label for="hasilpemeriksaanttcmmtbxdrxpert_pagi" class="col-form-label">Pagi</label>
		<input type="text" id="hasilpemeriksaanttcmmtbxdrxpert_pagi" class="form-control ekspertiseteks">
	</div>
	<div class="form-group col-lg-12">
		<label for="hasilpemeriksaanttcmmtbxdrxpert_sewaktu" class="col-form-label">Sewaktu</label>
		<input type="text" id="hasilpemeriksaanttcmmtbxdrxpert_sewaktu" class="form-control ekspertiseteks">
	</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">
		<label for="lsg_ditemukanmorfologi" class="col-form-label">9. Ditemukan morfologi.?</label>
		<input type="text" id="lsg_ditemukanmorfologi" class="form-control ekspertiseteks">
	</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">
	function openlamanekpertise( jQuery ){
		var dlp		= document.getElementById('dlp').value;
		var nofoto	= document.getElementById('nofoto').value;
		$('#template_jenis').val(dlp);
		$('#divtemplate').hide();
		$('.templatejawaban').hide();
		$('.setelahdipilihtemplate').show();
		$('input[type="checkbox"]').prop('disabled', false);
		if (dlp == 'CCI'){
			$('#templatecci').show();
		} else if (dlp == 'Kultur'){
			$('#templatekultur').show();
			$('#pewarnaangiemsaselect').show();
			$('#pewarnaangiemsateks').hide();
			$('#pewarnaankohselect').show();
			$('#pewarnaankohteks').hide();
			$('#id_bakterihitungkol01select').show();
			$('#id_bakterihitungkol01teks').hide();
			$('#id_bakterihitungkol02select').show();
			$('#id_bakterihitungkol02teks').hide();
		} 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();
		}
		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) {
					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("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 === '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_pewarnaangiesmaoptional'){
							$('#pewarnaangiemsaselect').hide();
							$('#pewarnaangiemsateks').show();
						}
						if (rows.komponen === 'id_pewarnaankohoptional'){
							$('#pewarnaankohselect').hide();
							$('#pewarnaankohteks').show();
						}
						if (rows.komponen === 'lsg_pewarnaankohoptional'){
							$('#lsg_pewarnaankohselect').hide();
							$('#lsg_pewarnaankohteks').show();
						}
						if (rows.komponen === 'lsg_pewarnaangiesmaoptional'){
							$('#lsg_pewarnaangiesmaselect').hide();
							$('#lsg_pewarnaangiesmateks').show();
						}
						if (rows.komponen === 'id_bakterihitungkolteks01'){
							$('#id_bakterihitungkol01select').hide();
							$('#id_bakterihitungkol01teks').show();
						}
						if (rows.komponen === 'id_bakterihitungkolteks02'){
							$('#id_bakterihitungkol02select').hide();
							$('#id_bakterihitungkol02teks').show();
						}
					}
				});
			},
			error: function (xhr, status, error) {
				var response = xhr.responseJSON || {};
				var traceText = response.trace ? JSON.stringify(response.trace) : null;
				console.log(traceText);
			}
		});
	}
	function openedpage( jQuery ){
		var jenis	= document.getElementById('master_set01').value;
		var mulai	= '';
		var akhir	= '';
		var valcari	= '';
		var master	= document.getElementById('master_lokasi').value;
		var poli	= document.getElementById('master_userid').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: '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: 'text'},
				{ name: 'daftar', type: 'text'},
				{ name: 'verifikasi', type: 'text'},
				{ name: 'ppdsas', type: 'text'},
				{ name: 'otherppds', type: 'text'},
				{ name: 'nmpendaftar', type: 'text'},
				{ name: 'alamatpasien', type: 'text'},
			],
			type		: 'GET',
			data		: {jenis:'verificationppds', mulai:mulai, akhir:akhir, valcari:valcari, poli:poli, master:'verificationppds', _token: token},
			url			: '{{ route("getList") }}',
		};
		var dataAdapter = new $.jqx.dataAdapter(sourcepasiencari);
		$("#gridpemeriksaan").jqxGrid({
			width			: '100%',
			filterable		: true,
			showfilterrow	: true,
			columnsresize	: true,
			pageable		: true,
			sortable		: true,
			autoheight		: true,
			source			: dataAdapter,
			theme			: "energyblue",
			altrows			: true,
			columns: [
				{ text: 'Expertise', filterable: false, columntype: 'button', align: 'center', width: 70, cellsrenderer: function () {
					return "Expertise";
					}, buttonclick: function (row) {        
						editrow         	= row;   
						var offset      	= $("#gridpemeriksaan").offset();       
						var dataRecord  	= $("#gridpemeriksaan").jqxGrid('getrowdata', editrow);
						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: 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: 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: token },
							url: '{{ route("getriwayat") }}',
						};
						var dataadendum 	= new $.jqx.dataAdapter(sourceadendum);
						var datadetail 		= new $.jqx.dataAdapter(sourcedetail);
						var jsonSirab 		= new $.jqx.dataAdapter(sourcesirab);
						$('#divtemplate').hide();
						$('#pilihancontohuji').show();
						$('#tekscontohuji').hide();
						$('#pilihanlokasianatomi').show();
						$('#tekslokasianatomi').hide();
						$('.setelahdipilihtemplate').hide();
						$("#asalpasien").val(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").val(dataRecord.jkpasien);
						$("#nousia").val(dataRecord.usia);
						$("#noservis").html(dataRecord.tlsreques);
						$("#nokamar").val(dataRecord.ruangan);
						$("#nostatus").val(statuse);
						$("#alamat").html(dataRecord.alamatpasien);
						$("#tlppasien").html(dataRecord.tlppasien);
						$("#periksa_id").val(dataRecord.id);
						$("#ruangan").val(dataRecord.idruangan);
						if (dataRecord.iddokter == '0' || dataRecord.iddokter == null || dataRecord.iddokter == ''){
							$("#dokter").val(masteru).select2().trigger('change');
						} else {
							$("#dokter").val(dataRecord.iddokter).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").val(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: '25%', cellsalign: 'left', align: 'center' },
								{ text: 'Excutor', datafield: 'inputor', width: '40%', cellsalign: 'left', align: 'center' },
								{ text: 'Type', datafield: 'keterangan', width: '25%', 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) {
												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);
											}
										});
									}
								},
								{ 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) {
												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);
											}
										});
									}
								},
								{ 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) {
												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);
											}
										});
									}
								},
							]
						});
						if (statuse === null) {
							$('#divperiksa').show();
							$('#divawal').hide();
							$('#divreadonly').hide();
							if (dlp == '' || dlp == null){
								$(".ekspertisecheckbox").prop('checked', false);
								$('.ekspertiseteks').val('');
								$('.ekspertiseseletc').val('');
								$('#divtemplate').show();
								$('.templatejawaban').hide();
								$('.setelahdipilihtemplate').hide();
								$.post('{{ route("markPeriksa") }}', { id: goook, nofoto: nofoto, _token: token },
								function(data){
									return false;
								});
							} else {
								openlamanekpertise();
							}
						} else if (statuse.includes("Dibatalkan")){
							swal({
								title	: 'Pemeriksaan di batalkan',
								text	: statuse,
								type	: 'warning',
							})
						} else if (statuse == 'Selesai' || statuse == 'Arsip') {
							$('#divreadonly').hide();
							$('#divperiksa').show();
							$('#divawal').hide();
							openlamanekpertise();
						} else {
							$('#divreadonly').hide();
							$('#divperiksa').show();
							$('#divawal').hide();
							if (dlp == '' || dlp == null){
								$('#divtemplate').show();
								$('.templatejawaban').hide();
								$('.setelahdipilihtemplate').hide();
							} else {
								openlamanekpertise();
							}
						}
					}
				},
				{ text: 'Acc.No', datafield: 'tlsnofoto', 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: 'Comming From', filtertype: 'checkedlist', datafield: 'asalpasien', width: 120, cellsalign: 'left', align: 'center'},
				{ text: 'Service', datafield: 'tlsreques', width: 170, cellsalign: 'left', align: 'center'},
				{ text: 'Pengirim', datafield: 'nmexcutor', width: 200, cellsalign: 'left', align: 'center'},
				{ text: 'Themeplate', filtertype: 'checkedlist', datafield: 'dlp', width: 220, cellsalign: 'left', align: 'center'},
				{ text: 'Specimen', filtertype: 'checkedlist', datafield: 'nm_spesimen', width: 200, cellsalign: 'left', align: 'center'},
			]
		});
		$("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');
		$("#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 () {
		$("#mulai").datepicker({format: 'yyyy-mm-dd', autoclose: true});
		$("#akhir").datepicker({format: 'yyyy-mm-dd', autoclose: true});
		$('#divviewpacs').hide();
		$('#divtemplate').hide();
		$('#divperiksa').hide();
		$('#divreadonly').hide();
		$('#divharibytanggal').hide();
		$("#btnpunyaku").click(function() {
			$("#master_userid").val("{{ Session('id') }}");
			openedpage();
		});
		$("#btnallspv").click(function() {
			$("#master_userid").val('allspv');
			openedpage();
		});
		$("#btnkembali").click(function() {
			$('#divperiksa').hide();
			$('#divreadonly').hide();
			$('#divawal').show();
			$("#gridpemeriksaan").jqxGrid('updatebounddata', 'filter');
		});
		$("#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: 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();
		});
		$("#btngetbyaccnum").click(function(){
			var nofoto          =   document.getElementById('nofoto').value;
			var ruangan         =   document.getElementById('ruangan').value;
			var dokter          =   document.getElementById('dokter').value;
			var keterangan      =   CKEDITOR.instances['keterangan'].getData();
			var kesimpulan      =   CKEDITOR.instances['kesimpulan'].getData();
			var periksa_id      =   document.getElementById('periksa_id').value;
			var set01			= 	'';
			var set07			= 	'';
			var set09			= 	document.getElementById('modaliti').value;
			var set10			= 	document.getElementById('template_jenis').value;
			var set11			= 	document.getElementById('berat').value;
			var set12			= 	'';
			var set13			= 	document.getElementById('klinis').value;
			var set14			= 	document.getElementById('kave').value;
			var set15			= 	document.getElementById('mas').value;
			var token			= 	document.getElementById('token').value;
			if (dokter == 'Pilih' || dokter == '' || dokter == '0' || dokter == null){
				swal({
					title	: 'Stop',
					text	: 'Please Select SPV',
					type	: 'warning',
				})
			} else if (set09 == '' || set09 == 'OT'){
				swal({
					title	: 'Stop',
					text	: 'Please Select Device',
					type	: 'warning',
				})
			} else {
				var form_data 	= 	new FormData();
					form_data.append('nofoto', nofoto);
					form_data.append('ruangan', ruangan);
					form_data.append('dokter', dokter);
					form_data.append('keterangan', keterangan);
					form_data.append('kesimpulan', kesimpulan);
					form_data.append('periksa_id', periksa_id);
					form_data.append('val01', set01);
					form_data.append('val07', set07);
					form_data.append('val09', set09);
					form_data.append('val10', set10);
					form_data.append('val11', set11);
					form_data.append('val12', set12);
					form_data.append('val13', set13);
					form_data.append('val14', set14);
					form_data.append('val15', set15);
					form_data.append('_token', '{{csrf_token()}}');
				var btn = $(this);
					btn.addClass('fa fa-spinner fa-spin orange bigger-125').attr('disabled', true);
				$.ajax({
					url			: '{{ route("getResult") }}',
					data		: form_data,
					type		: 'POST',
					contentType	: false,
					processData	: false,
					success		: function (data) {
						var ketlama = CKEDITOR.instances['keterangan'].getData();
						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
						});
						CKEDITOR.instances['keterangan'].setData(ketlama+'<br />'+message)
						btn.removeClass('fa fa-spinner fa-spin orange bigger-125').attr('disabled', false);
						return false;
					},
					error: function (xhr, status, error) {
						btn.removeClass('fa fa-spinner fa-spin orange bigger-125').attr('disabled', false);
						var response = xhr.responseJSON || {};
						var traceText = response.trace ? JSON.stringify(response.trace) : null;
						swal({
							title	: response.message || 'Terjadi kesalahan',
							text	: traceText || xhr.responseText,
							type	: 'error',
						})
					}
				});
			}		
		});
		$("#btnsendexpertisetopacs").click(function(){
			var nofoto          =   document.getElementById('nofoto').value;
			var ruangan         =   document.getElementById('ruangan').value;
			var dokter          =   document.getElementById('dokter').value;
			var keterangan      =   CKEDITOR.instances['keterangan'].getData();
			var kesimpulan      =   CKEDITOR.instances['kesimpulan'].getData();
			var periksa_id      =   document.getElementById('periksa_id').value;
			var set01			= 	'verifikasi';
			var set07			= 	'1';
			var set09			= 	document.getElementById('modaliti').value;
			var set10			= 	document.getElementById('template_jenis').value;
			var set11			= 	document.getElementById('ppds1').value;
			var set12			= 	document.getElementById('ppds2').value;
			var set13			= 	document.getElementById('ppds3').value;
			var set14			= 	document.getElementById('kave').value;
			var set15			= 	document.getElementById('mas').value;
			var set16			= 	document.getElementById('berat').value;
			var set17			= 	document.getElementById('klinis').value;
			var set18			= 	document.getElementById('klinisi').value;
			var analis			= 	document.getElementById('analis').value;
			var token			= 	document.getElementById('token').value;
			if (dokter == 'Pilih' || dokter == '' || dokter == '0' || dokter == null){
				swal({
					title	: 'Stop',
					text	: 'Please Select SPV',
					type	: 'warning',
				})
			} else {
				$.post('{{ route("exexpertisepacs") }}', { nofoto: nofoto, ruangan: ruangan, dokter: dokter, keterangan: keterangan, kesimpulan: kesimpulan, periksa_id: periksa_id, val01: set01, val07: set07, val09: set09, val10: set10, val11: set11, val12: set12, val13: set13, val14: set14, val15: set15, val16: set16, val17: set17, val18: set18, analis: analis, _token: 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	: 5000,
						stack		: 1
					});
					$('#divperiksa').hide(); 
					$('#divawal').show();
					$("#gridpemeriksaan").jqxGrid('updatebounddata', 'filter');
					return false;
				});
			}
		});
		$("#btnSavePeriksa").click(function(){
			var nofoto          =   document.getElementById('nofoto').value;
			var ruangan         =   document.getElementById('ruangan').value;
			var dokter          =   document.getElementById('dokter').value;
			var keterangan      =   CKEDITOR.instances['keterangan'].getData();
			var kesimpulan      =   CKEDITOR.instances['kesimpulan'].getData();
			var periksa_id      =   document.getElementById('periksa_id').value;
			var set01			= 	document.getElementById('template_jenis').value;
			var set02			= 	'Send';
			var set07			= 	'1';
			var set09			= 	document.getElementById('modaliti').value;
			var set10			= 	document.getElementById('template_jenis').value;
			var set11			= 	document.getElementById('ppds1').value;
			var set12			= 	document.getElementById('ppds2').value;
			var set13			= 	document.getElementById('ppds3').value;
			var set14			= 	document.getElementById('kave').value;
			var set15			= 	document.getElementById('mas').value;
			var set16			= 	document.getElementById('diagnosa2').value;
			var set17			= 	document.getElementById('klinis').value;
			var set18			= 	document.getElementById('klinisi').value;
			var set19 			=	document.getElementById('berat').value;
			var set20			= 	document.getElementById('otheras').value;
			var set21			= 	document.getElementById('otherppds').value;
			var analis			= 	document.getElementById('analis').value;
			var token			= 	document.getElementById('token').value;
			if (dokter == 'Pilih' || dokter == '' || dokter == '0' || dokter == null){
				swal({
					title	: 'Stop',
					text	: 'Please Select SPV',
					type	: 'warning',
				})
			} else {
				$.post('{{ route("exexpertise") }}', { nofoto: nofoto, analis: analis, ruangan: ruangan, dokter: dokter, keterangan: keterangan, kesimpulan: kesimpulan, periksa_id: periksa_id, val01: set01, val02: set02, val07: set07, val09: set09, val10: set10, val11: set11, val12: set12, val13: set13, val14: set14, val15: set15, val16: set16, val17: set17, val18: set18, val19: set19, val20: set20, val21: set21, _token: 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	: 5000,
						stack		: 1
					});
					$('#divperiksa').hide(); 
					$('#divawal').show();
					$("#gridpemeriksaan").jqxGrid('updatebounddata', 'filter');
					return false;
				});
			}
		});
		$("#btnsavedraft").click(function(){
			var nofoto          =   document.getElementById('nofoto').value;
			var ruangan         =   document.getElementById('ruangan').value;
			var dokter          =   document.getElementById('dokter').value;
			var keterangan      =   CKEDITOR.instances['keterangan'].getData();
			var kesimpulan      =   CKEDITOR.instances['kesimpulan'].getData();
			var periksa_id      =   document.getElementById('periksa_id').value;
			var set01			= 	document.getElementById('template_jenis').value;
			var set02			= 	'Draft';
			var set07			= 	'1';
			var set09			= 	document.getElementById('modaliti').value;
			var set10			= 	document.getElementById('template_jenis').value;
			var set11			= 	document.getElementById('ppds1').value;
			var set12			= 	document.getElementById('ppds2').value;
			var set13			= 	document.getElementById('ppds3').value;
			var set14			= 	document.getElementById('kave').value;
			var set15			= 	document.getElementById('mas').value;
			var set16			= 	document.getElementById('diagnosa2').value;
			var set17			= 	document.getElementById('klinis').value;
			var set18			= 	document.getElementById('klinisi').value;
			var set19 			=	document.getElementById('berat').value;
			var set20			= 	document.getElementById('otheras').value;
			var set21			= 	document.getElementById('otherppds').value;
			var analis			= 	document.getElementById('analis').value;
			var token			= 	document.getElementById('token').value;
			if (dokter == 'Pilih' || dokter == '' || dokter == '0' || dokter == null){
				swal({
					title	: 'Stop',
					text	: 'Please Select SPV',
					type	: 'warning',
				})
			} else {
				$.post('{{ route("exexpertise") }}', { nofoto: nofoto, analis: analis, ruangan: ruangan, dokter: dokter, keterangan: keterangan, kesimpulan: kesimpulan, periksa_id: periksa_id, val01: set01, val07: set07, val09: set09, val10: set10, val11: set11, val12: set12, val13: set13, val14: set14, val15: set15, val16: set16, val17: set17, val18: set18, val19: set19, val20: set20, val21: set21, _token: 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	: 5000,
						stack		: 1
					});
					$('#divperiksa').hide(); 
					$('#divawal').show();
					$("#gridpemeriksaan").jqxGrid('updatebounddata', 'filter');
					return false;
				});
			}
		});
		$("#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: 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_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();
			}
		});
		$(".isiandasar").on('change', function() {
			var komponen 	= $(this).attr('id');
			var isi 		= $(this).val();
			var nofoto 		= document.getElementById('nofoto').value;
			var jenis 		= document.getElementById('template_jenis').value;
			var form_data 	= new FormData();
				form_data.append('nofoto', nofoto);
				form_data.append('jenis', jenis);
				form_data.append('komponen', komponen);
				form_data.append('isi', isi);
				form_data.append('keterangan', 'isandasar');
				form_data.append('_token', '{{csrf_token()}}');
			$.ajax({
				url			: '{{ route("getResult") }}',
				data		: form_data,
				type		: 'POST',
				contentType	: false,
				processData	: false,
				success		: function (data) {
					console.log(data);
					return false;
				},
				error: function (xhr, status, error) {
					var response 	= xhr.responseJSON || {};
					var traceText 	= response.trace ? JSON.stringify(response.trace) : null;
					console.log(traceText || xhr.responseText);
				}
			});
		});
		$(".ekspertiseteks").on('change', function() {
			var komponen 	= $(this).attr('id');
			var isi 		= $(this).val();
			var nofoto 		= document.getElementById('nofoto').value;
			var jenis 		= document.getElementById('template_jenis').value;
			var form_data 	= new FormData();
				form_data.append('nofoto', nofoto);
				form_data.append('jenis', jenis);
				form_data.append('komponen', komponen);
				form_data.append('isi', isi);
				form_data.append('keterangan', 'isikomponenjawaban');
				form_data.append('_token', '{{csrf_token()}}');
			$.ajax({
				url			: '{{ route("getResult") }}',
				data		: form_data,
				type		: 'POST',
				contentType	: false,
				processData	: false,
				success		: function (data) {
					console.log(data);
					return false;
				},
				error: function (xhr, status, error) {
					var response 	= xhr.responseJSON || {};
					var traceText 	= response.trace ? JSON.stringify(response.trace) : null;
					console.log(traceText || xhr.responseText);
				}
			});
		});
		$(".ekspertiseseletc").on('change', function() {
			var komponen 	= $(this).attr('id');
			var isi 		= $(this).val();
			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_bakterihitungkol01' && isi == 'lainnya'){
				$('#id_bakterihitungkol01select').hide();
				$('#id_bakterihitungkol01teks').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 == 'hasilpemeriksaanttcmmtbxdrxpert_pagineg' || komponen == 'hasilpemeriksaanttcmmtbxdrxpert_paginhlow' || komponen == 'hasilpemeriksaanttcmmtbxdrxpert_pagih' || komponen == 'hasilpemeriksaanttcmmtbxdrxpert_pagifqlow' || komponen == 'hasilpemeriksaanttcmmtbxdrxpert_pagifq' || komponen == 'hasilpemeriksaanttcmmtbxdrxpert_pagiinvalid' || komponen == 'hasilpemeriksaanttcmmtbxdrxpert_pagiamk' || komponen == 'hasilpemeriksaanttcmmtbxdrxpert_pagikm' || komponen == 'hasilpemeriksaanttcmmtbxdrxpert_pagicm' || komponen == 'hasilpemeriksaanttcmmtbxdrxpert_pagieto' || komponen == 'hasilpemeriksaanttcmmtbxdrxpert_pagierror' || komponen == 'hasilpemeriksaanttcmmtbxdrxpert_paginoresult'){
				$('#hasilpemeriksaanttcmmtbxdrxpert_pagi').val(isi);
			} else if (komponen == 'hasilpemeriksaanttcmmtbxdrxpert_sewaktuneg' || komponen == 'hasilpemeriksaanttcmmtbxdrxpert_sewaktunhlow' || komponen == 'hasilpemeriksaanttcmmtbxdrxpert_sewaktuh' || komponen == 'hasilpemeriksaanttcmmtbxdrxpert_sewaktufqlow' || komponen == 'hasilpemeriksaanttcmmtbxdrxpert_sewaktufq' || komponen == 'hasilpemeriksaanttcmmtbxdrxpert_sewaktuinvalid' || komponen == 'hasilpemeriksaanttcmmtbxdrxpert_sewaktuamk' || komponen == 'hasilpemeriksaanttcmmtbxdrxpert_sewaktukm' || komponen == 'hasilpemeriksaanttcmmtbxdrxpert_sewaktucm' || komponen == 'hasilpemeriksaanttcmmtbxdrxpert_sewaktueto' || komponen == 'hasilpemeriksaanttcmmtbxdrxpert_sewaktuerror' || komponen == 'hasilpemeriksaanttcmmtbxdrxpert_sewaktunoresult'){
				$('#hasilpemeriksaanttcmmtbxdrxpert_sewaktu').val(isi);
			} else {
				var nofoto 		= document.getElementById('nofoto').value;
				var jenis 		= document.getElementById('template_jenis').value;
				var form_data 	= new FormData();
					form_data.append('nofoto', nofoto);
					form_data.append('komponen', komponen);
					form_data.append('jenis', jenis);
					form_data.append('isi', isi);
					form_data.append('keterangan', 'isikomponenjawaban');
					form_data.append('_token', '{{csrf_token()}}');
				$.ajax({
					url			: '{{ route("getResult") }}',
					data		: form_data,
					type		: 'POST',
					contentType	: false,
					processData	: false,
					success		: function (data) {
						if (komponen == 'vl_parameter01' && isi == 'TCM-RNA HIV'){
							$('#vl_satuan01').val('copies/mL');
							$('#vl_rujukan01').val('40-10.000.000');
							$('#vl_rujukan02').val('1,6-7');
						}
						if (komponen == 'vl_parameter01' && isi == 'TCM-HCV VL'){
							$('#vl_satuan01').val('IU/mL');
							$('#vl_rujukan01').val('10-100.000.000');
							$('#vl_rujukan02').val('&nbsp;');
						}
						if (komponen == 'vl_parameter02' && isi == 'LOG'){
							$('#vl_satuan02').val('LOG');
							$('#vl_rujukan01').val('10-100.000.000');
						}
						console.log(data);
						return false;
					},
					error: function (xhr, status, error) {
						var response 	= xhr.responseJSON || {};
						var traceText 	= response.trace ? JSON.stringify(response.trace) : null;
						console.log(traceText || xhr.responseText);
					}
				});
			}
		});
		$(".ekspertisecheckbox").on('change', function() {
			var komponen 	= $(this).attr('id');
			var isChecked 	= $(this).prop('checked');
			if (isChecked) {
				var isi 	= $(this).attr('value');
				if (komponen == 'inlineCheckbox16'){
					$('input[type="checkbox"].chekbox1216').prop('disabled', true);
				} else if (komponen == 'inlineCheckbox21'){
					$('input[type="checkbox"].chekbox1721').prop('disabled', true);
				} else if (komponen == 'inlineCheckbox23'){
					$('input[type="checkbox"].chekbox2226').prop('disabled', true);
				} else if (komponen == 'inlineCheckbox31'){
					$('input[type="checkbox"].chekbox2734').prop('disabled', true);
				} else if (komponen == 'inlineCheckbox39'){
					$('input[type="checkbox"].chekbox3539').prop('disabled', true);
				} else if (komponen == 'inlineCheckbox45'){
					$('input[type="checkbox"].chekbox4045').prop('disabled', true);
				} else if (komponen == 'inlineCheckbox46'){
					$('input[type="checkbox"].chekbox4652').prop('disabled', true);
				} else if (komponen == 'inlineCheckbox53'){
					$('input[type="checkbox"].chekbox5359').prop('disabled', true);
				} else {
					$('input[type="checkbox"]').prop('disabled', false);
				}
			} else {
				var isi 	= '';
			}
			if (komponen == 'inlineCheckbox12' || komponen == 'inlineCheckbox13' || komponen == 'inlineCheckbox14' || komponen == 'inlineCheckbox15' || komponen == 'inlineCheckbox16'){
				$('#hasilpemeriksaantbbiakan_mikroskopispagi').val(isi);
			}
			if (komponen == 'inlineCheckbox17' || komponen == 'inlineCheckbox18' || komponen == 'inlineCheckbox19' || komponen == 'inlineCheckbox20' || komponen == 'inlineCheckbox21'){
				$('#hasilpemeriksaantbbiakan_mikroskopisswaktu').val(isi);
			}
			if (komponen == 'inlineCheckbox35' || komponen == 'inlineCheckbox36' || komponen == 'inlineCheckbox37' || komponen == 'inlineCheckbox38' || komponen == 'inlineCheckbox39'){
				$('#hasilpemeriksaantbbiakan_mgitpagi').val(isi);
			}
			if (komponen == 'inlineCheckbox53' || komponen == 'inlineCheckbox54' || komponen == 'inlineCheckbox55' || komponen == 'inlineCheckbox56' || komponen == 'inlineCheckbox57' || komponen == 'inlineCheckbox58' || komponen == 'inlineCheckbox59'){
				$('#hasilpemeriksaanttcmmtbrifxpert_pagi').val(isi);
			}
			if (komponen == 'inlineCheckbox46' || komponen == 'inlineCheckbox47' || komponen == 'inlineCheckbox48' || komponen == 'inlineCheckbox49' || komponen == 'inlineCheckbox50' || komponen == 'inlineCheckbox51' || komponen == 'inlineCheckbox52'){
				$('#hasilpemeriksaanttcmmtbrifxpert_sewaktu').val(isi);
			}
			if (komponen == 'inlineCheckbox35' || komponen == 'inlineCheckbox36' || komponen == 'inlineCheckbox37' || komponen == 'inlineCheckbox38' || komponen == 'inlineCheckbox39'){
				$('#hasilpemeriksaantmikroskopis_mikroskopissewaktu').val(isi);
			}
			if (komponen == 'inlineCheckbox40' || komponen == 'inlineCheckbox41' || komponen == 'inlineCheckbox42' || komponen == 'inlineCheckbox43' || komponen == 'inlineCheckbox45'){
				$('#hasilpemeriksaantmikroskopis_mikroskopispagi').val(isi);
			}
			var nofoto 		= document.getElementById('nofoto').value;
			var jenis 		= document.getElementById('template_jenis').value;
			var form_data 	= new FormData();
				form_data.append('nofoto', nofoto);
				form_data.append('komponen', komponen);
				form_data.append('jenis', jenis);
				form_data.append('isi', isi);
				form_data.append('keterangan', 'isikomponenjawaban');
				form_data.append('_token', '{{csrf_token()}}');
			$.ajax({
				url			: '{{ route("getResult") }}',
				data		: form_data,
				type		: 'POST',
				contentType	: false,
				processData	: false,
				success		: function (data) {
					console.log(data);
					return false;
				},
				error: function (xhr, status, error) {
					var response 	= xhr.responseJSON || {};
					var traceText 	= response.trace ? JSON.stringify(response.trace) : null;
					console.log(traceText || xhr.responseText);
				}
			});
		});
		$("#id_mikroorganismeoptional").on('change', function() {
			var komponen 	= $(this).attr('id');
			var isi 		= $(this).val();
			var nofoto 		= document.getElementById('nofoto').value;
			var jenis 		= document.getElementById('template_jenis').value;
			if (!isi || isi.length === 0) {
				console.log("Tidak ada nilai yang dipilih.");
				return;
			}
			var form_data 	= new FormData();
				form_data.append('nofoto', nofoto);
				form_data.append('komponen', komponen);
				form_data.append('jenis', jenis);
				form_data.append('isi', JSON.stringify(isi));
				form_data.append('keterangan', 'isikomponenjawaban');
				form_data.append('_token', '{{csrf_token()}}');
			$.ajax({
				url			: '{{ route("getResult") }}',
				data		: form_data,
				type		: 'POST',
				contentType	: false,
				processData	: false,
				success		: function (data) {
					console.log(data);
					return false;
				},
				error: function (xhr, status, error) {
					var response 	= xhr.responseJSON || {};
					var traceText 	= response.trace ? JSON.stringify(response.trace) : null;
					console.log(traceText || xhr.responseText);
				}
			});
		});
		$("#id_biakankulturoptional").on('change', function() {
			var komponen 	= $(this).attr('id');
			var isi 		= $(this).val();
			var nofoto 		= document.getElementById('nofoto').value;
			var jenis 		= document.getElementById('template_jenis').value;
			if (!isi || isi.length === 0) {
				console.log("Tidak ada nilai yang dipilih.");
				return;
			}
			var form_data 	= new FormData();
				form_data.append('nofoto', nofoto);
				form_data.append('komponen', komponen);
				form_data.append('jenis', jenis);
				form_data.append('isi', JSON.stringify(isi));
				form_data.append('keterangan', 'isikomponenjawaban');
				form_data.append('_token', '{{csrf_token()}}');
			$.ajax({
				url			: '{{ route("getResult") }}',
				data		: form_data,
				type		: 'POST',
				contentType	: false,
				processData	: false,
				success		: function (data) {
					console.log(data);
					return false;
				},
				error: function (xhr, status, error) {
					var response 	= xhr.responseJSON || {};
					var traceText 	= response.trace ? JSON.stringify(response.trace) : null;
					console.log(traceText || xhr.responseText);
				}
			});
		});
		$("#lsg_mikroorganismeoptional").on('change', function() {
			var komponen 	= $(this).attr('id');
			var isi 		= $(this).val();
			var nofoto 		= document.getElementById('nofoto').value;
			var jenis 		= document.getElementById('template_jenis').value;
			if (!isi || isi.length === 0) {
				console.log("Tidak ada nilai yang dipilih.");
				return;
			}
			var form_data 	= new FormData();
				form_data.append('nofoto', nofoto);
				form_data.append('komponen', komponen);
				form_data.append('jenis', jenis);
				form_data.append('isi', JSON.stringify(isi));
				form_data.append('keterangan', 'isikomponenjawaban');
				form_data.append('_token', '{{csrf_token()}}');
			$.ajax({
				url			: '{{ route("getResult") }}',
				data		: form_data,
				type		: 'POST',
				contentType	: false,
				processData	: false,
				success		: function (data) {
					console.log(data);
					return false;
				},
				error: function (xhr, status, error) {
					var response 	= xhr.responseJSON || {};
					var traceText 	= response.trace ? JSON.stringify(response.trace) : null;
					console.log(traceText || xhr.responseText);
				}
			});
		});
		$("#id_mediabap").on('change', function() {
			var komponen 	= $(this).attr('id');
			var isi 		= $(this).val();
			var nofoto 		= document.getElementById('nofoto').value;
			var jenis 		= document.getElementById('template_jenis').value;
			if (!isi || isi.length === 0) {
				console.log("Tidak ada nilai yang dipilih.");
				return;
			}
			var form_data 	= new FormData();
				form_data.append('nofoto', nofoto);
				form_data.append('komponen', komponen);
				form_data.append('jenis', jenis);
				form_data.append('isi', JSON.stringify(isi));
				form_data.append('keterangan', 'isikomponenjawaban');
				form_data.append('_token', '{{csrf_token()}}');
			$.ajax({
				url			: '{{ route("getResult") }}',
				data		: form_data,
				type		: 'POST',
				contentType	: false,
				processData	: false,
				success		: function (data) {
					console.log(data);
					return false;
				},
				error: function (xhr, status, error) {
					var response 	= xhr.responseJSON || {};
					var traceText 	= response.trace ? JSON.stringify(response.trace) : null;
					console.log(traceText || xhr.responseText);
				}
			});
		});
		$("#id_mediamcconkey").on('change', function() {
			var komponen 	= $(this).attr('id');
			var isi 		= $(this).val();
			var nofoto 		= document.getElementById('nofoto').value;
			var jenis 		= document.getElementById('template_jenis').value;
			if (!isi || isi.length === 0) {
				console.log("Tidak ada nilai yang dipilih.");
				return;
			}
			var form_data 	= new FormData();
				form_data.append('nofoto', nofoto);
				form_data.append('komponen', komponen);
				form_data.append('jenis', jenis);
				form_data.append('isi', JSON.stringify(isi));
				form_data.append('keterangan', 'isikomponenjawaban');
				form_data.append('_token', '{{csrf_token()}}');
			$.ajax({
				url			: '{{ route("getResult") }}',
				data		: form_data,
				type		: 'POST',
				contentType	: false,
				processData	: false,
				success		: function (data) {
					console.log(data);
					return false;
				},
				error: function (xhr, status, error) {
					var response 	= xhr.responseJSON || {};
					var traceText 	= response.trace ? JSON.stringify(response.trace) : null;
					console.log(traceText || xhr.responseText);
				}
			});
		});
		$("#id_mediabap").on('change', function() {
			var komponen 	= $(this).attr('id');
			var isi 		= $(this).val();
			var nofoto 		= document.getElementById('nofoto').value;
			var jenis 		= document.getElementById('template_jenis').value;
			if (!isi || isi.length === 0) {
				console.log("Tidak ada nilai yang dipilih.");
				return;
			}
			var form_data 	= new FormData();
				form_data.append('nofoto', nofoto);
				form_data.append('komponen', komponen);
				form_data.append('jenis', jenis);
				form_data.append('isi', JSON.stringify(isi));
				form_data.append('keterangan', 'isikomponenjawaban');
				form_data.append('_token', '{{csrf_token()}}');
			$.ajax({
				url			: '{{ route("getResult") }}',
				data		: form_data,
				type		: 'POST',
				contentType	: false,
				processData	: false,
				success		: function (data) {
					console.log(data);
					return false;
				},
				error: function (xhr, status, error) {
					var response 	= xhr.responseJSON || {};
					var traceText 	= response.trace ? JSON.stringify(response.trace) : null;
					console.log(traceText || xhr.responseText);
				}
			});
		});
		CKEDITOR.instances['lsg_pewarnaanlain'].on('change', function() {
			var editorValue = CKEDITOR.instances['lsg_pewarnaanlain'].getData();
			var nofoto 		= document.getElementById('nofoto').value;
			var jenis 		= document.getElementById('template_jenis').value;
			var form_data 	= new FormData();
				form_data.append('nofoto', nofoto);
				form_data.append('komponen', 'lsg_pewarnaanlain');
				form_data.append('jenis', jenis);
				form_data.append('isi', editorValue);
				form_data.append('keterangan', 'isikomponenjawaban');
				form_data.append('_token', '{{csrf_token()}}');
			$.ajax({
				url			: '{{ route("getResult") }}',
				data		: form_data,
				type		: 'POST',
				contentType	: false,
				processData	: false,
				success		: function (data) {
					return false;
				},
				error: function (xhr, status, error) {
					var response 	= xhr.responseJSON || {};
					var traceText 	= response.trace ? JSON.stringify(response.trace) : null;
					console.log(traceText || xhr.responseText);
				}
			});
		});
		CKEDITOR.instances['lsg_ditemukanmorfologi'].on('change', function() {
			var editorValue = CKEDITOR.instances['lsg_ditemukanmorfologi'].getData();
			var nofoto 		= document.getElementById('nofoto').value;
			var jenis 		= document.getElementById('template_jenis').value;
			var form_data 	= new FormData();
				form_data.append('nofoto', nofoto);
				form_data.append('komponen', 'lsg_ditemukanmorfologi');
				form_data.append('jenis', jenis);
				form_data.append('isi', editorValue);
				form_data.append('keterangan', 'isikomponenjawaban');
				form_data.append('_token', '{{csrf_token()}}');
			$.ajax({
				url			: '{{ route("getResult") }}',
				data		: form_data,
				type		: 'POST',
				contentType	: false,
				processData	: false,
				success		: function (data) {
					return false;
				},
				error: function (xhr, status, error) {
					var response 	= xhr.responseJSON || {};
					var traceText 	= response.trace ? JSON.stringify(response.trace) : null;
					console.log(traceText || xhr.responseText);
				}
			});
		});
		CKEDITOR.instances['viralload'].on('change', function() {
			var editorValue = CKEDITOR.instances['viralload'].getData();
			var nofoto 		= document.getElementById('nofoto').value;
			var jenis 		= document.getElementById('template_jenis').value;
			var form_data 	= new FormData();
				form_data.append('nofoto', nofoto);
				form_data.append('komponen', 'viralload');
				form_data.append('jenis', jenis);
				form_data.append('isi', editorValue);
				form_data.append('keterangan', 'isikomponenjawaban');
				form_data.append('_token', '{{csrf_token()}}');
			$.ajax({
				url			: '{{ route("getResult") }}',
				data		: form_data,
				type		: 'POST',
				contentType	: false,
				processData	: false,
				success		: function (data) {
					return false;
				},
				error: function (xhr, status, error) {
					var response 	= xhr.responseJSON || {};
					var traceText 	= response.trace ? JSON.stringify(response.trace) : null;
					console.log(traceText || xhr.responseText);
				}
			});
		});
	});
</script>
@endpush
