diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/EmrInfoOdsCopyController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/EmrInfoOdsCopyController.java new file mode 100644 index 000000000..8baa9f1b6 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/EmrInfoOdsCopyController.java @@ -0,0 +1,103 @@ +package com.ruoyi.system.controller; + +import java.util.List; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.system.domain.EmrInfoOdsCopy; +import com.ruoyi.system.service.IEmrInfoOdsCopyService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * emr原始数据Controller + * + * @author ruoyi + * @date 2021-11-04 + */ +@RestController +@RequestMapping("/system/copy") +public class EmrInfoOdsCopyController extends BaseController +{ + @Autowired + private IEmrInfoOdsCopyService emrInfoOdsCopyService; + + /** + * 查询emr原始数据列表 + */ + @PreAuthorize("@ss.hasPermi('system:copy:list')") + @GetMapping("/list") + public TableDataInfo list(EmrInfoOdsCopy emrInfoOdsCopy) + { + startPage(); + List list = emrInfoOdsCopyService.selectEmrInfoOdsCopyList(emrInfoOdsCopy); + return getDataTable(list); + } + + /** + * 导出emr原始数据列表 + */ + @PreAuthorize("@ss.hasPermi('system:copy:export')") + @Log(title = "emr原始数据", businessType = BusinessType.EXPORT) + @GetMapping("/export") + public AjaxResult export(EmrInfoOdsCopy emrInfoOdsCopy) + { + List list = emrInfoOdsCopyService.selectEmrInfoOdsCopyList(emrInfoOdsCopy); + ExcelUtil util = new ExcelUtil(EmrInfoOdsCopy.class); + return util.exportExcel(list, "emr原始数据数据"); + } + + /** + * 获取emr原始数据详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:copy:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return AjaxResult.success(emrInfoOdsCopyService.selectEmrInfoOdsCopyById(id)); + } + + /** + * 新增emr原始数据 + */ + @PreAuthorize("@ss.hasPermi('system:copy:add')") + @Log(title = "emr原始数据", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody EmrInfoOdsCopy emrInfoOdsCopy) + { + return toAjax(emrInfoOdsCopyService.insertEmrInfoOdsCopy(emrInfoOdsCopy)); + } + + /** + * 修改emr原始数据 + */ + @PreAuthorize("@ss.hasPermi('system:copy:edit')") + @Log(title = "emr原始数据", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody EmrInfoOdsCopy emrInfoOdsCopy) + { + return toAjax(emrInfoOdsCopyService.updateEmrInfoOdsCopy(emrInfoOdsCopy)); + } + + /** + * 删除emr原始数据 + */ + @PreAuthorize("@ss.hasPermi('system:copy:remove')") + @Log(title = "emr原始数据", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(emrInfoOdsCopyService.deleteEmrInfoOdsCopyByIds(ids)); + } +} diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisUtils.java new file mode 100644 index 000000000..6cae91ce7 --- /dev/null +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisUtils.java @@ -0,0 +1,246 @@ +package com.ruoyi.common.core.redis; + +import java.util.Collection; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.TimeUnit; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.redis.core.BoundSetOperations; +import org.springframework.data.redis.core.HashOperations; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.data.redis.core.ValueOperations; +import org.springframework.stereotype.Component; + +/** + * spring redis 工具类 + * + * @author ruoyi + **/ +@SuppressWarnings(value = { "unchecked", "rawtypes" }) +@Component +public class RedisUtils +{ + @Autowired + public RedisTemplate redisTemplate; + + /** + * 缓存基本的对象,Integer、String、实体类等 + * + * @param key 缓存的键值 + * @param value 缓存的值 + */ + public void setCacheObject(final String key, final T value) + { + redisTemplate.opsForValue().set(key, value); + } + + /** + * 缓存基本的对象,Integer、String、实体类等 + * + * @param key 缓存的键值 + * @param value 缓存的值 + * @param timeout 时间 + * @param timeUnit 时间颗粒度 + */ + public void setCacheObject(final String key, final T value, final Integer timeout, final TimeUnit timeUnit) + { + redisTemplate.opsForValue().set(key, value, timeout, timeUnit); + } + + /** + * 设置有效时间 + * + * @param key Redis键 + * @param timeout 超时时间 + * @return true=设置成功;false=设置失败 + */ + public boolean expire(final String key, final long timeout) + { + return expire(key, timeout, TimeUnit.SECONDS); + } + + /** + * 设置有效时间 + * + * @param key Redis键 + * @param timeout 超时时间 + * @param unit 时间单位 + * @return true=设置成功;false=设置失败 + */ + public boolean expire(final String key, final long timeout, final TimeUnit unit) + { + return redisTemplate.expire(key, timeout, unit); + } + + /** + * 获得缓存的基本对象。 + * + * @param key 缓存键值 + * @return 缓存键值对应的数据 + */ + public T getCacheObject(final String key) + { + ValueOperations operation = redisTemplate.opsForValue(); + return operation.get(key); + } + + /** + * 删除单个对象 + * + * @param key + */ + public boolean deleteObject(final String key) + { + return redisTemplate.delete(key); + } + + /** + * 删除集合对象 + * + * @param collection 多个对象 + * @return + */ + public long deleteObject(final Collection collection) + { + return redisTemplate.delete(collection); + } + + /** + * 缓存List数据 + * + * @param key 缓存的键值 + * @param dataList 待缓存的List数据 + * @return 缓存的对象 + */ + public long setCacheList(final String key, final List dataList) + { + Long count = redisTemplate.opsForList().rightPushAll(key, dataList); + return count == null ? 0 : count; + } + + /** + * 获得缓存的list对象 + * + * @param key 缓存的键值 + * @return 缓存键值对应的数据 + */ + public List getCacheList(final String key) + { + return redisTemplate.opsForList().range(key, 0, -1); + } + + /** + * 缓存Set + * + * @param key 缓存键值 + * @param dataSet 缓存的数据 + * @return 缓存数据的对象 + */ + public BoundSetOperations setCacheSet(final String key, final Set dataSet) + { + BoundSetOperations setOperation = redisTemplate.boundSetOps(key); + Iterator it = dataSet.iterator(); + while (it.hasNext()) + { + setOperation.add(it.next()); + } + return setOperation; + } + + /** + * 获得缓存的set + * + * @param key + * @return + */ + public Set getCacheSet(final String key) + { + return redisTemplate.opsForSet().members(key); + } + + /** + * 缓存Map + * + * @param key + * @param dataMap + */ + public void setCacheMap(final String key, final Map dataMap) + { + if (dataMap != null) { + redisTemplate.opsForHash().putAll(key, dataMap); + } + } + + /** + * 获得缓存的Map + * + * @param key + * @return + */ + public Map getCacheMap(final String key) + { + return redisTemplate.opsForHash().entries(key); + } + + /** + * 往Hash中存入数据 + * + * @param key Redis键 + * @param hKey Hash键 + * @param value 值 + */ + public void setCacheMapValue(final String key, final String hKey, final T value) + { + redisTemplate.opsForHash().put(key, hKey, value); + } + + /** + * 获取Hash中的数据 + * + * @param key Redis键 + * @param hKey Hash键 + * @return Hash中的对象 + */ + public T getCacheMapValue(final String key, final String hKey) + { + HashOperations opsForHash = redisTemplate.opsForHash(); + return opsForHash.get(key, hKey); + } + + /** + * 删除Hash中的数据 + * + * @param key + * @param mapkey + */ + public void delCacheMapValue(final String key, final String hkey) + { + HashOperations hashOperations = redisTemplate.opsForHash(); + hashOperations.delete(key, hkey); + } + + /** + * 获取多个Hash中的数据 + * + * @param key Redis键 + * @param hKeys Hash键集合 + * @return Hash对象集合 + */ + public List getMultiCacheMapValue(final String key, final Collection hKeys) + { + return redisTemplate.opsForHash().multiGet(key, hKeys); + } + + /** + * 获得缓存的基本对象列表 + * + * @param pattern 字符串前缀 + * @return 对象列表 + */ + public Collection keys(final String pattern) + { + return redisTemplate.keys(pattern); + } +} diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/bean/BeanUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/bean/BeanUtil.java new file mode 100644 index 000000000..b02683d95 --- /dev/null +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/bean/BeanUtil.java @@ -0,0 +1,112 @@ +package com.ruoyi.common.utils.bean; + +import org.springframework.beans.BeanUtils; + +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Bean 工具类 + * + * @author ruoyi + */ +public class BeanUtil extends BeanUtils +{ + /** Bean方法名中属性名开始的下标 */ + private static final int BEAN_METHOD_PROP_INDEX = 3; + + /** * 匹配getter方法的正则表达式 */ + private static final Pattern GET_PATTERN = Pattern.compile("get(\\p{javaUpperCase}\\w*)"); + + /** * 匹配setter方法的正则表达式 */ + private static final Pattern SET_PATTERN = Pattern.compile("set(\\p{javaUpperCase}\\w*)"); + + /** + * Bean属性复制工具方法。 + * + * @param dest 目标对象 + * @param src 源对象 + */ + public static void copyBeanProp(Object dest, Object src) + { + try + { + copyProperties(src, dest); + } + catch (Exception e) + { + e.printStackTrace(); + } + } + + /** + * 获取对象的setter方法。 + * + * @param obj 对象 + * @return 对象的setter方法列表 + */ + public static List getSetterMethods(Object obj) + { + // setter方法列表 + List setterMethods = new ArrayList(); + + // 获取所有方法 + Method[] methods = obj.getClass().getMethods(); + + // 查找setter方法 + + for (Method method : methods) + { + Matcher m = SET_PATTERN.matcher(method.getName()); + if (m.matches() && (method.getParameterTypes().length == 1)) + { + setterMethods.add(method); + } + } + // 返回setter方法列表 + return setterMethods; + } + + /** + * 获取对象的getter方法。 + * + * @param obj 对象 + * @return 对象的getter方法列表 + */ + + public static List getGetterMethods(Object obj) + { + // getter方法列表 + List getterMethods = new ArrayList(); + // 获取所有方法 + Method[] methods = obj.getClass().getMethods(); + // 查找getter方法 + for (Method method : methods) + { + Matcher m = GET_PATTERN.matcher(method.getName()); + if (m.matches() && (method.getParameterTypes().length == 0)) + { + getterMethods.add(method); + } + } + // 返回getter方法列表 + return getterMethods; + } + + /** + * 检查Bean方法名中的属性名是否相等。
+ * 如getName()和setName()属性名一样,getName()和setAge()属性名不一样。 + * + * @param m1 方法名1 + * @param m2 方法名2 + * @return 属性名一样返回true,否则返回false + */ + + public static boolean isMethodPropEquals(String m1, String m2) + { + return m1.substring(BEAN_METHOD_PROP_INDEX).equals(m2.substring(BEAN_METHOD_PROP_INDEX)); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/EmrInfoOdsCopy.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/EmrInfoOdsCopy.java new file mode 100644 index 000000000..c31ff78af --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/EmrInfoOdsCopy.java @@ -0,0 +1,363 @@ +package com.ruoyi.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * emr原始数据对象 emr_info_ods_copy + * + * @author ruoyi + * @date 2021-11-04 + */ +public class EmrInfoOdsCopy extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键id */ + private Long id; + + /** 电子病历ID */ + @Excel(name = "电子病历ID") + private Long emrId; + + /** 科室编码 */ + @Excel(name = "科室编码") + private String deptNumber; + + /** 就诊科室 */ + @Excel(name = "就诊科室") + private String treatmentDepartment; + + /** 就诊日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "就诊日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date treatmentDate; + + /** 性别 */ + @Excel(name = "性别") + private String sex; + + /** 年龄 */ + @Excel(name = "年龄") + private String age; + + /** 身高 */ + @Excel(name = "身高") + private String height; + + /** 体重 */ + @Excel(name = "体重") + private String weight; + + /** 主诉 */ + @Excel(name = "主诉") + private String chiefComplaint; + + /** 现病史 */ + @Excel(name = "现病史") + private String hsPresentIllness; + + /** 体格检查 */ + @Excel(name = "体格检查") + private String physicalExamination; + + /** 初步诊断 */ + @Excel(name = "初步诊断") + private String preliminaryDiagnosis; + + /** 诊断ICD编码 */ + @Excel(name = "诊断ICD编码") + private String icdId; + + /** 病种中文名 */ + @Excel(name = "病种中文名") + private String icdName; + + /** 医生姓名 */ + @Excel(name = "医生姓名") + private String doctorName; + + /** 医生工号 */ + @Excel(name = "医生工号") + private String doctorNumber; + + /** 医生职称 */ + @Excel(name = "医生职称") + private String doctorTitle; + + /** 专科病历名称 */ + @Excel(name = "专科病历名称") + private String specialRecord; + + /** 状态0-未处理 1-已处理 */ + @Excel(name = "状态0-未处理 1-已处理") + private Integer state; + + /** 是否存在高危病种:0-不存在 1-存在 */ + @Excel(name = "是否存在高危病种:0-不存在 1-存在") + private Integer isHightDisease; + + /** 诊断结果一致率:是否落在小布top5内:0:不一致 1:一致 */ + @Excel(name = "诊断结果一致率:是否落在小布top5内:0:不一致 1:一致") + private Integer isTop; + + /** 是否为无依据诊断 :0-不是无依据诊断 1-是无依据诊断 */ + @Excel(name = "是否为无依据诊断 :0-不是无依据诊断 1-是无依据诊断") + private Integer isGroundless; + + /** 小布返回top5数组 */ + @Excel(name = "小布返回top5数组") + private String xiaobuResult; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setEmrId(Long emrId) + { + this.emrId = emrId; + } + + public Long getEmrId() + { + return emrId; + } + public void setDeptNumber(String deptNumber) + { + this.deptNumber = deptNumber; + } + + public String getDeptNumber() + { + return deptNumber; + } + public void setTreatmentDepartment(String treatmentDepartment) + { + this.treatmentDepartment = treatmentDepartment; + } + + public String getTreatmentDepartment() + { + return treatmentDepartment; + } + public void setTreatmentDate(Date treatmentDate) + { + this.treatmentDate = treatmentDate; + } + + public Date getTreatmentDate() + { + return treatmentDate; + } + public void setSex(String sex) + { + this.sex = sex; + } + + public String getSex() + { + return sex; + } + public void setAge(String age) + { + this.age = age; + } + + public String getAge() + { + return age; + } + public void setHeight(String height) + { + this.height = height; + } + + public String getHeight() + { + return height; + } + public void setWeight(String weight) + { + this.weight = weight; + } + + public String getWeight() + { + return weight; + } + public void setChiefComplaint(String chiefComplaint) + { + this.chiefComplaint = chiefComplaint; + } + + public String getChiefComplaint() + { + return chiefComplaint; + } + public void setHsPresentIllness(String hsPresentIllness) + { + this.hsPresentIllness = hsPresentIllness; + } + + public String getHsPresentIllness() + { + return hsPresentIllness; + } + public void setPhysicalExamination(String physicalExamination) + { + this.physicalExamination = physicalExamination; + } + + public String getPhysicalExamination() + { + return physicalExamination; + } + public void setPreliminaryDiagnosis(String preliminaryDiagnosis) + { + this.preliminaryDiagnosis = preliminaryDiagnosis; + } + + public String getPreliminaryDiagnosis() + { + return preliminaryDiagnosis; + } + public void setIcdId(String icdId) + { + this.icdId = icdId; + } + + public String getIcdId() + { + return icdId; + } + public void setIcdName(String icdName) + { + this.icdName = icdName; + } + + public String getIcdName() + { + return icdName; + } + public void setDoctorName(String doctorName) + { + this.doctorName = doctorName; + } + + public String getDoctorName() + { + return doctorName; + } + public void setDoctorNumber(String doctorNumber) + { + this.doctorNumber = doctorNumber; + } + + public String getDoctorNumber() + { + return doctorNumber; + } + public void setDoctorTitle(String doctorTitle) + { + this.doctorTitle = doctorTitle; + } + + public String getDoctorTitle() + { + return doctorTitle; + } + public void setSpecialRecord(String specialRecord) + { + this.specialRecord = specialRecord; + } + + public String getSpecialRecord() + { + return specialRecord; + } + public void setState(Integer state) + { + this.state = state; + } + + public Integer getState() + { + return state; + } + public void setIsHightDisease(Integer isHightDisease) + { + this.isHightDisease = isHightDisease; + } + + public Integer getIsHightDisease() + { + return isHightDisease; + } + public void setIsTop(Integer isTop) + { + this.isTop = isTop; + } + + public Integer getIsTop() + { + return isTop; + } + public void setIsGroundless(Integer isGroundless) + { + this.isGroundless = isGroundless; + } + + public Integer getIsGroundless() + { + return isGroundless; + } + public void setXiaobuResult(String xiaobuResult) + { + this.xiaobuResult = xiaobuResult; + } + + public String getXiaobuResult() + { + return xiaobuResult; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("emrId", getEmrId()) + .append("deptNumber", getDeptNumber()) + .append("treatmentDepartment", getTreatmentDepartment()) + .append("treatmentDate", getTreatmentDate()) + .append("sex", getSex()) + .append("age", getAge()) + .append("height", getHeight()) + .append("weight", getWeight()) + .append("chiefComplaint", getChiefComplaint()) + .append("hsPresentIllness", getHsPresentIllness()) + .append("physicalExamination", getPhysicalExamination()) + .append("preliminaryDiagnosis", getPreliminaryDiagnosis()) + .append("icdId", getIcdId()) + .append("icdName", getIcdName()) + .append("doctorName", getDoctorName()) + .append("doctorNumber", getDoctorNumber()) + .append("doctorTitle", getDoctorTitle()) + .append("specialRecord", getSpecialRecord()) + .append("state", getState()) + .append("isHightDisease", getIsHightDisease()) + .append("isTop", getIsTop()) + .append("isGroundless", getIsGroundless()) + .append("xiaobuResult", getXiaobuResult()) + .toString(); + } + +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/EmrInfoOdsCopyMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/EmrInfoOdsCopyMapper.java new file mode 100644 index 000000000..f2f02618d --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/EmrInfoOdsCopyMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.EmrInfoOdsCopy; + +/** + * emr原始数据Mapper接口 + * + * @author ruoyi + * @date 2021-11-04 + */ +public interface EmrInfoOdsCopyMapper +{ + /** + * 查询emr原始数据 + * + * @param id emr原始数据主键 + * @return emr原始数据 + */ + public EmrInfoOdsCopy selectEmrInfoOdsCopyById(Long id); + + /** + * 查询emr原始数据列表 + * + * @param emrInfoOdsCopy emr原始数据 + * @return emr原始数据集合 + */ + public List selectEmrInfoOdsCopyList(EmrInfoOdsCopy emrInfoOdsCopy); + + /** + * 新增emr原始数据 + * + * @param emrInfoOdsCopy emr原始数据 + * @return 结果 + */ + public int insertEmrInfoOdsCopy(EmrInfoOdsCopy emrInfoOdsCopy); + + /** + * 修改emr原始数据 + * + * @param emrInfoOdsCopy emr原始数据 + * @return 结果 + */ + public int updateEmrInfoOdsCopy(EmrInfoOdsCopy emrInfoOdsCopy); + + /** + * 删除emr原始数据 + * + * @param id emr原始数据主键 + * @return 结果 + */ + public int deleteEmrInfoOdsCopyById(Long id); + + /** + * 批量删除emr原始数据 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteEmrInfoOdsCopyByIds(Long[] ids); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IEmrInfoOdsCopyService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IEmrInfoOdsCopyService.java new file mode 100644 index 000000000..3665b6c14 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IEmrInfoOdsCopyService.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.EmrInfoOdsCopy; + +/** + * emr原始数据Service接口 + * + * @author ruoyi + * @date 2021-11-04 + */ +public interface IEmrInfoOdsCopyService +{ + /** + * 查询emr原始数据 + * + * @param id emr原始数据主键 + * @return emr原始数据 + */ + public EmrInfoOdsCopy selectEmrInfoOdsCopyById(Long id); + + /** + * 查询emr原始数据列表 + * + * @param emrInfoOdsCopy emr原始数据 + * @return emr原始数据集合 + */ + public List selectEmrInfoOdsCopyList(EmrInfoOdsCopy emrInfoOdsCopy); + + /** + * 新增emr原始数据 + * + * @param emrInfoOdsCopy emr原始数据 + * @return 结果 + */ + public int insertEmrInfoOdsCopy(EmrInfoOdsCopy emrInfoOdsCopy); + + /** + * 修改emr原始数据 + * + * @param emrInfoOdsCopy emr原始数据 + * @return 结果 + */ + public int updateEmrInfoOdsCopy(EmrInfoOdsCopy emrInfoOdsCopy); + + /** + * 批量删除emr原始数据 + * + * @param ids 需要删除的emr原始数据主键集合 + * @return 结果 + */ + public int deleteEmrInfoOdsCopyByIds(Long[] ids); + + /** + * 删除emr原始数据信息 + * + * @param id emr原始数据主键 + * @return 结果 + */ + public int deleteEmrInfoOdsCopyById(Long id); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/EmrInfoOdsCopyServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/EmrInfoOdsCopyServiceImpl.java new file mode 100644 index 000000000..82a6d5753 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/EmrInfoOdsCopyServiceImpl.java @@ -0,0 +1,93 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.EmrInfoOdsCopyMapper; +import com.ruoyi.system.domain.EmrInfoOdsCopy; +import com.ruoyi.system.service.IEmrInfoOdsCopyService; + +/** + * emr原始数据Service业务层处理 + * + * @author ruoyi + * @date 2021-11-04 + */ +@Service +public class EmrInfoOdsCopyServiceImpl implements IEmrInfoOdsCopyService +{ + @Autowired + private EmrInfoOdsCopyMapper emrInfoOdsCopyMapper; + + /** + * 查询emr原始数据 + * + * @param id emr原始数据主键 + * @return emr原始数据 + */ + @Override + public EmrInfoOdsCopy selectEmrInfoOdsCopyById(Long id) + { + return emrInfoOdsCopyMapper.selectEmrInfoOdsCopyById(id); + } + + /** + * 查询emr原始数据列表 + * + * @param emrInfoOdsCopy emr原始数据 + * @return emr原始数据 + */ + @Override + public List selectEmrInfoOdsCopyList(EmrInfoOdsCopy emrInfoOdsCopy) + { + return emrInfoOdsCopyMapper.selectEmrInfoOdsCopyList(emrInfoOdsCopy); + } + + /** + * 新增emr原始数据 + * + * @param emrInfoOdsCopy emr原始数据 + * @return 结果 + */ + @Override + public int insertEmrInfoOdsCopy(EmrInfoOdsCopy emrInfoOdsCopy) + { + return emrInfoOdsCopyMapper.insertEmrInfoOdsCopy(emrInfoOdsCopy); + } + + /** + * 修改emr原始数据 + * + * @param emrInfoOdsCopy emr原始数据 + * @return 结果 + */ + @Override + public int updateEmrInfoOdsCopy(EmrInfoOdsCopy emrInfoOdsCopy) + { + return emrInfoOdsCopyMapper.updateEmrInfoOdsCopy(emrInfoOdsCopy); + } + + /** + * 批量删除emr原始数据 + * + * @param ids 需要删除的emr原始数据主键 + * @return 结果 + */ + @Override + public int deleteEmrInfoOdsCopyByIds(Long[] ids) + { + return emrInfoOdsCopyMapper.deleteEmrInfoOdsCopyByIds(ids); + } + + /** + * 删除emr原始数据信息 + * + * @param id emr原始数据主键 + * @return 结果 + */ + @Override + public int deleteEmrInfoOdsCopyById(Long id) + { + return emrInfoOdsCopyMapper.deleteEmrInfoOdsCopyById(id); + } +} diff --git a/ruoyi-system/src/main/resources/mapper/system/EmrInfoOdsCopyMapper.xml b/ruoyi-system/src/main/resources/mapper/system/EmrInfoOdsCopyMapper.xml new file mode 100644 index 000000000..2eb2cd07b --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/EmrInfoOdsCopyMapper.xml @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, emr_id, dept_number, treatment_department, treatment_date, sex, age, height, weight, chief_complaint, hs_present_illness, physical_examination, preliminary_diagnosis, icd_id, icd_name, doctor_name, doctor_number, doctor_title, special_record, state, is_hight_disease, is_top, is_groundless, xiaobu_result from emr_info_ods_copy + + + + + + + + insert into emr_info_ods_copy + + emr_id, + dept_number, + treatment_department, + treatment_date, + sex, + age, + height, + weight, + chief_complaint, + hs_present_illness, + physical_examination, + preliminary_diagnosis, + icd_id, + icd_name, + doctor_name, + doctor_number, + doctor_title, + special_record, + state, + is_hight_disease, + is_top, + is_groundless, + xiaobu_result, + + + #{emrId}, + #{deptNumber}, + #{treatmentDepartment}, + #{treatmentDate}, + #{sex}, + #{age}, + #{height}, + #{weight}, + #{chiefComplaint}, + #{hsPresentIllness}, + #{physicalExamination}, + #{preliminaryDiagnosis}, + #{icdId}, + #{icdName}, + #{doctorName}, + #{doctorNumber}, + #{doctorTitle}, + #{specialRecord}, + #{state}, + #{isHightDisease}, + #{isTop}, + #{isGroundless}, + #{xiaobuResult}, + + + + + update emr_info_ods_copy + + emr_id = #{emrId}, + dept_number = #{deptNumber}, + treatment_department = #{treatmentDepartment}, + treatment_date = #{treatmentDate}, + sex = #{sex}, + age = #{age}, + height = #{height}, + weight = #{weight}, + chief_complaint = #{chiefComplaint}, + hs_present_illness = #{hsPresentIllness}, + physical_examination = #{physicalExamination}, + preliminary_diagnosis = #{preliminaryDiagnosis}, + icd_id = #{icdId}, + icd_name = #{icdName}, + doctor_name = #{doctorName}, + doctor_number = #{doctorNumber}, + doctor_title = #{doctorTitle}, + special_record = #{specialRecord}, + state = #{state}, + is_hight_disease = #{isHightDisease}, + is_top = #{isTop}, + is_groundless = #{isGroundless}, + xiaobu_result = #{xiaobuResult}, + + where id = #{id} + + + + delete from emr_info_ods_copy where id = #{id} + + + + delete from emr_info_ods_copy where id in + + #{id} + + + \ No newline at end of file