|
@@ -7,6 +7,7 @@ import com.lantone.qc.kernel.util.CatalogueUtil;
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
import com.lantone.qc.pub.model.doc.FirstCourseRecordDoc;
|
|
import com.lantone.qc.pub.model.doc.FirstCourseRecordDoc;
|
|
|
|
+import com.lantone.qc.pub.model.doc.MedicalRecordInfoDoc;
|
|
import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
|
|
import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
|
|
import com.lantone.qc.pub.model.doc.operation.OperationDoc;
|
|
import com.lantone.qc.pub.model.doc.operation.OperationDoc;
|
|
import com.lantone.qc.pub.model.doc.ward.AttendingDoctorWardDoc;
|
|
import com.lantone.qc.pub.model.doc.ward.AttendingDoctorWardDoc;
|
|
@@ -28,16 +29,14 @@ import java.util.Map;
|
|
@Component
|
|
@Component
|
|
public class THR0126 extends QCCatalogue {
|
|
public class THR0126 extends QCCatalogue {
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
- if (inputInfo.getThreeLevelWardDocs().size() == 0) {
|
|
|
|
- status.set("0");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if (inputInfo.getLeaveHospitalDoc() != null && inputInfo.getLeaveHospitalDoc().getStructureMap() != null
|
|
|
|
- && inputInfo.getThreeLevelWardDocs().size() > 0) {
|
|
|
|
- Map<String, String> getLeaveHospitalStructureMap = inputInfo.getLeaveHospitalDoc().getStructureMap();
|
|
|
|
- String admisTime = getLeaveHospitalStructureMap.get("入院日期");
|
|
|
|
- String dischargeTime = getLeaveHospitalStructureMap.get("出院日期");
|
|
|
|
- if (CatalogueUtil.isEmpty(admisTime)) {
|
|
|
|
|
|
+
|
|
|
|
+ MedicalRecordInfoDoc medicalRecordInfoDoc = inputInfo.getMedicalRecordInfoDoc();
|
|
|
|
+ if (inputInfo.getFirstPageRecordDoc() != null && inputInfo.getFirstPageRecordDoc().getStructureMap() != null &&
|
|
|
|
+ medicalRecordInfoDoc != null) {
|
|
|
|
+ Map<String, String> getFirstPageRecordStructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
|
|
|
|
+ String admisTime = medicalRecordInfoDoc.getStructureMap().get("behospitalDate");
|
|
|
|
+ String dischargeTime = getFirstPageRecordStructureMap.get("出院时间");
|
|
|
|
+ if (CatalogueUtil.isEmpty(admisTime) || CatalogueUtil.isEmpty(dischargeTime)) {
|
|
status.set("0");
|
|
status.set("0");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -53,12 +52,18 @@ public class THR0126 extends QCCatalogue {
|
|
!CatalogueUtil.compareTime(StringUtil.parseDateTime(admisTime), StringUtil.parseDateTime(dischargeTime), (long) (48 * 60))) {
|
|
!CatalogueUtil.compareTime(StringUtil.parseDateTime(admisTime), StringUtil.parseDateTime(dischargeTime), (long) (48 * 60))) {
|
|
status.set("0");
|
|
status.set("0");
|
|
return;
|
|
return;
|
|
|
|
+ } else {
|
|
|
|
+ if (inputInfo.getThreeLevelWardDocs().size() == 0) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
if (inputInfo.getBeHospitalizedDoc() != null) {
|
|
if (inputInfo.getBeHospitalizedDoc() != null) {
|
|
Map<String, String> beHospitalStructureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
|
|
Map<String, String> beHospitalStructureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
|
|
String admisTime = beHospitalStructureMap.get("入院日期");
|
|
String admisTime = beHospitalStructureMap.get("入院日期");
|
|
if (CatalogueUtil.isEmpty(admisTime)) {
|
|
if (CatalogueUtil.isEmpty(admisTime)) {
|
|
|
|
+ status.set("0");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if (!CatalogueUtil.compareTime(
|
|
if (!CatalogueUtil.compareTime(
|
|
@@ -79,7 +84,7 @@ public class THR0126 extends QCCatalogue {
|
|
if (firstCourseRecordDoc != null) {
|
|
if (firstCourseRecordDoc != null) {
|
|
String doctorSign = firstCourseRecordDoc.getStructureMap().get("医生签名");
|
|
String doctorSign = firstCourseRecordDoc.getStructureMap().get("医生签名");
|
|
String firstCourseProfessor = getFirstCourseProfessor(doctorSign);
|
|
String firstCourseProfessor = getFirstCourseProfessor(doctorSign);
|
|
- if (firstCourseProfessor.contains("主治") || firstCourseProfessor.contains("主任")) {
|
|
|
|
|
|
+ if (firstCourseProfessor.contains("主治")) {
|
|
String recordDateStr = firstCourseRecordDoc.getStructureMap().get("记录时间");
|
|
String recordDateStr = firstCourseRecordDoc.getStructureMap().get("记录时间");
|
|
if (StringUtil.isNotBlank(recordDateStr)) {
|
|
if (StringUtil.isNotBlank(recordDateStr)) {
|
|
if (!CatalogueUtil.compareTime(StringUtil.parseDateTime(admisTime), StringUtil.parseDateTime(recordDateStr), 48 * 60L)) {
|
|
if (!CatalogueUtil.compareTime(StringUtil.parseDateTime(admisTime), StringUtil.parseDateTime(recordDateStr), 48 * 60L)) {
|