患者端保存信息

This commit is contained in:
2025-01-06 17:40:03 +08:00
parent e18bb2e0fc
commit beaba99449

View File

@@ -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;