Esempio n. 1
0
  </div>
</div>


<!-- Historial de Resultados de Laboratorio -->
<?php 
if ($Gresultados > 0) {
    ?>
<div id="Gresultados" 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 Resultados de Laboratorio</h3>
  </div>
  <div class="modal-body">
 	<?php 
    $GlosResultados = PacienteResultadosLab::model()->findAll("paciente_id = {$model->paciente_id}");
    foreach ($GlosResultados as $Glos_resultados) {
        $this->widget('zii.widgets.CDetailView', array('data' => $Glos_resultados, 'attributes' => array(array('name' => 'fecha', 'value' => Yii::app()->dateformatter->format("dd-MM-yyyy", $Glos_resultados->fecha), ''), 'comentario')));
        ?>
 	
 	<table class="table" width="100%">
		<tr>
			<th><small>Archivos</small></th>
		</tr>
		<?php 
        $losArchivos = PacienteResultadosLabDetalle::model()->findAll("paciente_resultados_lab_id = {$Glos_resultados->id}");
        foreach ($losArchivos as $los_archivos) {
            ?>
			<tr>
				<td>
					<center>
Esempio n. 2
0
	                <?php 
if ($archivoExamenes > 0) {
    ?>
		                <div class="tab-pane" id="archivoExamenes">
		                	<h5>Historial de Resultados de Examenes</h5>
		                	<table class="table table-condensed">
		                		<tr>
		                			<th>Fecha</th>
		                			<th>Descripción</th>
		                			<th>Examenes</th>
		                			<th></th>
		                		</tr>
		                
		                	<?php 
    $losArchivosExamenes = PacienteResultadosLab::model()->findAll("paciente_id = {$model->id}");
    foreach ($losArchivosExamenes as $los_archivos_examenes) {
        $nArchivos = PacienteResultadosLabDetalle::model()->count("paciente_resultados_lab_id = {$los_archivos_examenes->id}");
        ?>
						 			<tr>
						 				<td><?php 
        echo Yii::app()->dateformatter->format("dd-MM-yyyy", $los_archivos_examenes->fecha);
        ?>
</td>
						 				<td><?php 
        echo $los_archivos_examenes->descripcion;
        ?>
</td>
						 				<td><?php 
        echo $nArchivos;
        ?>
 /**
  * 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 PacienteResultadosLab the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = PacienteResultadosLab::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }