Commit a704e2c519927d38a3abdbdf01ea11b9f0db504f

Authored by shiyang
1 parent 05ff6ec0e7

承德市妇幼上线两癌需求-乳腺癌检查时追访数据添加修改

Showing 8 changed files with 1103 additions and 0 deletions

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IBreastAfterVisitDao.java View file @ a704e2c
  1 +package com.lyms.platform.biz.dal;
  2 +
  3 +import com.lyms.platform.pojo.BreastAfterVisitModel;
  4 +
  5 +import java.util.List;
  6 +
  7 +/**
  8 + * 乳腺追访
  9 + * Created by Administrator on 2022/2/8
  10 + */
  11 +public interface IBreastAfterVisitDao {
  12 +
  13 + /**
  14 + * 增加一条乳腺追访
  15 + *
  16 + * @param breastAfterVisitModel
  17 + * @return
  18 + */
  19 + BreastAfterVisitModel addOneCanScr(BreastAfterVisitModel breastAfterVisitModel);
  20 +
  21 +
  22 + void updateOneBreastAfterVisit(BreastAfterVisitModel breastAfterVisitModel);
  23 +}
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/BreastAfterVisitDaoImpl.java View file @ a704e2c
  1 +package com.lyms.platform.biz.dal.impl;
  2 +
  3 +import com.lyms.platform.biz.dal.IBreastAfterVisitDao;
  4 +import com.lyms.platform.common.dao.BaseMongoDAOImpl;
  5 +import com.lyms.platform.common.dao.operator.MongoCondition;
  6 +import com.lyms.platform.common.dao.operator.MongoOper;
  7 +import com.lyms.platform.common.dao.operator.MongoQuery;
  8 +import com.lyms.platform.pojo.BreastAfterVisitModel;
  9 +import com.lyms.platform.pojo.CancerScreeningModel;
  10 +import org.springframework.stereotype.Repository;
  11 +
  12 +import java.util.Date;
  13 +import java.util.List;
  14 +
  15 +/**
  16 + * @auther sy
  17 + * @createTime 2022年02月8日
  18 + * @discription
  19 + */
  20 +@Repository
  21 +public class BreastAfterVisitDaoImpl extends BaseMongoDAOImpl<BreastAfterVisitModel> implements IBreastAfterVisitDao {
  22 + /**
  23 + * 增加一条乳腺追访
  24 + *
  25 + * @param breastAfterVisitModel
  26 + * @return
  27 + */
  28 + @Override
  29 + public BreastAfterVisitModel addOneCanScr(BreastAfterVisitModel breastAfterVisitModel) {
  30 +
  31 + return save(breastAfterVisitModel);
  32 + }
  33 +
  34 + /**
  35 + * 修改一条乳腺追访
  36 + * @param breastAfterVisitModel
  37 + */
  38 + @Override
  39 + public void updateOneBreastAfterVisit(BreastAfterVisitModel breastAfterVisitModel) {
  40 + update(new MongoQuery(new MongoCondition("parentId", breastAfterVisitModel.getParentId(), MongoOper.IS)).convertToMongoQuery(), breastAfterVisitModel);
  41 + }
  42 +
  43 +
  44 +}
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/BreastAfterVisitService.java View file @ a704e2c
  1 +package com.lyms.platform.biz.service;
  2 +
  3 +import com.lyms.platform.biz.dal.IBreastAfterVisitDao;
  4 +import com.lyms.platform.biz.dal.ICancerScreeningDao;
  5 +import com.lyms.platform.common.dao.operator.MongoCondition;
  6 +import com.lyms.platform.common.dao.operator.MongoOper;
  7 +import com.lyms.platform.common.dao.operator.MongoQuery;
  8 +import com.lyms.platform.common.enums.YnEnums;
  9 +import com.lyms.platform.pojo.BreastAfterVisitModel;
  10 +import com.lyms.platform.pojo.CancerScreeningModel;
  11 +import com.lyms.platform.query.CancerScreeningQuery;
  12 +import org.apache.commons.lang.StringUtils;
  13 +import org.springframework.beans.factory.annotation.Autowired;
  14 +import org.springframework.data.domain.Sort;
  15 +import org.springframework.stereotype.Service;
  16 +import org.springframework.util.Assert;
  17 +
  18 +import java.util.Date;
  19 +import java.util.List;
  20 +
  21 +/**
  22 + * 乳腺追访服务实现
  23 + *
  24 + */
  25 +@Service
  26 +public class BreastAfterVisitService {
  27 + @Autowired
  28 + private IBreastAfterVisitDao iBreastAfterVisitDao;
  29 +
  30 +
  31 +
  32 +
  33 + /**
  34 + * 增加一条乳腺追访
  35 + *
  36 + * @param breastAfterVisitModel
  37 + * @return BreastAfterVisitModel
  38 + */
  39 + public BreastAfterVisitModel addOneBreastAfterVisit(BreastAfterVisitModel breastAfterVisitModel) {
  40 + Assert.notNull(breastAfterVisitModel, "addOneBreastAfterVisit breastAfterVisitModel must not be null.");
  41 + breastAfterVisitModel.setCreated(new Date());
  42 +
  43 + return iBreastAfterVisitDao.addOneCanScr(breastAfterVisitModel);
  44 + }
  45 + /**
  46 + * 修改一条乳腺追访
  47 + *
  48 + * @param breastAfterVisitModel
  49 + */
  50 + public void updateOneBreastAfterVisit(BreastAfterVisitModel breastAfterVisitModel) {
  51 + Assert.notNull(breastAfterVisitModel.getParentId(), "updateOnebreastAfterVisitModel parentId must not be null.");
  52 + breastAfterVisitModel.setModified(new Date());
  53 + iBreastAfterVisitDao.updateOneBreastAfterVisit(breastAfterVisitModel);
  54 + }
  55 +
  56 +}
platform-dal/src/main/java/com/lyms/platform/pojo/BreastAfterVisitModel.java View file @ a704e2c
  1 +package com.lyms.platform.pojo;
  2 +
  3 +/**
  4 + * @auther sy
  5 + * @createTime 2022年02月8日
  6 + * @discription 乳腺追访列表模型
  7 + */
  8 +
  9 +import com.lyms.platform.common.result.BaseModel;
  10 +import org.springframework.data.mongodb.core.mapping.Document;
  11 +
  12 +import java.util.Date;
  13 +import java.util.Map;
  14 +
  15 +@Document(collection = "lyms_cancer_BreastAfterVisitModel")
  16 +public class BreastAfterVisitModel extends BaseModel {
  17 + //主键id
  18 + private String id;
  19 + //乳腺检查记录id
  20 + private String parentId;
  21 + //医院ID
  22 + private String hospitalId;
  23 + //姓名
  24 + private String username;
  25 + //出生日期
  26 + private Date birthday;
  27 + //民族Id
  28 + private String nationId;
  29 + //身份证件号
  30 + private String certificateNum;
  31 + //手机号
  32 + private String phone;
  33 + //居住地
  34 + private String provinceId;
  35 + //市
  36 + private String cityId;
  37 + //区
  38 + private String areaId;
  39 + //街道
  40 + private String streetId;
  41 + //详细地址
  42 + private String address;
  43 + //编号
  44 + private String code;
  45 + /**
  46 + * 乳腺临床检查
  47 + */
  48 + //乳头左
  49 + private Map<String, Object> rxlRtz;
  50 + //乳头右
  51 + private Map<String, Object> rxlRty;
  52 + //溢液左 ,遵化新增,血性5 浆液性6 清水性7
  53 + private Map<String, Object> rxlYyz;
  54 + //溢液右
  55 + private Map<String, Object> rxlYyy;
  56 + //肿块左
  57 + private Map<String, Object> rxlZkz;
  58 + //肿块右
  59 + private Map<String, Object> rxlZky;
  60 +
  61 + /**
  62 + * 乳腺彩超检查
  63 + * 超声所见
  64 + * 原文字展示。改为单选。newRxCssj展示用到enum(LhUltrasoundContent);
  65 + * 历史数据展示:前端判断newRxCssj有没值。没有还用以前rxCssj字段展示
  66 + */
  67 + private String newRxCssj;
  68 +
  69 + //隆化乳腺X钼靶检查内容,展示用到enum(LhBreastXRayContent)
  70 + private String rxXJc;
  71 +
  72 +
  73 + //检査日期
  74 + private Date checkDate;
  75 +
  76 + //追访日期
  77 + private Date afterVisitTime;
  78 + //预约下次追访日期
  79 + private Date nextAfterVisitTime;
  80 +
  81 + //随访状态(0:待随访,1:已随访)
  82 + private Integer type;
  83 +
  84 +
  85 +
  86 + /**
  87 + * 是否有效
  88 + */
  89 + private Integer yn;
  90 + private Date created;
  91 + private Date modified;
  92 +
  93 + public String getId() {
  94 + return id;
  95 + }
  96 +
  97 + public void setId(String id) {
  98 + this.id = id;
  99 + }
  100 +
  101 + public String getParentId() {
  102 + return parentId;
  103 + }
  104 +
  105 + public void setParentId(String parentId) {
  106 + this.parentId = parentId;
  107 + }
  108 +
  109 + public String getHospitalId() {
  110 + return hospitalId;
  111 + }
  112 +
  113 + public void setHospitalId(String hospitalId) {
  114 + this.hospitalId = hospitalId;
  115 + }
  116 +
  117 + public String getUsername() {
  118 + return username;
  119 + }
  120 +
  121 + public void setUsername(String username) {
  122 + this.username = username;
  123 + }
  124 +
  125 + public Date getBirthday() {
  126 + return birthday;
  127 + }
  128 +
  129 + public void setBirthday(Date birthday) {
  130 + this.birthday = birthday;
  131 + }
  132 +
  133 + public String getNationId() {
  134 + return nationId;
  135 + }
  136 +
  137 + public void setNationId(String nationId) {
  138 + this.nationId = nationId;
  139 + }
  140 +
  141 + public String getCertificateNum() {
  142 + return certificateNum;
  143 + }
  144 +
  145 + public void setCertificateNum(String certificateNum) {
  146 + this.certificateNum = certificateNum;
  147 + }
  148 +
  149 + public String getPhone() {
  150 + return phone;
  151 + }
  152 +
  153 + public void setPhone(String phone) {
  154 + this.phone = phone;
  155 + }
  156 +
  157 + public String getProvinceId() {
  158 + return provinceId;
  159 + }
  160 +
  161 + public void setProvinceId(String provinceId) {
  162 + this.provinceId = provinceId;
  163 + }
  164 +
  165 + public String getCityId() {
  166 + return cityId;
  167 + }
  168 +
  169 + public void setCityId(String cityId) {
  170 + this.cityId = cityId;
  171 + }
  172 +
  173 + public String getAreaId() {
  174 + return areaId;
  175 + }
  176 +
  177 + public void setAreaId(String areaId) {
  178 + this.areaId = areaId;
  179 + }
  180 +
  181 + public String getStreetId() {
  182 + return streetId;
  183 + }
  184 +
  185 + public void setStreetId(String streetId) {
  186 + this.streetId = streetId;
  187 + }
  188 +
  189 + public String getAddress() {
  190 + return address;
  191 + }
  192 +
  193 + public void setAddress(String address) {
  194 + this.address = address;
  195 + }
  196 +
  197 + public String getCode() {
  198 + return code;
  199 + }
  200 +
  201 + public void setCode(String code) {
  202 + this.code = code;
  203 + }
  204 +
  205 + public Map<String, Object> getRxlRtz() {
  206 + return rxlRtz;
  207 + }
  208 +
  209 + public void setRxlRtz(Map<String, Object> rxlRtz) {
  210 + this.rxlRtz = rxlRtz;
  211 + }
  212 +
  213 + public Map<String, Object> getRxlRty() {
  214 + return rxlRty;
  215 + }
  216 +
  217 + public void setRxlRty(Map<String, Object> rxlRty) {
  218 + this.rxlRty = rxlRty;
  219 + }
  220 +
  221 + public Map<String, Object> getRxlYyz() {
  222 + return rxlYyz;
  223 + }
  224 +
  225 + public void setRxlYyz(Map<String, Object> rxlYyz) {
  226 + this.rxlYyz = rxlYyz;
  227 + }
  228 +
  229 + public Map<String, Object> getRxlYyy() {
  230 + return rxlYyy;
  231 + }
  232 +
  233 + public void setRxlYyy(Map<String, Object> rxlYyy) {
  234 + this.rxlYyy = rxlYyy;
  235 + }
  236 +
  237 + public Map<String, Object> getRxlZkz() {
  238 + return rxlZkz;
  239 + }
  240 +
  241 + public void setRxlZkz(Map<String, Object> rxlZkz) {
  242 + this.rxlZkz = rxlZkz;
  243 + }
  244 +
  245 + public Map<String, Object> getRxlZky() {
  246 + return rxlZky;
  247 + }
  248 +
  249 + public void setRxlZky(Map<String, Object> rxlZky) {
  250 + this.rxlZky = rxlZky;
  251 + }
  252 +
  253 + public String getNewRxCssj() {
  254 + return newRxCssj;
  255 + }
  256 +
  257 + public void setNewRxCssj(String newRxCssj) {
  258 + this.newRxCssj = newRxCssj;
  259 + }
  260 +
  261 + public String getRxXJc() {
  262 + return rxXJc;
  263 + }
  264 +
  265 + public void setRxXJc(String rxXJc) {
  266 + this.rxXJc = rxXJc;
  267 + }
  268 +
  269 + public Date getCheckDate() {
  270 + return checkDate;
  271 + }
  272 +
  273 + public void setCheckDate(Date checkDate) {
  274 + this.checkDate = checkDate;
  275 + }
  276 +
  277 + public Date getAfterVisitTime() {
  278 + return afterVisitTime;
  279 + }
  280 +
  281 + public void setAfterVisitTime(Date afterVisitTime) {
  282 + this.afterVisitTime = afterVisitTime;
  283 + }
  284 +
  285 + public Date getNextAfterVisitTime() {
  286 + return nextAfterVisitTime;
  287 + }
  288 +
  289 + public void setNextAfterVisitTime(Date nextAfterVisitTime) {
  290 + this.nextAfterVisitTime = nextAfterVisitTime;
  291 + }
  292 +
  293 +
  294 + public Integer getType() {
  295 + return type;
  296 + }
  297 +
  298 + public void setType(Integer type) {
  299 + this.type = type;
  300 + }
  301 +
  302 + public Integer getYn() {
  303 + return yn;
  304 + }
  305 +
  306 + public void setYn(Integer yn) {
  307 + this.yn = yn;
  308 + }
  309 +
  310 + public Date getCreated() {
  311 + return created;
  312 + }
  313 +
  314 + public void setCreated(Date created) {
  315 + this.created = created;
  316 + }
  317 +
  318 + public Date getModified() {
  319 + return modified;
  320 + }
  321 +
  322 + public void setModified(Date modified) {
  323 + this.modified = modified;
  324 + }
  325 +}
