小程序:一体化照护方案/照护记录

This commit is contained in:
HaoWang 2023-12-19 11:25:39 +08:00
parent f46ea981fd
commit 061b605961
8 changed files with 697 additions and 0 deletions

View File

@ -0,0 +1,111 @@
package com.xinelu.applet.controller.careplan;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.github.pagehelper.PageInfo;
import com.xinelu.applet.vo.careplan.PerRecordVo;
import com.xinelu.applet.vo.careplan.PerformanceRecordVo;
import com.xinelu.applet.vo.careplan.PerformanceSchemaVo;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.utils.http.HttpService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@Api(tags = "一体化照护方案控制器")
@RestController
@RequestMapping("/chronic/careplan")
public class SchemaController {
@Resource
private HttpService httpService;
@Value("${th.url}")
private String thUrl;
/**
* @return
* @Author mengkuiliang
* @Description 履约计划
* @Date 2023-01-09 16:41
* @Param
**/
@ApiOperation("照护方案列表")
@GetMapping("/schema/list")
public AjaxResult schemaList(String identity, String year, Integer pageNum, Integer pageSize, @RequestHeader("regionKey") String regionKey) {
StringBuffer params = new StringBuffer();
params.append("?identity=").append(identity);
if (!StringUtils.isBlank(year)) {
params.append("&year=").append(year);
}
params.append("&pageSize=").append(pageSize != null && pageSize > 0 ? pageSize : 15);
params.append("&pageNum=").append(pageNum != null && pageNum > 0 ? pageNum : 1);
String result = (String) httpService.get(thUrl + "/fdmp/schema/list" + params.toString(), null, String.class);
JSONObject jsonObject = JSONObject.parseObject(result);
if (!"200".equals(jsonObject.get("code").toString())) {
return AjaxResult.error(jsonObject.get("msg").toString());
}
PageInfo pageInfo = new PageInfo();
if (jsonObject.get("rows") != null) {
pageInfo.setTotal(jsonObject.getInteger("total"));
pageInfo.setList(JSONArray.parseArray(jsonObject.getJSONArray("rows").toJSONString()).toJavaList(PerformanceSchemaVo.class));
}
return AjaxResult.success(pageInfo);
}
/**
* @return
* @Author mengkuiliang
* @Description 照护记录列表
* @Date 2023-01-09 16:41
* @Param
**/
@ApiOperation("照护记录列表")
@GetMapping("/per/list")
public AjaxResult perList(String identity, String year, Integer pageNum, Integer pageSize, @RequestHeader("regionKey") String regionKey) {
StringBuffer params = new StringBuffer();
params.append("?identity=").append(identity);
if (!StringUtils.isBlank(year)) {
params.append("&year=").append(year);
}
params.append("&pageSize=").append(pageSize != null && pageSize > 0 ? pageSize : 15);
params.append("&pageNum=").append(pageNum != null && pageNum > 0 ? pageNum : 1);
String result = (String) httpService.get(thUrl + "/fdmp/per/list" + params.toString(), null, String.class);
JSONObject jsonObject = JSONObject.parseObject(result);
if (!"200".equals(jsonObject.get("code").toString())) {
return AjaxResult.error(jsonObject.get("msg").toString());
}
PageInfo pageInfo = new PageInfo();
if (jsonObject.get("rows") != null) {
pageInfo.setTotal(jsonObject.getInteger("total"));
pageInfo.setList(jsonObject.getJSONArray("rows").toJavaList(PerRecordVo.class));
}
return AjaxResult.success(pageInfo);
}
/**
* @return
* @Author mengkuiliang
* @Description 获取照护记录详情
* @Date 2023-01-09 16:41
* @Param
**/
@ApiOperation("照护记录详情")
@GetMapping("/per/detail/{perRecordId}")
public AjaxResult detail(@PathVariable String perRecordId, @RequestHeader("regionKey") String regionKey) {
String result = (String) httpService.get(thUrl + "/fdmp/per/detail/" + perRecordId, null, String.class);
JSONObject jsonObject = JSONObject.parseObject(result);
if (!"200".equals(jsonObject.get("code").toString())) {
return AjaxResult.error(jsonObject.get("msg").toString());
}
if (jsonObject.get("data") != null) {
return AjaxResult.success(JSON.parseObject(jsonObject.getJSONObject("data").toJSONString(), PerformanceRecordVo.class));
}
return AjaxResult.error();
}
}

