|
@@ -0,0 +1,64 @@
|
|
|
+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.model.InputInfo;
|
|
|
+import com.lantone.qc.pub.model.OutputInfo;
|
|
|
+import com.lantone.qc.pub.model.doc.ward.AttendingDoctorWardDoc;
|
|
|
+import com.lantone.qc.pub.model.label.ThreeLevelWardLabel;
|
|
|
+import com.lantone.qc.pub.util.StringUtil;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @ClassName : THR03044
|
|
|
+ * @Description : 抗生素使用指征不明确
|
|
|
+ * @Author : kwz
|
|
|
+ * @Date: 2020-07-23 14:16
|
|
|
+ */
|
|
|
+@Component
|
|
|
+public class THR03044 extends QCCatalogue {
|
|
|
+ public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
+ if (inputInfo.getThreeLevelWardDocs().size() == 0 || inputInfo.getBeHospitalizedDoc() == null) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ List<AttendingDoctorWardDoc> attendDocs = inputInfo.getThreeLevelWardDocs().get(0).getAttendingDoctorWardDocs();
|
|
|
+ if (attendDocs.size() == 0) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ AttendingDoctorWardDoc firstAttendDoc = attendDocs.get(0);
|
|
|
+ //先取结构化数据判断
|
|
|
+ Map<String, String> firstAttendStructureMap = firstAttendDoc.getStructureMap();
|
|
|
+ String admisDateStr = inputInfo.getBeHospitalizedDoc().getStructureMap().get("入院日期");
|
|
|
+ String recordDateStr = firstAttendStructureMap.get("查房日期");
|
|
|
+ if (CatalogueUtil.isEmpty(admisDateStr) || CatalogueUtil.isEmpty(recordDateStr)) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ //如果首次查房超过48小时则不判断该条规则
|
|
|
+ if (CatalogueUtil.compareTime(StringUtil.parseDateTime(admisDateStr), StringUtil.parseDateTime(recordDateStr), 48 * 60L)) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (StringUtil.isNotBlank(firstAttendStructureMap.get("病情记录"))) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ ThreeLevelWardLabel firstAttendLabel = firstAttendDoc.getThreeLevelWardLabel();
|
|
|
+ if (firstAttendLabel == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (firstAttendLabel.getDiags().size() > 0
|
|
|
+ || StringUtil.isNotBlank(firstAttendLabel.getDiagBasisText())
|
|
|
+ || (firstAttendLabel.getDiffDiag().size() > 0 || StringUtils.isNotEmpty(firstAttendLabel.getDiffDiagText()))
|
|
|
+ || firstAttendLabel.getTreatmentPlans().size() > 0) {
|
|
|
+ status.set("0");
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|