diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java index 639dee7..f5a56ec 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java @@ -3,10 +3,7 @@ package com.ruoyi.web.controller.api; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.system.domain.TDoctor; -import com.ruoyi.system.domain.THospital; -import com.ruoyi.system.domain.TPatientHospitalDoctor; -import com.ruoyi.system.domain.TRecord; +import com.ruoyi.system.domain.*; import com.ruoyi.system.service.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -34,6 +31,9 @@ public class AppController extends BaseController @Resource private ITDoctorService tDoctorService; + @Resource + private ITPatientService tPatientService; + @Resource private ITPatientHospitalDoctorService itPatientHospitalDoctorService; @@ -85,7 +85,7 @@ public class AppController extends BaseController * @return {@code AjaxResult} */ @ApiOperation("患者预约") - @GetMapping("/getDoctorInfo") + @GetMapping("/patientsToMakeAnAppointment") public AjaxResult patientsToMakeAnAppointment(TPatientHospitalDoctor tPatientHospitalDoctor) { // 患者预约,新增t_record中的一条记录;判断关联表是否存在当前关系 @@ -123,4 +123,41 @@ public class AppController extends BaseController { return AjaxResult.success(configService.selectConfigByKey(configKey)); } + + /** + * 诊断记录上传 + * + * @return {@code AjaxResult} + */ + @ApiOperation("诊断记录上传") + @PostMapping("/diagnosticRecordsUploaded") + public AjaxResult diagnosticRecordsUploaded(TRecord tRecord) { + return AjaxResult.success(tRecordService.updateTRecord(tRecord)); + } + + /** + * 添加病人 + * + * @param tPatient t病人 + * @return {@code AjaxResult} + */ + @ApiOperation("添加患者") + @PostMapping("/addPatient") + public AjaxResult addPatient(TPatient tPatient) { + return AjaxResult.success(tPatientService.insertTPatient(tPatient)); + } + + + /** + * 诊断记录列表 + * + * @param tPatientHospitalDoctor t病人医院医生 + * @return {@code AjaxResult} + */ + @ApiOperation("诊断记录列表") + @GetMapping("/diagnosisOfRecordList") + public AjaxResult diagnosisOfRecordList(TPatientHospitalDoctor tPatientHospitalDoctor) { + List tRecords = tRecordService.queryRecordListByPHDids(tPatientHospitalDoctor); + return AjaxResult.success(tRecords); + } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TRecordMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TRecordMapper.java index b7d018a..79fa024 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TRecordMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TRecordMapper.java @@ -1,6 +1,8 @@ package com.ruoyi.system.mapper; import java.util.List; + +import com.ruoyi.system.domain.TPatientHospitalDoctor; import com.ruoyi.system.domain.TRecord; import com.ruoyi.system.domain.req.TRecordResultReq; import com.ruoyi.system.domain.resp.TRecordResp; @@ -66,4 +68,12 @@ public interface TRecordMapper List selectTRecordListWithoutResult(TRecordResultReq tRecord); TRecordResp selectById(Long id); + + /** + * 通过病人医院医生id查询记录列表 + * + * @param tPatientHospitalDoctor t病人医院医生 + * @return {@code List} + */ + public List queryRecordListByPHDids(TPatientHospitalDoctor tPatientHospitalDoctor); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ITRecordService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ITRecordService.java index d9f6c20..4717092 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/ITRecordService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ITRecordService.java @@ -1,6 +1,8 @@ package com.ruoyi.system.service; import java.util.List; + +import com.ruoyi.system.domain.TPatientHospitalDoctor; import com.ruoyi.system.domain.TRecord; import com.ruoyi.system.domain.req.TRecordResultReq; import com.ruoyi.system.domain.resp.TRecordResp; @@ -64,4 +66,12 @@ public interface ITRecordService List selectTRecordListWithoutResult(TRecordResultReq tRecord); TRecordResp selectById(Long id); + + /** + * 通过病人医院医生id查询记录列表 + * + * @param tPatientHospitalDoctor t病人医院医生 + * @return {@code List} + */ + public List queryRecordListByPHDids(TPatientHospitalDoctor tPatientHospitalDoctor); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TRecordServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TRecordServiceImpl.java index 8e0595d..658960d 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TRecordServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TRecordServiceImpl.java @@ -2,6 +2,7 @@ package com.ruoyi.system.service.impl; import java.util.List; import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.system.domain.TPatientHospitalDoctor; import com.ruoyi.system.domain.req.TRecordResultReq; import com.ruoyi.system.domain.resp.TRecordResp; import org.springframework.beans.factory.annotation.Autowired; @@ -107,4 +108,10 @@ public class TRecordServiceImpl implements ITRecordService { return tRecordMapper.selectById(id); } + + @Override + public List queryRecordListByPHDids(TPatientHospitalDoctor tPatientHospitalDoctor) + { + return tRecordMapper.queryRecordListByPHDids(tPatientHospitalDoctor); + } } diff --git a/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml index 47b903f..b23843f 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml @@ -181,6 +181,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" img_sx = #{imgSx}, img_sm = #{imgSm}, response_time = #{responseTime}, + ai_result_return_time = #{aiResultReturnTime}, + ai_result_modify_time = #{aiResultModifyTime}, where id = #{id} @@ -200,4 +202,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where id = #{id} + +