|
@@ -0,0 +1,74 @@
|
|
|
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
|
|
|
+
|
|
|
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
|
+import com.lantone.qc.pub.Content;
|
|
|
+import com.lantone.qc.pub.model.InputInfo;
|
|
|
+import com.lantone.qc.pub.model.OutputInfo;
|
|
|
+import com.lantone.qc.pub.model.doc.FirstPageRecordDoc;
|
|
|
+import com.lantone.qc.pub.model.doc.operation.OperationDiscussionDoc;
|
|
|
+import com.lantone.qc.pub.model.doc.operation.OperationDoc;
|
|
|
+import com.lantone.qc.pub.model.doc.operation.OperationRecordDoc;
|
|
|
+import com.lantone.qc.pub.util.ListUtil;
|
|
|
+import com.lantone.qc.pub.util.StringUtil;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @ClassName : FIRP0193
|
|
|
+ * @Description :手术及操作名称填写不全
|
|
|
+ * @Author : 胡敬
|
|
|
+ * @Date: 2020-03-16 20:28
|
|
|
+ */
|
|
|
+@Component
|
|
|
+public class FIRP0193 extends QCCatalogue {
|
|
|
+ public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
+ status.set("0");
|
|
|
+ FirstPageRecordDoc firstPageRecordDoc = inputInfo.getFirstPageRecordDoc();
|
|
|
+ if (firstPageRecordDoc == null){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ List<OperationDoc> operationDocs = inputInfo.getOperationDocs();
|
|
|
+ List<String> operations = new ArrayList<>();
|
|
|
+ List<String> operations_first = new ArrayList<>();
|
|
|
+ if (ListUtil.isNotEmpty(operationDocs)) {
|
|
|
+ for (OperationDoc opd : operationDocs) {
|
|
|
+ OperationRecordDoc operationRecordDoc = opd.getOperationRecordDoc();
|
|
|
+ if (operationRecordDoc == null) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ String operativeMethod = operationRecordDoc.getStructureMap().get("手术名称");
|
|
|
+ if (StringUtil.isBlank(operativeMethod)){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if(operativeMethod.contains("+")){
|
|
|
+ String[] split = operativeMethod.split("\\+");
|
|
|
+ for (String s : split) {
|
|
|
+ operations.add(s);
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ operations.add(operativeMethod);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Map<String, Object> firstPageRecordDocStructureMap = firstPageRecordDoc.getStructureExtMap();
|
|
|
+ List<Map<String, String>> mapList = (List<Map<String, String>>) firstPageRecordDocStructureMap.get(Content.operative_information);
|
|
|
+ if (mapList != null && mapList.size() > 0) {
|
|
|
+ for (Map<String, String> ds : mapList) {
|
|
|
+ String oName = ds.get(Content.operative_name);
|
|
|
+ if (StringUtils.isNotEmpty(oName)) {
|
|
|
+ operations_first.add(oName);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (operations_first.size()==operations.size()) {
|
|
|
+ status.set("0");
|
|
|
+ } else {
|
|
|
+ status.set("-1");
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+}
|