|
@@ -0,0 +1,64 @@
|
|
|
+package com.lantone.qc.kernel.catalogue.hospital.shengzhouyy.deathcasediscuss;
|
|
|
+
|
|
|
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
|
+import com.lantone.qc.pub.model.InputInfo;
|
|
|
+import com.lantone.qc.pub.model.OutputInfo;
|
|
|
+import com.lantone.qc.pub.model.doc.DeathCaseDiscussDoc;
|
|
|
+import com.lantone.qc.pub.model.doc.LeaveHospitalDoc;
|
|
|
+import com.lantone.qc.pub.model.doc.MedicalRecordInfoDoc;
|
|
|
+import com.lantone.qc.pub.util.StringUtil;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @ClassName : DEAC03232
|
|
|
+ * @Description: 死亡病例讨论记录内性别和基本信息不一致
|
|
|
+ * @author: wsy
|
|
|
+ * @time: 2022/5/18 15:15
|
|
|
+ */
|
|
|
+@Component
|
|
|
+public class DEAC03232 extends QCCatalogue {
|
|
|
+ /**
|
|
|
+ * 1.(死亡病例讨论记录)存在,查看文书结构化(性别)和文书内是否有包含(男性/女性/男/女/性别男/性别女),存在则统一提取出
|
|
|
+ * 2.获取住院信息表,查看性别和(死亡病例讨论记录)中提出的性别处理过同义词后是否一致,任一不一致则报出
|
|
|
+ * */
|
|
|
+ @Override
|
|
|
+ public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
+ status.set("0");
|
|
|
+ String gender = "";
|
|
|
+ MedicalRecordInfoDoc medicalRecordInfoDoc = inputInfo.getMedicalRecordInfoDoc();
|
|
|
+ DeathCaseDiscussDoc deathCaseDiscussDoc = inputInfo.getDeathCaseDiscussDoc();
|
|
|
+ if (medicalRecordInfoDoc == null || deathCaseDiscussDoc == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ gender = medicalRecordInfoDoc.getStructureMap().get("sex");
|
|
|
+ if (StringUtil.isBlank(gender)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Map<String, String> structureMap = deathCaseDiscussDoc.getStructureMap();
|
|
|
+ String firCGender = structureMap.get("性别");
|
|
|
+ String text = structureMap.get("原始文本");
|
|
|
+ if (gender.contains("男")) {
|
|
|
+ if (StringUtil.isNotBlank(firCGender) && firCGender.contains("女")) {
|
|
|
+ status.set("-1");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (StringUtil.isNotBlank(text) && text.contains("女")) {
|
|
|
+ status.set("-1");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (gender.contains("女")) {
|
|
|
+ if (StringUtil.isNotBlank(firCGender) && firCGender.contains("男")) {
|
|
|
+ status.set("-1");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (StringUtil.isNotBlank(text) && text.contains("男")) {
|
|
|
+ status.set("-1");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|