|
@@ -14,6 +14,7 @@ import 'package:vitalapp/pages/controllers/home_nav_mixin.dart';
|
|
|
import 'package:vitalapp/pages/patient/bluetooth_card_reader/view.dart';
|
|
|
import 'package:vitalapp/pages/patient/card_reader/index.dart';
|
|
|
import 'package:vitalapp/pages/patient/create/state.dart';
|
|
|
+import 'package:vitalapp/pages/patient/create/widgets/face_result_dialog.dart';
|
|
|
import 'package:vitalapp/pages/patient/list/controller.dart';
|
|
|
import 'package:vitalapp/store/store.dart';
|
|
|
import 'package:vnote_device_plugin/consts/types.dart';
|
|
@@ -220,19 +221,10 @@ class CreatePatientController extends FControllerBase with HomeNavMixin {
|
|
|
);
|
|
|
if (result != null && result.success) {
|
|
|
final patient = result.patientInfo;
|
|
|
- // PromptBox.toast("录入成功");
|
|
|
- final patientDTO = PatientDTO(
|
|
|
- code: patient.cardNo,
|
|
|
- cardNo: patient.cardNo,
|
|
|
- patientName: patient.patientName,
|
|
|
- nationality: patient.nationality,
|
|
|
- patientGender: patient.patientGender,
|
|
|
- birthday: patient.birthday,
|
|
|
- patientAddress: patient.patientAddress,
|
|
|
- );
|
|
|
- Store.user.currentSelectPatientInfo = patientDTO;
|
|
|
- await Get.find<PatientListController>().gotoDetail(patientDTO.code!);
|
|
|
- PromptBox.toast('人脸识别成功,姓名:${patient.patientName}');
|
|
|
+ final hasConfirmed = await FaceResultDialog.show(patient);
|
|
|
+ if (hasConfirmed) {
|
|
|
+ await _checkinPatient(patient);
|
|
|
+ }
|
|
|
} else {
|
|
|
print("识别取消");
|
|
|
}
|
|
@@ -439,4 +431,19 @@ class CreatePatientController extends FControllerBase with HomeNavMixin {
|
|
|
// }
|
|
|
return null;
|
|
|
}
|
|
|
+
|
|
|
+ /// 切换当前登记居民
|
|
|
+ Future<void> _checkinPatient(PatientBaseDTO patient) async {
|
|
|
+ final patientDTO = PatientDTO(
|
|
|
+ code: patient.cardNo,
|
|
|
+ cardNo: patient.cardNo,
|
|
|
+ patientName: patient.patientName,
|
|
|
+ nationality: patient.nationality,
|
|
|
+ patientGender: patient.patientGender,
|
|
|
+ birthday: patient.birthday,
|
|
|
+ patientAddress: patient.patientAddress,
|
|
|
+ );
|
|
|
+ Store.user.currentSelectPatientInfo = patientDTO;
|
|
|
+ await Get.find<PatientListController>().gotoDetail(patientDTO.code!);
|
|
|
+ }
|
|
|
}
|