|
@@ -0,0 +1,59 @@
|
|
|
+package com.lantone.qc.kernel.catalogue.threelevelward;
|
|
|
+
|
|
|
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
|
+import com.lantone.qc.kernel.util.CatalogueUtil;
|
|
|
+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.ThreeLevelWardDoc;
|
|
|
+import com.lantone.qc.pub.util.StringUtil;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @ClassName : THR03022
|
|
|
+ * @Description : 整份病历无主任医师查房记录
|
|
|
+ * @Author : 胡敬
|
|
|
+ * @Date: 2020-03-25 10:21
|
|
|
+ */
|
|
|
+@Component
|
|
|
+public class THR03022 extends QCCatalogue {
|
|
|
+ public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
+ status.set("0");
|
|
|
+ if (inputInfo.getLeaveHospitalDoc() == null || inputInfo.getThreeLevelWardDocs().size() == 0) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Map<String, String> leaveHospitalStructureMap = inputInfo.getLeaveHospitalDoc().getStructureMap();
|
|
|
+ String lengthOfStay = leaveHospitalStructureMap.get("住院天数");
|
|
|
+ if (StringUtil.isNotBlank(lengthOfStay) && CatalogueUtil.numbersOnly(lengthOfStay)) {
|
|
|
+ //如果住院天数小于2天则不判断该条规则
|
|
|
+ if (Integer.parseInt(lengthOfStay) <= 2) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ List<ThreeLevelWardDoc> allDoctorWradDocs = inputInfo.getThreeLevelWardDocs().get(0).getAllDoctorWradDocs();//查房记录
|
|
|
+ String title, record;
|
|
|
+ boolean findIndications = false;
|
|
|
+ for (ThreeLevelWardDoc threeLevelWardDoc : allDoctorWradDocs) {
|
|
|
+ Map<String, String> rescueStructureMap = threeLevelWardDoc.getStructureMap();
|
|
|
+ title = CatalogueUtil.subTitle(rescueStructureMap.get("查房标题"));
|
|
|
+ record = CatalogueUtil.subTitle(rescueStructureMap.get("病情记录"));
|
|
|
+ if (StringUtil.isNotBlank(title) && title.contains(Content.director)) {
|
|
|
+ findIndications = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ if (StringUtil.isNotBlank(title) && StringUtil.isNotBlank(record)
|
|
|
+ && title.contains("共同照护讨论记录") && record.contains(Content.director)) {
|
|
|
+ findIndications = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ if (!findIndications) {
|
|
|
+ status.set("-1");
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|