|
@@ -3,20 +3,58 @@ package com.lantone.qc.kernel.catalogue.leavehospital;
|
|
|
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.BeHospitalizedDoc;
|
|
|
+import com.lantone.qc.pub.model.entity.Diag;
|
|
|
+import com.lantone.qc.pub.model.label.DiagLabel;
|
|
|
+import com.lantone.qc.pub.util.ListUtil;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
- * @Description:
|
|
|
- * @author: rengb
|
|
|
- * @time: 2020/3/10 13:53
|
|
|
+ * @ClassName : LEA0146
|
|
|
+ * @Description :出院其他诊断不完全
|
|
|
+ * @Author : 胡敬
|
|
|
+ * @Date: 2020-03-16 14:01
|
|
|
*/
|
|
|
@Component
|
|
|
public class LEA0146 extends QCCatalogue {
|
|
|
-
|
|
|
- @Override
|
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
status.set("0");
|
|
|
+ if (inputInfo.getBeHospitalizedDoc() != null && inputInfo.getLeaveHospitalDoc() != null) {
|
|
|
+ DiagLabel leaveDiagLabel = inputInfo.getLeaveHospitalDoc().getLeaveDiagLabel();
|
|
|
+ if (leaveDiagLabel == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ List<Diag> dischargeDiag = leaveDiagLabel.getDiags();
|
|
|
+ if (ListUtil.isEmpty(dischargeDiag)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ List<String> leaveDiags = new ArrayList<>();
|
|
|
+ putDiagToList(dischargeDiag, leaveDiags);
|
|
|
+
|
|
|
+ BeHospitalizedDoc beHospitalizedDoc = inputInfo.getBeHospitalizedDoc();
|
|
|
+ List<String> beHospitalDiag = new ArrayList<>();//收集入院记录中初步诊断、修正诊断、其他诊断所有诊断
|
|
|
+ if (beHospitalizedDoc.getInitialDiagLabel() != null) {
|
|
|
+ putDiagToList(beHospitalizedDoc.getInitialDiagLabel().getDiags(), beHospitalDiag); //初步诊断
|
|
|
+ }
|
|
|
+ if (beHospitalizedDoc.getRevisedDiagLabel() != null) {
|
|
|
+ putDiagToList(beHospitalizedDoc.getRevisedDiagLabel().getDiags(), beHospitalDiag); //修正诊断
|
|
|
+ }
|
|
|
+ if (beHospitalizedDoc.getSuppleDiagLabel() != null) {
|
|
|
+ putDiagToList(beHospitalizedDoc.getSuppleDiagLabel().getDiags(), beHospitalDiag); //其他诊断
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!leaveDiags.containsAll(beHospitalDiag)) {
|
|
|
+ status.set("-1");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
+ private void putDiagToList(List<Diag> diagList, List<String> beHospitalDiag) {
|
|
|
+ for (Diag diag : diagList) {
|
|
|
+ beHospitalDiag.add(diag.getName());
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
}
|