/**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer $id the ID of the model to be loaded
  * @return HistorialEvaluacionMedica the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = HistorialEvaluacionMedica::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Example #2
0


<!-- Historial de Evaluación Medica -->
<?php 
if ($Gevaluacion > 0) {
    ?>
<div id="Gevaluacion" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">Historial de Evaluación Médica</h3>
  </div>
  <div class="modal-body">
 	<!-- Evaluar politicas de cancelación -->
 	<?php 
    $Glasevaluaciones = HistorialEvaluacionMedica::model()->findAll("paciente_id = {$model->id}");
    foreach ($Glasevaluaciones as $Glas_evaluaciones) {
        $fecha = date('d-m-Y', strtotime($Glas_evaluaciones->fecha));
        $this->widget('zii.widgets.CDetailView', array('data' => $Glas_evaluaciones, 'attributes' => array(array('name' => 'fecha', 'value' => $fecha, ''), 'personal.nombreCompleto', 'evolucion')));
        echo "<hr>";
    }
    ?>
  </div>
  	
   <div class="modal-footer">
    <!-- <button class="btn" data-dismiss="modal" aria-hidden="true">Cerrar</button> -->
  </div>
</div>

<?php 
}
Example #3
0
} else {
    $elPaciente = "0";
}
if (isset($_GET['idCita'])) {
    $idCita = $_GET['idCita'];
} else {
    $idCita = "0";
}
$paciente = Paciente::model()->find("id={$elPaciente}");
$tabla = HistorialTablaMedidas::model()->count("paciente_id = {$elPaciente}");
//Calculo de Edad
$anio_nacimiento = Yii::app()->dateformatter->format("yyyy", $paciente->fecha_nacimiento);
$edadpaciente = date("Y") - $anio_nacimiento;
//array('name'=>'Edad', 'value'=>$edadpaciente, ''),
$evolucion = "";
$elHistorial = HistorialEvaluacionMedica::model()->findAll("paciente_id={$elPaciente}");
foreach ($elHistorial as $el_historial) {
    $evolucion = $evolucion . date('d-m-Y', strtotime($el_historial->fecha)) . "<br>" . $el_historial->personal->nombreCompleto . "<br>---------------<br>" . $el_historial->evolucion . "<br><br>";
}
//IMC mas reciente
$cImc = HistorialExamenFisico::model()->count("paciente_id = {$elPaciente}");
$elImc = HistorialExamenFisico::model()->find("paciente_id = {$elPaciente}");
if ($cImc > 0) {
    $otroImc = $elImc->imc;
} else {
    $otroImc = 0;
}
?>

	<div class="row">
		<h4 class="text-center">Datos de Paciente</h4>