Commit 344779c63f18894d53cd83bffbb17f423f6b966e

Authored by liquanyu
1 parent 1cd020673f

update

Showing 6 changed files with 314 additions and 1 deletions

platform-dal/src/main/java/com/lyms/platform/pojo/BabyAssessModel.java View file @ 344779c
  1 +package com.lyms.platform.pojo;
  2 +
  3 +import com.lyms.platform.common.result.BaseModel;
  4 +import org.springframework.data.mongodb.core.mapping.Document;
  5 +
  6 +import java.util.Date;
  7 +
  8 +/**
  9 + * Created by Administrator on 2021-05-18.
  10 + */
  11 +@Document(collection = "lyms_baby_assess")
  12 +public class BabyAssessModel extends BaseModel {
  13 + private String id;
  14 + //儿童id
  15 + private String babyId;
  16 + //重症识别
  17 + private String zzsb;
  18 + //疾病治疗
  19 + private String jbzl;
  20 +
  21 + //发育评估
  22 + private String fypg;
  23 +
  24 + //口腔保健
  25 + private String kqbj;
  26 +
  27 + //眼保健
  28 + private String ybj;
  29 +
  30 + //耳保健
  31 + private String ebj;
  32 +
  33 + //儿童保健
  34 + private String etbj;
  35 +
  36 + //预防接种
  37 + private String yfjz;
  38 +
  39 + //疾病的预防
  40 + private String jbyf;
  41 + private Date created;
  42 +
  43 + private Date modified;
  44 +
  45 + private String operaterId;
  46 + private String hospitalId;
  47 +
  48 + public String getHospitalId() {
  49 + return hospitalId;
  50 + }
  51 +
  52 + public void setHospitalId(String hospitalId) {
  53 + this.hospitalId = hospitalId;
  54 + }
  55 +
  56 + public String getId() {
  57 + return id;
  58 + }
  59 +
  60 + public void setId(String id) {
  61 + this.id = id;
  62 + }
  63 +
  64 + public String getBabyId() {
  65 + return babyId;
  66 + }
  67 +
  68 + public void setBabyId(String babyId) {
  69 + this.babyId = babyId;
  70 + }
  71 +
  72 + public String getZzsb() {
  73 + return zzsb;
  74 + }
  75 +
  76 + public void setZzsb(String zzsb) {
  77 + this.zzsb = zzsb;
  78 + }
  79 +
  80 + public String getJbzl() {
  81 + return jbzl;
  82 + }
  83 +
  84 + public void setJbzl(String jbzl) {
  85 + this.jbzl = jbzl;
  86 + }
  87 +
  88 + public String getFypg() {
  89 + return fypg;
  90 + }
  91 +
  92 + public void setFypg(String fypg) {
  93 + this.fypg = fypg;
  94 + }
  95 +
  96 + public String getKqbj() {
  97 + return kqbj;
  98 + }
  99 +
  100 + public void setKqbj(String kqbj) {
  101 + this.kqbj = kqbj;
  102 + }
  103 +
  104 + public String getYbj() {
  105 + return ybj;
  106 + }
  107 +
  108 + public void setYbj(String ybj) {
  109 + this.ybj = ybj;
  110 + }
  111 +
  112 + public String getEbj() {
  113 + return ebj;
  114 + }
  115 +
  116 + public void setEbj(String ebj) {
  117 + this.ebj = ebj;
  118 + }
  119 +
  120 + public String getEtbj() {
  121 + return etbj;
  122 + }
  123 +
  124 + public void setEtbj(String etbj) {
  125 + this.etbj = etbj;
  126 + }
  127 +
  128 + public String getYfjz() {
  129 + return yfjz;
  130 + }
  131 +
  132 + public void setYfjz(String yfjz) {
  133 + this.yfjz = yfjz;
  134 + }
  135 +
  136 + public String getJbyf() {
  137 + return jbyf;
  138 + }
  139 +
  140 + public void setJbyf(String jbyf) {
  141 + this.jbyf = jbyf;
  142 + }
  143 +
  144 + public Date getCreated() {
  145 + return created;
  146 + }
  147 +
  148 + public void setCreated(Date created) {
  149 + this.created = created;
  150 + }
  151 +
  152 + public Date getModified() {
  153 + return modified;
  154 + }
  155 +
  156 + public void setModified(Date modified) {
  157 + this.modified = modified;
  158 + }
  159 +
  160 + public String getOperaterId() {
  161 + return operaterId;
  162 + }
  163 +
  164 + public void setOperaterId(String operaterId) {
  165 + this.operaterId = operaterId;
  166 + }
  167 +}
platform-dal/src/main/java/com/lyms/platform/pojo/MaternalDeliverModel.java View file @ 344779c
... ... @@ -207,6 +207,18 @@
207 207 private String streetRegisterId;
208 208 private String inHospitalNo;
209 209  
  210 + //产后复查评估 状态 1 出院前评估 2 产后7天评估 3 产后14天评估 4 产后28天评估 5 产后42天评估
  211 +
  212 + private List<Integer> status;
  213 +
  214 + public List<Integer> getStatus() {
  215 + return status;
  216 + }
  217 +
  218 + public void setStatus(List<Integer> status) {
  219 + this.status = status;
  220 + }
  221 +
