|
|
@@ -1127,6 +1127,11 @@ public class ReportCollectService {
|
|
|
if (expected == null || expected.isEmpty()) {
|
|
|
return true;
|
|
|
}
|
|
|
+ // 肠道菌群家族:肠道预测年龄/肠型 为摘要增强字段,部分报告(如体检型菌群检测)不输出,
|
|
|
+ // 缺失不阻断入库,避免合法报告因缺少增强字段卡在草稿
|
|
|
+ if (isGutFloraType(typeId)) {
|
|
|
+ expected.removeAll(GUT_FLORA_OPTIONAL_INDICATORS);
|
|
|
+ }
|
|
|
List<String> missing = new ArrayList<>();
|
|
|
int matched = 0;
|
|
|
for (String exp : expected) {
|
|
|
@@ -1156,6 +1161,10 @@ public class ReportCollectService {
|
|
|
return missing.isEmpty();
|
|
|
}
|
|
|
|
|
|
+ /** 肠道菌群家族校验可选指标(report_type_registry.expected_indicators 中缺失不阻断入库) */
|
|
|
+ private static final Set<String> GUT_FLORA_OPTIONAL_INDICATORS =
|
|
|
+ new HashSet<>(Arrays.asList("肠道预测年龄", "肠型"));
|
|
|
+
|
|
|
/** 是否为肠道菌群家族类型(report_type_registry.family = gut_flora) */
|
|
|
private boolean isGutFloraType(String typeId) {
|
|
|
if (typeId == null) {
|