Commit 80f28e22757ecdca7acfbada0bcd473eb8a4c09c

Authored by jiangjiazhi

Merge remote-tracking branch 'origin/master'

Showing 7 changed files

platform-dal/src/main/java/com/lyms/platform/pojo/StopPregModel.java View file @ 80f28e2
... ... @@ -33,6 +33,16 @@
33 33  
34 34 private Date modified;
35 35  
  36 + private String hospitalId;
  37 +
  38 + public String getHospitalId() {
  39 + return hospitalId;
  40 + }
  41 +
  42 + public void setHospitalId(String hospitalId) {
  43 + this.hospitalId = hospitalId;
  44 + }
  45 +
36 46 public Date getCreated() {
37 47 return created;
38 48 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java View file @ 80f28e2
... ... @@ -137,6 +137,23 @@
137 137 */
138 138 public BaseObjectResponse addBabyBookbuilding(BabyBookbuildingAddRequest request) {
139 139  
  140 + //判断儿童的就诊卡号是否建档 在该家医院
  141 + if (StringUtils.isNotEmpty(request.getVcCardNo()))
  142 + {
  143 + BabyModelQuery babyQuery = new BabyModelQuery();
  144 + babyQuery.setYn(YnEnums.YES.getId());
  145 + babyQuery.setVcCardNo(request.getVcCardNo());
  146 + babyQuery.setHospitalId(request.getHospitalId());
  147 + List<BabyModel> models = babyBookbuildingService.queryBabyBuildByCond(babyQuery);
  148 + if (CollectionUtils.isNotEmpty(models))
  149 + {
  150 + BaseObjectResponse br = new BaseObjectResponse();
  151 + br.setErrorcode(ErrorCodeConstants.DATA_EXIST);
  152 + br.setErrormsg("该就诊卡号儿童已经建档");
  153 + return br;
  154 + }
  155 + }
  156 +
140 157 //通过查询是否有该孕妇
141 158 PatientsQuery puerperaQuery = new PatientsQuery();
142 159 puerperaQuery.setCardNo(request.getMommyCertificateNum());
143 160  
... ... @@ -196,13 +213,15 @@
196 213 DateUtil.getYmd(DateUtil.parseYMD(request.getBabyBirthday()));
197 214 babyQuery.setCardId(cardId);
198 215 count = babyBookbuildingService.queryBabyCount(babyQuery);
199   - model.setCardId(cardId + request.getSex() + count + 1);
200   - } else {
  216 + model.setCardId(cardId + request.getSex() + (count + 1));
  217 + }
  218 + if (StringUtils.isNotEmpty(request.getMommyPhone()))
  219 + {
201 220 String phoneId = request.getMommyPhone() +
202 221 DateUtil.getYmd(DateUtil.parseYMD(request.getBabyBirthday()));
203 222 babyQuery.setPhoneId(phoneId);
204 223 count = babyBookbuildingService.queryBabyCount(babyQuery);
205   - model.setPhoneId(phoneId + request.getSex() + count + 1);
  224 + model.setPhoneId(phoneId + request.getSex() + (count + 1));
206 225 }
207 226  
208 227 model.setParentId(patients.getId());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java View file @ 80f28e2
... ... @@ -98,7 +98,7 @@
98 98 model.setWeight(request.getWeight());
99 99 model.setHead(request.getHead());
100 100 model.setHeightWeight(request.getHeightWeight());
101   - model.setGrowthEvaluate(request.getGrowthEvaluate());
  101 + model.setGrowthEvaluate(JsonUtil.array2JsonString(request.getGrowthEvaluate()));
102 102  
103 103  
104 104 model.setBilirubinHead(request.getBilirubinHead());
... ... @@ -449,7 +449,7 @@
449 449 model.setWeight(checkModel.getWeight());
450 450 model.setHead(checkModel.getHead());
451 451 model.setHeightWeight(checkModel.getHeightWeight());
452   - model.setGrowthEvaluate(checkModel.getGrowthEvaluate());
  452 + model.setGrowthEvaluate(JsonUtil.toList(checkModel.getGrowthEvaluate(),String.class));
453 453  
454 454  
455 455 model.setBilirubinHead(checkModel.getBilirubinHead());
... ... @@ -517,6 +517,17 @@
517 517 model.setNextDate(DateUtil.getyyyy_MM_dd(checkModel.getNextDate()));
518 518 model.setHighRisk(checkModel.getHighRisk());
519 519 model.setCheckDate(DateUtil.getyyyy_MM_dd(checkModel.getCheckDate()));
  520 +
  521 + BabyModelQuery babyQuery = new BabyModelQuery();
  522 + babyQuery.setId(checkModel.getBuildId());
  523 + babyQuery.setYn(YnEnums.YES.getId());
  524 +
  525 + List<BabyModel> models = babyBookbuildingService.queryBabyBuildByCond(babyQuery);
  526 +
  527 + if (CollectionUtils.isNotEmpty(models))
  528 + {
  529 + model.setMonthAge(DateUtil.getBabyMonthAge(models.get(0).getBirth(), checkModel.getCheckDate()));
  530 + }
520 531  
521 532 model.setDrugGllergic(JsonUtil.str2Obj(checkModel.getDrugGllergic(), Map.class));
522 533 model.setChestw(checkModel.getChestw());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/StopPregnancyFacade.java View file @ 80f28e2
... ... @@ -92,6 +92,7 @@
92 92 model.setYn(YnEnums.YES.getId());
93 93 model.setInPerson(request.getInPerson());
94 94 model.setRemark(request.getRemark());
  95 + model.setHospitalId(request.getHospitalId());
95 96 model.setStopDate(DateUtil.parseYMD(request.getStopDate()));
96 97 model.setStopReason(JsonUtil.obj2JsonString(request.getStopReason()));
97 98  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyCheckRequest.java View file @ 80f28e2
... ... @@ -87,7 +87,7 @@
87 87 }
88 88  
89 89 //发育评价
90   - private String growthEvaluate;
  90 + private List<String> growthEvaluate;