210 222 public String getDoctorSign() {
211 223 return doctorSign;
212 224 }
platform-dal/src/main/java/com/lyms/platform/pojo/PostkfModel.java View file @ 344779c
... ... @@ -4,6 +4,7 @@
4 4 import org.springframework.data.mongodb.core.mapping.Document;
5 5  
6 6 import java.util.Date;
  7 +import java.util.List;
7 8  
8 9 /**
9 10 * Created by Administrator on 2021-05-18.
10 11  
11 12  
12 13  
... ... @@ -46,13 +47,34 @@
46 47  
47 48 //保健预防
48 49 private String bjyf;
  50 + private String hospitalId;
49 51  
  52 + //产后复查评估 状态 1 出院前评估 2 产后7天评估 3 产后14天评估 4 产后28天评估 5 产后42天评估
50 53  
  54 + private List<Integer> status;
  55 +
  56 +
51 57 private Date created;
52 58  
53 59 private Date modified;
54 60  
55 61 private String operaterId;
  62 +
  63 + public List<Integer> getStatus() {
  64 + return status;
  65 + }
  66 +
  67 + public void setStatus(List<Integer> status) {
  68 + this.status = status;
  69 + }
  70 +
  71 + public String getHospitalId() {
  72 + return hospitalId;
  73 + }
  74 +
  75 + public void setHospitalId(String hospitalId) {
  76 + this.hospitalId = hospitalId;
  77 + }
56 78  
57 79 public Date getCreated() {
58 80 return created;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PostkfController.java View file @ 344779c
... ... @@ -4,6 +4,7 @@
4 4 import com.lyms.platform.common.base.BaseController;
5 5 import com.lyms.platform.common.result.BaseResponse;
6 6 import com.lyms.platform.operate.web.facade.PostkfFaccade;
  7 +import com.lyms.platform.pojo.BabyAssessModel;
7 8 import com.lyms.platform.pojo.PostkfModel;
8 9 import org.springframework.beans.factory.annotation.Autowired;
9 10 import org.springframework.stereotype.Controller;
... ... @@ -20,6 +21,12 @@
20 21 @Autowired
21 22 private PostkfFaccade postkfFaccade;
22 23  
  24 + /**
  25 + * 添加产后康复表记录
  26 + * @param request
  27 + * @param postkfModel
  28 + * @return
  29 + */
23 30 @TokenRequired
24 31 @ResponseBody
25 32 @RequestMapping(value = "/addPostKf", method = RequestMethod.POST)
26 33  
... ... @@ -28,11 +35,45 @@
28 35 }
29 36  
30 37  
  38 + /**
  39 + * 查询产后康复表记录
  40 + * @param request
  41 + * @param mid
  42 + * @return
  43 + */
31 44 @TokenRequired
32 45 @ResponseBody
33 46 @RequestMapping(value = "/getPostKf", method = RequestMethod.GET)
34 47 public BaseResponse getPostKf(HttpServletRequest request,@RequestParam(required = true) String mid) {
35 48 return postkfFaccade.getPostKf(mid, getUserId(request));
  49 + }
  50 +
  51 +
  52 + /**
  53 + * 添加儿童评估表
  54 + * @param request
  55 + * @param babyAssessModel
  56 + * @return
  57 + */
  58 + @TokenRequired
  59 + @ResponseBody
  60 + @RequestMapping(value = "/addBabyAssess", method = RequestMethod.POST)
  61 + public BaseResponse addBabyAssess(HttpServletRequest request,@RequestBody BabyAssessModel babyAssessModel) {
  62 + return postkfFaccade.addBabyAssess(babyAssessModel, getUserId(request));
  63 + }
  64 +
  65 +
  66 + /**
  67 + * 查询儿童评估表
  68 + * @param request
  69 + * @param mid
  70 + * @return
  71 + */
  72 + @TokenRequired
  73 + @ResponseBody
  74 + @RequestMapping(value = "/getBabyAssess", method = RequestMethod.GET)
  75 + public BaseResponse getBabyAssess(HttpServletRequest request,@RequestParam(required = true) String mid) {
  76 + return postkfFaccade.getBabyAssess(mid, getUserId(request));
36 77 }
37 78 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PostkfFaccade.java View file @ 344779c
1 1 package com.lyms.platform.operate.web.facade;
2 2  
  3 +import com.lyms.platform.biz.service.MatDeliverService;
3 4 import com.lyms.platform.common.constants.ErrorCodeConstants;
  5 +import com.lyms.platform.common.enums.YnEnums;
4 6 import com.lyms.platform.common.result.BaseObjectResponse;
5 7 import com.lyms.platform.common.result.BaseResponse;
6 8 import com.lyms.platform.common.utils.MongoConvertHelper;
7 9 import com.lyms.platform.common.utils.ReflectionUtils;
8 10 import com.lyms.platform.common.utils.StringUtils;
  11 +import com.lyms.platform.pojo.BabyAssessModel;
  12 +import com.lyms.platform.pojo.MaternalDeliverModel;
