<?php
$this->load->helper("url");
$d=array("tituloApp"=>"Nuevo Paciente","menu"=>"");

/*$this->load->library("parser");
$this->load->view("html/page/v2/header");
$this->load->view("html/page/v2/bar");
$this->load->view("html/page/v2/navigation");*/

$this->parser->parse("html/page/v2/header",$d);
$this->parser->parse("html/page/v2/bar",$d);
//$parse["menu"]=$this->load->view("html/page/v2/php/menuVenta",$d,true);
$parse["menu"]=$this->load->view("html/page/v2/php/menuHClinica",$d,true);
$parse["tituloApp"]=!isset($tituloApp)?$d["tituloApp"]:$tituloApp;
//$parse["tituloApp"]=$arr["tituloApp"];
$this->parser->parse("html/page/v2/navigation",$parse);

//$parse["body"]=$this->load->view("hclinica/form/paciente/formPaciente",$data,true);
//$this->parser->parse("hclinica/ejemplo1",$parse);

$input=array("name"=>"","id"=>"","value"=>"","class"=>"form-control form-control-sm","placeholder"=>"");
//print_r($data);
$nombreTmp=isset($_SESSION["nombreTmp"])?$_SESSION["nombreTmp"]:"";
?>
<div class="row">
	<div class="col-md-12">
		<div class="box box-primary">
			<?php echo form_open("pacientes/paciente/guardarPaciente",array("id"=>"formPaciente"))?>
    		<!-- <form action="/share/ajax/catalogo/ajaxFormCliente" method="post" id="formCliente" class="">  --><!-- d-block para mostrar -->
    	  	<div class="box-header">
				<button type="button" id="btnBackPacientes" class="btn btn-primary"><i class="fa fa-user fa-lg">&nbsp;</i>Ver Pacientes</button>
    		</div>
    	  	<div class="box-body">
    	  		<div class="row">
             	<div class="col-lg-6">
        			<div class="row">
        				<div class="form-group col-lg-6">
            				<?php 
            				echo form_label("Codigo / Ficha","codigo",array("class"=>"control-label"));
            				$codTxt=array("name"=>"codigo","id"=>"codigo","value"=>$codigo,"class"=>"form-control form-control-sm","placeholder"=>"Ingrese Código / Ficha");
            				echo form_input($codTxt);
            				?>			
            			</div>
            			<div class="form-group col-lg-6">
            				<?php 
            				echo form_label("CURP","curp",array("class"=>"control-label"));
            				$curpTxt=array("name"=>"curp","id"=>"curp","value"=>$curp,"class"=>"form-control form-control-sm","placeholder"=>"Ingrese CURP");
            				echo form_input($curpTxt);
            				?>			
            			</div>
        			</div>
        			<div class="form-group">
        				<?php 
        				echo form_label("RFC","rfc",array("class"=>"control-label"));
        				$rfc=array("name"=>"rfc","id"=>"rfc","value"=>$rfc,"class"=>"form-control form-control-sm","placeholder"=>"Ingrese RFC");
        				echo form_input($rfc);
        				?>
        			</div>
        			<div class="form-group">
        				<?php 
        				echo form_label("Nombre(s)","nombre",array("class"=>"control-label"));
        				$nombreTxt=array("name"=>"nombre","id"=>"nombre","value"=>$nombre,"class"=>"form-control form-control-sm","placeholder"=>"Ingrese Nombre");
        				echo form_input($nombreTxt);
        				?>
        			</div>
        			<div class="row">
        				<div class="form-group col-lg-6 col-md-6">
            				<?php 
            				echo form_label("Apellido Paterno","appat",array("class"=>"control-label"));
            				$appat=array("name"=>"appat","id"=>"appat","value"=>$appat,"class"=>"form-control form-control-sm","placeholder"=>"Apellido Paterno");
            				echo form_input($appat);
            				?>
            			</div>
            			<div class="form-group col-lg-6 col-md-6">
            				<?php 
            				echo form_label("Apellido Materno","apmat",array("class"=>"control-label"));
            				$apmat=array("name"=>"apmat","id"=>"apmat","value"=>$apmat,"class"=>"form-control form-control-sm","placeholder"=>"Apellido Materno");
            				echo form_input($apmat);
            				?>
            			</div>
        			</div>
        			<div class="form-group">
        				<?php 
        				echo form_label("Genero","genero",array("class"=>"control-label"));
        				//$genero=array("name"=>"genero","id"=>"genero","value"=>"","class"=>"form-control form-control-sm","placeholder"=>"");
        				//echo form_input($genero);
        				$extra=array("id"=>"genero","class"=>"form-control");
        				$g=array("M"=>"Masculino","F"=>"Femenino");
        				echo form_dropdown("genero",$g,$genero,$extra);
        				?>
        			</div>
        			<div class="form-group">
        				<?php 
        				echo form_label("Fecha de Nacimiento","fechaNacimiento",array("class"=>"control-label"));
        				$fechaNacimiento=array("name"=>"fechaNacimiento","id"=>"fechaNacimiento","type"=>"text","value"=>$fechaNacimiento,"class"=>"form-control form-control-sm pull-right","placeholder"=>"Fecha de Nacimiento");
        				//echo form_input($fechaNacimiento);
        				?>
        				<div class="input-group date">
                  			<div class="input-group-addon">
                    		<i class="fa fa-calendar"></i>
                  		</div>
                  		<?php echo form_input($fechaNacimiento);?>
                		</div>
        			</div>
        			<div class="form-group">
        				<?php 
        				echo form_label("Telefono(s) / Celular","telefono",array("class"=>"control-label"));
        				$tel=array("name"=>"telefono","id"=>"telefono","value"=>$telefono,"class"=>"form-control form-control-sm","placeholder"=>"");
        				echo form_input($tel);
        				?>
        			</div>		
        			<div class="form-group">
        				<?php 
        				echo form_label("Correo Electrónico","email",array("class"=>"control-label"));
        				$email=array("name"=>"email","id"=>"email","value"=>$email,"class"=>"form-control form-control-sm","placeholder"=>"Correo Electrónico");
        				echo form_input($email);
        				?>
        			</div>
        			<div class="form-group">
        				<?php 
        				echo form_label("Código Postal","codigoPostal",array("class"=>"control-label"));
        				$cp=array("name"=>"codigoPostal","id"=>"codigoPostal","value"=>$codigoPostal,"class"=>"form-control form-control-sm","placeholder"=>"Código Postal");
        				echo form_input($cp);
        				?>
        			</div>		
             	</div>
             	<div class="col-md-6">
             		<div class="form-group">
        				<?php 
        				echo form_label("Calle","calle",array("class"=>"control-label"));
        				$calle=array("name"=>"calle","id"=>"calle","value"=>$calle,"class"=>"form-control form-control-sm","placeholder"=>"Calle");
        				echo form_input($calle);
        				?>
        			</div>	
             		<div class="row">
             			<div class="form-group col-md-6">
        				<?php 
        				echo form_label("No. Exterior","noExt",array("class"=>"control-label"));
        				$noext=array("name"=>"noExt","id"=>"noExt","value"=>$noExt,"class"=>"form-control form-control-sm","placeholder"=>"No. Exterior");
        				echo form_input($noext);
        				?>
            			</div>	
            			<div class="form-group col-md-6">
            				<?php 
            				echo form_label("No. Interior","noInt",array("class"=>"control-label"));
            				$noint=array("name"=>"noInt","id"=>"noInt","value"=>$noInt,"class"=>"form-control form-control-sm","placeholder"=>"No. Interior");
            				echo form_input($noint);
            				?>
            			</div>
             		</div>
        			<div class="form-group">
        				<?php 
        				echo form_label("Colonia","colonia",array("class"=>"control-label"));
        				$colonia=array("name"=>"colonia","id"=>"colonia","value"=>$colonia,"class"=>"form-control form-control-sm","placeholder"=>"Colonia");
        				echo form_input($colonia);
        				?>
        				</div>	
        			<div class="form-group">
        				<?php 
        				echo form_label("Localidad","localidad",array("class"=>"control-label"));
        				$loc=array("name"=>"localidad","id"=>"localidad","value"=>$localidad,"class"=>"form-control form-control-sm","placeholder"=>"Localidad");
        				echo form_input($loc);
        				?>
        			</div>
        			<div class="row">
        				<div class="form-group col-md-6">
        				<?php 
        				echo form_label("Municipio","municipio",array("class"=>"control-label"));
        				$municipio=array("name"=>"municipio","id"=>"municipio","value"=>$municipio,"class"=>"form-control form-control-sm","placeholder"=>"Municipio");
        				echo form_input($municipio);
        				?>
        				</div>
        				<div class="form-group col-md-6">
        				<?php 
        				echo form_label("Estado","estado",array("class"=>"control-label"));
        				$estado=array("name"=>"estado","id"=>"estado","value"=>$estado,"class"=>"form-control form-control-sm","placeholder"=>"Estado");
        				echo form_input($estado);
        				?>
        				</div>
        			</div>
        			<div class="form-group">
        				<?php 
        				echo form_label("Referencias","referencia",array("class"=>"control-label"));
        				$data_textarea = array(
        				    'name' => 'referencia',
        				    'rows' => 2,
        				    "class"=>"form-control form-control-sm",
        				    "value"=>$referencia
        				);
        				echo form_textarea($data_textarea);
        				?>
        			</div>
        			<div class="form-group">
        				<?php 
        				echo form_label("Comentarios","comentario",array("class"=>"control-label"));
        				$data_textarea = array(
        				    'name' => 'comentario',
        				    'rows' => 2,
        				    "class"=>"form-control form-control-sm",
        				    "value"=>$comentario
        				);
        				echo form_textarea($data_textarea);
        				?>
        			</div>
        			<!--
        			<div class="form-group">
        				<label class="control-label" for="">País</label>
						<input type="text" class="form-control form-control-sm">
        			</div> -->                         			
        			<?php
        			$hidden=array("idPaciente"=>$idPaciente);
        			echo form_hidden($hidden);
        			$hiddenPersona=array("idPersona"=>$idPersona);
        			echo form_hidden($hiddenPersona);
        			$hiddenDomicilio=array("idDomicilio"=>$idDomicilio);
        			echo form_hidden($hiddenDomicilio);
        			?>
             	</div>  
             </div>  
        </div> 
     	<div class="box-footer">
			<?php 
     			//$btnPaciente=array("id"=>"btnPaciente","class"=>"btn btn-primary","value"=>"Guardar Paciente");
     			//echo form_submit($btnPaciente);
     			?>
              	<button type="submit" id="btnCliente" class="btn btn-primary">Guardar Paciente</button>
              	<!--<button type="button" class="btn btn-warning" id="btnBorrar">Borrar</button>-->
		        <button type="button" id="btnSalir" class="btn btn-danger">Salir</button>
         </div>                            	
    	  <?php 
    	  echo form_close();
    	  //</form>
    	  ?>
		</div> <!-- fin box-body -->
	</div> <!-- fin box-default -->
</div>
<?php
$this->load->view("html/page/v2/prefooter");?>
<script src="<?php echo base_url()?>assets/js/paciente/formPaciente.js"></script>
<?php
$this->load->view("html/page/v2/footer");