|
@@ -10,6 +10,7 @@ import com.lantone.qc.pub.model.OutputInfo;
|
|
|
import com.lantone.qc.pub.model.doc.FirstCourseRecordDoc;
|
|
|
import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
|
|
|
import com.lantone.qc.pub.model.doc.operation.OperationDoc;
|
|
|
+import com.lantone.qc.pub.model.doc.ward.AttendingDoctorWardDoc;
|
|
|
import com.lantone.qc.pub.util.DateUtil;
|
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -34,7 +35,18 @@ public class THR0128 extends QCCatalogue {
|
|
|
|
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
status.set("0");
|
|
|
- if (inputInfo.getLeaveHospitalDoc() != null) {
|
|
|
+ if (inputInfo.getBeHospitalizedDoc() != null) {
|
|
|
+ Map<String, String> beHospitalStructureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
|
|
|
+ String admisTime = beHospitalStructureMap.get("入院日期");
|
|
|
+ String dischargeTime = DateUtil.nowString();
|
|
|
+ //如果住院天数小于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) {
|
|
|
Map<String, String> leaveHospitalStructureMap = inputInfo.getLeaveHospitalDoc().getStructureMap();
|
|
|
String admisTime = leaveHospitalStructureMap.get(Content.admisTime);
|
|
|
String dischargeTime = leaveHospitalStructureMap.get(Content.dischargeTime);
|
|
@@ -44,7 +56,7 @@ public class THR0128 extends QCCatalogue {
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
if (inputInfo.getBeHospitalizedDoc() != null && inputInfo.getBeHospitalizedDoc().getStructureMap() != null
|
|
|
&& inputInfo.getThreeLevelWardDocs().size() > 0) {
|
|
|
Map<String, String> beHospitalStructureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
|
|
@@ -73,6 +85,19 @@ public class THR0128 extends QCCatalogue {
|
|
|
List<String> roundRecordEveryWeek = new ArrayList<>();
|
|
|
beginDate = DateUtil.dateZeroClear(beginDate);//从入院记录当天天0点开始算
|
|
|
int i = 1;
|
|
|
+ //长兴首次病程算一次主治查房,所以第一周只需要两次主治查房就可以
|
|
|
+ int rounds = 0;//主治查房次数
|
|
|
+ Date firstWeek = DateUtil.addDate(beginDate, 7);
|
|
|
+ for (AttendingDoctorWardDoc attendingDoctorWardDoc : threeLevelWardDoc.getAttendingDoctorWardDocs()) {//循环筛选主治,找出地日在第一周的个数
|
|
|
+ String recordTime = attendingDoctorWardDoc.getStructureMap().get("查房日期");
|
|
|
+ Date recordDate = StringUtil.parseDateTime(recordTime);
|
|
|
+ if(recordDate.before(firstWeek)){
|
|
|
+ rounds = rounds + 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(rounds >= 2){
|
|
|
+ return;
|
|
|
+ }
|
|
|
String lastWardDateRange = "";
|
|
|
List<String> lastWardDateRangeList = new ArrayList<>();
|
|
|
//每周的病历记录
|