?> <!-- Historial de Diagnostico Clínico --> <?php if ($Gdiagnostico > 0) { ?> <div id="Gdiagnostico" 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 Diagnostico Clínico</h3> </div> <div class="modal-body"> <!-- Evaluar politicas de cancelación --> <?php $Geldiagnostico = HistorialDiagnostico::model()->findAll("paciente_id = {$model->paciente_id}"); foreach ($Geldiagnostico as $Gel_diagnostico) { ?> <?php $this->widget('zii.widgets.CDetailView', array('data' => $Gel_diagnostico, 'attributes' => array(array('name' => 'fecha', 'value' => Yii::app()->dateformatter->format("dd-MM-yyyy", $Gel_diagnostico->fecha), ''), 'observaciones'))); ?> <table class="table table-striped"> <tr> <th>Diagnotico</th> <th>Tipo</th> <th>Observaciones</th> </tr> <?php $GlosDiagnosticos = HistorialDiagnosticoDetalle::model()->findAll("historial_diagnostico_id = {$Gel_diagnostico->id}"); foreach ($GlosDiagnosticos as $Glos_diagnosticos) {
?> <?php if ($diagnostico > 0) { ?> <div class="tab-pane" id="diagnostico"> <h5>Historial de Diagnostico Clínico</h5> <table class="table table-condensed"> <tr> <th>Fecha</th> <th>Responsable</th> <th></th> </tr> <?php $losDiagnosticos = HistorialDiagnostico::model()->findAll("paciente_id = {$model->id}"); foreach ($losDiagnosticos as $los_diagnosticos) { ?> <tr> <td><?php echo Yii::app()->dateformatter->format("dd-MM-yyyy", $los_diagnosticos->fecha); ?> </td> <td><?php echo $los_diagnosticos->personal->nombreCompleto; ?> </td> <td><a href="index.php?r=historialDiagnostico/view&id=<?php echo $los_diagnosticos->id; ?> " class="btn btn-mini btn-info"><i class="icon-search icon-white"></i></a></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 HistorialDiagnostico the loaded model * @throws CHttpException */ public function loadModel($id) { $model = HistorialDiagnostico::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }