|
|
|
@ -6,7 +6,9 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
|
|
import com.ruoyi.system.domain.*;
|
|
|
|
|
import com.ruoyi.system.domain.req.AppPatientHospitalDoctor;
|
|
|
|
|
import com.ruoyi.system.domain.req.AppPatientReq;
|
|
|
|
|
import com.ruoyi.system.domain.req.AppRecordReq;
|
|
|
|
|
import com.ruoyi.system.domain.req.TRecordResultReq;
|
|
|
|
|
import com.ruoyi.system.domain.resp.TRecordResp;
|
|
|
|
|
import com.ruoyi.system.service.*;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
@ -82,8 +84,7 @@ public class AppController extends BaseController
|
|
|
|
|
@GetMapping("/doctor/info")
|
|
|
|
|
public AjaxResult doctorInformation(Long doctorId)
|
|
|
|
|
{
|
|
|
|
|
TDoctor tDoctor = tDoctorService.selectTDoctorById(doctorId);
|
|
|
|
|
return AjaxResult.success(tDoctor);
|
|
|
|
|
return AjaxResult.success(tDoctorService.selectAppDoctorDetailById(doctorId));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -99,6 +100,7 @@ public class AppController extends BaseController
|
|
|
|
|
// 患者预约,新增t_record中的一条记录;判断关联表是否存在当前关系
|
|
|
|
|
TPatientHospitalDoctor tPatientHospitalDoctor = new TPatientHospitalDoctor();
|
|
|
|
|
BeanUtils.copyProperties(appPatientHospitalDoctor, tPatientHospitalDoctor);
|
|
|
|
|
tPatientHospitalDoctor.setPatientId(getUserId());
|
|
|
|
|
TRecord tRecord = new TRecord();
|
|
|
|
|
tRecord.setHospitalId(tPatientHospitalDoctor.getHospitalId());
|
|
|
|
|
tRecord.setPatientId(tPatientHospitalDoctor.getPatientId());
|
|
|
|
@ -129,6 +131,7 @@ public class AppController extends BaseController
|
|
|
|
|
|
|
|
|
|
@GetMapping(value = "/config/ai/refreshtime")
|
|
|
|
|
@Log(title = "获取AI结果刷新时间接口")
|
|
|
|
|
@ApiOperation("获取AI结果刷新时间接口")
|
|
|
|
|
public AjaxResult getConfigKey()
|
|
|
|
|
{
|
|
|
|
|
String configKey="t.ai.refreshtime";
|
|
|
|
@ -142,25 +145,29 @@ public class AppController extends BaseController
|
|
|
|
|
*/
|
|
|
|
|
@ApiOperation("诊断记录上传")
|
|
|
|
|
@PostMapping("/record/diagnostic/upload")
|
|
|
|
|
public AjaxResult diagnosticRecordsUploaded(TRecord tRecord) {
|
|
|
|
|
public AjaxResult diagnosticRecordsUploaded(AppRecordReq appRecordReq) {
|
|
|
|
|
TRecord tRecord = new TRecord();
|
|
|
|
|
BeanUtils.copyProperties(appRecordReq, tRecord);
|
|
|
|
|
return AjaxResult.success(tRecordService.updateTRecord(tRecord));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 添加病人
|
|
|
|
|
*
|
|
|
|
|
* @param tPatient t病人
|
|
|
|
|
* @param appPatientReq App端添加患者入参实体
|
|
|
|
|
* @return {@code AjaxResult}
|
|
|
|
|
*/
|
|
|
|
|
@ApiOperation("添加患者")
|
|
|
|
|
@PostMapping("/patient/add")
|
|
|
|
|
public AjaxResult addPatient(AppPatientReq tPatient)
|
|
|
|
|
public AjaxResult addPatient(AppPatientReq appPatientReq)
|
|
|
|
|
{
|
|
|
|
|
TPatient tPatient = new TPatient();
|
|
|
|
|
BeanUtils.copyProperties(appPatientReq, tPatient);
|
|
|
|
|
tPatientService.insertTPatient(tPatient);
|
|
|
|
|
TPatientHospitalDoctor tPatientHospitalDoctor = new TPatientHospitalDoctor();
|
|
|
|
|
tPatientHospitalDoctor.setHospitalId(tPatient.getHospitalId());
|
|
|
|
|
tPatientHospitalDoctor.setDoctorId(tPatient.getDoctorId());
|
|
|
|
|
tPatientHospitalDoctor.setPatientId(tPatient.getId());
|
|
|
|
|
tPatientHospitalDoctor.setHospitalId(appPatientReq.getHospitalId());
|
|
|
|
|
tPatientHospitalDoctor.setDoctorId(appPatientReq.getDoctorId());
|
|
|
|
|
tPatientHospitalDoctor.setPatientId(appPatientReq.getId());
|
|
|
|
|
List<TPatientHospitalDoctor> tPatientHospitalDoctors = itPatientHospitalDoctorService.selectTPatientHospitalDoctorList(tPatientHospitalDoctor);
|
|
|
|
|
if (tPatientHospitalDoctors.isEmpty())
|
|
|
|
|
{
|
|
|
|
@ -169,6 +176,20 @@ public class AppController extends BaseController
|
|
|
|
|
return AjaxResult.success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 修改患者
|
|
|
|
|
*
|
|
|
|
|
* @param appPatientReq App端添加患者入参实体
|
|
|
|
|
* @return {@code AjaxResult}
|
|
|
|
|
*/
|
|
|
|
|
@ApiOperation("患者信息修改")
|
|
|
|
|
@PostMapping("/patient/modify")
|
|
|
|
|
public AjaxResult patientsWithModified(AppPatientReq appPatientReq) {
|
|
|
|
|
TPatient tPatient = new TPatient();
|
|
|
|
|
BeanUtils.copyProperties(appPatientReq, tPatient);
|
|
|
|
|
return AjaxResult.success(tPatientService.updateTPatient(tPatient));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 诊断记录列表
|
|
|
|
|
*
|
|
|
|
@ -180,7 +201,7 @@ public class AppController extends BaseController
|
|
|
|
|
public AjaxResult diagnosisOfRecordList(AppPatientHospitalDoctor appPatientHospitalDoctor) {
|
|
|
|
|
TPatientHospitalDoctor tPatientHospitalDoctor = new TPatientHospitalDoctor();
|
|
|
|
|
BeanUtils.copyProperties(appPatientHospitalDoctor, tPatientHospitalDoctor);
|
|
|
|
|
List<TRecord> tRecords = tRecordService.queryRecordListByPHDids(tPatientHospitalDoctor);
|
|
|
|
|
List<TRecordResp> tRecords = tRecordService.queryRecordListByPHDids(tPatientHospitalDoctor);
|
|
|
|
|
return AjaxResult.success(tRecords);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -191,12 +212,11 @@ public class AppController extends BaseController
|
|
|
|
|
* @return {@code AjaxResult}
|
|
|
|
|
*/
|
|
|
|
|
@ApiOperation("患者诊断记录信息详情")
|
|
|
|
|
@GetMapping("/record/info")
|
|
|
|
|
public AjaxResult patientsWithDiagnosisOfRecordInformationDetails(Long id) {
|
|
|
|
|
@GetMapping("/record/info/{id}")
|
|
|
|
|
public AjaxResult patientsWithDiagnosisOfRecordInformationDetails(@PathVariable("id") Long id) {
|
|
|
|
|
return AjaxResult.success(tRecordService.selectById(id));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 患者已诊列表
|
|
|
|
|
*
|
|
|
|
@ -206,11 +226,10 @@ public class AppController extends BaseController
|
|
|
|
|
@ApiOperation("患者已诊列表")
|
|
|
|
|
@GetMapping("/record/diagnosedList")
|
|
|
|
|
public AjaxResult patientsDiagnosedList(TRecordResultReq recordResultReq) {
|
|
|
|
|
recordResultReq.setStatus("0");
|
|
|
|
|
recordResultReq.setStatus("1");
|
|
|
|
|
return AjaxResult.success(tRecordService.selectTRecordListWithoutResult(recordResultReq));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 病人等待名单
|
|
|
|
|
*
|
|
|
|
@ -220,7 +239,7 @@ public class AppController extends BaseController
|
|
|
|
|
@ApiOperation("患者候诊列表")
|
|
|
|
|
@GetMapping("/record/waitingList")
|
|
|
|
|
public AjaxResult patientsWaitingList(TRecordResultReq recordResultReq) {
|
|
|
|
|
recordResultReq.setStatus("2");
|
|
|
|
|
recordResultReq.setStatus("0");
|
|
|
|
|
return AjaxResult.success(tRecordService.selectTRecordListWithoutResult(recordResultReq));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|