platform-dal/src/main/java/com/lyms/platform/pojo/BreastAfterVisitRecordModel.java View file @ a704e2c
  1 +package com.lyms.platform.pojo;
  2 +
  3 +/**
  4 + * @auther sy
  5 + * @createTime 2022年02月8日
  6 + * @discription 乳腺追访记录模型
  7 + */
  8 +
  9 +import com.lyms.platform.common.result.BaseModel;
  10 +import org.springframework.data.mongodb.core.mapping.Document;
  11 +
  12 +import java.util.Date;
  13 +import java.util.Map;
  14 +
  15 +@Document(collection = "lyms_cancer_BreastAfterVisitRecordModel")
  16 +public class BreastAfterVisitRecordModel extends BaseModel {
  17 + //主键id
  18 + private String id;
  19 + //乳腺随访列表模型id
  20 + private String parentId;
  21 +
  22 + //追访日期
  23 + private Date afterVisitTime;
  24 + //追访人
  25 + private String afterVisitName;
  26 + //追访方式
  27 + private String afterVisitType;
  28 + //是否预约(0:否,1:是)
  29 + private Integer appointment;
  30 + //预约下次追访日期
  31 + private Date nextAfterVisitTime;
  32 + //追访结果
  33 + private String afterVisitResult;
  34 + //追访流程
  35 + private String afterVisitFlowPath;
  36 +
  37 + /**
  38 + * 是否有效
  39 + */
  40 + private Integer yn;
  41 +
  42 + private Date created;
  43 +
  44 + public String getId() {
  45 + return id;
  46 + }
  47 +
  48 + public void setId(String id) {
  49 + this.id = id;
  50 + }
  51 +
  52 + public String getParentId() {
  53 + return parentId;
  54 + }
  55 +
  56 + public void setParentId(String parentId) {
  57 + this.parentId = parentId;
  58 + }
  59 +
  60 + public Date getAfterVisitTime() {
  61 + return afterVisitTime;
  62 + }
  63 +
  64 + public void setAfterVisitTime(Date afterVisitTime) {
  65 + this.afterVisitTime = afterVisitTime;
  66 + }
  67 +
  68 + public String getAfterVisitName() {
  69 + return afterVisitName;
  70 + }
  71 +
  72 + public void setAfterVisitName(String afterVisitName) {
  73 + this.afterVisitName = afterVisitName;
  74 + }
  75 +
  76 + public String getAfterVisitType() {
  77 + return afterVisitType;
  78 + }
  79 +
  80 + public void setAfterVisitType(String afterVisitType) {
  81 + this.afterVisitType = afterVisitType;
  82 + }
  83 +
  84 + public Integer getAppointment() {
  85 + return appointment;
  86 + }
  87 +
  88 + public void setAppointment(Integer appointment) {
  89 + this.appointment = appointment;
  90 + }
  91 +
  92 + public Date getNextAfterVisitTime() {
  93 + return nextAfterVisitTime;
  94 + }
  95 +
  96 + public void setNextAfterVisitTime(Date nextAfterVisitTime) {
  97 + this.nextAfterVisitTime = nextAfterVisitTime;
  98 + }
  99 +
  100 + public String getAfterVisitResult() {
  101 + return afterVisitResult;
  102 + }
  103 +
  104 + public void setAfterVisitResult(String afterVisitResult) {
  105 + this.afterVisitResult = afterVisitResult;
  106 + }
  107 +
  108 + public String getAfterVisitFlowPath() {
  109 + return afterVisitFlowPath;
  110 + }
  111 +
  112 + public void setAfterVisitFlowPath(String afterVisitFlowPath) {
  113 + this.afterVisitFlowPath = afterVisitFlowPath;
  114 + }
  115 +
  116 + public Integer getYn() {
  117 + return yn;
  118 + }
  119 +
  120 + public void setYn(Integer yn) {
  121 + this.yn = yn;
  122 + }
  123 +
  124 + public Date getCreated() {
  125 + return created;
  126 + }
  127 +
  128 + public void setCreated(Date created) {
  129 + this.created = created;
  130 + }
  131 +}
