Commit 02c0621db188c0524ac80b01a915beb2263fb9f6
1 parent
4560eea3b2
Exists in
master
and in
1 other branch
修改儿童检查
Showing 7 changed files with 241 additions and 14 deletions
- platform-common/src/main/java/com/lyms/platform/common/enums/FyTypeEnums.java
- platform-common/src/main/java/com/lyms/platform/common/enums/WyTypeEnums.java
- platform-dal/src/main/java/com/lyms/platform/pojo/BabyCheckModel.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyCheckController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyCheckRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyCheckResult.java
platform-common/src/main/java/com/lyms/platform/common/enums/FyTypeEnums.java
View file @
02c0621
1 | +package com.lyms.platform.common.enums; | |
2 | + | |
3 | +import java.util.ArrayList; | |
4 | +import java.util.HashMap; | |
5 | +import java.util.List; | |
6 | +import java.util.Map; | |
7 | + | |
8 | +/** | |
9 | + * | |
10 | + * 抚养方式 | |
11 | + * | |
12 | + * @author Administrator | |
13 | + * | |
14 | + */ | |
15 | +public enum FyTypeEnums { | |
16 | + | |
17 | + FQ(0,"父亲"),MQ(1,"母亲"),ZF(2,"祖父"),ZM(3,"祖母"),WZF(4,"祖父"),WZM(5,"祖母"),QT(6,"其它"); | |
18 | + | |
19 | + private FyTypeEnums(int id, String name) { | |
20 | + this.id = id; | |
21 | + this.name = name; | |
22 | + } | |
23 | + | |
24 | + public static String getNameById(int id){ | |
25 | + for(FyTypeEnums s : values()){ | |
26 | + if(id==s.id){ | |
27 | + return s.getName(); | |
28 | + } | |
29 | + } | |
30 | + return ""; | |
31 | + } | |
32 | + | |
33 | + public static List<Map> getFyTypeEnums() { | |
34 | + List<Map> list = new ArrayList<>(); | |
35 | + for (FyTypeEnums e : FyTypeEnums.values()) { | |
36 | + Map rootMap = new HashMap(); | |
37 | + rootMap.put("id", e.getId()); | |
38 | + rootMap.put("name", e.getName()); | |
39 | + list.add(rootMap); | |
40 | + } | |
41 | + return list; | |
42 | + } | |
43 | + | |
44 | + private int id; | |
45 | + | |
46 | + private String name; | |
47 | + | |
48 | + public int getId() { | |
49 | + return id; | |
50 | + } | |
51 | + | |
52 | + public String getName() { | |
53 | + return name; | |
54 | + } | |
55 | +} |
platform-common/src/main/java/com/lyms/platform/common/enums/WyTypeEnums.java
View file @
02c0621
1 | +package com.lyms.platform.common.enums; | |
2 | + | |
3 | +import java.util.ArrayList; | |
4 | +import java.util.HashMap; | |
5 | +import java.util.List; | |
6 | +import java.util.Map; | |
7 | + | |
8 | +/** | |
9 | + * | |
10 | + * 喂养方式 | |
11 | + * | |
12 | + * @author Administrator | |
13 | + * | |
14 | + */ | |
15 | +public enum WyTypeEnums { | |
16 | + | |
17 | + MR(0,"纯母乳喂养"),HH(1,"混合喂养"),RG(2,"人工喂养"); | |
18 | + | |
19 | + private WyTypeEnums(int id, String name) { | |
20 | + this.id = id; | |
21 | + this.name = name; | |
22 | + } | |
23 | + | |
24 | + public static String getNameById(int id){ | |
25 | + for(WyTypeEnums s : values()){ | |
26 | + if(id==s.id){ | |
27 | + return s.getName(); | |
28 | + } | |
29 | + } | |
30 | + return ""; | |
31 | + } | |
32 | + | |
33 | + public static List<Map> getWyTypeEnums() { | |
34 | + List<Map> list = new ArrayList<>(); | |
35 | + for (WyTypeEnums e : WyTypeEnums.values()) { | |
36 | + Map rootMap = new HashMap(); | |
37 | + rootMap.put("id", e.getId()); | |
38 | + rootMap.put("name", e.getName()); | |
39 | + list.add(rootMap); | |
40 | + } | |
41 | + return list; | |
42 | + } | |
43 | + | |
44 | + private int id; | |
45 | + | |
46 | + private String name; | |
47 | + | |
48 | + public int getId() { | |
49 | + return id; | |
50 | + } | |
51 | + | |
52 | + public String getName() { | |
53 | + return name; | |
54 | + } | |
55 | +} |
platform-dal/src/main/java/com/lyms/platform/pojo/BabyCheckModel.java
View file @
02c0621
... | ... | @@ -5,6 +5,7 @@ |
5 | 5 | import org.springframework.data.mongodb.core.mapping.Field; |
6 | 6 | |
7 | 7 | import java.util.Date; |
8 | +import java.util.Map; | |
8 | 9 | |
9 | 10 | /** |
10 | 11 | * 儿保检查 |
... | ... | @@ -59,6 +60,9 @@ |
59 | 60 | //发病情况 |
60 | 61 | private String morbidity; |
61 | 62 | |
63 | + //药物过敏史 | |
64 | + private String drugGllergic; | |
65 | + | |
62 | 66 | /******问诊情况****/ |
63 | 67 | |
64 | 68 | /******一般检查****/ |
65 | 69 | |
... | ... | @@ -77,8 +81,10 @@ |
77 | 81 | //身长别体重 |
78 | 82 | private String heightWeight; |
79 | 83 | |
84 | + private String chestw; | |
80 | 85 | |
81 | 86 | |
87 | + | |
82 | 88 | //发育评价 |
83 | 89 | private String growthEvaluate; |
84 | 90 | |
... | ... | @@ -212,6 +218,23 @@ |
212 | 218 | |
213 | 219 | //创建时间 |
214 | 220 | private Date created; |
221 | + | |
222 | + | |
223 | + public String getDrugGllergic() { | |
224 | + return drugGllergic; | |
225 | + } | |
226 | + | |
227 | + public void setDrugGllergic(String drugGllergic) { | |
228 | + this.drugGllergic = drugGllergic; | |
229 | + } | |
230 | + | |
231 | + public String getChestw() { | |
232 | + return chestw; | |
233 | + } | |
234 | + | |
235 | + public void setChestw(String chestw) { | |
236 | + this.chestw = chestw; | |
237 | + } | |
215 | 238 | |
216 | 239 | public Date getModified() { |
217 | 240 | return modified; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyCheckController.java
View file @
02c0621
... | ... | @@ -134,7 +134,17 @@ |
134 | 134 | @ResponseBody |
135 | 135 | public BaseObjectResponse queryGrowthEvaluate(@RequestParam(required = true) Double height,@RequestParam(required = true) Integer sex |
136 | 136 | ,@RequestParam(required = true) String birth,@RequestParam(required = true) Double weight){ |
137 | - return babyCheckFacade.queryGrowthEvaluate(height, sex,birth,weight); | |
137 | + return babyCheckFacade.queryGrowthEvaluate(height, sex, birth, weight); | |
138 | + | |
139 | + } | |
140 | + | |
141 | + /** | |
142 | + * 基础数据 | |
143 | + */ | |
144 | + @RequestMapping(value = "/getBaseConfig", method = RequestMethod.GET) | |
145 | + @ResponseBody | |
146 | + public BaseObjectResponse getBaseConfig(){ | |
147 | + return babyCheckFacade.getBaseConfig(); | |
138 | 148 | |
139 | 149 | } |
140 | 150 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
View file @
02c0621
... | ... | @@ -2,16 +2,18 @@ |
2 | 2 | |
3 | 3 | import com.lyms.platform.biz.service.*; |
4 | 4 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
5 | -import com.lyms.platform.common.enums.SexEnum; | |
6 | -import com.lyms.platform.common.enums.YnEnums; | |
5 | +import com.lyms.platform.common.enums.*; | |
7 | 6 | import com.lyms.platform.common.result.BaseObjectResponse; |
8 | 7 | import com.lyms.platform.common.result.BaseResponse; |
9 | 8 | import com.lyms.platform.common.utils.DateUtil; |
9 | +import com.lyms.platform.common.utils.JsonUtil; | |
10 | 10 | import com.lyms.platform.common.utils.StringUtils; |
11 | +import com.lyms.platform.common.utils.SystemConfig; | |
11 | 12 | import com.lyms.platform.operate.web.request.BabyCheckRequest; |
12 | 13 | import com.lyms.platform.operate.web.result.BabyBasicResult; |
13 | 14 | import com.lyms.platform.operate.web.result.BabyCheckResult; |
14 | 15 | import com.lyms.platform.operate.web.result.BabyChooseResult; |
16 | +import com.lyms.platform.operate.web.result.BasicConfigResult; | |
15 | 17 | import com.lyms.platform.pojo.AwModel; |
16 | 18 | import com.lyms.platform.pojo.BabyCheckModel; |
17 | 19 | import com.lyms.platform.pojo.BabyModel; |
... | ... | @@ -32,6 +34,7 @@ |
32 | 34 | |
33 | 35 | @Autowired |
34 | 36 | private BabyBookbuildingService babyBookbuildingService; |
37 | + private BaseObjectResponse baseConfig; | |
35 | 38 | |
36 | 39 | /** |
37 | 40 | * 更新检查 |
... | ... | @@ -92,7 +95,7 @@ |
92 | 95 | model.setBilirubinHead(request.getBilirubinHead()); |
93 | 96 | model.setBilirubinChest(request.getBilirubinChest()); |
94 | 97 | model.setBilirubinBelly(request.getBilirubinBelly()); |
95 | - model.setBregma(request.getBregma()); | |
98 | + model.setBregma(JsonUtil.obj2JsonString(request.getBregma())); | |
96 | 99 | model.setTooth(request.getTooth()); |
97 | 100 | model.setFaceColor(request.getFaceColor()); |
98 | 101 | model.setSkin(request.getSkin()); |
... | ... | @@ -130,6 +133,10 @@ |
130 | 133 | model.setNextDate(DateUtil.parseYMD(request.getNextDate())); |
131 | 134 | model.setHighRisk(request.getHighRisk()); |
132 | 135 | |
136 | + model.setDrugGllergic(JsonUtil.obj2JsonString(request.getDrugGllergic())); | |
137 | + model.setChestw(request.getChestw()); | |
138 | + | |
139 | + | |
133 | 140 | model.setCheckDate(DateUtil.parseYMD(request.getCheckDate())); |
134 | 141 | |
135 | 142 | return model; |
... | ... | @@ -345,7 +352,7 @@ |
345 | 352 | model.setBilirubinHead(checkModel.getBilirubinHead()); |
346 | 353 | model.setBilirubinChest(checkModel.getBilirubinChest()); |
347 | 354 | model.setBilirubinBelly(checkModel.getBilirubinBelly()); |
348 | - model.setBregma(checkModel.getBregma()); | |
355 | + model.setBregma(JsonUtil.str2Obj(checkModel.getBregma(), Map.class)); | |
349 | 356 | model.setTooth(checkModel.getTooth()); |
350 | 357 | model.setFaceColor(checkModel.getFaceColor()); |
351 | 358 | model.setSkin(checkModel.getSkin()); |
... | ... | @@ -383,6 +390,8 @@ |
383 | 390 | model.setNextDate(DateUtil.getyyyy_MM_dd(checkModel.getNextDate())); |
384 | 391 | model.setHighRisk(checkModel.getHighRisk()); |
385 | 392 | |
393 | + model.setDrugGllergic(JsonUtil.str2Obj(checkModel.getBregma(), Map.class)); | |
394 | + model.setChestw(checkModel.getChestw()); | |
386 | 395 | |
387 | 396 | return model; |
388 | 397 | |
... | ... | @@ -533,6 +542,30 @@ |
533 | 542 | br.setErrorcode(ErrorCodeConstants.SUCCESS); |
534 | 543 | br.setErrormsg("成功"); |
535 | 544 | return br; |
545 | + } | |
546 | + | |
547 | + public BaseObjectResponse getBaseConfig() { | |
548 | + | |
549 | + Map<String,Object> map = new HashMap(); | |
550 | + | |
551 | + //抚养方式 | |
552 | + List fyType = FyTypeEnums.getFyTypeEnums(); | |
553 | + map.put("fyType", fyType); | |
554 | + | |
555 | + //喂养方式 | |
556 | + List wyType = WyTypeEnums.getWyTypeEnums(); | |
557 | + map.put("wyType", wyType); | |
558 | + | |
559 | + map.put("initCheckDate", DateUtil.getyyyy_MM_dd(new Date())); | |
560 | + | |
561 | + | |
562 | + | |
563 | + BaseObjectResponse objectResponse = new BaseObjectResponse(); | |
564 | + objectResponse.setData(map); | |
565 | + objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); | |
566 | + objectResponse.setErrormsg("成功"); | |
567 | + | |
568 | + return objectResponse; | |
536 | 569 | } |
537 | 570 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyCheckRequest.java
View file @
02c0621
1 | 1 | package com.lyms.platform.operate.web.request; |
2 | 2 | |
3 | +import java.util.Map; | |
4 | + | |
3 | 5 | /** |
4 | 6 | * Created by lqy on 2016/6/20. |
5 | 7 | * 儿保检查 |
... | ... | @@ -44,6 +46,9 @@ |
44 | 46 | //发病情况 |
45 | 47 | private String morbidity; |
46 | 48 | |
49 | + //药物过敏史 | |
50 | + private Map drugGllergic; | |
51 | + | |
47 | 52 | /******问诊情况****/ |
48 | 53 | |
49 | 54 | /******一般检查****/ |
... | ... | @@ -59,6 +64,9 @@ |
59 | 64 | //头围 |
60 | 65 | private String head; |
61 | 66 | |
67 | + //胸围 | |
68 | + private String chestw; | |
69 | + | |
62 | 70 | //身长别体重 |
63 | 71 | private String heightWeight; |
64 | 72 | |
65 | 73 | |
... | ... | @@ -81,8 +89,9 @@ |
81 | 89 | private String bilirubinBelly; |
82 | 90 | |
83 | 91 | //前卤 |
84 | - private String bregma; | |
92 | + private Map bregma; | |
85 | 93 | |
94 | + | |
86 | 95 | //牙齿 |
87 | 96 | private String tooth; |
88 | 97 | |
... | ... | @@ -202,6 +211,14 @@ |
202 | 211 | this.checkDate = checkDate; |
203 | 212 | } |
204 | 213 | |
214 | + public String getChestw() { | |
215 | + return chestw; | |
216 | + } | |
217 | + | |
218 | + public void setChestw(String chestw) { | |
219 | + this.chestw = chestw; | |
220 | + } | |
221 | + | |
205 | 222 | /******诊断指导****/ |
206 | 223 | |
207 | 224 | |
208 | 225 | |
... | ... | @@ -414,11 +431,19 @@ |
414 | 431 | this.nextDate = nextDate; |
415 | 432 | } |
416 | 433 | |
417 | - public String getBregma() { | |
434 | + public Map getDrugGllergic() { | |
435 | + return drugGllergic; | |
436 | + } | |
437 | + | |
438 | + public void setDrugGllergic(Map drugGllergic) { | |
439 | + this.drugGllergic = drugGllergic; | |
440 | + } | |
441 | + | |
442 | + public Map getBregma() { | |
418 | 443 | return bregma; |
419 | 444 | } |
420 | 445 | |
421 | - public void setBregma(String bregma) { | |
446 | + public void setBregma(Map bregma) { | |
422 | 447 | this.bregma = bregma; |
423 | 448 | } |
424 | 449 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyCheckResult.java
View file @
02c0621
1 | 1 | package com.lyms.platform.operate.web.result; |
2 | 2 | |
3 | +import java.util.Map; | |
4 | + | |
3 | 5 | /** |
4 | 6 | * Created by Administrator on 2016/6/21. |
5 | 7 | */ |
... | ... | @@ -41,6 +43,10 @@ |
41 | 43 | //发病情况 |
42 | 44 | private String morbidity; |
43 | 45 | |
46 | + //药物过敏史 | |
47 | + private Map drugGllergic; | |
48 | + | |
49 | + | |
44 | 50 | /******问诊情况****/ |
45 | 51 | |
46 | 52 | /******一般检查****/ |
... | ... | @@ -59,6 +65,8 @@ |
59 | 65 | //身长别体重 |
60 | 66 | private String heightWeight; |
61 | 67 | |
68 | + //胸围 | |
69 | + private String chestw; | |
62 | 70 | |
63 | 71 | |
64 | 72 | //发育评价 |
... | ... | @@ -78,7 +86,7 @@ |
78 | 86 | private String bilirubinBelly; |
79 | 87 | |
80 | 88 | //前卤 |
81 | - private String bregma; | |
89 | + private Map bregma; | |
82 | 90 | |
83 | 91 | //牙齿 |
84 | 92 | private String tooth; |
85 | 93 | |
... | ... | @@ -188,8 +196,30 @@ |
188 | 196 | //是否高危儿童 0 非高危 1高危 |
189 | 197 | private Integer highRisk; |
190 | 198 | |
199 | + public Map getDrugGllergic() { | |
200 | + return drugGllergic; | |
201 | + } | |
202 | + | |
203 | + public void setDrugGllergic(Map drugGllergic) { | |
204 | + this.drugGllergic = drugGllergic; | |
205 | + } | |
206 | + | |
207 | + public String getChestw() { | |
208 | + return chestw; | |
209 | + } | |
210 | + | |
211 | + public void setChestw(String chestw) { | |
212 | + this.chestw = chestw; | |
213 | + } | |
214 | + | |
215 | + public void setBregma(Map bregma) { | |
216 | + this.bregma = bregma; | |
217 | + } | |
218 | + | |
191 | 219 | /******诊断指导****/ |
192 | 220 | |
221 | + | |
222 | + | |
193 | 223 | public String getId() { |
194 | 224 | return id; |
195 | 225 | } |
196 | 226 | |
... | ... | @@ -358,12 +388,8 @@ |
358 | 388 | this.bilirubinBelly = bilirubinBelly; |
359 | 389 | } |
360 | 390 | |
361 | - public String getBregma() { | |
391 | + public Map getBregma() { | |
362 | 392 | return bregma; |
363 | - } | |
364 | - | |
365 | - public void setBregma(String bregma) { | |
366 | - this.bregma = bregma; | |
367 | 393 | } |
368 | 394 | |
369 | 395 | public String getTooth() { |