Commit 4e37a7588b7cbd8ca42a31daedb93c0ad5137c46
1 parent
345ff26097
Exists in
master
and in
6 other branches
听力诊断模块
Showing 4 changed files with 86 additions and 3 deletions
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarHearingDiagnose.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/EarController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearingDiagnoseController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/InitHearingDiagnose.java
platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarHearingDiagnose.java
View file @
4e37a75
| 1 | 1 | package com.lyms.platform.permission.model; |
| 2 | 2 | |
| 3 | 3 | import java.util.Date; |
| 4 | +import java.util.List; | |
| 4 | 5 | |
| 5 | 6 | public class BabyPatientExtendEarHearingDiagnose { |
| 6 | 7 | |
| ... | ... | @@ -35,6 +36,10 @@ |
| 35 | 36 | /** |
| 36 | 37 | * 高危因素 |
| 37 | 38 | */ |
| 39 | + private List highFactors; | |
| 40 | + /** | |
| 41 | + * 高危因素 | |
| 42 | + */ | |
| 38 | 43 | private String highFactorStr; |
| 39 | 44 | |
| 40 | 45 | /** |
| ... | ... | @@ -448,6 +453,10 @@ |
| 448 | 453 | /** |
| 449 | 454 | * 诊断结果 |
| 450 | 455 | */ |
| 456 | + private List diagnResults; | |
| 457 | + /** | |
| 458 | + * 诊断结果 | |
| 459 | + */ | |
| 451 | 460 | private String diagnResultStr; |
| 452 | 461 | /** |
| 453 | 462 | * 确诊结果 |
| ... | ... | @@ -456,6 +465,11 @@ |
| 456 | 465 | /** |
| 457 | 466 | * 确诊结果 |
| 458 | 467 | */ |
| 468 | + private List confirmResults; | |
| 469 | + | |
| 470 | + /** | |
| 471 | + * 确诊结果 | |
| 472 | + */ | |
| 459 | 473 | private String confirmResultStr; |
| 460 | 474 | /** |
| 461 | 475 | * 确诊时间 |
| ... | ... | @@ -534,6 +548,22 @@ |
| 534 | 548 | return confirmResultStr; |
| 535 | 549 | } |
| 536 | 550 | |
| 551 | + public List getDiagnResults() { | |
| 552 | + return diagnResults; | |
| 553 | + } | |
| 554 | + | |
| 555 | + public void setDiagnResults(List diagnResults) { | |
| 556 | + this.diagnResults = diagnResults; | |
| 557 | + } | |
| 558 | + | |
| 559 | + public List getConfirmResults() { | |
| 560 | + return confirmResults; | |
| 561 | + } | |
| 562 | + | |
| 563 | + public void setConfirmResults(List confirmResults) { | |
| 564 | + this.confirmResults = confirmResults; | |
| 565 | + } | |
| 566 | + | |
| 537 | 567 | public void setConfirmResultStr(String confirmResultStr) { |
| 538 | 568 | this.confirmResultStr = confirmResultStr; |
| 539 | 569 | } |
| ... | ... | @@ -712,6 +742,14 @@ |
| 712 | 742 | |
| 713 | 743 | public void setAbrThrLeftShieldDbnhl(String abrThrLeftShieldDbnhl) { |
| 714 | 744 | this.abrThrLeftShieldDbnhl = abrThrLeftShieldDbnhl; |
| 745 | + } | |
| 746 | + | |
| 747 | + public List getHighFactors() { | |
| 748 | + return highFactors; | |
| 749 | + } | |
| 750 | + | |
| 751 | + public void setHighFactors(List highFactors) { | |
| 752 | + this.highFactors = highFactors; | |
| 715 | 753 | } |
| 716 | 754 | |
| 717 | 755 | public String getAbrThrRightDbnhl() { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/EarController.java
View file @
4e37a75
| ... | ... | @@ -17,6 +17,7 @@ |
| 17 | 17 | import com.lyms.platform.operate.web.result.InitHearingDiagnoseListData; |
| 18 | 18 | import com.lyms.platform.permission.model.*; |
| 19 | 19 | import com.lyms.platform.permission.service.*; |
| 20 | +import org.apache.commons.collections.CollectionUtils; | |
| 20 | 21 | import org.springframework.beans.factory.annotation.Autowired; |
| 21 | 22 | import org.springframework.stereotype.Controller; |
| 22 | 23 | import org.springframework.web.bind.annotation.RequestMapping; |
| 23 | 24 | |
| ... | ... | @@ -163,14 +164,24 @@ |
| 163 | 164 | */ |
| 164 | 165 | @RequestMapping(method = RequestMethod.GET, value = "/initHearingDiagnose") |
| 165 | 166 | @ResponseBody |
| 166 | - public BaseResponse initHearingDiagnose() { | |
| 167 | - | |
| 167 | + public BaseResponse initHearingDiagnose(String babyId) { | |
| 168 | 168 | //根据条件查询基础配置信息表 |
| 169 | 169 | InitHearingDiagnose initHearingDiagnose = new InitHearingDiagnose(); |
| 170 | 170 | initHearingDiagnose.setConfirmResult(EnumUtil.toJson(ConfirmedEnums.class)); |
| 171 | 171 | initHearingDiagnose.setHearingDiagnosis(EnumUtil.toJson(HearingDiagnosisEnums.class)); |
| 172 | 172 | initHearingDiagnose.setHighRiskConfirms(EnumUtil.toJson(HighRiskEnum.class)); |
| 173 | 173 | initHearingDiagnose.setHandlingSuggestion(HdEnums.getHandlingSuggestionEnums()); |
| 174 | + | |
| 175 | + //查询最后一次听诊时间 | |
| 176 | + //查询听诊记录 | |
| 177 | + BabyPatientExtendEarHearingDiagnoseQuery hdQuery = new BabyPatientExtendEarHearingDiagnoseQuery(); | |
| 178 | + hdQuery.setBabyId(babyId); | |
| 179 | + hdQuery.setSort("diagnose_time"); | |
| 180 | + List<BabyPatientExtendEarHearingDiagnose> hdList = hearingDiagnoseService.queryBabyPatientExtendEarHearingDiagnose(hdQuery); | |
| 181 | + if(CollectionUtils.isNotEmpty(hdList)){ | |
| 182 | + BabyPatientExtendEarHearingDiagnose ehd = hdList.get(hdList.size()-1); | |
| 183 | + initHearingDiagnose.setDiagnoseTime(DateUtil.getyyyy_MM_dd(ehd.getDiagnoseTime())); | |
| 184 | + } | |
| 174 | 185 | return initHearingDiagnose.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); |
| 175 | 186 | } |
| 176 | 187 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearingDiagnoseController.java
View file @
4e37a75
| 1 | 1 | package com.lyms.platform.operate.web.controller; |
| 2 | 2 | |
| 3 | +import com.alibaba.fastjson.JSONObject; | |
| 3 | 4 | import com.lyms.platform.biz.service.BabyBookbuildingService; |
| 4 | 5 | import com.lyms.platform.biz.service.BabyService; |
| 5 | 6 | import com.lyms.platform.common.annotation.TokenRequired; |
| 6 | 7 | |
| 7 | 8 | |
| ... | ... | @@ -148,13 +149,20 @@ |
| 148 | 149 | if (StringUtils.isNotEmpty(behd.getHighFactor()))//听力高危因素文字 HighRiskEnum |
| 149 | 150 | { |
| 150 | 151 | StringBuffer hfBuff = new StringBuffer(); |
| 152 | + List highArr = new ArrayList(); | |
| 153 | + | |
| 151 | 154 | String[] highFactors = behd.getHighFactor().split(","); |
| 152 | 155 | for (String hf : highFactors) { |
| 153 | 156 | if (StringUtils.isNotEmpty(hf)) { |
| 154 | 157 | String name = HighRiskEnum.getTitle(Integer.parseInt(hf)); |
| 155 | 158 | hfBuff.append(name + "、"); |
| 159 | + JSONObject confiJo = new JSONObject(); | |
| 160 | + confiJo.put("id",hf); | |
| 161 | + confiJo.put("name",name); | |
| 162 | + highArr.add(confiJo); | |
| 156 | 163 | } |
| 157 | 164 | } |
| 165 | + behd.setHighFactors(highArr); | |
| 158 | 166 | behd.setHighFactorStr(hfBuff.toString()); |
| 159 | 167 | } |
| 160 | 168 | |
| 161 | 169 | |
| 162 | 170 | |
| 163 | 171 | |
| 164 | 172 | |
| 165 | 173 | |
| 166 | 174 | |
| ... | ... | @@ -175,26 +183,42 @@ |
| 175 | 183 | { |
| 176 | 184 | StringBuffer hfBuff = new StringBuffer(); |
| 177 | 185 | String[] highFactors = behd.getConfirmResult().split(","); |
| 186 | + List confiArr = new ArrayList(); | |
| 178 | 187 | for (String hf : highFactors) { |
| 179 | 188 | if (StringUtils.isNotEmpty(hf)) { |
| 180 | 189 | String name = ConfirmedEnums.getTitle(Integer.parseInt(hf)); |
| 190 | + JSONObject confiJo = new JSONObject(); | |
| 191 | + confiJo.put("id",hf); | |
| 192 | + confiJo.put("name",name); | |
| 193 | + confiArr.add(confiJo); | |
| 181 | 194 | hfBuff.append(name + "、"); |
| 182 | 195 | } |
| 183 | 196 | } |
| 197 | + behd.setConfirmResults(confiArr); | |
| 184 | 198 | behd.setConfirmResultStr(hfBuff.toString()); |
| 199 | + }else{ | |
| 200 | + behd.setConfirmResults(new ArrayList()); | |
| 185 | 201 | } |
| 186 | 202 | |
| 187 | 203 | if (StringUtils.isNotEmpty(behd.getDiagnResult()))//诊断内容转换 HearingDiagnosisEnums |
| 188 | 204 | { |
| 189 | 205 | StringBuffer hfBuff = new StringBuffer(); |
| 190 | - String[] highFactors = behd.getConfirmResult().split(","); | |
| 206 | + List diagnArr = new ArrayList(); | |
| 207 | + String[] highFactors = behd.getDiagnResult().split(","); | |
| 191 | 208 | for (String hf : highFactors) { |
| 192 | 209 | if (StringUtils.isNotEmpty(hf)) { |
| 193 | 210 | String name = HearingDiagnosisEnums.getTitle(Integer.parseInt(hf)); |
| 211 | + JSONObject confiJo = new JSONObject(); | |
| 212 | + confiJo.put("id",hf); | |
| 213 | + confiJo.put("name",name); | |
| 214 | + diagnArr.add(confiJo); | |
| 194 | 215 | hfBuff.append(name + "、"); |
| 195 | 216 | } |
| 196 | 217 | } |
| 197 | 218 | behd.setDiagnResultStr(hfBuff.toString()); |
| 219 | + behd.setDiagnResults(diagnArr); | |
| 220 | + }else{ | |
| 221 | + behd.setConfirmResults(new ArrayList()); | |
| 198 | 222 | } |
| 199 | 223 | |
| 200 | 224 | if(behd.getDiagnHandSugge()!=null){ |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/InitHearingDiagnose.java
View file @
4e37a75
| ... | ... | @@ -19,6 +19,16 @@ |
| 19 | 19 | private List<Map<String,Object>> confirmResult; |
| 20 | 20 | //处理意见 |
| 21 | 21 | private List<Map> handlingSuggestion; |
| 22 | + //最后一次听诊时间 | |
| 23 | + private String diagnoseTime; | |
| 24 | + | |
| 25 | + public String getDiagnoseTime() { | |
| 26 | + return diagnoseTime; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void setDiagnoseTime(String diagnoseTime) { | |
| 30 | + this.diagnoseTime = diagnoseTime; | |
| 31 | + } | |
| 22 | 32 | |
| 23 | 33 | public List<Map> getHandlingSuggestion() { |
| 24 | 34 | return handlingSuggestion; |