|
@@ -7,6 +7,7 @@ import com.lantone.qc.pub.model.InputInfo;
|
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
|
import com.lantone.qc.pub.model.doc.operation.OperationDoc;
|
|
|
import com.lantone.qc.pub.model.doc.operation.OperationRecordDoc;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
@@ -15,6 +16,7 @@ import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* 病案首页手术名称未填
|
|
|
+ * 如果有手术记录,病案首页手术为空就报
|
|
|
* @author wangfeng
|
|
|
* @Description:
|
|
|
* @date 2020-06-28 17:10
|
|
@@ -26,7 +28,30 @@ public class FIRP02993 extends QCCatalogue {
|
|
|
if (inputInfo.getFirstPageRecordDoc() != null && inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
|
|
|
//取出病程信息里的手术记录的名称
|
|
|
List<OperationDoc> operationDocs = inputInfo.getOperationDocs();
|
|
|
- if (!operationDocs.isEmpty()) {
|
|
|
+ long count = operationDocs.stream().map(i -> i.getOperationRecordDoc()).filter(v -> StringUtils.isNotBlank(v.getOperationName())).count();
|
|
|
+ //取出病案首页里的手术名称operationNameList;
|
|
|
+ Map<String, Object> structureExtMap = inputInfo.getFirstPageRecordDoc().getStructureExtMap();
|
|
|
+ Object operation = structureExtMap.get(Content.operative_information);//手术信息
|
|
|
+ List<String> operationNameList = new ArrayList<String>();
|
|
|
+ List<Map<String, String>> mapStrs = (List<Map<String, String>>) operation;
|
|
|
+ // 解决空指针,如果无数据,报错
|
|
|
+ if (mapStrs == null) {
|
|
|
+ status.set("-1");
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+ if (mapStrs.size() > 0) {
|
|
|
+ for (Map<String, String> mapStr : mapStrs
|
|
|
+ ) {
|
|
|
+ String name = mapStr.get(Content.operative_name);//手术名称
|
|
|
+ operationNameList.add(name);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(count > 0 && operationNameList.size() == 0){
|
|
|
+ status.set("-1");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ /*if (!operationDocs.isEmpty()) {
|
|
|
List<String> nameberList = new ArrayList<String>();
|
|
|
for (OperationDoc operationDoc : operationDocs
|
|
|
) {
|
|
@@ -80,7 +105,7 @@ public class FIRP02993 extends QCCatalogue {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
}
|
|
|
}
|