|
@@ -0,0 +1,101 @@
|
|
|
+package com.lantone.qc.kernel.catalogue.threelevelward;
|
|
|
+
|
|
|
+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.DoctorAdviceDoc;
|
|
|
+import com.lantone.qc.pub.model.doc.FirstPageRecordDoc;
|
|
|
+import com.lantone.qc.pub.model.doc.PacsDoc;
|
|
|
+import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
|
|
|
+import com.lantone.qc.pub.util.ListUtil;
|
|
|
+import com.lantone.qc.pub.util.StringUtil;
|
|
|
+import io.netty.util.internal.ObjectUtil;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @ClassName : THR03117
|
|
|
+ * @Description : 病理检查存在病程记录中无病理报告结果
|
|
|
+ * @Author : zh
|
|
|
+ * @Date: 2021-04-02 17:06
|
|
|
+ */
|
|
|
+@Component
|
|
|
+public class THR03117 extends QCCatalogue {
|
|
|
+ @Override
|
|
|
+ public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
+ status.set("0");
|
|
|
+ boolean match = false;
|
|
|
+ FirstPageRecordDoc firstPageRecordDoc = inputInfo.getFirstPageRecordDoc();
|
|
|
+ List<ThreeLevelWardDoc> threeLevelWardDocs = inputInfo.getThreeLevelWardDocs();
|
|
|
+ if(firstPageRecordDoc==null){
|
|
|
+ //病案首页为空判断医嘱
|
|
|
+ List<DoctorAdviceDoc> doctorAdviceDocs = inputInfo.getDoctorAdviceDocs();
|
|
|
+ if(ListUtil.isEmpty(doctorAdviceDocs)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (doctorAdviceDocs.size() == 0) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ for (DoctorAdviceDoc dad : doctorAdviceDocs) {
|
|
|
+ Map<String, String> dadStructureMap = dad.getStructureMap();
|
|
|
+ String daStatus = dadStructureMap.get(Content.doctorAdviceState);
|
|
|
+ if(StringUtil.isEmpty(daStatus) || (!daStatus.equals(Content.cancellationOrder) && StringUtil.isNotEmpty(daStatus))){
|
|
|
+ String name = dadStructureMap.get(Content.medicalOrderName);
|
|
|
+ if (name.contains("非手术") || name.contains("手术室") || (name.contains("手术") && name.contains("取消")) || (name.contains("暂停") && name.contains("手术")) || name.contains("静脉穿刺置管术") || name.startsWith("停") || name.contains("前一次")
|
|
|
+ || name.contains("特殊病人手术使用一次性卫生材料") || name.contains("人免疫缺陷病毒抗体检测免费")) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if (name.contains("手术")) {
|
|
|
+ for (DoctorAdviceDoc doctorAdviceDoc : doctorAdviceDocs) {
|
|
|
+ String adviceDocName = doctorAdviceDoc.getStructureMap().get(Content.medicalOrderName);
|
|
|
+ if (adviceDocName.contains(Content.pathological)) {
|
|
|
+ status.set("-1");
|
|
|
+ //查房记录查找病理报告
|
|
|
+ match=true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(firstPageRecordDoc!=null) {
|
|
|
+ Map<String, String> structureMap = firstPageRecordDoc.getStructureMap();
|
|
|
+ String pathologyMoneyStr = structureMap.get(Content.pathologyFee);
|
|
|
+ String operationMoneyStr = structureMap.get(Content.operationFee);
|
|
|
+ if (StringUtil.isEmpty(pathologyMoneyStr) || StringUtil.isEmpty(operationMoneyStr)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if ((pathologyMoneyStr.equals("0") || operationMoneyStr.equals("0"))) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ double a = Double.parseDouble(pathologyMoneyStr);
|
|
|
+ double b = Double.parseDouble(operationMoneyStr);
|
|
|
+ if (a > Content.pathologicalFee && b > 0) {
|
|
|
+ status.set("-1");
|
|
|
+ match=true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(match) {
|
|
|
+ if (ListUtil.isNotEmpty(threeLevelWardDocs)) {
|
|
|
+ ThreeLevelWardDoc threeLevelWardDoc = threeLevelWardDocs.get(0);
|
|
|
+ //所有查房记录
|
|
|
+ List<ThreeLevelWardDoc> allDoctorWradDocs = threeLevelWardDoc.getAllDoctorWradDocs();
|
|
|
+ if (ListUtil.isEmpty(allDoctorWradDocs)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ for (ThreeLevelWardDoc allDoctorWradDoc : allDoctorWradDocs) {
|
|
|
+ String pathographyStr = allDoctorWradDoc.getStructureMap().get(Content.illnessRecords);
|
|
|
+ if (StringUtil.isNotEmpty(pathographyStr)) {
|
|
|
+ if (pathographyStr.contains(Content.pathologicalReport)) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|