|
@@ -1,11 +1,14 @@
|
|
|
package thyyxxk.wxservice_server.service;
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
import thyyxxk.wxservice_server.config.exception.ExceptionEnum;
|
|
|
+import thyyxxk.wxservice_server.dao.AppointmentDao;
|
|
|
import thyyxxk.wxservice_server.pojo.HrgResponse;
|
|
|
import thyyxxk.wxservice_server.pojo.ResultVo;
|
|
|
+import thyyxxk.wxservice_server.pojo.assessment.CovidPojo;
|
|
|
import thyyxxk.wxservice_server.pojo.covid.OrderCovidExamParam;
|
|
|
import thyyxxk.wxservice_server.utils.ThmzUrls;
|
|
|
import thyyxxk.wxservice_server.utils.ResultVoUtil;
|
|
@@ -13,6 +16,21 @@ import thyyxxk.wxservice_server.utils.ResultVoUtil;
|
|
|
@Slf4j
|
|
|
@Service
|
|
|
public class OrderCovidExamService {
|
|
|
+ private final AppointmentDao dao;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ public OrderCovidExamService(AppointmentDao dao) {
|
|
|
+ this.dao = dao;
|
|
|
+ }
|
|
|
+
|
|
|
+ public ResultVo<String> hasDoneCovidAssessment(String patientId) {
|
|
|
+ CovidPojo covid = dao.validCovidAssessment(patientId);
|
|
|
+ if (null == covid) {
|
|
|
+ return ResultVoUtil.success("no");
|
|
|
+ } else {
|
|
|
+ return ResultVoUtil.success("yes");
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
public ResultVo<String> savePrescription(String patientId) {
|
|
|
OrderCovidExamParam param = new OrderCovidExamParam();
|