|
@@ -26,13 +26,24 @@ import java.util.Map;
|
|
|
public class THR0127 extends QCCatalogue {
|
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
status.set("0");
|
|
|
- if (inputInfo.getLeaveHospitalDoc() != null
|
|
|
- && inputInfo.getBeHospitalizedDoc() != null && inputInfo.getBeHospitalizedDoc().getStructureMap() != null
|
|
|
- && inputInfo.getThreeLevelWardDocs().size() > 0) {
|
|
|
+ if (inputInfo.getLeaveHospitalDoc() != null) {
|
|
|
Map<String, String> leaveHospitalStructureMap = inputInfo.getLeaveHospitalDoc().getStructureMap();
|
|
|
String admisTime = leaveHospitalStructureMap.get(Content.admisTime);
|
|
|
String dischargeTime = leaveHospitalStructureMap.get(Content.dischargeTime);
|
|
|
- if (CatalogueUtil.isEmpty(admisTime) || CatalogueUtil.isEmpty(dischargeTime)) {
|
|
|
+ //如果住院天数小于7天则不判断该条规则
|
|
|
+ if (!CatalogueUtil.isEmpty(admisTime) && !CatalogueUtil.isEmpty(dischargeTime)) {
|
|
|
+ if (!CatalogueUtil.compareTime(StringUtil.parseDateTime(admisTime), StringUtil.parseDateTime(dischargeTime), (long) (7 * 24 * 60))) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (inputInfo.getLeaveHospitalDoc() != null
|
|
|
+ && inputInfo.getBeHospitalizedDoc() != null && inputInfo.getBeHospitalizedDoc().getStructureMap() != null
|
|
|
+ && inputInfo.getThreeLevelWardDocs().size() > 0) {
|
|
|
+ Map<String, String> beHospitalStructureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
|
|
|
+ String admisTime = beHospitalStructureMap.get("入院日期");
|
|
|
+ if (CatalogueUtil.isEmpty(admisTime)) {
|
|
|
return;
|
|
|
}
|
|
|
//开始时间(入院时间)
|
|
@@ -40,10 +51,6 @@ public class THR0127 extends QCCatalogue {
|
|
|
if (beginDate == null) {
|
|
|
return;
|
|
|
}
|
|
|
- //如果住院天数小于7天则不判断该条规则
|
|
|
- if (!CatalogueUtil.compareTime(beginDate, StringUtil.parseDateTime(dischargeTime), (long) (7 * 24 * 60))) {
|
|
|
- return;
|
|
|
- }
|
|
|
|
|
|
ThreeLevelWardDoc threeLevelWardDoc = inputInfo.getThreeLevelWardDocs().get(0);
|
|
|
List<ThreeLevelWardDoc> allDoctorWradDocs = threeLevelWardDoc.getAllDoctorWradDocs();
|