91 91  
92 92 /******一般检查****/
93 93  
94 94  
... ... @@ -375,11 +375,11 @@
375 375 this.chest = chest;
376 376 }
377 377  
378   - public String getGrowthEvaluate() {
  378 + public List<String> getGrowthEvaluate() {
379 379 return growthEvaluate;
380 380 }
381 381  
382   - public void setGrowthEvaluate(String growthEvaluate) {
  382 + public void setGrowthEvaluate(List<String> growthEvaluate) {
383 383 this.growthEvaluate = growthEvaluate;
384 384 }
385 385  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/StopPregRequest.java View file @ 80f28e2
... ... @@ -33,6 +33,10 @@
33 33 @NotEmpty(message = "录入人不能为空.")
34 34 private String inPerson;
35 35  
  36 + //医院ID
  37 + @FormParam
  38 + private String hospitalId;
  39 +
36 40 public String getId() {
37 41 return id;
38 42 }
... ... @@ -79,6 +83,14 @@
79 83  
80 84 public void setInPerson(String inPerson) {
81 85 this.inPerson = inPerson;
  86 + }
  87 +
  88 + public String getHospitalId() {
  89 + return hospitalId;
  90 + }
  91 +
  92 + public void setHospitalId(String hospitalId) {
  93 + this.hospitalId = hospitalId;
82 94 }
83 95 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyCheckResult.java View file @ 80f28e2
... ... @@ -79,7 +79,7 @@
79 79  
80 80  
81 81 //发育评价
82   - private String growthEvaluate;
  82 + private List<String> growthEvaluate;
83 83  
84 84 /******一般检查****/
85 85  
86 86  
... ... @@ -207,7 +207,17 @@
207 207  
208 208 //检查时间
209 209 private String checkDate;
  210 + private String monthAge;
210 211  
  212 +
  213 + public String getMonthAge() {
  214 + return monthAge;
  215 + }
  216 +
  217 + public void setMonthAge(String monthAge) {
  218 + this.monthAge = monthAge;
  219 + }
  220 +
211 221 public String getCheckDate() {
212 222 return checkDate;
213 223 }
214 224  
... ... @@ -376,11 +386,11 @@
376 386 this.heightWeight = heightWeight;
377 387 }
378 388  
379   - public String getGrowthEvaluate() {
  389 + public List<String> getGrowthEvaluate() {
380 390 return growthEvaluate;
381 391 }
382 392  
383   - public void setGrowthEvaluate(String growthEvaluate) {
  393 + public void setGrowthEvaluate(List<String> growthEvaluate) {
384 394 this.growthEvaluate = growthEvaluate;
385 395 }
386 396