View File

@ -0,0 +1,79 @@
package com.xinelu.applet.dto.careplan;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* 三高患者一体化干预目标
* @TableName th_intervene_target
* @author haown
* @date 2022-10-27 09:36
*/
@Data
@ApiModel(description = "三高患者一体化干预目标")
public class InterveneTarget {
@ApiModelProperty(value = "自增主键")
private Integer id;
@ApiModelProperty(value = "业务主键")
private String targetId;
@ApiModelProperty(value = "指标")
private String target;
@ApiModelProperty(value = "指标项")
private String targetItem;
@ApiModelProperty(value = "是否通用")
private String common;
@ApiModelProperty(value = "是否一般高血压患者")
private String generalHbp;
@ApiModelProperty(value = "是否合并慢病")
private String combinedChronic;
@ApiModelProperty(value = "是否老年患者")
private String elderlyPatient;
@ApiModelProperty(value = "适用性别12")
private String gender;
@ApiModelProperty(value = "是否合并动脉粥样硬化性心血管病")
private String isAscvd;
@ApiModelProperty(value = "指标单位")
private String unit;
@ApiModelProperty(value = "目标值最小值")
private String targetValueMin;
@ApiModelProperty(value = "目标值最大值")
private String targetValueMax;
@ApiModelProperty(value = "创建机构编码")
private String deptId;
@ApiModelProperty(value = "创建机构名称")
private String deptName;
@ApiModelProperty(value = "是否有效1:有效0:无效")
private String status;
@ApiModelProperty(value = "排序")
private Integer orderNum;
@ApiModelProperty(value = "删除状态0未删除1已删除")
private String delFlag;
@JsonFormat(pattern = "yyyy-MM-dd")
private Date createTime;
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,100 @@
package com.xinelu.applet.dto.careplan;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Description 履约记录表
* @TableName th_performance_record
* @author haown
* @date 2022-10-25 09:36
*/
@Data
@ApiModel("履约记录表")
public class PerformanceRecord {
@ApiModelProperty(value = "自增主键")
private Long id;
@ApiModelProperty(value = "履约记录编码")
private String perRecordId;
@ApiModelProperty(value = "居民基本信息编码")
private String patientId;
@ApiModelProperty(value = "身高")
private BigDecimal height;
@ApiModelProperty(value = "体重")
private BigDecimal weight;
@ApiModelProperty(value = "BMI")
private BigDecimal bmi;
@ApiModelProperty(value = "腰围")
private Integer waistline;
@ApiModelProperty(value = "是否在哺乳期或妊娠期1是 0")
private Boolean lactationPregnancy;
@ApiModelProperty(value = "下次复诊时间")
private Date nextVisitTime;
@ApiModelProperty(value = "下次复诊内容")
private String nextVisitContent;
@ApiModelProperty(value = "复诊建议")
private String suggestion;
@ApiModelProperty(value = "收缩压单位mmHg")
private Integer sbp;
@ApiModelProperty(value = "舒张压单位mmHg")
private Integer dbp;
@ApiModelProperty(value = "历史最高收缩压单位mmHg")
private Integer maxSbp;
@ApiModelProperty(value = "历史最高舒张压单位mmHg")
private Integer maxDbp;
@ApiModelProperty(value = "心率(单位:次/分)")
private Integer hr;
@ApiModelProperty(value = "空腹血糖单位mmol/L")
private BigDecimal fbg;
@ApiModelProperty(value = "餐后两小时血糖单位mmol/L")
private BigDecimal pbg;
@ApiModelProperty(value = "随机血糖蛋白单位mmol/L")
private BigDecimal randomGlycoprotein;
@ApiModelProperty(value = "TC值-总胆固醇单位mmol/L")
private BigDecimal tc;
@ApiModelProperty(value = "HDLC值-高密度单位mmol/L")
private BigDecimal hdl;
@ApiModelProperty(value = "TG值-甘油三脂单位mmol/L")
private BigDecimal tg;
@ApiModelProperty(value = "LDLC值-低密度单位mmol/L")
private BigDecimal ldl;
@ApiModelProperty(value = "医生编号")
private String doctorId;
@ApiModelProperty(value = "医生名称")
private String doctorName;
@ApiModelProperty(value = "履约时间")
private Date performanceDate;
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,53 @@
package com.xinelu.applet.dto.careplan;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Description 健康指导表
* @TableName th_prescription
* @author haown
* @date 2022-10-26 09:36
*/
@Data
@ApiModel("健康指导表")
public class Prescription {
@ApiModelProperty(value = "主键")
private Long id;
/**
* 业务主键
*/
@ApiModelProperty(value = "业务主键")
private String prescriptionId;
/**
* 履约编码
*/
@ApiModelProperty(value = "履约编码")
private String perRecordId;
/**
* 健康教育处方
*/
@ApiModelProperty(value = "健康教育处方")
private String healthEducation;
/**
* 运动治疗处方
*/
@ApiModelProperty(value = "运动治疗处方")
private String exercise;
/**
* 营养治疗处方
*/
@ApiModelProperty(value = "营养治疗处方")
private String nutritional;
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,105 @@
package com.xinelu.applet.vo.careplan;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* @Author mengkuiliang
* @Description 履约记录展示类
* @Date 2023-01-11 9:46
* @Param
* @return
**/
@Data
@ApiModel("履约记录展示类")
public class PerRecordVo {
@ApiModelProperty(value = "履约记录编码")
private String perRecordId;
@ApiModelProperty(value = "居民基本信息编码")
private String patientId;
@ApiModelProperty(value = "身高")
private BigDecimal height;
@ApiModelProperty(value = "体重")
private BigDecimal weight;
@ApiModelProperty(value = "BMI")
private BigDecimal bmi;
@ApiModelProperty(value = "腰围")
private Integer waistline;
@ApiModelProperty(value = "是否在哺乳期或妊娠期1是 0")
private Boolean lactationPregnancy;
@ApiModelProperty(value = "下次复诊时间")
@JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date nextVisitTime;
@ApiModelProperty(value = "下次复诊内容")
private String nextVisitContent;
@ApiModelProperty(value = "复诊建议")
private String suggestion;
@ApiModelProperty(value = "收缩压单位mmHg")
private Integer sbp;
@ApiModelProperty(value = "舒张压单位mmHg")
private Integer dbp;
@ApiModelProperty(value = "历史最高收缩压单位mmHg")
private Integer maxSbp;
@ApiModelProperty(value = "历史最高舒张压单位mmHg")
private Integer maxDbp;
@ApiModelProperty(value = "心率(单位:次/分)")
private Integer hr;
@ApiModelProperty(value = "空腹血糖单位mmol/L")
private BigDecimal fbg;
@ApiModelProperty(value = "餐后两小时血糖单位mmol/L")
private BigDecimal pbg;
@ApiModelProperty(value = "随机血糖蛋白单位mmol/L")
private BigDecimal randomGlycoprotein;
@ApiModelProperty(value = "TC值-总胆固醇单位mmol/L")
private BigDecimal tc;
@ApiModelProperty(value = "HDLC值-高密度单位mmol/L")
private BigDecimal hdl;
@ApiModelProperty(value = "TG值-甘油三脂单位mmol/L")
private BigDecimal tg;
@ApiModelProperty(value = "LDLC值-低密度单位mmol/L")
private BigDecimal ldl;
@ApiModelProperty(value = "医生编号")
private String doctorId;
@ApiModelProperty(value = "医生名称")
private String doctorName;
@ApiModelProperty(value = "履约时间")
@JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date performanceDate;
@ApiModelProperty(value = "履约计划集合")
private List<PerformanceSchemaVo> schemaList;
@ApiModelProperty(value = "履约计划名称")
private String schemaName;
}

View File

@ -0,0 +1,85 @@
package com.xinelu.applet.vo.careplan;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @Author mengkuiliang
* @Description 用药展示类
* @Date 2022-12-14 13:58
* @Param
* @return
**/
@Data
@ApiModel("用药展示类")
public class PerTreatmentProtocolVo {
/**
* 居民业务主键
*/
@ApiModelProperty("居民业务主键")
private String patientId;
/**
* 履约记录编码
*/
@ApiModelProperty("履约记录编码")
private String perRecordId;
@ApiModelProperty(value = "履约时间")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date performanceDate;
/**
* 药物分类 1高血压用药 2糖尿病用药 3高血脂用药
*/
@ApiModelProperty("药物分类 1高血压用药 2糖尿病用药 3高血脂用药")
private String medicineType;
/**
* 药物分类名称
*/
@ApiModelProperty("药物分类 1高血压用药 2糖尿病用药 3高血脂用药")
private String medicineTypeName;
/**
* 药物类别 0目前用药 1调整用药
*/
@ApiModelProperty("药物类别 0目前用药 1调整用药")
private String medicineCategory;
/**
* 药物类别名称
*/
@ApiModelProperty("药物类别 0目前用药 1调整用药")
private String medicineCategoryName;
/**
* 药物名称
*/
@ApiModelProperty("药物名称")
private String medicineName;
/**
* 用法
*/
@ApiModelProperty("用法")
private String usage;
/**
* 用量
*/
@ApiModelProperty("用量")
private String dosage;
/**
* 频率
*/
@ApiModelProperty("频率")
private String frequency;
}

View File

@ -0,0 +1,39 @@
package com.xinelu.applet.vo.careplan;
import com.xinelu.applet.dto.careplan.InterveneTarget;
import com.xinelu.applet.dto.careplan.PerformanceRecord;
import com.xinelu.applet.dto.careplan.Prescription;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* @description: 查询履约记录详情视图类
* @author: haown
* @create: 2022-11-10 09:54
**/
@Data
@ApiModel("履约记录详情视图类")
public class PerformanceRecordVo {
@ApiModelProperty(value = "履约记录")
private PerformanceRecord performanceRecord;
@ApiModelProperty(value = "指导用药")
private List<PerTreatmentProtocolVo> drugProtocolList = new ArrayList<>();
@ApiModelProperty(value = "既往用药")
private List<PerTreatmentProtocolVo> protocolList = new ArrayList<>();
@ApiModelProperty(value = "干预目标")
private List<InterveneTarget> interveneTarget = new ArrayList<>();
@ApiModelProperty(value = "处方")
private Prescription prescription;
@ApiModelProperty(value = "履约计划")
private List<PerformanceSchemaVo> schemaList = new ArrayList<>();
}

View File

@ -0,0 +1,125 @@
package com.xinelu.applet.vo.careplan;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @Author mengkuiliang
* @Description 履约计划展示类
* @Date 2023-01-09 16:50
* @Param
* @return
**/
@ApiModel("履约计划展示类")
@Data
public class PerformanceSchemaVo {
/**
* 计划编码
*/
@ApiModelProperty("计划编码")
private String schemaId;
/**
* 居民基本信息编码
*/
@ApiModelProperty("居民基本信息编码")
private String patientId;
/**
* 套餐编码
*/
@ApiModelProperty("套餐编码")
private String packageId;
/**
* 服务项目编码
*/
@ApiModelProperty("服务项目编码")
private String projectId;
/**
* 服务项目名称
*/
@ApiModelProperty("服务项目名称")
private String projectName;
/**
* 计划履约时间
*/
@ApiModelProperty("计划履约时间")
@JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date scheduleTime;
/**
* 最小有效时间
*/
@ApiModelProperty("最小有效时间")
@JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date minValidTime;
/**
* 最大有效时间
*/
@ApiModelProperty("最大有效时间")
@JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date maxValidTime;
/**
* 履约年份
*/
@ApiModelProperty("履约年份")
private String schemaYear;
/**
* 计划类型0清单1新增
*/
@ApiModelProperty("计划类型0清单1新增")
private String schemaType;
/**
* 计划状态0未完成1已完成
*/
@ApiModelProperty("计划状态0未完成1已完成")
private String schemaStatus;
/**
* 实际履约时间
*/
@ApiModelProperty("实际履约时间")
@JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date actualTime;
/**
* 履约机构编码
*/
@ApiModelProperty("履约机构编码")
private String orgId;
/**
* 履约机构名称
*/
@ApiModelProperty("履约机构名称")
private String orgName;
/**
* 履约医生编码
*/
@ApiModelProperty("履约医生编码")
private String doctorId;
/**
* 履约医生姓名
*/
@ApiModelProperty("履约医生姓名")
private String doctorName;
/**
* 备注
*/
@ApiModelProperty("备注")
private String remark;
}