@extends('layouts.default')
@section('content')
<script type="text/javascript">
		$(document).ready(function(){
			$("input:radio[type='radio']").attr("disabled",true);
			
		}
	</script>
	<h3><strong>Nivel:</strong> Establecimientos - Detalle</h3>
	<div class="col-md-6">
		<table class="table table-hover table-condensed">
			<thead>
		      <tr>
		      	<td>#</td>
		        <th>Pregunta</th>
		        <th>Rojo</th>
		        <th>Verde</th>
		      </tr>
		    </thead>
		    <tbody>
		    	@foreach($data as $row)
		    	<?php 
		    		$pidestablec = $row->idestablec;
		    		$data = DB::select("CALL sp_r_ruta_establecimiento(" . $pidestablec . ");");
        		?>
        		
        		<h5>{{$data[0]->descestab}}</h5>
				<div class="col-md-4 col-md-offset-10">
		   		<a href="{{ URL::to('encuestas/grabar/' . $row->idestablec) }}" class="btn btn-info btn-sm" role="button">Modificar encuesta</a>
		    	</div>
		    	<tr>
		    		<td>1</td>
		    		<td >CATEGORIZACIÓN: Tiene vigente su resolución colgada en el RENIPRESS</td>
		    		{{-- <td>{{$row->pregunta1}}</td> --}}
		    		<td class="td_rojo"    ><input type="radio" id="opt1_1" name="opt1" class="custom-control-input" {{$row->pregunta1===0?"checked":""}} disabled></td>
		    		<td class="td_verde"   ><input type="radio" id="opt1_3" name="opt1" class="custom-control-input" {{$row->pregunta1===1?"checked":""}} disabled></td>
		    	</tr>
		    	<tr>
		    		<td>2</td>
		    		<td>AUTOEVALUACIÓN: Aplicó Guía de estándares de autoevaluación de su EESS</td>
		    		<td class="td_rojo"    ><input type="radio" id="opt2_1" name="opt2" class="custom-control-input" {{$row->pregunta2===0?"checked":""}} disabled></td>
		    		<td class="td_verde"   ><input type="radio" id="opt2_3" name="opt2" class="custom-control-input" {{$row->pregunta2===1?"checked":""}} disabled></td>
		    	</tr>
		    	<tr>
		    		<td>3</td>
		    		<td>CLIMA LABORAL: Aplicó cuestionario</td>
		    		<td class="td_rojo"    ><input type="radio" id="opt3_1" name="opt3" class="custom-control-input" {{$row->pregunta3===0?"checked":""}} disabled></td>
		    		<td class="td_verde"   ><input type="radio" id="opt3_3" name="opt3" class="custom-control-input" {{$row->pregunta3===1?"checked":""}} disabled></td>
		    	</tr>
		    	<tr>
		    		<td>4</td>
		    		<td>SATISFACCIÓN DEL USUARIO: Aplicó encuesta</td>
					<td class="td_rojo"    ><input type="radio" id="opt4_1" name="opt4" class="custom-control-input" {{$row->pregunta4===0?"checked":""}} disabled></td>
		    		<td class="td_verde"   ><input type="radio" id="opt4_3" name="opt4" class="custom-control-input" {{$row->pregunta4===1?"checked":""}} disabled></td>
		    	</tr>
		    	<tr>
		    		<td>5</td>
		    		<td>LIBRO DE RECLAMACIONES</td>
					<td class="td_rojo"    ><input type="radio" id="opt5_1" name="opt5" class="custom-control-input" {{$row->pregunta5===0?"checked":""}} disabled></td>
		    		<td class="td_verde"   ><input type="radio" id="opt5_3" name="opt5" class="custom-control-input" {{$row->pregunta5===1?"checked":""}} disabled></td>


		    	</tr>
		    	<tr>
		    		<td>6</td>
		    		<td>SIGA PATRIMONIO AL DIA</td>
					<td class="td_rojo"    ><input type="radio" id="opt6_1" name="opt6" class="custom-control-input" {{$row->pregunta6===0?"checked":""}} disabled></td>
		    		<td class="td_verde"   ><input type="radio" id="opt6_3" name="opt6" class="custom-control-input" {{$row->pregunta6===1?"checked":""}} disabled></td>
		    	</tr>
		    	<tr>
		    		<td>7</td>
		    		<td>CADENA DE FRIO OPERATIVA</td>
		    		<td class="td_rojo"    ><input type="radio" id="opt7_1" name="opt7" class="custom-control-input" {{$row->pregunta7===0?"checked":""}} disabled></td>
		    		<td class="td_verde"   ><input type="radio" id="opt7_3" name="opt7" class="custom-control-input" {{$row->pregunta7===1?"checked":""}} disabled></td>
		    	</tr>
		    	<tr>
		    		<td>8</td>
		    		<td>AMBULANCIA REGISTRADA, CLASIFICADA Y OPERATIVA</td>
		    		<td class="td_rojo"    ><input type="radio" id="opt8_1" name="opt8" class="custom-control-input" {{$row->pregunta8===0?"checked":""}} disabled></td>
		    		<td class="td_verde"   ><input type="radio" id="opt8_3" name="opt8" class="custom-control-input" {{$row->pregunta8===1?"checked":""}} disabled></td>
		    	</tr>
		    	<tr>
		    		<td>9</td>
		    		<td>TANQUE ELEVADO</td>
					<td class="td_rojo"    ><input type="radio" id="opt9_1" name="opt9" class="custom-control-input" {{$row->pregunta9===0?"checked":""}} disabled></td>
		    		<td class="td_verde"   ><input type="radio" id="opt9_3" name="opt9" class="custom-control-input" {{$row->pregunta9===1?"checked":""}} disabled></td>
		    	</tr>
		    	<tr>
		    		<td>10</td>
		    		<td>PANELES SOLARES Y/O GRUPO ELECTRÓGENO</td>
					<td class="td_rojo"    ><input type="radio" id="opt10_1" name="opt10" class="custom-control-input" {{$row->pregunta10===0?"checked":""}} disabled></td>
		    		<td class="td_verde"   ><input type="radio" id="opt10_3" name="opt10" class="custom-control-input" {{$row->pregunta10===1?"checked":""}} disabled></td>
		    	</tr>
		    	<tr>
		    		<td>11</td>
		    		<td>EXTINGIDOR (ES)</td>
					<td class="td_rojo"    ><input type="radio" id="opt11_1" name="opt11" class="custom-control-input" {{$row->pregunta11===0?"checked":""}} disabled></td>
		    		<td class="td_verde"   ><input type="radio" id="opt11_3" name="opt11" class="custom-control-input" {{$row->pregunta11===2?"checked":""}} disabled></td>
		    	</tr>
		    	<tr>
		    		<td>12</td>
		    		<td>SANEAMIENTO FISICO-LEGAL DEL TERRENO</td>
					<td class="td_rojo"    ><input type="radio" id="opt12_1" name="opt12" class="custom-control-input" {{$row->pregunta12===0?"checked":""}} disabled></td>
		    		<td class="td_verde"   ><input type="radio" id="opt12_3" name="opt12" class="custom-control-input" {{$row->pregunta12===1?"checked":""}} disabled></td>
		    	</tr>
		    	<tr>
		    		<td>13</td>
		    		<td>SEÑALÉTICA INTERNA</td>
					<td class="td_rojo"    ><input type="radio" id="opt13_1" name="opt13" class="custom-control-input" {{$row->pregunta13===0?"checked":""}} disabled></td>
		    		<td class="td_verde"   ><input type="radio" id="opt13_3" name="opt13" class="custom-control-input" {{$row->pregunta13===1?"checked":""}} disabled></td>
		    	</tr>
		    	<tr>
		    		<td>14</td>
		    		<td>SEÑALÉTICA EXTERNA</td>
					<td class="td_rojo"    ><input type="radio" id="opt14_1" name="opt14" class="custom-control-input" {{$row->pregunta14===0?"checked":""}} disabled></td>
		    		<td class="td_verde"   ><input type="radio" id="opt14_3" name="opt14" class="custom-control-input" {{$row->pregunta14===1?"checked":""}} disabled></td>
		    	</tr>
		    	<tr>
		    		<td>15</td>
		    		<td>ÁREA DE ALMACENAMIENTO INTERMEDIO DE LOS RESIDUOS BIOCONTAMINADOS</td>
					<td class="td_rojo"    ><input type="radio" id="opt15_1" name="opt15" class="custom-control-input" {{$row->pregunta15===0?"checked":""}} disabled></td>
		    		<td class="td_verde"   ><input type="radio" id="opt15_3" name="opt15" class="custom-control-input" {{$row->pregunta15===1?"checked":""}} disabled></td>
		    	</tr>
		    	<tr>
		    		<td>16</td>
		    		<td>VIGILANCIA DE AGUA SEGURA EN SU JURISDICCIÓN</td>
					<td class="td_rojo"    ><input type="radio" id="opt16_1" name="opt16" class="custom-control-input" {{$row->pregunta16===0?"checked":""}} disabled></td>
		    		<td class="td_verde"   ><input type="radio" id="opt16_3" name="opt16" class="custom-control-input" {{$row->pregunta16===1?"checked":""}} disabled></td>
		    	</tr>
		    	<tr>
		    		<td>17</td>
		    		<td>SECTORIZACIÓN Y RADARES INTEGRALES DE SALUD</td>
					<td class="td_rojo"    ><input type="radio" id="opt17_1" name="opt17" class="custom-control-input" {{$row->pregunta17===0?"checked":""}} disabled></td>
		    		<td class="td_verde"   ><input type="radio" id="opt17_3" name="opt17" class="custom-control-input" {{$row->pregunta17===1?"checked":""}} disabled></td>
		    	</tr>
		    	<tr>
		    		<td>18</td>
		    		<td>TELESALUD</td>
					<td class="td_rojo"    ><input type="radio" id="opt18_1" name="opt18" class="custom-control-input" {{$row->pregunta18===0?"checked":""}} disabled></td>
		    		<td class="td_verde"   ><input type="radio" id="opt18_3" name="opt18" class="custom-control-input" {{$row->pregunta18===1?"checked":""}} disabled></td>
		    	</tr>
		    	<tr>
		    		<td>19</td>
		    		<td>DISPONIBILIDAD DE MEDICAMENTOS POR DOS MESES</td>
					<td class="td_rojo"    ><input type="radio" id="opt19_1" name="opt19" class="custom-control-input" {{$row->pregunta19===0?"checked":""}} disabled></td>
		    		<td class="td_verde"   ><input type="radio" id="opt19_3" name="opt19" class="custom-control-input" {{$row->pregunta19===1?"checked":""}} disabled></td>
		    	</tr>
		    	<tr>
		    		<td>20</td>
		    		<td>COGESTIÓN: Cierres de gestión</td>
					<td class="td_rojo"    ><input type="radio" id="opt20_1" name="opt20" class="custom-control-input" {{$row->pregunta20===0?"checked":""}} disabled></td>
		    		<td class="td_verde"   ><input type="radio" id="opt20_3" name="opt20" class="custom-control-input" {{$row->pregunta20===1?"checked":""}} disabled></td>
		    	</tr>
		    	@endforeach
		    </tbody>
		</table>
	</div>
	
@stop