platform-dal/src/main/java/com/lyms/platform/query/BreastAfterVisitQuery.java View file @ a704e2c
  1 +package com.lyms.platform.query;
  2 +
  3 +/**
  4 + * @auther sy
  5 + * @createTime 2022年02月8日
  6 + * @discription 乳腺追访列表
  7 + */
  8 +
  9 +import com.lyms.platform.common.base.IConvertToNativeQuery;
  10 +import com.lyms.platform.common.dao.BaseQuery;
  11 +import com.lyms.platform.common.dao.operator.MongoCondition;
  12 +import com.lyms.platform.common.dao.operator.MongoOper;
  13 +import com.lyms.platform.common.dao.operator.MongoQuery;
  14 +import com.lyms.platform.common.utils.StringUtils;
  15 +import org.apache.commons.collections.CollectionUtils;
  16 +import org.springframework.data.mongodb.core.query.Criteria;
  17 +
  18 +import java.util.Date;
  19 +import java.util.List;
  20 +import java.util.Map;
  21 +
  22 +public class BreastAfterVisitQuery extends BaseQuery implements IConvertToNativeQuery {
  23 +
  24 + //主键id
  25 + private String id;
  26 + //乳腺检查记录id
  27 + private String parentId;
  28 + //医院ID
  29 + private String hospitalId;
  30 + //查询号(姓名、身份证、手机)
  31 + private String queryNo;
  32 +
  33 + //居住地
  34 + private String provinceId;
  35 + //市
  36 + private String cityId;
  37 + //区
  38 + private String areaId;
  39 + //街道
  40 + private String streetId;
  41 +
  42 + //编号
  43 + private String code;
  44 +
  45 + /**
  46 + * 乳腺彩超检查
  47 + * 超声所见
  48 + * 原文字展示。改为单选。newRxCssj展示用到enum(LhUltrasoundContent);
  49 + * 历史数据展示:前端判断newRxCssj有没值。没有还用以前rxCssj字段展示
  50 + */
  51 + private String newRxCssj;
  52 +
  53 + //隆化乳腺X钼靶检查内容,展示用到enum(LhBreastXRayContent)
  54 + private String rxXJc;
  55 +
  56 +
  57 + //检査日期
  58 + private Date checkDateStart;
  59 + private Date checkDateEnd;
  60 +
  61 + //追访日期
  62 + private Date afterVisitTimeStart;
  63 + private Date afterVisitTimeEnd;
  64 + //预约下次追访日期
  65 + private Date nextAfterVisitTimeStart;
  66 + private Date nextAfterVisitTimeEnd;
  67 +
  68 +
  69 + //随访状态(0:待随访,1:已随访)
  70 + private Integer type;
  71 +
  72 + /**
  73 + * 是否有效
  74 + */
  75 + private Integer yn;
  76 +
  77 +
  78 +
  79 + /**
  80 + * @return
  81 + */
  82 + @Override
  83 + public MongoQuery convertToQuery() {
  84 +
  85 + MongoCondition condition = MongoCondition.newInstance();
  86 +
  87 + if(StringUtils.isNotEmpty(id)){
  88 + condition=condition.and("id", id, MongoOper.IS);
  89 + }
  90 + if(null != yn){
  91 + condition=condition.and("yn", yn, MongoOper.IS);
  92 + }
  93 + if(StringUtils.isNotEmpty(parentId)){
  94 + condition=condition.and("parentId", parentId, MongoOper.IS);
  95 + }
  96 + if(StringUtils.isNotEmpty(code)){
  97 + condition=condition.and("code", code, MongoOper.IS);
  98 + }
  99 +
  100 + if(StringUtils.isNotEmpty(provinceId)){
  101 + condition=condition.and("provinceId", provinceId, MongoOper.IS);
  102 + }
  103 + if(StringUtils.isNotEmpty(cityId)){
  104 + condition=condition.and("cityId", cityId, MongoOper.IS);
  105 + }
  106 + if(StringUtils.isNotEmpty( areaId)){
  107 + condition=condition.and("areaId", areaId, MongoOper.IS);
  108 + }
  109 + if(StringUtils.isNotEmpty( streetId)){
  110 + condition=condition.and("streetId", streetId, MongoOper.IS);
  111 + }
  112 + if(StringUtils.isNotEmpty( hospitalId)){
  113 + condition=condition.and("hospitalId", hospitalId, MongoOper.IS);
  114 + }
  115 +
  116 +
  117 + if(StringUtils.isNotEmpty(newRxCssj)){
  118 + condition=condition.and("newRxCssj", newRxCssj, MongoOper.IS);
  119 + }
  120 + if(StringUtils.isNotEmpty(rxXJc)){
  121 + condition=condition.and("rxXJc", rxXJc, MongoOper.IS);
  122 + }
  123 + if(null!=type){
  124 + condition=condition.and("type", type, MongoOper.IS);
  125 + }
  126 +
  127 + Criteria c = null;
  128 +
  129 +
  130 + if (StringUtils.isNotEmpty(queryNo)) {
  131 + MongoCondition c1 = MongoCondition.newInstance();
  132 + MongoCondition con1 = MongoCondition.newInstance("username", queryNo, MongoOper.LIKE);
  133 + MongoCondition con2 = MongoCondition.newInstance("certificateNum", queryNo, MongoOper.IS);
  134 + MongoCondition con3 = MongoCondition.newInstance("phone", queryNo, MongoOper.IS);
  135 + if (c != null) {
  136 + c1.orCondition(new MongoCondition[]{con1, con2, con3}).getCriteria();
  137 + condition.andCondition(c1);
  138 + } else {
  139 + c = c1.orCondition(new MongoCondition[]{con1, con2, con3}).getCriteria();
  140 + }
  141 + }
  142 +
  143 +
  144 + if (null != checkDateStart && checkDateEnd != null) {
  145 + if (null != c) {
  146 + c = c.and("checkDate").gte(checkDateStart).lte(checkDateEnd);
  147 + } else {
  148 + c = Criteria.where("checkDate").gte(checkDateStart).lte(checkDateEnd);
  149 + }
  150 + }
  151 + if (null != afterVisitTimeStart && afterVisitTimeEnd != null) {
  152 + if (null != c) {
  153 + c = c.and("afterVisitTime").gte(afterVisitTimeStart).lte(afterVisitTimeEnd);
  154 + } else {
  155 + c = Criteria.where("afterVisitTime").gte(afterVisitTimeStart).lte(afterVisitTimeEnd);
  156 + }
  157 + }
  158 + if (null != nextAfterVisitTimeStart && nextAfterVisitTimeEnd != null) {
  159 + if (null != c) {
  160 + c = c.and("nextAfterVisitTime").gte(nextAfterVisitTimeStart).lte(nextAfterVisitTimeEnd);
  161 + } else {
  162 + c = Criteria.where("nextAfterVisitTime").gte(nextAfterVisitTimeStart).lte(nextAfterVisitTimeEnd);
  163 + }
  164 + }
  165 +
  166 + if (null != c) {
  167 + condition = condition.andCondition(new MongoCondition(c));
  168 + }
  169 +
  170 + return condition.toMongoQuery();
  171 + }
  172 +
  173 +}
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/CancerScreeningFacade.java View file @ a704e2c
1 1 package com.lyms.platform.operate.web.facade;
2 2  
3 3 import com.lyms.platform.biz.service.BasicConfigService;
  4 +import com.lyms.platform.biz.service.BreastAfterVisitService;
