|
|
@@ -7,14 +7,16 @@ import org.dom4j.DocumentHelper;
|
|
|
import org.dom4j.Element;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import thyyxxk.wxservice_server.config.exception.BizException;
|
|
|
import thyyxxk.wxservice_server.config.exception.ExceptionEnum;
|
|
|
import thyyxxk.wxservice_server.dao.InspectionsDao;
|
|
|
import thyyxxk.wxservice_server.entity.ResultVo;
|
|
|
-import thyyxxk.wxservice_server.entity.inspections.CheckExamParam;
|
|
|
-import thyyxxk.wxservice_server.entity.inspections.ExamIndexResult;
|
|
|
+import thyyxxk.wxservice_server.entity.inspections.request.CheckExamParam;
|
|
|
+import thyyxxk.wxservice_server.entity.inspections.response.ExamIndexResult;
|
|
|
import thyyxxk.wxservice_server.entity.inspections.HshjPatient;
|
|
|
-import thyyxxk.wxservice_server.entity.inspections.QueryReportDetail;
|
|
|
+import thyyxxk.wxservice_server.entity.inspections.request.QueryReportDetail;
|
|
|
import thyyxxk.wxservice_server.entity.inspections.detail.*;
|
|
|
+import thyyxxk.wxservice_server.entity.inspections.response.TestReport;
|
|
|
import thyyxxk.wxservice_server.factory.thmz.ThmzService;
|
|
|
import thyyxxk.wxservice_server.utils.*;
|
|
|
|
|
|
@@ -216,4 +218,32 @@ public class InspectionsService {
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ public List<TestReport> checkTestIndex(CheckExamParam param) {
|
|
|
+ param.setEnd(param.getEnd() + " 23:59:59");
|
|
|
+ return dao.selectTestReportIndex(param);
|
|
|
+ }
|
|
|
+
|
|
|
+ public TestReport checkTestDetail(QueryReportDetail param) throws Exception {
|
|
|
+ if (StringUtil.isBlank(param.getPatientUid())) {
|
|
|
+ throw new BizException(ExceptionEnum.NULL_POINTER, "报告ID不能为空!");
|
|
|
+ }
|
|
|
+ param.setOpenid(TokenUtil.getInstance().getUserOpenid());
|
|
|
+ int exist = dao.selectPatIdAndOpenidMatchCount(param.getPatientId(), param.getOpenid());
|
|
|
+ if (exist == 0) {
|
|
|
+ throw new BizException(ExceptionEnum.TOKEN_ERROR);
|
|
|
+ }
|
|
|
+ TestReport result = dao.selectTestReport(param.getPatientUid());
|
|
|
+ result.setExaminationSee(
|
|
|
+ result.getExaminationSee()
|
|
|
+ .replaceAll("\r\n", "<br/>")
|
|
|
+ .replaceAll("\n", "<br/>")
|
|
|
+ );
|
|
|
+ result.setExaminationreSult(
|
|
|
+ result.getExaminationreSult()
|
|
|
+ .replaceAll("\r\n", "<br/>")
|
|
|
+ .replaceAll("\n", "<br/>")
|
|
|
+ );
|
|
|
+ return result;
|
|
|
+ }
|
|
|
}
|