患者端保存信息
This commit is contained in:
@@ -67,6 +67,16 @@ class PatientController extends BaseAppController
|
||||
$this->requestValidate($post, [
|
||||
['up_id', 'required']
|
||||
]);
|
||||
if (!empty($post['id']?? '')) {
|
||||
$info = UserPatient::find()->where([
|
||||
'id' => $post['up_id'],
|
||||
'user_id' => \Yii::$app->user->identity->getId(),
|
||||
])->one();
|
||||
if (!$info) {
|
||||
throw new Exception('就诊人不存在');
|
||||
}
|
||||
$post['id_card'] = $info->id_card;
|
||||
}
|
||||
$form = new PatientForm();
|
||||
$form->attributes = $post;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user