4 5 import com.lyms.platform.biz.service.CancerScreeningService;
5 6 import com.lyms.platform.biz.service.ResidentsArchiveService;
6 7 import com.lyms.platform.common.constants.ErrorCodeConstants;
7 8  
8 9  
... ... @@ -21,15 +22,18 @@
21 22 import com.lyms.platform.permission.service.OrganizationService;
22 23 import com.lyms.platform.permission.service.UsersService;
23 24 import com.lyms.platform.pojo.BasicConfig;
  25 +import com.lyms.platform.pojo.BreastAfterVisitModel;
24 26 import com.lyms.platform.pojo.CancerScreeningModel;
25 27 import com.lyms.platform.pojo.ResidentsArchiveModel;
26 28 import com.lyms.platform.query.CancerScreeningQuery;
27 29 import com.lyms.platform.query.ResidentsArchiveQuery;
28 30 import org.apache.commons.collections.CollectionUtils;
  31 +import org.apache.commons.collections.MapUtils;
29 32 import org.apache.commons.collections.map.HashedMap;
30 33 import org.apache.commons.lang.StringUtils;
31 34 import org.springframework.beans.*;
32 35 import org.springframework.beans.factory.annotation.Autowired;
  36 +import org.springframework.data.mongodb.core.MongoTemplate;
