Ejemplo n.º 1
0
	                <?php 
if ($evaluacionEnfermeria > 0) {
    ?>
		                <div class="tab-pane" id="evaluacionEnfermeria">
		                	<h5>Historial de Evolución de Enfermería</h5>
		                	<table class="table table-condensed">
		                		<tr>
		                			<th>Fecha</th>
		                			<th>Responsable</th>
		                			<th>Evolución</th>
		                			<th></th>
		                		</tr>
		                
		                	<?php 
    $lasEnfermeria = HistorialEvaluacionEnfermeria::model()->findAll("paciente_id = {$model->id}");
    foreach ($lasEnfermeria as $las_enfermeria) {
        ?>
						 			<tr>
						 				<td><?php 
        echo Yii::app()->dateformatter->format("dd-MM-yyyy", $las_enfermeria->fecha);
        ?>
</td>
						 				<td><?php 
        echo $las_enfermeria->personal->nombreCompleto;
        ?>
</td>
						 				<td><?php 
        echo $las_enfermeria->evaluacion;
        ?>
</td>
 /**
  * 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 HistorialEvaluacionEnfermeria the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = HistorialEvaluacionEnfermeria::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Ejemplo n.º 3
0
    $elPaciente = $_GET['idPaciente'];
} else {
    $elPaciente = "0";
}
if (isset($_GET['idCita'])) {
    $idCita = $_GET['idCita'];
} else {
    $idCita = "0";
}
$paciente = Paciente::model()->find("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, ''),
$evaluacion = "";
$elHistorial = HistorialEvaluacionEnfermeria::model()->findAll("paciente_id={$elPaciente}");
foreach ($elHistorial as $el_historial) {
    $evaluacion = $evaluacion . date('d-m-Y', strtotime($el_historial->fecha)) . "<br>" . $el_historial->personal->nombreCompleto . "<br>---------------<br>" . $el_historial->evaluacion . "<br><br>";
}
?>

	<div class="row">
		<h4 class="text-center">Datos de Paciente</h4>
		<div class="span5">
			<?php 
$this->widget('zii.widgets.CDetailView', array('data' => $paciente, 'attributes' => array('nombreCompleto', 'n_identificacion', array('name' => 'Edad', 'value' => $edadpaciente, ''))));
?>
		</div>
		<div class="span5">
			<?php 
$this->widget('zii.widgets.CDetailView', array('data' => $paciente, 'attributes' => array('email', 'telefono1', 'celular')));