From d500f7b18df38392cc68ce58b3fdf2b145ded8e2 Mon Sep 17 00:00:00 2001
From: gongzhenkun <1658878546@qq.com>
Date: Wed, 24 Aug 2022 18:23:44 +0800
Subject: [PATCH] =?UTF-8?q?APP=E6=96=B0=E5=A2=9E=E6=9F=A5=E8=AF=A2?=
=?UTF-8?q?=E6=82=A3=E8=80=85=E8=AF=8A=E6=96=AD=E8=AE=B0=E5=BD=95=E5=88=97?=
=?UTF-8?q?=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../web/controller/api/AppController.java | 15 +++
.../domain/req/AppPatientRecordReq.java | 94 +++++++++++++++++++
.../system/domain/req/TRecordResultReq.java | 11 +++
.../resources/mapper/system/TRecordMapper.xml | 1 +
4 files changed, 121 insertions(+)
create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AppPatientRecordReq.java
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 b07ad1b..5240a53 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
@@ -681,4 +681,19 @@ public class AppController extends BaseController
public AjaxResult numberOfDiagnosis(@PathVariable("id") Long doctorId){
return AjaxResult.success(tRecordService.queryDoctorNumberOfDiagnosis(doctorId));
}
+
+ /**
+ * 查询患者诊断记录列表
+ *
+ * @param appPatientRecordReq 应用病人记录要求
+ * @return {@code AjaxResult}
+ */
+ @ApiOperation("APP查询患者诊断记录列表")
+ @Log(title = "APP查询患者诊断记录列表", businessType = BusinessType.OTHER)
+ @GetMapping("/patient/record/list")
+ public AjaxResult queryInPatientsWithDiagnosisOfRecordList(AppPatientRecordReq appPatientRecordReq){
+ TRecordResultReq tRecordResultReq = new TRecordResultReq();
+ BeanUtils.copyProperties(appPatientRecordReq, tRecordResultReq);
+ return AjaxResult.success(tRecordService.selectTRecordListWithoutResult(tRecordResultReq));
+ }
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AppPatientRecordReq.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AppPatientRecordReq.java
new file mode 100644
index 0000000..ce123f8
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AppPatientRecordReq.java
@@ -0,0 +1,94 @@
+package com.ruoyi.system.domain.req;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * App查询患者诊断记录列表
+ *
+ * @author gongzhenkun
+ * @date 2022/8/24 17:32
+ */
+@ApiModel(value = "AppPatientRecordReq", description = "App查询患者诊断记录列表")
+public class AppPatientRecordReq implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 档案号
+ */
+ @ApiModelProperty("档案号")
+ private String identifier;
+
+ /**
+ * 名称
+ */
+ @ApiModelProperty("名称")
+ private String name;
+
+ /**
+ * 用户性别(0男 1女 2未知)
+ */
+ @ApiModelProperty("用户性别: 0=男,1=女,2=未知")
+ private String sex;
+
+ /**
+ * 年龄
+ */
+ @ApiModelProperty("年龄")
+ @Max(120)
+ @Min(-1)
+ private Integer patientAge;
+
+ /**
+ * 就诊时间
+ */
+ @ApiModelProperty("就诊时间")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private String startTime;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getSex() {
+ return sex;
+ }
+
+ public void setSex(String sex) {
+ this.sex = sex;
+ }
+
+ public Integer getPatientAge() {
+ return patientAge;
+ }
+
+ public void setPatientAge(Integer patientAge) {
+ this.patientAge = patientAge;
+ }
+
+ public String getStartTime() {
+ return startTime;
+ }
+
+ public void setStartTime(String startTime) {
+ this.startTime = startTime;
+ }
+
+ public String getIdentifier() {
+ return identifier;
+ }
+
+ public void setIdentifier(String identifier) {
+ this.identifier = identifier;
+ }
+}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/TRecordResultReq.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/TRecordResultReq.java
index a736d53..0790b84 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/TRecordResultReq.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/TRecordResultReq.java
@@ -50,6 +50,17 @@ public class TRecordResultReq
@ApiModelProperty("是否查看删除状态 默认null不查看,1为查看全部")
private String delFlag;
+ @ApiModelProperty("(非必填)患者年龄[Integer]")
+ private Integer patientAge;
+
+ public Integer getPatientAge() {
+ return patientAge;
+ }
+
+ public void setPatientAge(Integer patientAge) {
+ this.patientAge = patientAge;
+ }
+
public String getName()
{
return name;
diff --git a/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml
index f7b492b..494f621 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml
@@ -319,6 +319,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and tr.create_time >= #{startTime}
and tr.create_time <= #{endTime}
and tr.create_time between #{startTime} and #{endTime}
+ and tp.age = #{patientAge}
order by tr.create_time ${doctorOder}
order by tp.create_time ${firstVisitOder}