<?php //Detalles $numFormulacion = $_GET['id']; $laFormulacion = HistorialFormulacion::model()->findByPk($numFormulacion); $detalleFormulacion = HistorialFormulacionDetalle::model()->findAll("historial_formulacion_id = {$numFormulacion}"); ?> <style type="text/css"> #parrafo{ padding: 0px 50px 0px 0px } #cuerpo{ font-size: 70%; } </style> <div id="cuerpo" style="background-image: url(images/m_horizontal_presupuesto.jpg); background-repeat: no-repeat; height:100%; width:100%; padding:0px 0px 0px 50px;"> <!-- <div style="height:175px"></div> --> <div style="padding:150px 0px 0px 0px;"> <h4>Formulaciones</h4> <p id="parrafo">Paciente: <?php echo "<b>" . $laFormulacion->paciente->nombreCompleto . "</b>"; ?> </p> <p id="parrafo">Medico: <?php echo "<b>" . $laFormulacion->personal->nombreCompleto . "</b>"; ?> </p>
?> <!-- Historial de Formulaciones --> <?php if ($Gformulacion > 0) { ?> <div id="Gformulacion" 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 Formulaciones</h3> </div> <div class="modal-body"> <!-- Evaluar politicas de cancelación --> <?php $Glaformulacion = HistorialFormulacion::model()->findAll("paciente_id = {$model->id}"); foreach ($Glaformulacion as $Gla_formulacion) { echo "<b>Fecha: </b><span class='label label-info'>" . Yii::app()->dateformatter->format("yyyy-MM-dd", $Gla_formulacion->fecha) . "</span>"; ?> <table class="table table-striped"> <tr> <th>Formula</th> <th>Formulación</th> </tr> <?php $GlasFormulas = HistorialFormulacionDetalle::model()->findAll("historial_formulacion_id = {$Gla_formulacion->id}"); foreach ($GlasFormulas as $Glas_formulas) { ?> <tr> <?php
/** * 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 HistorialFormulacion the loaded model * @throws CHttpException */ public function loadModel($id) { $model = HistorialFormulacion::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }