Commit 26672d95812609f566f32032d546a32eb4e29dc5
1 parent
5cff25f2fb
Exists in
master
and in
4 other branches
孤独症初筛根据月龄查询套餐内容接口
Showing 3 changed files with 269 additions and 0 deletions
platform-common/src/main/java/com/lyms/platform/common/base/BaseMap.java
View file @
26672d9
| 1 | +package com.lyms.platform.common.base; | |
| 2 | + | |
| 3 | +/** | |
| 4 | + * 简单类 | |
| 5 | + */ | |
| 6 | +public class BaseMap { | |
| 7 | + | |
| 8 | + private String id; | |
| 9 | + | |
| 10 | + private String name; | |
| 11 | + | |
| 12 | + public String getId() { | |
| 13 | + return id; | |
| 14 | + } | |
| 15 | + | |
| 16 | + public void setId(String id) { | |
| 17 | + this.id = id; | |
| 18 | + } | |
| 19 | + | |
| 20 | + public String getName() { | |
| 21 | + return name; | |
| 22 | + } | |
| 23 | + | |
| 24 | + public void setName(String name) { | |
| 25 | + this.name = name; | |
| 26 | + } | |
| 27 | + | |
| 28 | + @Override | |
| 29 | + public String toString() { | |
| 30 | + return "BaseMap{" + | |
| 31 | + "id='" + id + '\'' + | |
| 32 | + ", name='" + name + '\'' + | |
| 33 | + '}'; | |
| 34 | + } | |
| 35 | + | |
| 36 | + public BaseMap(String id, String name) { | |
| 37 | + this.id = id; | |
| 38 | + this.name = name; | |
| 39 | + } | |
| 40 | +} |
platform-common/src/main/java/com/lyms/platform/common/constants/PrimaryScreeningConstants.java
View file @
26672d9
| 1 | +package com.lyms.platform.common.constants; | |
| 2 | + | |
| 3 | +import com.google.common.collect.Lists; | |
| 4 | +import com.lyms.platform.common.base.BaseMap; | |
| 5 | + | |
| 6 | +import java.util.ArrayList; | |
| 7 | +import java.util.List; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * 孤独症初筛月龄套餐 | |
| 11 | + * A(1, "1月龄"), | |
| 12 | + * B(3, "3月龄"), | |
| 13 | + * C(6, "6月龄"), | |
| 14 | + * D(8, "8月龄"), | |
| 15 | + * E(12, "12月龄"), | |
| 16 | + * F(18, "18月龄"), | |
| 17 | + * G(24, "24月龄"), | |
| 18 | + * H(30, "30月龄"), | |
| 19 | + * I(36, "36月龄"), | |
| 20 | + * J(48, "4岁"), | |
| 21 | + * K(60, "5岁"), | |
| 22 | + * L(72, "6岁"); | |
| 23 | + */ | |
| 24 | +public class PrimaryScreeningConstants { | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * 预警征象筛查 | |
| 28 | + * 心理行为发育初筛 预警征象筛查 | |
| 29 | + * 3月龄 6月龄 8月龄 12月龄 | |
| 30 | + * □ 0未见异常 □ 0未见异常 □ 0未见异常 □ 0未见异常 | |
| 31 | + * □ 1对很大声音没有反应 □ 1发音少,不会笑 出声 □ 1听到声音无应答 □ 1呼唤名字无反应 | |
| 32 | + * □ 2逗引时不发音或不会微笑 □ 2不会伸手抓物 □ 2不会区分生人和熟人 □ 2不会模仿“再见”或“欢迎”动作 | |
| 33 | + * □ 3不注视人脸,不追视移动人或物品 □ 3紧握拳松不开 □ 3双手间不会传递 玩具 □ 3不会用拇食指对捏小物品 | |
| 34 | + * □ 4俯卧时不会抬头 □ 4不能扶坐 □ 4不会独坐 □ 4不会扶物站立 | |
| 35 | + */ | |
| 36 | + public static final List<BaseMap> WARNINGSIGNS3 = Lists.newArrayList( | |
| 37 | + new BaseMap("0","未见异常"), | |
| 38 | + new BaseMap("1","对很大声音没有反应"), | |
| 39 | + new BaseMap("2","逗引时不发音或不会微笑"), | |
| 40 | + new BaseMap("3","不注视人脸,不追视移动人或物品"), | |
| 41 | + new BaseMap("4","俯卧时不会抬头") | |
| 42 | + ); | |
| 43 | + public static final List<BaseMap> WARNINGSIGNS6 = Lists.newArrayList( | |
| 44 | + new BaseMap("0","未见异常"), | |
| 45 | + new BaseMap("1","发音少,不会笑出声"), | |
| 46 | + new BaseMap("2","不会伸手抓物"), | |
| 47 | + new BaseMap("3","紧握拳松不开"), | |
| 48 | + new BaseMap("4","不能扶坐") | |
| 49 | + ); | |
| 50 | + public static final List<BaseMap> WARNINGSIGNS8 = Lists.newArrayList( | |
| 51 | + new BaseMap("0","未见异常"), | |
| 52 | + new BaseMap("1","听到声音无应答"), | |
| 53 | + new BaseMap("2","不会区分生人和熟人"), | |
| 54 | + new BaseMap("3","双手间不会传递玩具"), | |
| 55 | + new BaseMap("4","不会独坐") | |
| 56 | + ); | |
| 57 | + public static final List<BaseMap> WARNINGSIGNS12 = Lists.newArrayList( | |
| 58 | + new BaseMap("0","未见异常"), | |
| 59 | + new BaseMap("1","呼唤名字无反应"), | |
| 60 | + new BaseMap("2","不会模仿“再见”或“欢迎”动作"), | |
| 61 | + new BaseMap("3","不会用拇食指对捏小物品"), | |
| 62 | + new BaseMap("4","不会扶物站立") | |
| 63 | + ); | |
| 64 | + | |
| 65 | + | |
| 66 | + /** | |
| 67 | + * 预警征象筛查 | |
| 68 | + * 心理行为发育初筛 语言功能和社会交往能力询问 | |
| 69 | + * 3月龄 6月龄 8月龄 12月龄 | |
| 70 | + * □ 1未见异常 □ 1未见异常 □ 1未见异常 □ 1未见异常 | |
| 71 | + * □ 2语言功能障碍或 倒退 □ 2语言功能障碍或 倒退 □ 2语言功能障碍或 倒退 □ 2语言功能障碍或倒退 | |
| 72 | + * □ 3社会交往能力障 碍或倒退 □ 3社会交往能力障 碍或倒退 □ 3社会交往能力障 碍或倒退 □ 3社会交往能力障碍或倒退 | |
| 73 | + * | |
| 74 | + */ | |
| 75 | + public static final List<BaseMap> LANGUAGESOCIAL3 = Lists.newArrayList( | |
| 76 | + new BaseMap("0","未见异常"), | |
| 77 | + new BaseMap("1","语言功能障碍或倒退"), | |
| 78 | + new BaseMap("2","社会交往能力障碍或倒退") | |
| 79 | + ); | |
| 80 | + public static final List<BaseMap> LANGUAGESOCIAL6 = Lists.newArrayList( | |
| 81 | + new BaseMap("0","未见异常"), | |
| 82 | + new BaseMap("1","语言功能障碍或倒退"), | |
| 83 | + new BaseMap("2","社会交往能力障碍或倒退") | |
| 84 | + ); | |
| 85 | + public static final List<BaseMap> LANGUAGESOCIAL8 = Lists.newArrayList( | |
| 86 | + new BaseMap("0","未见异常"), | |
| 87 | + new BaseMap("1","语言功能障碍或倒退"), | |
| 88 | + new BaseMap("2","社会交往能力障碍或倒退") | |
| 89 | + ); | |
| 90 | + public static final List<BaseMap> LANGUAGESOCIAL12 = Lists.newArrayList( | |
| 91 | + new BaseMap("0","未见异常"), | |
| 92 | + new BaseMap("1","语言功能障碍或倒退"), | |
| 93 | + new BaseMap("2","社会交往能力障碍或倒退") | |
| 94 | + ); | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/autism/PrimaryScreeningController.java
View file @
26672d9
| 1 | +package com.lyms.platform.operate.web.controller.autism; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.base.BaseMap; | |
| 4 | +import com.lyms.platform.common.constants.PrimaryScreeningConstants; | |
| 5 | +import com.lyms.platform.common.result.BaseResponse; | |
| 6 | +import com.lyms.platform.common.result.RespBuilder; | |
| 7 | +import org.slf4j.Logger; | |
| 8 | +import org.slf4j.LoggerFactory; | |
| 9 | +import org.springframework.stereotype.Controller; | |
| 10 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 11 | +import org.springframework.web.bind.annotation.RequestMethod; | |
| 12 | +import org.springframework.web.bind.annotation.ResponseBody; | |
| 13 | + | |
| 14 | +import javax.servlet.http.HttpServletRequest; | |
| 15 | +import java.util.HashMap; | |
| 16 | +import java.util.List; | |
| 17 | + | |
| 18 | +/** | |
| 19 | + * 孤独症初筛 | |
| 20 | + */ | |
| 21 | +@RequestMapping(value = "/primaryScreening") | |
| 22 | +@Controller | |
| 23 | +public class PrimaryScreeningController { | |
| 24 | + | |
| 25 | + //日志调测器 | |
| 26 | + private static final Logger logger = LoggerFactory.getLogger(PrimaryScreeningController.class); | |
| 27 | + | |
| 28 | + | |
| 29 | + /** | |
| 30 | + * 根据月龄套餐获取相应数据 | |
| 31 | + * B(3, "3月龄"), | |
| 32 | + * C(6, "6月龄"), | |
| 33 | + * D(8, "8月龄"), | |
| 34 | + * E(12, "12月龄"), | |
| 35 | + * F(18, "18月龄"), | |
| 36 | + * G(24, "24月龄"), | |
| 37 | + * H(30, "30月龄"), | |
| 38 | + * I(36, "36月龄"), | |
| 39 | + * J(48, "4岁"), | |
| 40 | + * K(60, "5岁"), | |
| 41 | + * L(72, "6岁"); | |
| 42 | + * | |
| 43 | + * @param request | |
| 44 | + * @param monthAge | |
| 45 | + * @return | |
| 46 | + */ | |
| 47 | + @RequestMapping(value = "/queryChooseBabys", method = RequestMethod.GET) | |
| 48 | + @ResponseBody | |
| 49 | + public BaseResponse queryChooseBabys(HttpServletRequest request, | |
| 50 | + String monthAge) { | |
| 51 | + logger.info("===孤独症===根据月龄套餐查询套餐内容====月龄套餐::" + monthAge); | |
| 52 | + HashMap<String, List<BaseMap>> res = new HashMap<>(); | |
| 53 | + try { | |
| 54 | + switch (monthAge) { | |
| 55 | + case "3": | |
| 56 | + //预警征象筛查 | |
| 57 | + res.put("warningSigns", PrimaryScreeningConstants.WARNINGSIGNS3); | |
| 58 | + //语言功能和社会交往能力询问 | |
| 59 | + res.put("languageSocial", PrimaryScreeningConstants.LANGUAGESOCIAL3); | |
| 60 | + break; | |
| 61 | + case "6": | |
| 62 | + //预警征象筛查 | |
| 63 | + res.put("warningSigns", PrimaryScreeningConstants.WARNINGSIGNS6); | |
| 64 | + //语言功能和社会交往能力询问 | |
| 65 | + res.put("languageSocial", PrimaryScreeningConstants.LANGUAGESOCIAL6); | |
| 66 | + break; | |
| 67 | + case "8": | |
| 68 | + //预警征象筛查 | |
| 69 | + res.put("warningSigns", PrimaryScreeningConstants.WARNINGSIGNS8); | |
| 70 | + //语言功能和社会交往能力询问 | |
| 71 | + res.put("languageSocial", PrimaryScreeningConstants.LANGUAGESOCIAL8); | |
| 72 | + break; | |
| 73 | + case "12": | |
| 74 | + //预警征象筛查 | |
| 75 | + res.put("warningSigns", PrimaryScreeningConstants.WARNINGSIGNS3); | |
| 76 | + //语言功能和社会交往能力询问 | |
| 77 | + res.put("languageSocial", PrimaryScreeningConstants.LANGUAGESOCIAL12); | |
| 78 | + break; | |
| 79 | + case "18": | |
| 80 | + //预警征象筛查 | |
| 81 | + res.put("warningSigns", PrimaryScreeningConstants.WARNINGSIGNS3); | |
| 82 | + //语言功能和社会交往能力询问 | |
| 83 | + res.put("languageSocial", PrimaryScreeningConstants.WARNINGSIGNS3); | |
| 84 | + break; | |
| 85 | + case "24": | |
| 86 | + //预警征象筛查 | |
| 87 | + res.put("warningSigns", PrimaryScreeningConstants.WARNINGSIGNS3); | |
| 88 | + //语言功能和社会交往能力询问 | |
| 89 | + res.put("languageSocial", PrimaryScreeningConstants.WARNINGSIGNS3); | |
| 90 | + break; | |
| 91 | + case "30": | |
| 92 | + //预警征象筛查 | |
| 93 | + res.put("warningSigns", PrimaryScreeningConstants.WARNINGSIGNS3); | |
| 94 | + //语言功能和社会交往能力询问 | |
| 95 | + res.put("languageSocial", PrimaryScreeningConstants.WARNINGSIGNS3); | |
| 96 | + break; | |
| 97 | + case "36": | |
| 98 | + //预警征象筛查 | |
| 99 | + res.put("warningSigns", PrimaryScreeningConstants.WARNINGSIGNS3); | |
| 100 | + //语言功能和社会交往能力询问 | |
| 101 | + res.put("languageSocial", PrimaryScreeningConstants.WARNINGSIGNS3); | |
| 102 | + break; | |
| 103 | + case "48": | |
| 104 | + //预警征象筛查 | |
| 105 | + res.put("warningSigns", PrimaryScreeningConstants.WARNINGSIGNS3); | |
| 106 | + //语言功能和社会交往能力询问 | |
| 107 | + res.put("languageSocial", PrimaryScreeningConstants.WARNINGSIGNS3); | |
| 108 | + break; | |
| 109 | + case "60": | |
| 110 | + //预警征象筛查 | |
| 111 | + res.put("warningSigns", PrimaryScreeningConstants.WARNINGSIGNS3); | |
| 112 | + //语言功能和社会交往能力询问 | |
| 113 | + res.put("languageSocial", PrimaryScreeningConstants.WARNINGSIGNS3); | |
| 114 | + break; | |
| 115 | + case "72": | |
| 116 | + //预警征象筛查 | |
| 117 | + res.put("warningSigns", PrimaryScreeningConstants.WARNINGSIGNS3); | |
| 118 | + //语言功能和社会交往能力询问 | |
| 119 | + res.put("languageSocial", PrimaryScreeningConstants.WARNINGSIGNS3); | |
| 120 | + break; | |
| 121 | + } | |
| 122 | + } catch (Exception e) { | |
| 123 | + e.printStackTrace(); | |
| 124 | + logger.error(e.getMessage()); | |
| 125 | + } | |
| 126 | + logger.info("===孤独症===根据月龄套餐查询套餐内容====月龄套餐内容::" + res); | |
| 127 | + return RespBuilder.buildSuccess(res); | |
| 128 | + } | |
| 129 | + | |
| 130 | + | |
| 131 | +} |