|
@@ -7,6 +7,8 @@ import com.lantone.qc.pub.model.OutputInfo;
|
|
|
import com.lantone.qc.pub.model.doc.DeathCaseDiscussDoc;
|
|
|
import com.lantone.qc.pub.model.doc.DeathRecordDoc;
|
|
|
import com.lantone.qc.pub.model.doc.DoctorAdviceDoc;
|
|
|
+import com.lantone.qc.pub.model.doc.RescueDoc;
|
|
|
+import com.lantone.qc.pub.util.ListUtil;
|
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
@@ -30,31 +32,39 @@ public class FIRP0195 extends QCCatalogue {
|
|
|
if (inputInfo.getFirstPageRecordDoc() == null) {
|
|
|
return;
|
|
|
}
|
|
|
+ boolean flag=false;
|
|
|
Map<String, String> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
|
|
|
String outWay = firstpageStructureMap.get(Content.outWay);
|
|
|
if (StringUtil.isBlank(outWay)) {
|
|
|
return;
|
|
|
}
|
|
|
String wardOutWay;
|
|
|
+ //包含死亡记录
|
|
|
if (deathRecordDoc != null) {
|
|
|
- wardOutWay = "死亡";
|
|
|
- if (!match(outWay, wardOutWay)) {
|
|
|
- status.set("-1");
|
|
|
- return;
|
|
|
- }
|
|
|
- //增加判断,如有死亡记录,开医嘱离院需扣分
|
|
|
+ flag=true;
|
|
|
+ }else {
|
|
|
+ //不包含死亡记录 从医嘱中获取死亡情况
|
|
|
List<DoctorAdviceDoc> doctorAdviceDocs = inputInfo.getDoctorAdviceDocs();
|
|
|
- if(doctorAdviceDocs!=null) {
|
|
|
+ if(ListUtil.isNotEmpty(doctorAdviceDocs) || doctorAdviceDocs.size()>0){
|
|
|
for (DoctorAdviceDoc doctorAdviceDoc : doctorAdviceDocs) {
|
|
|
- String name = doctorAdviceDoc.getStructureMap().get(Content.medicalName);
|
|
|
- if(StringUtil.isNotEmpty(name)) {
|
|
|
- if (name.contains("出院")) {
|
|
|
- status.set("-1");
|
|
|
- return;
|
|
|
+ if(doctorAdviceDoc!=null){
|
|
|
+ Map<String, String> structureMap = doctorAdviceDoc.getStructureMap();
|
|
|
+ if(structureMap!=null){
|
|
|
+ String name = structureMap.get(Content.medicalName);
|
|
|
+ if(StringUtil.isNotEmpty(name) && name.contains("死亡") && !name.contains("死亡蛋白")){
|
|
|
+ //医嘱项目名称包含死亡但不包含死亡蛋白为死亡患者
|
|
|
+ flag=true;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(flag) {
|
|
|
+ wardOutWay = "死亡";
|
|
|
+ if (!match(outWay, wardOutWay)) {
|
|
|
+ status.set("-1");
|
|
|
+ return;
|
|
|
}
|
|
|
}
|
|
|
|