app患者相关接口

master
gongzhenkun 2 years ago
parent a0e3dccd6a
commit 5bfe6a88a8

@ -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<TRecord> tRecords = tRecordService.queryRecordListByPHDids(tPatientHospitalDoctor);
return AjaxResult.success(tRecords);
}
}

@ -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<TRecordResp> selectTRecordListWithoutResult(TRecordResultReq tRecord);
TRecordResp selectById(Long id);
/**
* id
*
* @param tPatientHospitalDoctor t
* @return {@code List<TRecord>}
*/
public List<TRecord> queryRecordListByPHDids(TPatientHospitalDoctor tPatientHospitalDoctor);
}

@ -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<TRecordResp> selectTRecordListWithoutResult(TRecordResultReq tRecord);
TRecordResp selectById(Long id);
/**
* id
*
* @param tPatientHospitalDoctor t
* @return {@code List<TRecord>}
*/
public List<TRecord> queryRecordListByPHDids(TPatientHospitalDoctor tPatientHospitalDoctor);
}

@ -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<TRecord> queryRecordListByPHDids(TPatientHospitalDoctor tPatientHospitalDoctor)
{
return tRecordMapper.queryRecordListByPHDids(tPatientHospitalDoctor);
}
}

@ -181,6 +181,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="imgSx != null">img_sx = #{imgSx},</if>
<if test="imgSm != null">img_sm = #{imgSm},</if>
<if test="responseTime != null">response_time = #{responseTime},</if>
<if test="aiResultReturnTime != null">ai_result_return_time = #{aiResultReturnTime},</if>
<if test="aiResultModifyTime != null">ai_result_modify_time = #{aiResultModifyTime},</if>
</trim>
where id = #{id}
</update>
@ -200,4 +202,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectTRecordWithResult"/>
where id = #{id}
</select>
<select id="queryRecordListByPHDids" parameterType="TPatientHospitalDoctor" resultMap="TRecordResult">
<include refid="selectTRecordWithOutResult"/>
<where>
<if test="patientId != null and patientId != ''"> and patient_id = #{patientId}</if>
<if test="doctorId != null and doctorId != ''"> and doctor_id = #{doctorId}</if>
<if test="hospitalId != null and hospitalId != ''"> and hospital_id = #{hospitalId}</if>
</where>
</select>
</mapper>

Loading…
Cancel
Save