瀏覽代碼

1、fixed:0018171: 【体检系统】【登记工作站】读卡识别身份证,在录入信息窗口中点击取消,仍自动弹出健康档案页面,体检记录创建成功

guanxinyi 11 月之前
父節點
當前提交
0c6d45e87a
共有 1 個文件被更改,包括 8 次插入5 次删除
  1. 8 5
      lib/pages/medical_checkup_station/registration/controller/form.dart

+ 8 - 5
lib/pages/medical_checkup_station/registration/controller/form.dart

@@ -163,7 +163,10 @@ class RegistrationFormController {
       RegistrationFormDialog(patient: patientInfo),
       barrierDismissible: false,
     );
-    if (patient != null && result != null) {
+    if (result == null) {
+      return null;
+    }
+    if (patient != null) {
       patient.cardNo = result.cardNo;
       patient.patientName = result.patientName;
       patient.patientGender = result.patientGender ?? GenderEnum.Unknown;
@@ -210,16 +213,16 @@ class RegistrationFormController {
           PatientDTO? currentPatient = await fillInIdentityInfo(patient);
           if (currentPatient != null) {
             patient = currentPatient;
+            await createResidentInList(
+              patient: patient,
+              isVital: isVital,
+            );
           } else {
             return;
           }
         }
       }
     }
-    await createResidentInList(
-      patient: patient,
-      isVital: isVital,
-    );
   }
 
   /// 提交数据给server 生成登记列表