app患者接口入参调整,新增修改接口

master
gongzhenkun 2 years ago
parent 4d61868bbf
commit b2da525070

@ -6,6 +6,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.*; import com.ruoyi.system.domain.*;
import com.ruoyi.system.domain.req.AppPatientHospitalDoctor; import com.ruoyi.system.domain.req.AppPatientHospitalDoctor;
import com.ruoyi.system.domain.req.AppPatientReq; 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.req.TRecordResultReq;
import com.ruoyi.system.service.*; import com.ruoyi.system.service.*;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -142,25 +143,29 @@ public class AppController extends BaseController
*/ */
@ApiOperation("诊断记录上传") @ApiOperation("诊断记录上传")
@PostMapping("/record/diagnostic/upload") @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)); return AjaxResult.success(tRecordService.updateTRecord(tRecord));
} }
/** /**
* *
* *
* @param tPatient t * @param appPatientReq App
* @return {@code AjaxResult} * @return {@code AjaxResult}
*/ */
@ApiOperation("添加患者") @ApiOperation("添加患者")
@PostMapping("/patient/add") @PostMapping("/patient/add")
public AjaxResult addPatient(AppPatientReq tPatient) public AjaxResult addPatient(AppPatientReq appPatientReq)
{ {
TPatient tPatient = new TPatient();
BeanUtils.copyProperties(appPatientReq, tPatient);
tPatientService.insertTPatient(tPatient); tPatientService.insertTPatient(tPatient);
TPatientHospitalDoctor tPatientHospitalDoctor = new TPatientHospitalDoctor(); TPatientHospitalDoctor tPatientHospitalDoctor = new TPatientHospitalDoctor();
tPatientHospitalDoctor.setHospitalId(tPatient.getHospitalId()); tPatientHospitalDoctor.setHospitalId(appPatientReq.getHospitalId());
tPatientHospitalDoctor.setDoctorId(tPatient.getDoctorId()); tPatientHospitalDoctor.setDoctorId(appPatientReq.getDoctorId());
tPatientHospitalDoctor.setPatientId(tPatient.getId()); tPatientHospitalDoctor.setPatientId(appPatientReq.getId());
List<TPatientHospitalDoctor> tPatientHospitalDoctors = itPatientHospitalDoctorService.selectTPatientHospitalDoctorList(tPatientHospitalDoctor); List<TPatientHospitalDoctor> tPatientHospitalDoctors = itPatientHospitalDoctorService.selectTPatientHospitalDoctorList(tPatientHospitalDoctor);
if (tPatientHospitalDoctors.isEmpty()) if (tPatientHospitalDoctors.isEmpty())
{ {
@ -169,6 +174,20 @@ public class AppController extends BaseController
return AjaxResult.success(); 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));
}
/** /**
* *
* *
@ -191,12 +210,11 @@ public class AppController extends BaseController
* @return {@code AjaxResult} * @return {@code AjaxResult}
*/ */
@ApiOperation("患者诊断记录信息详情") @ApiOperation("患者诊断记录信息详情")
@GetMapping("/record/info") @GetMapping("/record/info/{id}")
public AjaxResult patientsWithDiagnosisOfRecordInformationDetails(Long id) { public AjaxResult patientsWithDiagnosisOfRecordInformationDetails(@PathVariable("id") Long id) {
return AjaxResult.success(tRecordService.selectById(id)); return AjaxResult.success(tRecordService.selectById(id));
} }
/** /**
* *
* *
@ -206,11 +224,10 @@ public class AppController extends BaseController
@ApiOperation("患者已诊列表") @ApiOperation("患者已诊列表")
@GetMapping("/record/diagnosedList") @GetMapping("/record/diagnosedList")
public AjaxResult patientsDiagnosedList(TRecordResultReq recordResultReq) { public AjaxResult patientsDiagnosedList(TRecordResultReq recordResultReq) {
recordResultReq.setStatus("0"); recordResultReq.setStatus("1");
return AjaxResult.success(tRecordService.selectTRecordListWithoutResult(recordResultReq)); return AjaxResult.success(tRecordService.selectTRecordListWithoutResult(recordResultReq));
} }
/** /**
* *
* *
@ -220,7 +237,7 @@ public class AppController extends BaseController
@ApiOperation("患者候诊列表") @ApiOperation("患者候诊列表")
@GetMapping("/record/waitingList") @GetMapping("/record/waitingList")
public AjaxResult patientsWaitingList(TRecordResultReq recordResultReq) { public AjaxResult patientsWaitingList(TRecordResultReq recordResultReq) {
recordResultReq.setStatus("2"); recordResultReq.setStatus("0");
return AjaxResult.success(tRecordService.selectTRecordListWithoutResult(recordResultReq)); return AjaxResult.success(tRecordService.selectTRecordListWithoutResult(recordResultReq));
} }
} }

@ -1,11 +1,8 @@
package com.ruoyi.system.domain.req; package com.ruoyi.system.domain.req;
import com.ruoyi.system.domain.TPatient;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotNull;
/** /**
* App * App
* *
@ -13,33 +10,186 @@ import javax.validation.constraints.NotNull;
* @date 2022/8/9 14:32 * @date 2022/8/9 14:32
*/ */
@ApiModel(value = "AppPatientReq", description = "App端添加患者入参实体") @ApiModel(value = "AppPatientReq", description = "App端添加患者入参实体")
public class AppPatientReq extends TPatient public class AppPatientReq {
{ /**
@NotNull(message = "doctorId不为空") * id
*/
@ApiModelProperty("doctorId") @ApiModelProperty("doctorId")
private Long doctorId; private Long doctorId;
@NotNull(message = "hospitalId不为空") /**
* Id
*/
@ApiModelProperty("hospitalId") @ApiModelProperty("hospitalId")
private Long hospitalId; private Long hospitalId;
public Long getDoctorId() /**
{ * ID
*/
@ApiModelProperty("patientId")
private Long id;
/**
* openid
*/
@ApiModelProperty("腾讯openid")
private String openId;
/**
*
*/
@ApiModelProperty("编号")
private String identifier;
/**
*
*/
@ApiModelProperty("名称")
private String name;
/**
*
*/
@ApiModelProperty("电话")
private String phone;
/**
* 0 1 2
*/
@ApiModelProperty("用户性别: 0=男,1=女,2=未知")
private String sex;
/**
*
*/
@ApiModelProperty("年龄")
private Integer age;
/**
*
*/
@ApiModelProperty("身高")
private Integer height;
/**
*
*/
@ApiModelProperty("体重")
private Integer weight;
/**
* 0 1 2
*/
@ApiModelProperty("婚姻状态: 0=未婚,1=已婚,2=未知")
private String marriage;
/**
*
*/
@ApiModelProperty("基础疾病")
private String disease;
public Long getDoctorId() {
return doctorId; return doctorId;
} }
public void setDoctorId(Long doctorId) public void setDoctorId(Long doctorId) {
{
this.doctorId = doctorId; this.doctorId = doctorId;
} }
public Long getHospitalId() public Long getHospitalId() {
{
return hospitalId; return hospitalId;
} }
public void setHospitalId(Long hospitalId) public void setHospitalId(Long hospitalId) {
{
this.hospitalId = hospitalId; this.hospitalId = hospitalId;
} }
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getOpenId() {
return openId;
}
public void setOpenId(String openId) {
this.openId = openId;
}
public String getIdentifier() {
return identifier;
}
public void setIdentifier(String identifier) {
this.identifier = identifier;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public Integer getAge() {
return age;
}
public void setAge(Integer age) {
this.age = age;
}
public Integer getHeight() {
return height;
}
public void setHeight(Integer height) {
this.height = height;
}
public Integer getWeight() {
return weight;
}
public void setWeight(Integer weight) {
this.weight = weight;
}
public String getMarriage() {
return marriage;
}
public void setMarriage(String marriage) {
this.marriage = marriage;
}
public String getDisease() {
return disease;
}
public void setDisease(String disease) {
this.disease = disease;
}
} }

@ -0,0 +1,229 @@
package com.ruoyi.system.domain.req;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
/**
* App
*
* @author gongzhenkun
* @date 2022/8/9 17:02
*/
@ApiModel(value = "AppRecordReq", description = "App端诊断记录上传入参实体")
public class AppRecordReq implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
private Long id;
/**
*
*/
@ApiModelProperty("患者")
private Long patientId;
/**
*
*/
@ApiModelProperty("医生")
private Long doctorId;
/**
*
*/
@ApiModelProperty("医院")
private Long hospitalId;
/**
* 0 1
*/
@ApiModelProperty("状态 0=预约,1=就诊")
private String status;
/**
* ai
*/
@ApiModelProperty("ai诊断结果")
private String aiResult;
/**
* ai
*/
@ApiModelProperty("ai诊断结果无图片")
private String aiResult2;
/**
*
*/
@ApiModelProperty("医生诊断结果")
private String updateResult;
/**
*
*/
@ApiModelProperty("医生诊断结果,无图片")
private String updateResult2;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty("上传时间")
private Date uploadTime;
/**
*
*/
@ApiModelProperty("舌下")
private String imgSx;
/**
*
*/
@ApiModelProperty("舌上")
private String imgSm;
/**
*
*/
@ApiModelProperty("响应时长")
private Long responseTime;
/**
*
*/
@ApiModelProperty("ai结果返回时间")
private Date aiResultReturnTime;
/**
*
*/
@ApiModelProperty("ai结果修改时间")
private Date aiResultModifyTime;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getPatientId() {
return patientId;
}
public void setPatientId(Long patientId) {
this.patientId = patientId;
}
public Long getDoctorId() {
return doctorId;
}
public void setDoctorId(Long doctorId) {
this.doctorId = doctorId;
}
public Long getHospitalId() {
return hospitalId;
}
public void setHospitalId(Long hospitalId) {
this.hospitalId = hospitalId;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getAiResult() {
return aiResult;
}
public void setAiResult(String aiResult) {
this.aiResult = aiResult;
}
public String getAiResult2() {
return aiResult2;
}
public void setAiResult2(String aiResult2) {
this.aiResult2 = aiResult2;
}
public String getUpdateResult() {
return updateResult;
}
public void setUpdateResult(String updateResult) {
this.updateResult = updateResult;
}
public String getUpdateResult2() {
return updateResult2;
}
public void setUpdateResult2(String updateResult2) {
this.updateResult2 = updateResult2;
}
public Date getUploadTime() {
return uploadTime;
}
public void setUploadTime(Date uploadTime) {
this.uploadTime = uploadTime;
}
public String getImgSx() {
return imgSx;
}
public void setImgSx(String imgSx) {
this.imgSx = imgSx;
}
public String getImgSm() {
return imgSm;
}
public void setImgSm(String imgSm) {
this.imgSm = imgSm;
}
public Long getResponseTime() {
return responseTime;
}
public void setResponseTime(Long responseTime) {
this.responseTime = responseTime;
}
public Date getAiResultReturnTime() {
return aiResultReturnTime;
}
public void setAiResultReturnTime(Date aiResultReturnTime) {
this.aiResultReturnTime = aiResultReturnTime;
}
public Date getAiResultModifyTime() {
return aiResultModifyTime;
}
public void setAiResultModifyTime(Date aiResultModifyTime) {
this.aiResultModifyTime = aiResultModifyTime;
}
}
Loading…
Cancel
Save