|
@@ -143,6 +143,11 @@ class MedicalController extends FControllerBase {
|
|
|
List<DiagnosisItem> diagnosisItems = [];
|
|
|
diagnosisDataValue.forEach((key, value) {
|
|
|
if (value != null) {
|
|
|
+ if (key == 'Heart' && value is Map) {
|
|
|
+ if (value.isEmpty) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
diagnosisItems.add(
|
|
|
DiagnosisItem(
|
|
|
key: key,
|
|
@@ -151,16 +156,7 @@ class MedicalController extends FControllerBase {
|
|
|
);
|
|
|
}
|
|
|
});
|
|
|
- if (diagnosisItems.any((e) => e.key == 'Heart')) {
|
|
|
- ///这里是判断心电这个类目下数据是否为空
|
|
|
- var heartInfo = diagnosisItems.firstWhere((e) => e.key == 'Heart');
|
|
|
- if (heartInfo.diagnosisData == null ||
|
|
|
- (heartInfo.diagnosisData?.isEmpty ?? false) ||
|
|
|
- heartInfo.diagnosisData == '{}') {
|
|
|
- PromptBox.toast('不能提交空数据');
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
if (diagnosisItems.isEmpty) {
|
|
|
PromptBox.toast('不能提交空数据');
|
|
|
return;
|