示例#1
0
	<div class="btn-group-vertical pull-right">
		<a class="btn btn-primary" style="color:#FFFFFF;" href="<?php 
echo $this->createUrl('/medicalRecord/create/', array('patientId' => $patient->id));
?>
">
			<?php 
echo "建立就醫記錄";
?>
		</a>
	</div>

	<p>
	</p>

	<?php 
echo CHtml::link('進階搜尋', '#', array('class' => 'search-button btn'));
?>
	<div class="search-form" style="display:none">
		<?php 
$this->renderPartial('_medicalRecordSearch', array('patient' => $patient, 'doctors' => $doctors, 'medicalRecords' => $medicalRecords));
?>
	</div><!-- search-form -->

	<?php 
$this->widget('booster.widgets.TbGridView', array('id' => 'medical-record-grid', 'dataProvider' => $medicalRecords->search($patient->id), 'filter' => $medicalRecords, 'columns' => array(array('name' => 'id', 'htmlOptions' => array('width' => '5%')), array('name' => 'date', 'htmlOptions' => array('width' => '8%')), array('name' => 'purpose', 'htmlOptions' => array('width' => '20%'), 'value' => function ($medicalRecords) {
    return ViewHelper::truncate($medicalRecords->purpose, 30);
}), array('name' => 'next_back_to_clinic_date', 'htmlOptions' => array('width' => '8%')), array('name' => 'next_back_to_clinic_notes', 'htmlOptions' => array('width' => '20%'), 'value' => function ($medicalRecords) {
    return ViewHelper::truncate($medicalRecords->next_back_to_clinic_notes, 30);
}), array('class' => 'booster.widgets.TbButtonColumn', 'htmlOptions' => array('width' => '8%'), 'viewButtonUrl' => 'Yii::app()->createUrl("/medicalRecord/view",array("id"=>$data->primaryKey))', 'updateButtonUrl' => 'Yii::app()->createUrl("/medicalRecord/update",array("id"=>$data->primaryKey))', 'deleteButtonUrl' => 'Yii::app()->createUrl("/medicalRecord/delete",array("id"=>$data->primaryKey))'))));
?>
</div>
<div class="tab-pane" id="medicalRecords">

<?php 
Yii::app()->clientScript->registerScript('medicalRecordSearch', "\n    \$('#medicalRecords a.search-button').click(function(){\n        \$('#medicalRecords div.search-form').toggle();\n        \$('#medicalRecords div.search-form .form-group').addClass('has-warning');\n        return false;\n    });\n    \$('#medicalRecordAdvanceSearchForm').submit(function(){\n        \$.fn.yiiGridView.update('medical-record-grid', {\n            data: \$(this).serialize()\n        });\n        console.log('fn.yiiGridView.update');\n        return false;\n    });\n");
?>

<?php 
echo CHtml::link('進階搜尋', '#', array('class' => 'search-button btn'));
?>

<div class="search-form" style="display:none">
    <?php 
$this->renderPartial('_medicalRecordAdvanceSearch', array('medicalRecords' => $recentOutpatients));
?>
</div><!-- search-form -->

<?php 
$this->widget('booster.widgets.TbGridView', array('id' => 'medical-record-grid', 'type' => 'condensed', 'dataProvider' => $recentOutpatients->search(), 'filter' => $recentOutpatients, 'columns' => array(array('name' => 'id', 'htmlOptions' => array('width' => '5%')), array('name' => 'searchByPatient', 'htmlOptions' => array('width' => '8%'), 'value' => function ($recentOutpatients) {
    return $recentOutpatients->getPatientName();
}), array('name' => 'next_back_to_clinic_date', 'htmlOptions' => array('width' => '8%')), array('name' => 'date', 'htmlOptions' => array('width' => '8%')), array('name' => 'purpose', 'htmlOptions' => array('width' => '30%'), 'value' => function ($surgeryRecords) {
    return ViewHelper::truncate($surgeryRecords->purpose, 45);
}), array('class' => 'booster.widgets.TbButtonColumn', 'viewButtonUrl' => 'Yii::app()->createUrl("/medicalRecord/view",array("id"=>$data->primaryKey))', 'updateButtonUrl' => 'Yii::app()->createUrl("/medicalRecord/update",array("id"=>$data->primaryKey))', 'deleteButtonUrl' => 'Yii::app()->createUrl("/medicalRecord/delete",array("id"=>$data->primaryKey))'))));
?>

</div>
示例#3
0
?>
		</a>
	</div>

	<p>
	</p>

	<?php 
echo CHtml::link('進階搜尋', '#', array('class' => 'search-button btn'));
?>

	<div class="search-form" style="display:none">
		<?php 
$this->renderPartial('_surgeryRecordSearch', array('patient' => $patient, 'doctors' => $doctors, 'surgeryRecords' => $surgeryRecords));
?>
	</div><!-- search-form -->

	<?php 
/**
 * GridView 關聯搜尋可參考
 * @link http://www.yiiframework.com/wiki/281/searching-and-sorting-by-related-model-in-cgridview/
 */
$this->widget('booster.widgets.TbGridView', array('id' => 'surgery-record-grid', 'dataProvider' => $surgeryRecords->search($patient->id), 'filter' => $surgeryRecords, 'columns' => array(array('name' => 'id', 'htmlOptions' => array('width' => '5%')), array('name' => 'date', 'htmlOptions' => array('width' => '8%')), array('name' => 'surgical_methods', 'htmlOptions' => array('width' => '30%'), 'value' => function ($surgeryRecords) {
    return ViewHelper::truncate($surgeryRecords->surgical_methods, 50);
}), array('name' => 'searchByPlasticSurgeon', 'header' => '外科醫師', 'htmlOptions' => array('width' => '8%'), 'value' => function ($surgeryRecords) {
    return $surgeryRecords->getPlasticSurgeonName();
}), array('name' => 'searchByDentist', 'header' => '牙科醫師', 'htmlOptions' => array('width' => '8%'), 'value' => function ($surgeryRecords) {
    return $surgeryRecords->getDentistName();
}), array('class' => 'booster.widgets.TbButtonColumn', 'viewButtonUrl' => 'Yii::app()->createUrl("/surgeryRecord/view",array("id"=>$data->primaryKey))', 'updateButtonUrl' => 'Yii::app()->createUrl("/surgeryRecord/update",array("id"=>$data->primaryKey))', 'deleteButtonUrl' => 'Yii::app()->createUrl("/surgeryRecord/delete",array("id"=>$data->primaryKey))'))));
?>
</div>
示例#4
0
<?php

$this->breadcrumbs = array($patient->name => $this->createUrl('/patient/update/', array('id' => $patient->id)), ViewHelper::truncate($model->surgical_methods, 50) => array('update', 'id' => $model->id), '修改手術記錄');
?>

<h1>修改手術記錄: <?php 
echo $patient->name;
?>
</h1>

<?php 
echo $this->renderPartial('_form', array('model' => $model, 'patient' => $patient, 'doctors' => $doctors));
示例#5
0
<?php

$this->breadcrumbs = array($patient->name => $this->createUrl('/patient/update/', array('id' => $patient->id)), ViewHelper::truncate($model->purpose, 50) => array('update', 'id' => $model->id), '修改就醫記錄');
?>

<h1>修改就醫記錄: <?php 
echo $patient->name;
?>
</h1>

<?php 
echo $this->renderPartial('_form', array('model' => $model, 'patient' => $patient));