|
@@ -21,7 +21,7 @@ import java.util.Map;
|
|
@Component
|
|
@Component
|
|
public class LEA0507 extends QCCatalogue {
|
|
public class LEA0507 extends QCCatalogue {
|
|
/**
|
|
/**
|
|
- * 获取存在病案首页,或出院信息表,存在出院时间的病人。
|
|
|
|
|
|
+ * 获取存在病案首页,出院时间有填写的病人,或出院信息表,存在出院时间的病人(如果都有取住院信息表为准)
|
|
* 判断是否是死亡病人,存在“死亡”医嘱,排除“死亡蛋白”医嘱;存在抢救记录并抢救文书内包含“死亡”;存在死亡记录;存在24小时内入院死亡记录;存在死亡病例讨论记录。上述情况任意一中存在不报
|
|
* 判断是否是死亡病人,存在“死亡”医嘱,排除“死亡蛋白”医嘱;存在抢救记录并抢救文书内包含“死亡”;存在死亡记录;存在24小时内入院死亡记录;存在死亡病例讨论记录。上述情况任意一中存在不报
|
|
* 非死亡患者存在24小时内入出院记录,不报。
|
|
* 非死亡患者存在24小时内入出院记录,不报。
|
|
* 非死亡患者存在24小时内入出院记录,但入院时间和出院时间超过30小时,报出
|
|
* 非死亡患者存在24小时内入出院记录,但入院时间和出院时间超过30小时,报出
|
|
@@ -36,10 +36,13 @@ public class LEA0507 extends QCCatalogue {
|
|
FirstPageRecordDoc firstPageRecordDoc = inputInfo.getFirstPageRecordDoc();
|
|
FirstPageRecordDoc firstPageRecordDoc = inputInfo.getFirstPageRecordDoc();
|
|
MedicalRecordInfoDoc medicalRecordInfoDoc = inputInfo.getMedicalRecordInfoDoc();
|
|
MedicalRecordInfoDoc medicalRecordInfoDoc = inputInfo.getMedicalRecordInfoDoc();
|
|
String leaveHospitalDate = null;
|
|
String leaveHospitalDate = null;
|
|
|
|
+ if(firstPageRecordDoc!=null){
|
|
|
|
+ leaveHospitalDate = firstPageRecordDoc.getStructureMap().get("出院时间");
|
|
|
|
+ }
|
|
if (medicalRecordInfoDoc != null) {
|
|
if (medicalRecordInfoDoc != null) {
|
|
leaveHospitalDate = medicalRecordInfoDoc.getStructureMap().get("leaveHospitalDate");
|
|
leaveHospitalDate = medicalRecordInfoDoc.getStructureMap().get("leaveHospitalDate");
|
|
}
|
|
}
|
|
- if (firstPageRecordDoc == null || StringUtil.isEmpty(leaveHospitalDate)) {
|
|
|
|
|
|
+ if (StringUtil.isEmpty(leaveHospitalDate)) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
//排除医嘱死亡
|
|
//排除医嘱死亡
|
|
@@ -89,13 +92,22 @@ public class LEA0507 extends QCCatalogue {
|
|
if (beHospitalizedDoc != null) {
|
|
if (beHospitalizedDoc != null) {
|
|
Map<String, String> structureMap = beHospitalizedDoc.getStructureMap();
|
|
Map<String, String> structureMap = beHospitalizedDoc.getStructureMap();
|
|
String title = structureMap.get("文书名称");
|
|
String title = structureMap.get("文书名称");
|
|
|
|
+ String outDate =null;
|
|
|
|
+ String inDate=null;
|
|
if (title.equals("24小时内入出院记录")) {
|
|
if (title.equals("24小时内入出院记录")) {
|
|
- Map<String, String> pageMap = firstPageRecordDoc.getStructureMap();
|
|
|
|
- String outDate = pageMap.get("出院时间");
|
|
|
|
- String inDate = pageMap.get("入院时间");
|
|
|
|
- if(StringUtil.isEmpty(outDate) || StringUtil.isEmpty(inDate)){
|
|
|
|
- outDate = medicalRecordInfoDoc.getStructureMap().get("behospitalDate");
|
|
|
|
- inDate=leaveHospitalDate;
|
|
|
|
|
|
+ if(medicalRecordInfoDoc!=null){
|
|
|
|
+ //取出入院时间
|
|
|
|
+ inDate = medicalRecordInfoDoc.getStructureMap().get("behospitalDate");
|
|
|
|
+ outDate = medicalRecordInfoDoc.getStructureMap().get("leaveHospitalDate");
|
|
|
|
+ if(firstPageRecordDoc!=null) {
|
|
|
|
+ //首页存在取出入院时间
|
|
|
|
+ Map<String, String> pageMap = firstPageRecordDoc.getStructureMap();
|
|
|
|
+ if (StringUtil.isEmpty(outDate) || StringUtil.isEmpty(inDate)) {
|
|
|
|
+ //任一为空则去首页中取时间
|
|
|
|
+ outDate = pageMap.get("出院时间");
|
|
|
|
+ inDate = pageMap.get("入院时间");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if(StringUtil.isNotEmpty(outDate) && StringUtil.isNotEmpty(inDate)) {
|
|
if(StringUtil.isNotEmpty(outDate) && StringUtil.isNotEmpty(inDate)) {
|
|
Date infusionEndDate = StringUtil.parseDateTime(inDate);
|
|
Date infusionEndDate = StringUtil.parseDateTime(inDate);
|