|
@@ -0,0 +1,104 @@
|
|
|
+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.ThreeLevelWardDoc;
|
|
|
+import com.lantone.qc.pub.util.ListUtil;
|
|
|
+import com.lantone.qc.pub.util.StringUtil;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Arrays;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @ClassName : THR03121
|
|
|
+ * @Description: 病程记录未记录恶性肿瘤放射治疗相关信息
|
|
|
+ * @author: wangsy
|
|
|
+ * @time: 2021/04/19 11:22
|
|
|
+ */
|
|
|
+@Component
|
|
|
+public class THR03121 extends QCCatalogue {
|
|
|
+ public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
+ /**
|
|
|
+ * 【指标十三】恶性肿瘤放射治疗记录符合率(MER-D & T-03)
|
|
|
+ * 1、首先判断是否为恶性肿瘤患者
|
|
|
+ * 2、再进一步从医嘱判断是否为放射治疗患者
|
|
|
+ * 3、在病程记录中查找是否存在治疗记录
|
|
|
+ */
|
|
|
+ status.set("0");
|
|
|
+ boolean flag = false;
|
|
|
+ FirstPageRecordDoc firstPageRecordDoc = inputInfo.getFirstPageRecordDoc();
|
|
|
+ if (firstPageRecordDoc == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, Object> structureMap = firstPageRecordDoc.getStructureExtMap();
|
|
|
+ List<Map<String, String>> dischargeDiag = (List) structureMap.get(Content.dischargeDiag);
|
|
|
+ if (ListUtil.isEmpty(dischargeDiag)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ for (Map<String, String> diagMap : dischargeDiag) {
|
|
|
+ if (StringUtil.isBlank(diagMap.get("诊断名称")) || StringUtil.isBlank(diagMap.get("诊断编码"))) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if (diagMap.get("诊断名称").contains("恶性肿瘤") && diagMap.get("诊断编码").toUpperCase().startsWith("C")) {
|
|
|
+ //初步判断为一个恶性肿瘤患者
|
|
|
+ flag = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<String> chemotherapyDrugList = new ArrayList<>();
|
|
|
+ if (flag) {
|
|
|
+ //进一步去医嘱中判断是否为恶性肿瘤放射治疗患者
|
|
|
+ List<DoctorAdviceDoc> doctorAdviceDocs = inputInfo.getDoctorAdviceDocs();
|
|
|
+ if (ListUtil.isEmpty(doctorAdviceDocs)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ for (DoctorAdviceDoc doctorAdviceDoc : doctorAdviceDocs) {
|
|
|
+ Map<String, String> doctorAdviceDocStrMap = doctorAdviceDoc.getStructureMap();
|
|
|
+ String daStatus = doctorAdviceDocStrMap.get(Content.doctorAdviceState);
|
|
|
+ if (StringUtil.isEmpty(daStatus) || (StringUtil.isNotEmpty(daStatus) && !daStatus.equals(Content.cancellationOrder))) {
|
|
|
+ //取临时医嘱
|
|
|
+ String doctorAsks = doctorAdviceDocStrMap.get(Content.doctorAdviceType);
|
|
|
+ if (StringUtil.isEmpty(doctorAsks)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if (Content.statOrder.equals(doctorAsks)) {
|
|
|
+ String daItemName = doctorAdviceDocStrMap.get(Content.medicalOrderName);
|
|
|
+ if (Arrays.asList(Content.radiotherapyDrugList).contains(daItemName)) {
|
|
|
+ chemotherapyDrugList.add(daItemName);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (ListUtil.isNotEmpty(chemotherapyDrugList)) {
|
|
|
+ for (String chemotherapyDrug : chemotherapyDrugList) {
|
|
|
+ //为一个恶性肿瘤放射治疗患者
|
|
|
+ status.set("-1");
|
|
|
+ List<ThreeLevelWardDoc> threeLevelWardDocs = inputInfo.getThreeLevelWardDocs();
|
|
|
+ if (ListUtil.isNotEmpty(threeLevelWardDocs)) {
|
|
|
+ List<ThreeLevelWardDoc> allDoctorWradDocs = threeLevelWardDocs.get(0).getAllDoctorWradDocs();
|
|
|
+ for (ThreeLevelWardDoc allDoctorWradDoc : allDoctorWradDocs) {
|
|
|
+ String illness = allDoctorWradDoc.getStructureMap().get(Content.illnessRecords);
|
|
|
+ //判断病程记录是否记录
|
|
|
+ //病程记录中若是含有疗程两字并且含有放射药物则为记录
|
|
|
+ if (illness.contains(chemotherapyDrug) && (illness.contains("疗程") || illness.contains("放疗") || illness.contains("放射治疗"))) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|