|
@@ -14,6 +14,9 @@ import thyyxxk.wxservice_server.factory.examreport.ExamReportService;
|
|
|
import thyyxxk.wxservice_server.factory.examreport.model.ExamDetailResponse;
|
|
|
import thyyxxk.wxservice_server.factory.examreport.model.ExamIndexRequest;
|
|
|
import thyyxxk.wxservice_server.factory.examreport.model.ExamIndexResponse;
|
|
|
+import thyyxxk.wxservice_server.factory.pathology.PathologyService;
|
|
|
+import thyyxxk.wxservice_server.factory.pathology.model.PathologyIndex;
|
|
|
+import thyyxxk.wxservice_server.factory.pathology.model.PathologyRequest;
|
|
|
import thyyxxk.wxservice_server.factory.thmz.ThmzService;
|
|
|
import thyyxxk.wxservice_server.utils.*;
|
|
|
|
|
@@ -28,12 +31,14 @@ public class InspectionsService {
|
|
|
private final InspectionsDao dao;
|
|
|
private final ElectronicHealthCardService healthCardService;
|
|
|
private final ThmzService thmzService;
|
|
|
+ private final InpatientService inpatientService;
|
|
|
|
|
|
@Autowired
|
|
|
- public InspectionsService(InspectionsDao dao, ElectronicHealthCardService healthCardService, ThmzService thmzService) {
|
|
|
+ public InspectionsService(InspectionsDao dao, ElectronicHealthCardService healthCardService, ThmzService thmzService, InpatientService inpatientService) {
|
|
|
this.dao = dao;
|
|
|
this.healthCardService = healthCardService;
|
|
|
this.thmzService = thmzService;
|
|
|
+ this.inpatientService = inpatientService;
|
|
|
}
|
|
|
|
|
|
public List<ExamIndexResponse> getExamIndex(CheckExamParam param) {
|
|
@@ -62,7 +67,7 @@ public class InspectionsService {
|
|
|
.patientNumType("Pis").patientNum(tjNo)
|
|
|
.startDate(param.getStart()).endDate(param.getEnd()).build());
|
|
|
}
|
|
|
- final List<String> inpatientNos = dao.selectInpatientNo(param.getPatientId());
|
|
|
+ List<String> inpatientNos = inpatientService.getInpatientNoByPatientId(param.getPatientId());
|
|
|
for (String inpatientNo : inpatientNos) {
|
|
|
requestList.add(new ExamIndexRequest.Builder()
|
|
|
.patientNumType("InPatient").patientNum(inpatientNo)
|
|
@@ -95,7 +100,7 @@ public class InspectionsService {
|
|
|
return dao.selectTestReportIndex(param);
|
|
|
}
|
|
|
|
|
|
- public TestReport checkTestDetail(QueryReportDetail param) throws Exception {
|
|
|
+ public TestReport checkTestDetail(QueryReportDetail param) {
|
|
|
if (StringUtil.isBlank(param.getPatientUid())) {
|
|
|
throw new BizException(ExceptionEnum.NULL_POINTER, "报告ID不能为空!");
|
|
|
}
|
|
@@ -117,4 +122,13 @@ public class InspectionsService {
|
|
|
);
|
|
|
return result;
|
|
|
}
|
|
|
+
|
|
|
+ public List<PathologyIndex> checkPathologyIndex(PathologyRequest request) {
|
|
|
+ PathologyService pathologyService = new PathologyService();
|
|
|
+ request.setSocialNo(dao.getPatSocialNo(request.getPatientId()));
|
|
|
+ List<PathologyIndex> list = pathologyService.queryOutpatientPathologyIndex(request);
|
|
|
+ list.sort(Comparator.comparing(PathologyIndex::getApplyDate).reversed());
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
}
|