diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/FollowupController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/FollowupController.java index 2c93c70..e44c9ff 100644 --- a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/FollowupController.java +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/FollowupController.java @@ -3,19 +3,21 @@ package com.xinelu.web.controller.applet; import com.alibaba.fastjson2.JSONArray; import com.alibaba.fastjson2.JSONObject; 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.spring.SpringUtils; 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.ApiOperation; -import org.springframework.beans.BeanUtils; -import org.springframework.web.bind.annotation.*; - -import javax.annotation.Resource; import java.util.ArrayList; 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 @@ -82,7 +84,7 @@ public class FollowupController { } - @ApiOperation("获取公卫体检记录") + @ApiOperation("获取公卫体检记录时间轴") @GetMapping("fetch/record/{identity}") public R> fetchMedicalRecord(@PathVariable String identity, @RequestHeader("region") String region) { if (identity == null || identity.isEmpty()) { diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/SdPerformanceController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/SdPerformanceController.java new file mode 100644 index 0000000..f5e336f --- /dev/null +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/SdPerformanceController.java @@ -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> 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 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()); + } + } +} diff --git a/xinelu-admin/src/main/resources/application.yml b/xinelu-admin/src/main/resources/application.yml index 1f4943e..aa332a8 100644 --- a/xinelu-admin/src/main/resources/application.yml +++ b/xinelu-admin/src/main/resources/application.yml @@ -269,6 +269,10 @@ fd: th: url: http://127.0.0.1:8080 +# 专病后端服务地址,德州正式外网地址:https://fdmp.xinelu.cn/dzsd +sd: + url: http://20.1.1.97:8080 + # 腾讯云音视频 trtc: sdkappid: 1600006944 diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/specialdisease/PerformanceForm.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/specialdisease/PerformanceForm.java new file mode 100644 index 0000000..19c5be6 --- /dev/null +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/specialdisease/PerformanceForm.java @@ -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; +} diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/specialdisease/PerformanceLastRecordVo.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/specialdisease/PerformanceLastRecordVo.java new file mode 100644 index 0000000..9efe27f --- /dev/null +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/specialdisease/PerformanceLastRecordVo.java @@ -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 formList = new ArrayList<>(); + + @ApiModelProperty(value = "目前用药集合") + private List drugList = new ArrayList<>(); + + @ApiModelProperty(value = "调整用药集合") + private List adjustDrugList = new ArrayList<>(); + + @ApiModelProperty(value = "处方集合") + private List prescriptionList = new ArrayList<>(); + +} diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/specialdisease/PerformanceMedication.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/specialdisease/PerformanceMedication.java new file mode 100644 index 0000000..4035618 --- /dev/null +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/specialdisease/PerformanceMedication.java @@ -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; +} diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/specialdisease/PrescriptionRecordDetail.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/specialdisease/PrescriptionRecordDetail.java new file mode 100644 index 0000000..484650d --- /dev/null +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/specialdisease/PrescriptionRecordDetail.java @@ -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(); + } +}