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 82ddfc3..4b8696e 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 @@ -6,6 +6,7 @@ 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.service.*; import io.swagger.annotations.Api; @@ -142,25 +143,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 tPatientHospitalDoctors = itPatientHospitalDoctorService.selectTPatientHospitalDoctorList(tPatientHospitalDoctor); if (tPatientHospitalDoctors.isEmpty()) { @@ -169,6 +174,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)); + } + /** * 诊断记录列表 * @@ -191,12 +210,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 +224,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 +237,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)); } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AppPatientReq.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AppPatientReq.java index 4152214..2e08f18 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AppPatientReq.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AppPatientReq.java @@ -1,11 +1,8 @@ package com.ruoyi.system.domain.req; -import com.ruoyi.system.domain.TPatient; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import javax.validation.constraints.NotNull; - /** * App端添加患者入参实体 * @@ -13,33 +10,186 @@ import javax.validation.constraints.NotNull; * @date 2022/8/9 14:32 */ @ApiModel(value = "AppPatientReq", description = "App端添加患者入参实体") -public class AppPatientReq extends TPatient -{ - @NotNull(message = "doctorId不为空") +public class AppPatientReq { + /** + * 医生id + */ @ApiModelProperty("doctorId") private Long doctorId; - @NotNull(message = "hospitalId不为空") + /** + * 医院Id + */ @ApiModelProperty("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; } - public void setDoctorId(Long doctorId) - { + public void setDoctorId(Long doctorId) { this.doctorId = doctorId; } - public Long getHospitalId() - { + public Long getHospitalId() { return hospitalId; } - public void setHospitalId(Long hospitalId) - { + public void setHospitalId(Long 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; + } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AppRecordReq.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AppRecordReq.java new file mode 100644 index 0000000..8a4a942 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AppRecordReq.java @@ -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; + } +}