Beispiel #1
0
?>
    </p>
    
    <?php 
Modal::begin(['header' => '<h4>บันทึกข้อมูลผู้ป่วย STROKE</h4>', 'id' => 'modal2', 'size' => 'modal-lg', 'options' => ['tabindex' => false]]);
echo "<div id='modalContent2'></div>";
Modal::end();
?>
 

    <?php 
Pjax::begin(['id' => 'stoke-gridview']);
?>
 
    <?php 
echo \kartik\grid\GridView::widget(['dataProvider' => $dataProvider, 'formatter' => ['class' => 'yii\\i18n\\Formatter', 'nullDisplay' => '-'], 'filterModel' => $searchModel, 'responsive' => TRUE, 'hover' => true, 'panel' => ['before' => '', 'type' => \kartik\grid\GridView::TYPE_SUCCESS], 'columns' => [['class' => 'kartik\\grid\\SerialColumn'], ['attribute' => 'name', 'width' => '180px', 'headerOptions' => ['class' => 'text-center']], ['label' => 'อายุ(ปี)', 'attribute' => 'age', 'headerOptions' => ['class' => 'text-center'], 'contentOptions' => ['class' => 'text-center']], ['label' => 'บ้านเลขที่', 'attribute' => 'village', 'headerOptions' => ['class' => 'text-center'], 'contentOptions' => ['class' => 'text-center']], ['label' => 'หมู่ที่', 'attribute' => 'address', 'headerOptions' => ['class' => 'text-center'], 'contentOptions' => ['class' => 'text-center']], ['attribute' => 'tambon', 'value' => 'tambons.tambonname', 'filter' => ArrayHelper::map(\frontend\models\Ctambon::find()->orderBy('tambonname')->asArray()->all(), 'tambonname', 'tambonname'), 'vAlign' => 'middle', 'width' => '140px', 'filterType' => GridView::FILTER_SELECT2, 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'headerOptions' => ['class' => 'text-center'], 'filterInputOptions' => ['placeholder' => 'เลือก ตำบล']], ['attribute' => 'amphur', 'value' => 'ampurs.ampurname', 'filter' => ArrayHelper::map(\frontend\models\Campur::find()->orderBy('ampurname')->asArray()->all(), 'ampurname', 'ampurname'), 'vAlign' => 'middle', 'width' => '160px', 'filterType' => GridView::FILTER_SELECT2, 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'headerOptions' => ['class' => 'text-center'], 'filterInputOptions' => ['placeholder' => 'เลือก อำเภอ']], ['attribute' => 'pdx', 'value' => 'pdx', 'filter' => ArrayHelper::map(\frontend\models\Cdisease::find()->asArray()->all(), 'diagcode', 'diagcode'), 'vAlign' => 'middle', 'width' => '200px', 'filterType' => GridView::FILTER_SELECT2, 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'headerOptions' => ['class' => 'text-center'], 'contentOptions' => ['class' => 'text-center'], 'filterInputOptions' => ['placeholder' => 'เลือก โรค']], ['attribute' => 'hospcode', 'value' => 'hospcodes.hospname', 'filter' => ArrayHelper::map(\frontend\models\Chospital::find()->orderBy('hospcode')->asArray()->all(), 'hospname', 'hospname'), 'vAlign' => 'middle', 'width' => '200px', 'filterType' => GridView::FILTER_SELECT2, 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'headerOptions' => ['class' => 'text-center'], 'filterInputOptions' => ['placeholder' => 'เลือก สถานพยาบาล']], ['attribute' => 'discharge_type', 'value' => 'discharge.discharge_name', 'filter' => ArrayHelper::map(\frontend\models\Cdischarcetype::find()->orderBy('discharge_id')->asArray()->all(), 'discharge_name', 'discharge_name'), 'vAlign' => 'middle', 'width' => '100px', 'filterType' => GridView::FILTER_SELECT2, 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'headerOptions' => ['class' => 'text-center'], 'filterInputOptions' => ['placeholder' => 'เลือก การจำหน่าย']], ['attribute' => 'sex', 'filter' => Patient::$sexs, 'value' => function ($data) {
    return Patient::$sexs[$data->sex];
}], ['class' => 'yii\\grid\\ActionColumn', 'options' => ['style' => 'width:120px;'], 'template' => '<div class="btn-group btn-group-sm" role="group" aria-label="...">{view}{update}</div>', 'buttons' => ['view' => function ($url, $model, $key) {
    return Html::a('<i class="glyphicon glyphicon-eye-open"></i>', $url, ['class' => 'btn btn-default']);
}, 'update' => function ($url, $model, $key) {
    return Html::a('<i class="glyphicon glyphicon-pencil"></i>', $url, ['class' => 'btn btn-default']);
}]]]]);
?>
  

<?php 
Pjax::end();
?>

</div>
Beispiel #2
0
 public function getDischarge()
 {
     return $this->hasOne(Cdischarcetype::className(), ['discharge_id' => 'discharge_type']);
 }
Beispiel #3
0
            <div class="col-xs-4 col-sm-4 col-md-4">            
                <?php 
echo $form->field($model, 'date_discharge')->widget(\yii\jui\DatePicker::classname(), ['language' => 'th', 'dateFormat' => 'yyyy-MM-dd', 'clientOptions' => ['changeMonth' => true, 'changeYear' => true], 'options' => ['class' => 'form-control']]);
?>
        </div>
            </div>
                <div class="row">
                    <div class="col-xs-4 col-sm-4 col-md-2">
            <?php 
echo $form->field($model, 'admit_day')->textInput();
?>
        </div>
            
            <div class="col-xs-4 col-sm-4 col-md-3">             
            <?php 
echo $form->field($model, 'discharge_type')->widget(Select2::className(), ['data' => ArrayHelper::map(Cdischarcetype::find()->orderBy('discharge_id')->all(), 'discharge_id', 'discharge_name'), 'options' => ['placeholder' => '<--การจำหน่าย-->'], 'pluginOptions' => ['allowClear' => true]]);
?>
        </div>  
            <div class="col-xs-9 col-sm-9 col-md-7">   
               
           <?php 
echo $form->field($model, 'pdx')->widget(Select2::className(), ['data' => ArrayHelper::map(Cdisease::find()->orderBy('disease')->all(), 'diagcode', function ($model, $defaultValue) {
    return $model->diagcode . '-' . $model->disease;
}), 'options' => ['placeholder' => '<--คลิกเลือกชื่อโรค-->'], 'pluginOptions' => ['allowClear' => true]]);
?>
        </div>
</div>
         
         <div class="row">
        <div class="col-xs-9 col-sm-9 col-md-12">
           <?php