9 13 import com.lyms.platform.pojo.PostkfModel;
  14 +import com.lyms.platform.query.MatDeliverQuery;
10 15 import org.apache.commons.collections.CollectionUtils;
11 16 import org.springframework.beans.factory.annotation.Autowired;
12 17 import org.springframework.data.mongodb.core.MongoTemplate;
13 18  
14 19  
... ... @@ -26,8 +31,24 @@
26 31  
27 32 @Autowired
28 33 private MongoTemplate mongoTemplate;
  34 + @Autowired
  35 + private AutoMatchFacade autoMatchFacade;
29 36  
  37 + @Autowired
  38 + private MatDeliverService matDeliverService;
  39 +
30 40 public BaseResponse addPostKf(PostkfModel postkfModel, Integer userId) {
  41 +
  42 + MatDeliverQuery matDeliverQuery = new MatDeliverQuery();
  43 + matDeliverQuery.setId(postkfModel.getMid());
  44 + matDeliverQuery.setYn(YnEnums.YES.getId());
  45 + List <MaternalDeliverModel> list2 = matDeliverService.query(matDeliverQuery);
  46 + if (CollectionUtils.isNotEmpty(list2))
  47 + {
  48 + MaternalDeliverModel maternalDeliverModel = list2.get(0);
  49 + maternalDeliverModel.setStatus(postkfModel.getStatus());
  50 + matDeliverService.updateOne(maternalDeliverModel,maternalDeliverModel.getId());
  51 + }
31 52 if (StringUtils.isNotEmpty(postkfModel.getId()))
32 53 {
33 54 postkfModel.setModified(new Date());
... ... @@ -37,6 +58,8 @@
37 58 mongoTemplate.updateFirst(query, update, PostkfModel.class);
38 59 return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
39 60 }
  61 + String hospitalId = autoMatchFacade.getHospitalId(userId);
  62 + postkfModel.setHospitalId(hospitalId);
40 63 postkfModel.setOperaterId(String.valueOf(userId));
41 64 postkfModel.setCreated(new Date());
42 65 postkfModel.setModified(new Date());
... ... @@ -47,7 +70,34 @@
47 70 public BaseResponse getPostKf(String mid, Integer userId) {
48 71 List<PostkfModel> postkfModels = mongoTemplate.find(Query.query(Criteria.where("mid").
49 72 is(mid)), PostkfModel.class);
50   - return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(CollectionUtils.isNotEmpty(postkfModels) ? postkfModels.get(0) : null);
  73 + return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(CollectionUtils.isNotEmpty(postkfModels) ? postkfModels.get(0) : null);
  74 + }
  75 +
  76 + public BaseResponse addBabyAssess(BabyAssessModel babyAssessModel, Integer userId) {
  77 + if (StringUtils.isNotEmpty(babyAssessModel.getId()))
  78 + {
  79 + babyAssessModel.setModified(new Date());
  80 + Query query = Query.query(Criteria.where("_id").is(babyAssessModel.getId()));
  81 + Update update = MongoConvertHelper
  82 + .convertToNativeUpdate(ReflectionUtils.getUpdateField(babyAssessModel));
  83 + mongoTemplate.updateFirst(query, update, BabyAssessModel.class);
  84 + return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
  85 + }
  86 + String hospitalId = autoMatchFacade.getHospitalId(userId);
  87 + babyAssessModel.setHospitalId(hospitalId);
  88 + babyAssessModel.setOperaterId(String.valueOf(userId));
  89 + babyAssessModel.setCreated(new Date());
  90 + babyAssessModel.setModified(new Date());
  91 + mongoTemplate.save(babyAssessModel);
  92 + return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
  93 + }
  94 +
  95 +
  96 + public BaseResponse getBabyAssess(String babyId, Integer userId) {
  97 + List<BabyAssessModel> babyAssessModels = mongoTemplate.find(Query.query(Criteria.where("babyId").
  98 + is(babyId)), BabyAssessModel.class);
  99 + return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(CollectionUtils.isNotEmpty(babyAssessModels)
  100 + ? babyAssessModels.get(0) : null);
51 101 }
52 102 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ChildbirthManagerRequest.java View file @ 344779c
... ... @@ -182,6 +182,27 @@
182 182  
183 183 private String gcStatus;//观察状态(0:正在观察;1:观察完成)
184 184  
  185 + //评估类型 1 应评估 2 已评估
  186 + private Integer type;
  187 + //评估状态 1 出院前评估 2 产后7天评估 3 产后14天评估 4 产后28天评估 5 产后42天评估
  188 + private Integer status;
  189 +
  190 + public Integer getType() {
  191 + return type;
  192 + }
  193 +
  194 + public void setType(Integer type) {
  195 + this.type = type;
  196 + }
  197 +
  198 + public Integer getStatus() {
  199 + return status;
  200 + }
  201 +
  202 + public void setStatus(Integer status) {
  203 + this.status = status;
  204 + }
  205 +
185 206 public String getGcStatus() {
186 207 return gcStatus;
187 208 }