update===>增加专病复诊记录接口。
This commit is contained in:
parent
dfb289f8ad
commit
4e8ebe49d2
@ -3,19 +3,21 @@ package com.xinelu.web.controller.applet;
|
|||||||
import com.alibaba.fastjson2.JSONArray;
|
import com.alibaba.fastjson2.JSONArray;
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.xinelu.common.core.domain.R;
|
import com.xinelu.common.core.domain.R;
|
||||||
import com.xinelu.common.enums.FollowupType;
|
|
||||||
import com.xinelu.common.utils.http.HttpService;
|
import com.xinelu.common.utils.http.HttpService;
|
||||||
import com.xinelu.common.utils.spring.SpringUtils;
|
import com.xinelu.common.utils.spring.SpringUtils;
|
||||||
import com.xinelu.familydoctor.applet.pojo.dto.MedicalRecord;
|
import com.xinelu.familydoctor.applet.pojo.dto.MedicalRecord;
|
||||||
import com.xinelu.familydoctor.applet.pojo.vo.*;
|
import com.xinelu.familydoctor.applet.pojo.vo.FollowUpRecordDetailVo;
|
||||||
|
import com.xinelu.familydoctor.applet.pojo.vo.MedicalDetailVo;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.BeanUtils;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestHeader;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author mengkuiliang
|
* @Author mengkuiliang
|
||||||
@ -82,7 +84,7 @@ public class FollowupController {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("获取公卫体检记录")
|
@ApiOperation("获取公卫体检记录时间轴")
|
||||||
@GetMapping("fetch/record/{identity}")
|
@GetMapping("fetch/record/{identity}")
|
||||||
public R<List<MedicalRecord>> fetchMedicalRecord(@PathVariable String identity, @RequestHeader("region") String region) {
|
public R<List<MedicalRecord>> fetchMedicalRecord(@PathVariable String identity, @RequestHeader("region") String region) {
|
||||||
if (identity == null || identity.isEmpty()) {
|
if (identity == null || identity.isEmpty()) {
|
||||||
|
|||||||
@ -0,0 +1,65 @@
|
|||||||
|
package com.xinelu.web.controller.applet;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSON;
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
import com.xinelu.applet.vo.specialdisease.PerformanceLastRecordVo;
|
||||||
|
import com.xinelu.common.constant.HttpStatus;
|
||||||
|
import com.xinelu.common.core.domain.R;
|
||||||
|
import com.xinelu.common.core.domain.SelectVo;
|
||||||
|
import com.xinelu.common.utils.http.HttpService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import java.util.List;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 专病复诊记录控制器
|
||||||
|
* @author: haown
|
||||||
|
* @create: 2024-01-03 16:22
|
||||||
|
**/
|
||||||
|
@Api(tags = "专病复诊记录控制器")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/applet/performance")
|
||||||
|
public class SdPerformanceController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private HttpService httpService;
|
||||||
|
|
||||||
|
@Value("${sd.url}")
|
||||||
|
private String sdUrl;
|
||||||
|
|
||||||
|
@GetMapping("/timelineList/{identity}")
|
||||||
|
@ApiOperation(value = "查询复诊记录时间轴")
|
||||||
|
public R<List<SelectVo>> timelineList(@PathVariable("identity") String identity) {
|
||||||
|
String result = (String) httpService.get(sdUrl + "/business/applet/performance/timelineList/" + identity, null, String.class);
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||||
|
if (HttpStatus.SUCCESS == jsonObject.getInteger("code")) {
|
||||||
|
if (jsonObject.get("data") == null) {
|
||||||
|
return R.fail("暂无相关数据");
|
||||||
|
}
|
||||||
|
return R.ok(JSON.parseArray(jsonObject.getString("data"), SelectVo.class));
|
||||||
|
} else {
|
||||||
|
return R.fail(jsonObject.get("msg").toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getDetail/{perRecordId}")
|
||||||
|
@ApiOperation("获取履约详情")
|
||||||
|
public R<PerformanceLastRecordVo> getDetail(@PathVariable String perRecordId) {
|
||||||
|
String result = (String) httpService.get(sdUrl + "/business/applet/performance/getDetail/" + perRecordId, null, String.class);
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||||
|
if (HttpStatus.SUCCESS == jsonObject.getInteger("code")) {
|
||||||
|
if (jsonObject.get("data") == null) {
|
||||||
|
return R.fail("暂无相关数据");
|
||||||
|
}
|
||||||
|
return R.ok(JSON.toJavaObject(jsonObject.getJSONObject("data"), PerformanceLastRecordVo.class));
|
||||||
|
} else {
|
||||||
|
return R.fail(jsonObject.get("msg").toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -269,6 +269,10 @@ fd:
|
|||||||
th:
|
th:
|
||||||
url: http://127.0.0.1:8080
|
url: http://127.0.0.1:8080
|
||||||
|
|
||||||
|
# 专病后端服务地址,德州正式外网地址:https://fdmp.xinelu.cn/dzsd
|
||||||
|
sd:
|
||||||
|
url: http://20.1.1.97:8080
|
||||||
|
|
||||||
# 腾讯云音视频
|
# 腾讯云音视频
|
||||||
trtc:
|
trtc:
|
||||||
sdkappid: 1600006944
|
sdkappid: 1600006944
|
||||||
|
|||||||
@ -0,0 +1,63 @@
|
|||||||
|
package com.xinelu.applet.vo.specialdisease;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 履约项目信息表
|
||||||
|
* @TableName th_performance_form
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PerformanceForm implements Serializable {
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务主键
|
||||||
|
*/
|
||||||
|
private String perFormId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务主键
|
||||||
|
*/
|
||||||
|
private String perRecordId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务项目编号
|
||||||
|
*/
|
||||||
|
private String projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务项目名称
|
||||||
|
*/
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问题描述
|
||||||
|
*/
|
||||||
|
private String descripe;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处置详情
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件1
|
||||||
|
*/
|
||||||
|
private String attachments1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件2
|
||||||
|
*/
|
||||||
|
private String attachments2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件3
|
||||||
|
*/
|
||||||
|
private String attachments3;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
||||||
@ -0,0 +1,67 @@
|
|||||||
|
package com.xinelu.applet.vo.specialdisease;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 获取最后一次随访记录详情视图类
|
||||||
|
* @author: haown
|
||||||
|
* @create: 2022-11-10 09:54
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@ApiModel("获取最后一次随访记录详情视图类")
|
||||||
|
public class PerformanceLastRecordVo {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "身高")
|
||||||
|
private BigDecimal height;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "体重")
|
||||||
|
private BigDecimal weight;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "BMI")
|
||||||
|
private BigDecimal bmi;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "腰围")
|
||||||
|
private Integer waistline;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "收缩压(单位:mmHg)")
|
||||||
|
private Integer sbp;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "舒张压(单位:mmHg)")
|
||||||
|
private Integer dbp;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "心率(单位:次/分)")
|
||||||
|
private Integer hr;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "空腹血糖(单位:mmol/L)")
|
||||||
|
private BigDecimal fbg;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "餐后两小时血糖(单位:mmol/L)")
|
||||||
|
private BigDecimal pbg;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "履约时间")
|
||||||
|
@JsonFormat(pattern ="yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date performanceDate;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "控制是否满意")
|
||||||
|
private String satisfied;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "履约项目集合")
|
||||||
|
private List<PerformanceForm> formList = new ArrayList<>();
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "目前用药集合")
|
||||||
|
private List<PerformanceMedication> drugList = new ArrayList<>();
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "调整用药集合")
|
||||||
|
private List<PerformanceMedication> adjustDrugList = new ArrayList<>();
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "处方集合")
|
||||||
|
private List<PrescriptionRecordDetail> prescriptionList = new ArrayList<>();
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,53 @@
|
|||||||
|
package com.xinelu.applet.vo.specialdisease;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 履约用药信息表
|
||||||
|
* @TableName th_performance_medication
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PerformanceMedication implements Serializable {
|
||||||
|
/**
|
||||||
|
* 自增主键
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 居民身份证号
|
||||||
|
*/
|
||||||
|
private String identity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 履约记录编码
|
||||||
|
*/
|
||||||
|
private String perRecordId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药物类别 (0:目前用药 1:调整用药)
|
||||||
|
*/
|
||||||
|
private String medicineCategory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 药物名称
|
||||||
|
*/
|
||||||
|
private String medicineName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用法
|
||||||
|
*/
|
||||||
|
private String freq;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用量
|
||||||
|
*/
|
||||||
|
private String dose;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位
|
||||||
|
*/
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
||||||
@ -0,0 +1,208 @@
|
|||||||
|
package com.xinelu.applet.vo.specialdisease;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @TableName sd_prescription_record_detail
|
||||||
|
*/
|
||||||
|
public class PrescriptionRecordDetail implements Serializable {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处方记录业务主键
|
||||||
|
*/
|
||||||
|
private String prescriptionRecordId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模版业务主键
|
||||||
|
*/
|
||||||
|
private String templateId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模版名称
|
||||||
|
*/
|
||||||
|
private String templateName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处方类型(0:健康教育处方;1:运动处方;2:营养处方 3: 用药调整处方)
|
||||||
|
*/
|
||||||
|
private String templateType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内容
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 适用疾病
|
||||||
|
*/
|
||||||
|
private String targetGroups;
|
||||||
|
|
||||||
|
/** 履约记录编号 */
|
||||||
|
private String perRecordId;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPerRecordId() {
|
||||||
|
return perRecordId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPerRecordId(String perRecordId) {
|
||||||
|
this.perRecordId = perRecordId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处方记录业务主键
|
||||||
|
*/
|
||||||
|
public String getPrescriptionRecordId() {
|
||||||
|
return prescriptionRecordId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处方记录业务主键
|
||||||
|
*/
|
||||||
|
public void setPrescriptionRecordId(String prescriptionRecordId) {
|
||||||
|
this.prescriptionRecordId = prescriptionRecordId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模版业务主键
|
||||||
|
*/
|
||||||
|
public String getTemplateId() {
|
||||||
|
return templateId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模版业务主键
|
||||||
|
*/
|
||||||
|
public void setTemplateId(String templateId) {
|
||||||
|
this.templateId = templateId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模版名称
|
||||||
|
*/
|
||||||
|
public String getTemplateName() {
|
||||||
|
return templateName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模版名称
|
||||||
|
*/
|
||||||
|
public void setTemplateName(String templateName) {
|
||||||
|
this.templateName = templateName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处方类型(0:健康教育处方;1:运动处方;2:营养处方 3: 用药调整处方)
|
||||||
|
*/
|
||||||
|
public String getTemplateType() {
|
||||||
|
return templateType;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处方类型(0:健康教育处方;1:运动处方;2:营养处方 3: 用药调整处方)
|
||||||
|
*/
|
||||||
|
public void setTemplateType(String templateType) {
|
||||||
|
this.templateType = templateType;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内容
|
||||||
|
*/
|
||||||
|
public String getContent() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内容
|
||||||
|
*/
|
||||||
|
public void setContent(String content) {
|
||||||
|
this.content = content;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 适用疾病
|
||||||
|
*/
|
||||||
|
public String getTargetGroups() {
|
||||||
|
return targetGroups;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 适用疾病
|
||||||
|
*/
|
||||||
|
public void setTargetGroups(String targetGroups) {
|
||||||
|
this.targetGroups = targetGroups;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object that) {
|
||||||
|
if (this == that) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (that == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (getClass() != that.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
PrescriptionRecordDetail other = (PrescriptionRecordDetail) that;
|
||||||
|
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||||
|
&& (this.getPrescriptionRecordId() == null ? other.getPrescriptionRecordId() == null : this.getPrescriptionRecordId().equals(other.getPrescriptionRecordId()))
|
||||||
|
&& (this.getTemplateId() == null ? other.getTemplateId() == null : this.getTemplateId().equals(other.getTemplateId()))
|
||||||
|
&& (this.getTemplateName() == null ? other.getTemplateName() == null : this.getTemplateName().equals(other.getTemplateName()))
|
||||||
|
&& (this.getTemplateType() == null ? other.getTemplateType() == null : this.getTemplateType().equals(other.getTemplateType()))
|
||||||
|
&& (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
|
||||||
|
&& (this.getTargetGroups() == null ? other.getTargetGroups() == null : this.getTargetGroups().equals(other.getTargetGroups()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
final int prime = 31;
|
||||||
|
int result = 1;
|
||||||
|
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||||
|
result = prime * result + ((getPrescriptionRecordId() == null) ? 0 : getPrescriptionRecordId().hashCode());
|
||||||
|
result = prime * result + ((getTemplateId() == null) ? 0 : getTemplateId().hashCode());
|
||||||
|
result = prime * result + ((getTemplateName() == null) ? 0 : getTemplateName().hashCode());
|
||||||
|
result = prime * result + ((getTemplateType() == null) ? 0 : getTemplateType().hashCode());
|
||||||
|
result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
|
||||||
|
result = prime * result + ((getTargetGroups() == null) ? 0 : getTargetGroups().hashCode());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append(getClass().getSimpleName());
|
||||||
|
sb.append(" [");
|
||||||
|
sb.append("Hash = ").append(hashCode());
|
||||||
|
sb.append(", id=").append(id);
|
||||||
|
sb.append(", prescriptionRecordId=").append(prescriptionRecordId);
|
||||||
|
sb.append(", templateId=").append(templateId);
|
||||||
|
sb.append(", templateName=").append(templateName);
|
||||||
|
sb.append(", templateType=").append(templateType);
|
||||||
|
sb.append(", content=").append(content);
|
||||||
|
sb.append(", targetGroups=").append(targetGroups);
|
||||||
|
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||||
|
sb.append("]");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user