public function getAmpurs() { return $this->hasOne(Campur::className(), ['ampurcodefull' => 'amphur']); }
?> </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>
<div class='well'> <form method="POST"> ระหว่างวันที่: <div class="row"> <div class="col-xs-4 col-sm-4 col-md-5"> <?php echo yii\jui\DatePicker::widget(['name' => 'date1', 'value' => $date1, 'language' => 'th', 'dateFormat' => 'yyyy-MM-dd', 'clientOptions' => ['changeMonth' => true, 'changeYear' => true], 'options' => ['class' => 'form-control']]); ?> ถึงวันที่: <?php echo yii\jui\DatePicker::widget(['name' => 'date2', 'value' => $date2, 'language' => 'th', 'dateFormat' => 'yyyy-MM-dd', 'clientOptions' => ['changeMonth' => true, 'changeYear' => true], 'options' => ['class' => 'form-control']]); ?> </div> <div class="col-xs-4 col-sm-4 col-md-4"> <?php $list = ArrayHelper::map(Campur::find()->all(), 'ampurname', 'ampurname'); echo Select2::widget(['name' => 'ampurname', 'data' => $list, 'value' => $ampurname, 'size' => Select2::MEDIUM, 'options' => ['placeholder' => 'เลือก อำเภอ...'], 'pluginOptions' => ['allowClear' => true]]); ?> </div> <div class="col-xs-4 col-sm-4 col-md-2"> <button class='btn btn-danger'>ประมวลผล</button> </div> </div> </form> </div>
</div> </div> <div class="row"> <div class="col-xs-4 col-sm-4 col-md-3"> <?php echo $form->field($model, 'address')->textInput(['maxlength' => true]); ?> </div> <div class="col-xs-4 col-sm-4 col-md-3"> <?php echo $form->field($model, 'village')->textInput(['maxlength' => true]); ?> </div> <div class="col-xs-4 col-sm-4 col-md-3"> <?php echo $form->field($model, 'amphur')->widget(Select2::className(), ['data' => ArrayHelper::map(Campur::find()->orderBy('ampurname')->all(), 'ampurcodefull', 'ampurname'), 'options' => ['id' => 'ddl-ampur', 'placeholder' => '<--คลิกเลือกอำเภอ-->'], 'pluginOptions' => ['allowClear' => true]]); ?> </div> <div class="col-xs-4 col-sm-4 col-md-3"> <?php echo $form->field($model, 'tambon')->widget(DepDrop::className(), ['data' => $tambon, 'options' => ['id' => 'ddl-tambon', 'placeholder' => '<--คลิกเลือกหรือพิมพ์ชื่อตำบล-->'], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['ddl-ampur'], 'url' => Url::to(['/patient/get-tambon']), 'loadingText' => 'Loading1...']]); ?> </div> </div> <hr/> <div class="page-header-line"> <h3><label class="label label-danger">ข้อมูลเข้ารับการรักษาพยาบาล</label></h3> </div>