33 37 import org.springframework.stereotype.Component;
34 38 import scala.util.parsing.combinator.testing.Str;
35 39  
... ... @@ -56,6 +60,8 @@
56 60 private BasicConfigService basicConfigService;
57 61 @Autowired
58 62 private ResidentsArchiveService residentsArchiveService;
  63 + @Autowired
  64 + private BreastAfterVisitService breastAfterVisitService;
59 65  
60 66 /**
61 67 * 获取当前医院或院组内的两癌检查列表
... ... @@ -364,6 +370,8 @@
364 370 cancerScr.setOperator(id);
365 371 cancerScr.setIsSync(1);
366 372 cancerScreenService.updateOneCancerScreen(cancerScr, cancerScr.getId());
  373 + //修改乳腺癌追访
  374 + BreastAfterVisitAdd(cancerScr,2);
367 375 return new BaseResponse("成功", ErrorCodeConstants.SUCCESS);
368 376 } catch (Exception e) {
369 377 e.printStackTrace();
... ... @@ -409,6 +417,8 @@
409 417  
410 418 cancerScr.setIsSync(1);
411 419 cancerScreenService.addOneCancerScreen(cancerScr);
  420 + //添加乳腺癌追访
  421 + BreastAfterVisitAdd(cancerScr,1);
412 422 return new BaseResponse("成功", ErrorCodeConstants.SUCCESS);
413 423 } else {
414 424 return new BaseResponse("未传入的妇女建档id", ErrorCodeConstants.SUCCESS);
... ... @@ -543,6 +553,104 @@
543 553 }
544 554 }
545 555 return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
  556 + }
  557 + //乳腺追访业务 type:1:新增、2:修改
  558 + public void BreastAfterVisitAdd(CancerScreeningModel cancerScreeningModel,int type) {
  559 + try {
  560 + if(null!=cancerScreeningModel&&
  561 + (MapUtils.isNotEmpty(cancerScreeningModel.getRxlRtz())||
  562 + MapUtils.isNotEmpty(cancerScreeningModel.getRxlRty())||
  563 + MapUtils.isNotEmpty(cancerScreeningModel.getRxlYyz())||
  564 + MapUtils.isNotEmpty(cancerScreeningModel.getRxlYyy())||
  565 + MapUtils.isNotEmpty(cancerScreeningModel.getRxlZkz())||
  566 + MapUtils.isNotEmpty(cancerScreeningModel.getRxlZky())||
  567 + StringUtils.isNotEmpty(cancerScreeningModel.getRxXJc()))){
  568 + BreastAfterVisitModel breastAfterVisitModel=new BreastAfterVisitModel();
  569 + //乳头左
  570 + if(MapUtils.isNotEmpty(cancerScreeningModel.getRxlRtz())&&null!=cancerScreeningModel.getRxlRtz().get("select")){
  571 + if("3".equals(cancerScreeningModel.getRxlRtz().get("select").toString())){
  572 + breastAfterVisitModel.setRxlRtz(cancerScreeningModel.getRxlRtz());
  573 + breastAfterVisitModel.setNextAfterVisitTime(DateUtil.addMonth(cancerScreeningModel.getCreated(),6));
  574 + }
  575 + }
  576 + //乳头右
  577 + if(MapUtils.isNotEmpty(cancerScreeningModel.getRxlRty())&&null!=cancerScreeningModel.getRxlRty().get("select")){
  578 + if("3".equals(cancerScreeningModel.getRxlRty().get("select").toString())){
  579 + breastAfterVisitModel.setRxlRty(cancerScreeningModel.getRxlRty());
  580 + breastAfterVisitModel.setNextAfterVisitTime(DateUtil.addMonth(cancerScreeningModel.getCreated(),6));
  581 + }
  582 + }
  583 + //溢液左
  584 + if(MapUtils.isNotEmpty(cancerScreeningModel.getRxlYyz())&&null!=cancerScreeningModel.getRxlYyz().get("select")){
  585 + if(!"1".equals(cancerScreeningModel.getRxlYyz().get("select").toString())){
  586 + breastAfterVisitModel.setRxlYyz(cancerScreeningModel.getRxlYyz());
  587 + breastAfterVisitModel.setNextAfterVisitTime(DateUtil.addMonth(cancerScreeningModel.getCreated(),6));
  588 + }
  589 + }
  590 + //溢液右
  591 + if(MapUtils.isNotEmpty(cancerScreeningModel.getRxlYyy())&&null!=cancerScreeningModel.getRxlYyy().get("select")){
  592 + if(!"1".equals(cancerScreeningModel.getRxlYyy().get("select").toString())){
  593 + breastAfterVisitModel.setRxlYyy(cancerScreeningModel.getRxlYyy());
  594 + breastAfterVisitModel.setNextAfterVisitTime(DateUtil.addMonth(cancerScreeningModel.getCreated(),6));
  595 + }
  596 + }
  597 + //肿块左
  598 + if(MapUtils.isNotEmpty(cancerScreeningModel.getRxlZkz())&&null!=cancerScreeningModel.getRxlZkz().get("select")){
  599 + if(!"1".equals(cancerScreeningModel.getRxlZkz().get("select").toString())){
  600 + breastAfterVisitModel.setRxlZkz(cancerScreeningModel.getRxlZkz());
  601 + breastAfterVisitModel.setNextAfterVisitTime(DateUtil.addMonth(cancerScreeningModel.getCreated(),6));
  602 + }
  603 + }
  604 + //肿块右
  605 + if(MapUtils.isNotEmpty(cancerScreeningModel.getRxlZky())&&null!=cancerScreeningModel.getRxlZky().get("select")){
  606 + if(!"1".equals(cancerScreeningModel.getRxlZky().get("select").toString())){
  607 + breastAfterVisitModel.setRxlZky(cancerScreeningModel.getRxlZky());
  608 + breastAfterVisitModel.setNextAfterVisitTime(DateUtil.addMonth(cancerScreeningModel.getCreated(),6));
  609 + }
  610 + }
  611 + //乳腺X钼靶
  612 + if(StringUtils.isNotEmpty(cancerScreeningModel.getRxXJc())){
  613 + if("3".equals(cancerScreeningModel.getRxXJc())){
  614 + breastAfterVisitModel.setRxXJc(cancerScreeningModel.getRxXJc());
  615 + breastAfterVisitModel.setNextAfterVisitTime(DateUtil.addMonth(cancerScreeningModel.getCreated(),6));
  616 + }
  617 + if("4".equals(cancerScreeningModel.getRxXJc())){
  618 + breastAfterVisitModel.setRxXJc(cancerScreeningModel.getRxXJc());
  619 + breastAfterVisitModel.setNextAfterVisitTime(DateUtil.addMonth(cancerScreeningModel.getCreated(),3));
  620 + }
  621 + }
  622 + if(type==1) {
  623 + breastAfterVisitModel.setNewRxCssj(cancerScreeningModel.getNewRxCssj());
  624 + breastAfterVisitModel.setParentId(cancerScreeningModel.getId());
  625 + breastAfterVisitModel.setHospitalId(cancerScreeningModel.getHospitalId());
  626 + breastAfterVisitModel.setUsername(cancerScreeningModel.getUsername());
  627 + breastAfterVisitModel.setBirthday(cancerScreeningModel.getBirthday());
  628 + breastAfterVisitModel.setNationId(cancerScreeningModel.getNationId());
  629 + breastAfterVisitModel.setCertificateNum(cancerScreeningModel.getCertificateNum());
  630 + breastAfterVisitModel.setPhone(cancerScreeningModel.getPhone());
  631 + breastAfterVisitModel.setProvinceId(cancerScreeningModel.getProvinceId());
  632 + breastAfterVisitModel.setCityId(cancerScreeningModel.getCityId());
  633 + breastAfterVisitModel.setAreaId(cancerScreeningModel.getAreaId());
  634 + breastAfterVisitModel.setStreetId(cancerScreeningModel.getStreetId());
  635 + breastAfterVisitModel.setAddress(cancerScreeningModel.getAddress());
  636 + breastAfterVisitModel.setCode(cancerScreeningModel.getCode());
  637 + breastAfterVisitModel.setCheckDate(cancerScreeningModel.getCreated());
  638 + breastAfterVisitModel.setType(0);
  639 + breastAfterVisitService.addOneBreastAfterVisit(breastAfterVisitModel);
  640 + }else {
  641 + breastAfterVisitModel.setNewRxCssj(cancerScreeningModel.getNewRxCssj());
  642 + breastAfterVisitModel.setParentId(cancerScreeningModel.getId());
  643 + breastAfterVisitModel.setCode(cancerScreeningModel.getCode());
  644 + breastAfterVisitModel.setCheckDate(cancerScreeningModel.getCreated());
  645 + breastAfterVisitService.updateOneBreastAfterVisit(breastAfterVisitModel);
  646 + }
  647 +
  648 +
  649 + }
  650 +
  651 + } catch (Exception e) {
  652 + e.printStackTrace();
  653 + }
546 654 }
547 655  
548 656 public static final String AREA_URL = PropertiesUtils.getPropertyValue("area_url");
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BreastAfterVisitRequest.java View file @ a704e2c
  1 +package com.lyms.platform.operate.web.request;
  2 +
  3 +import java.util.Date;
  4 +import java.util.Map;
  5 +
  6 +/**
  7 + * @auther sy
  8 + * @createTime 2022年02月8日
  9 + * @discription 乳腺追访列表查询条件
  10 + */
  11 +public class BreastAfterVisitRequest extends BasePageQueryRequest {
  12 +
  13 + /**
  14 + * 检查时间
  15 + */
  16 + private String checkDate;
  17 +
  18 + /**
  19 + * 查询号
  20 + */
  21 + private String queryNo;
  22 + //居住地
  23 + private String provinceId;
  24 + private String cityId;
  25 + private String areaId;
  26 + private String streetId;
  27 +
  28 + //追访日期
  29 + private String afterVisitTime;
  30 + //预约下次追访日期
  31 + private String nextAfterVisitTime;
  32 + //逾期天数
  33 + private Integer overdueStart;
  34 + private Integer overdueEnd;
  35 +
  36 + //随访状态(0:待随访,1:已随访)
  37 + private Integer type;
  38 +
  39 + /**
  40 + * 乳腺彩超检查
  41 + * 超声所见
  42 + */
  43 + private String newRxCssj;
  44 +
  45 + //隆化乳腺X钼靶检查内容,展示用到enum(LhBreastXRayContent)
  46 + private String rxXJc;
  47 +
  48 + /**
  49 + * 乳腺临床检查
  50 + */
  51 + //乳头左
  52 + private Map<String, Object> rxlRtz;
  53 + //乳头右
  54 + private Map<String, Object> rxlRty;
  55 + //溢液左 ,遵化新增,血性5 浆液性6 清水性7
  56 + private Map<String, Object> rxlYyz;
  57 + //溢液右
  58 + private Map<String, Object> rxlYyy;
  59 + //肿块左
  60 + private Map<String, Object> rxlZkz;
  61 + //肿块右
  62 + private Map<String, Object> rxlZky;
  63 +
  64 + public String getCheckDate() {
  65 + return checkDate;
  66 + }
  67 +
  68 + public void setCheckDate(String checkDate) {
  69 + this.checkDate = checkDate;
  70 + }
  71 +
  72 + public String getQueryNo() {
  73 + return queryNo;
  74 + }
  75 +
  76 + public void setQueryNo(String queryNo) {
  77 + this.queryNo = queryNo;
  78 + }
  79 +
  80 + public String getProvinceId() {
  81 + return provinceId;
  82 + }
  83 +
  84 + public void setProvinceId(String provinceId) {
  85 + this.provinceId = provinceId;
  86 + }
  87 +
  88 + public String getCityId() {
  89 + return cityId;
  90 + }
  91 +
  92 + public void setCityId(String cityId) {
  93 + this.cityId = cityId;
  94 + }
  95 +
  96 + public String getAreaId() {
  97 + return areaId;
  98 + }
  99 +
  100 + public void setAreaId(String areaId) {
  101 + this.areaId = areaId;
  102 + }
  103 +
  104 + public String getStreetId() {
  105 + return streetId;
  106 + }
  107 +
  108 + public void setStreetId(String streetId) {
  109 + this.streetId = streetId;
  110 + }
  111 +
  112 + public String getAfterVisitTime() {
  113 + return afterVisitTime;
  114 + }
  115 +
  116 + public void setAfterVisitTime(String afterVisitTime) {
  117 + this.afterVisitTime = afterVisitTime;
  118 + }
  119 +
  120 + public String getNextAfterVisitTime() {
  121 + return nextAfterVisitTime;
  122 + }
  123 +
  124 + public void setNextAfterVisitTime(String nextAfterVisitTime) {
  125 + this.nextAfterVisitTime = nextAfterVisitTime;
  126 + }
  127 +
  128 + public Integer getOverdueStart() {
  129 + return overdueStart;
  130 + }
  131 +
  132 + public void setOverdueStart(Integer overdueStart) {
  133 + this.overdueStart = overdueStart;
  134 + }
  135 +
  136 + public Integer getOverdueEnd() {
  137 + return overdueEnd;
  138 + }
  139 +
  140 + public void setOverdueEnd(Integer overdueEnd) {
  141 + this.overdueEnd = overdueEnd;
  142 + }
  143 +
  144 + public Integer getType() {
  145 + return type;
  146 + }
  147 +
  148 + public void setType(Integer type) {
  149 + this.type = type;
  150 + }
  151 +
  152 + public String getNewRxCssj() {
  153 + return newRxCssj;
  154 + }
  155 +
  156 + public void setNewRxCssj(String newRxCssj) {
  157 + this.newRxCssj = newRxCssj;
  158 + }
  159 +
  160 + public String getRxXJc() {
  161 + return rxXJc;
  162 + }
  163 +
  164 + public void setRxXJc(String rxXJc) {
  165 + this.rxXJc = rxXJc;
  166 + }
  167 +
  168 + public Map<String, Object> getRxlRtz() {
  169 + return rxlRtz;
  170 + }
  171 +
  172 + public void setRxlRtz(Map<String, Object> rxlRtz) {
  173 + this.rxlRtz = rxlRtz;
  174 + }
  175 +
  176 + public Map<String, Object> getRxlRty() {
  177 + return rxlRty;
  178 + }
  179 +
  180 + public void setRxlRty(Map<String, Object> rxlRty) {
  181 + this.rxlRty = rxlRty;
  182 + }
  183 +
  184 + public Map<String, Object> getRxlYyz() {
  185 + return rxlYyz;
  186 + }
  187 +
  188 + public void setRxlYyz(Map<String, Object> rxlYyz) {
  189 + this.rxlYyz = rxlYyz;
  190 + }
  191 +
  192 + public Map<String, Object> getRxlYyy() {
  193 + return rxlYyy;
  194 + }
  195 +
  196 + public void setRxlYyy(Map<String, Object> rxlYyy) {
  197 + this.rxlYyy = rxlYyy;
  198 + }
  199 +
  200 + public Map<String, Object> getRxlZkz() {
  201 + return rxlZkz;
  202 + }
  203 +
  204 + public void setRxlZkz(Map<String, Object> rxlZkz) {
  205 + this.rxlZkz = rxlZkz;
  206 + }
  207 +
  208 + public Map<String, Object> getRxlZky() {
  209 + return rxlZky;
  210 + }
  211 +
  212 + public void setRxlZky(Map<String, Object> rxlZky) {
  213 + this.rxlZky = rxlZky;
  214 + }
  215 +}