|
@@ -22,26 +22,21 @@ import java.util.Map;
|
|
|
public class DEAC0108 extends QCCatalogue {
|
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
status.set("0");
|
|
|
+
|
|
|
+ if (inputInfo.getFirstPageRecordDoc() == null || inputInfo.getFirstPageRecordDoc().getStructureMap() == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
DeathRecordDoc deathRecordDoc = inputInfo.getDeathRecordDoc();
|
|
|
- if (inputInfo.getFirstPageRecordDoc() != null && inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
|
|
|
- Map<String, String> FirstPageStructure = inputInfo.getFirstPageRecordDoc().getStructureMap();
|
|
|
- String outWay = FirstPageStructure.get(Content.outWay);
|
|
|
- //判断患者是否死亡
|
|
|
- if (CatalogueUtil.isEmpty(outWay) || !outWay.contains("死亡")) {
|
|
|
- return;
|
|
|
- }
|
|
|
- List<DoctorAdviceDoc> doctorAdviceDocs = inputInfo.getDoctorAdviceDocs();
|
|
|
- if (doctorAdviceDocs.size() == 0) {
|
|
|
- return;
|
|
|
- }
|
|
|
- long count = doctorAdviceDocs.stream().filter(x -> x.getStructureMap().get("医嘱项目名称").contains("死亡")).count();
|
|
|
- if ((count > 0 || outWay.contains("死亡")) && (inputInfo.getDeathCaseDiscussDoc() == null || inputInfo.getDeathCaseDiscussDoc().getStructureMap().size() == 0)) {
|
|
|
- status.set("-1");
|
|
|
- }
|
|
|
- if ((inputInfo.getDeathCaseDiscussDoc() == null || inputInfo.getDeathCaseDiscussDoc().getStructureMap().size() == 0)
|
|
|
- && deathRecordDoc != null) {
|
|
|
- status.set("-1");
|
|
|
- }
|
|
|
+ Map<String, String> FirstPageStructure = inputInfo.getFirstPageRecordDoc().getStructureMap();
|
|
|
+ String outWay = FirstPageStructure.get(Content.outWay);
|
|
|
+ String medicalOrderName = FirstPageStructure.get(Content.medicalOrderName);
|
|
|
+
|
|
|
+
|
|
|
+ if (((!CatalogueUtil.isEmpty(medicalOrderName) && medicalOrderName.contains("死亡") && (!medicalOrderName.contains("死亡蛋白") ||
|
|
|
+ (!CatalogueUtil.isEmpty(outWay) && outWay.contains("死亡")))) || deathRecordDoc != null) &&
|
|
|
+ (inputInfo.getDeathCaseDiscussDoc() == null || inputInfo.getDeathCaseDiscussDoc().getStructureMap().size() == 0)) {
|
|
|
+ status.set("-1");
|
|
|
+ return;
|
|
|
}
|
|
|
}
|
|
|
}
|