|
@@ -80,7 +80,12 @@ public class THR0128 extends QCCatalogue {
|
|
|
status.set("0");
|
|
|
return;
|
|
|
}
|
|
|
- Date lastRecordDate = getLastRecordDate(allDoctorWradDocs);
|
|
|
+ Date lastRecordDate = null;
|
|
|
+ if (StringUtil.isNotBlank(dischargeTime)) {
|
|
|
+ lastRecordDate = StringUtil.parseDateTime(dischargeTime);
|
|
|
+ } else {
|
|
|
+ lastRecordDate = getLastRecordDate(allDoctorWradDocs);
|
|
|
+ }
|
|
|
if (lastRecordDate == null) {
|
|
|
return;
|
|
|
}
|
|
@@ -106,7 +111,7 @@ public class THR0128 extends QCCatalogue {
|
|
|
List<String> lastWardDateRangeList = new ArrayList<>();
|
|
|
//每周的病历记录
|
|
|
while (i >= 1) {
|
|
|
- roundRecordThisWeek = extractWardRecord(inputInfo, allDoctorWradDocs, beginDate, hoursPerWeek, lastRecordDate);
|
|
|
+ roundRecordThisWeek = extractWardRecord(inputInfo, allDoctorWradDocs, beginDate, hoursPerWeek, lastRecordDate, dischargeTime);
|
|
|
if (CatalogueUtil.isEmpty(roundRecordThisWeek)) {
|
|
|
break;
|
|
|
}
|
|
@@ -171,7 +176,7 @@ public class THR0128 extends QCCatalogue {
|
|
|
* @param duration
|
|
|
* @return
|
|
|
*/
|
|
|
- private static String extractWardRecord(InputInfo inputInfo, List<ThreeLevelWardDoc> threeLevelWardDocs, Date admisDate, int duration, Date maxRecordDate) {
|
|
|
+ private static String extractWardRecord(InputInfo inputInfo, List<ThreeLevelWardDoc> threeLevelWardDocs, Date admisDate, int duration, Date maxRecordDate, String dischargeTime) {
|
|
|
String recordTime = "", recordTitle = "", title = "";
|
|
|
List<Date> dateList = new ArrayList();
|
|
|
for (ThreeLevelWardDoc threeLevelWardDoc : threeLevelWardDocs) {
|
|
@@ -199,6 +204,9 @@ public class THR0128 extends QCCatalogue {
|
|
|
dateList.add(recordDate);
|
|
|
}
|
|
|
}
|
|
|
+ if (dateList.size() > 0 && StringUtil.isNotBlank(dischargeTime)) {
|
|
|
+ dateList.add(StringUtil.parseDateTime(dischargeTime));
|
|
|
+ }
|
|
|
if (dateList.size() > 0) {
|
|
|
//dateList.sort(Date::compareTo);
|
|
|
if (!maxRecordDate.equals(dateList.get(dateList.size() - 1)) || CatalogueUtil.compareTime(admisDate, dateList.get(dateList.size() - 1), Long.valueOf(6 * 24 * 60))) {
|