|
@@ -6,7 +6,9 @@ import com.lantone.qc.pub.Content;
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
import com.lantone.qc.pub.model.doc.DoctorAdviceDoc;
|
|
import com.lantone.qc.pub.model.doc.DoctorAdviceDoc;
|
|
|
|
+import com.lantone.qc.pub.model.doc.FirstPageRecordDoc;
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
@@ -23,16 +25,26 @@ import java.util.Map;
|
|
public class DEAC0097 extends QCCatalogue {
|
|
public class DEAC0097 extends QCCatalogue {
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
status.set("0");
|
|
status.set("0");
|
|
- String outWay = inputInfo.getFirstPageRecordDoc().getStructureMap().get(Content.outWay);
|
|
|
|
- outWay = StringUtil.isBlank(outWay) ? "" : outWay;
|
|
|
|
|
|
+
|
|
|
|
+ String outWay ="";
|
|
|
|
+ FirstPageRecordDoc firstPageRecordDoc = inputInfo.getFirstPageRecordDoc();
|
|
|
|
+ if(firstPageRecordDoc != null){
|
|
|
|
+ outWay = firstPageRecordDoc.getStructureMap().get(Content.outWay);
|
|
|
|
+ outWay = StringUtil.isBlank(outWay) ? "" : outWay;
|
|
|
|
+ }
|
|
|
|
+
|
|
List<String> deathRecords = new ArrayList<>();
|
|
List<String> deathRecords = new ArrayList<>();
|
|
List<DoctorAdviceDoc> doctorAdviceDocs = inputInfo.getDoctorAdviceDocs();
|
|
List<DoctorAdviceDoc> doctorAdviceDocs = inputInfo.getDoctorAdviceDocs();
|
|
if (doctorAdviceDocs.size() == 0) {
|
|
if (doctorAdviceDocs.size() == 0) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+
|
|
for (DoctorAdviceDoc dad : doctorAdviceDocs) {
|
|
for (DoctorAdviceDoc dad : doctorAdviceDocs) {
|
|
- if (dad.getStructureMap().get("医嘱项目名称").contains("死亡")) {
|
|
|
|
- deathRecords.add(dad.getStructureMap().get("医嘱项目名称"));
|
|
|
|
|
|
+ String deviceName = dad.getStructureMap().get("医嘱项目名称");
|
|
|
|
+ if(StringUtils.isNotBlank(deviceName)){
|
|
|
|
+ if(deviceName.contains("死亡")){
|
|
|
|
+ deathRecords.add(deviceName);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if ((deathRecords.size() > 0 || outWay.contains("死亡")) && inputInfo.getDeathRecordDoc() == null) {
|
|
if ((deathRecords.size() > 0 || outWay.contains("死亡")) && inputInfo.getDeathRecordDoc() == null) {
|