Commit f4c6ab11b767ff4e23cdaf6918094f7a274470a3

Authored by yangfei
1 parent de0266f948
Exists in master and in 1 other branch dev

听力诊断

Showing 4 changed files with 186 additions and 15 deletions

platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarHearingDiagnose.java View file @ f4c6ab1
... ... @@ -16,6 +16,8 @@
16 16 * 检测医院ID
17 17 */
18 18 private String hospitalId;
  19 +
  20 + private String hospitalName;
19 21 /**
20 22 * 诊断时间
21 23 */
... ... @@ -24,6 +26,10 @@
24 26 * 高危因素
25 27 */
26 28 private String highFactor;
  29 + /**
  30 + * 高危因素
  31 + */
  32 + private String highFactorStr;
27 33  
28 34 /**
29 35 * ABR潜伏期左耳dBnHL
30 36  
... ... @@ -318,10 +324,18 @@
318 324 */
319 325 private Integer aabrLeftIfPass;
320 326 /**
  327 + * AABR左耳是否通过 0-未通过,1-通过
  328 + */
  329 + private String aabrLeftIfPassStr;
  330 + /**
321 331 * AABR右耳是否通过 0-未通过,1-通过
322 332 */
323 333 private Integer aabrRightIfPass;
324 334 /**
  335 + * AABR右耳是否通过 0-未通过,1-通过
  336 + */
  337 + private String aabrRightIfPassStr;
  338 + /**
325 339 * ASSR左耳500Hz
326 340 */
327 341 private String assrLeft500;
... ... @@ -366,6 +380,10 @@
366 380 */
367 381 private String diagnDoctorId;
368 382 /**
  383 + * 诊断指导诊断医生
  384 + */
  385 + private String diagnDoctorStr;
  386 + /**
369 387 * 预约下次诊断时间
370 388 */
371 389 private Date diagnNextTime;
372 390  
373 391  
374 392  
375 393  
376 394  
377 395  
... ... @@ -398,20 +416,90 @@
398 416 */
399 417 private Integer isconfirm;
400 418 /**
  419 + * 是否确诊 0-未确诊 1-确诊
  420 + */
  421 + private String isconfirmStr;
  422 + /**
401 423 * 诊断结果
402 424 */
403 425 private String diagnResult;
404   -
405 426 /**
  427 + * 诊断结果
  428 + */
  429 + private String diagnResultStr;
  430 + /**
406 431 * 确诊结果
407 432 */
408   -
409 433 private String confirmResult;
410 434 /**
  435 + * 确诊结果
  436 + */
  437 + private String confirmResultStr;
  438 + /**
411 439 * 确诊时间
412 440 */
413 441 private Date confirmTime;
  442 + /**
  443 + * 确诊时间
  444 + */
  445 + private String confirmTimeStr;
414 446  
  447 + public String getHospitalName() {
  448 + return hospitalName;
  449 + }
  450 +
  451 + public void setHospitalName(String hospitalName) {
  452 + this.hospitalName = hospitalName;
  453 + }
  454 +
  455 + public String getHighFactorStr() {
  456 + return highFactorStr;
  457 + }
  458 +
  459 + public void setHighFactorStr(String highFactorStr) {
  460 + this.highFactorStr = highFactorStr;
  461 + }
  462 +
  463 + public String getDiagnDoctorStr() {
  464 + return diagnDoctorStr;
  465 + }
  466 +
  467 + public void setDiagnDoctorStr(String diagnDoctorStr) {
  468 + this.diagnDoctorStr = diagnDoctorStr;
  469 + }
  470 +
  471 + public String getIsconfirmStr() {
  472 + return isconfirmStr;
  473 + }
  474 +
  475 + public void setIsconfirmStr(String isconfirmStr) {
  476 + this.isconfirmStr = isconfirmStr;
  477 + }
  478 +
  479 + public String getDiagnResultStr() {
  480 + return diagnResultStr;
  481 + }
  482 +
  483 + public void setDiagnResultStr(String diagnResultStr) {
  484 + this.diagnResultStr = diagnResultStr;
  485 + }
  486 +
  487 + public String getConfirmResultStr() {
  488 + return confirmResultStr;
  489 + }
  490 +
  491 + public void setConfirmResultStr(String confirmResultStr) {
  492 + this.confirmResultStr = confirmResultStr;
  493 + }
  494 +
  495 + public String getConfirmTimeStr() {
  496 + return confirmTimeStr;
  497 + }
  498 +
  499 + public void setConfirmTimeStr(String confirmTimeStr) {
  500 + this.confirmTimeStr = confirmTimeStr;
  501 + }
  502 +
415 503 public Date getConfirmTime() {
416 504 return confirmTime;
417 505 }
... ... @@ -438,6 +526,22 @@
438 526  
439 527 public String getHospitalId() {
440 528 return hospitalId;
  529 + }
  530 +
  531 + public String getAabrLeftIfPassStr() {
  532 + return aabrLeftIfPassStr;
  533 + }
  534 +
  535 + public void setAabrLeftIfPassStr(String aabrLeftIfPassStr) {
  536 + this.aabrLeftIfPassStr = aabrLeftIfPassStr;
  537 + }
  538 +
  539 + public String getAabrRightIfPassStr() {
  540 + return aabrRightIfPassStr;
  541 + }
  542 +
  543 + public void setAabrRightIfPassStr(String aabrRightIfPassStr) {
  544 + this.aabrRightIfPassStr = aabrRightIfPassStr;
441 545 }
442 546  
443 547 public void setHospitalId(String hospitalId) {
platform-common/src/main/java/com/lyms/platform/common/enums/HearingDiagnosisEnums.java View file @ f4c6ab1
1 1 package com.lyms.platform.common.enums;
2 2  
3 3 /**
4   - * 听力诊断结果
  4 + * 听力诊断列表
5 5 * @auther yangfei
6 6 * @createTime 2017年05月15日 17时41分
7 7 * @discription
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearingDiagnoseController.java View file @ f4c6ab1
1 1 package com.lyms.platform.operate.web.controller;
2 2  
3 3 import com.lyms.platform.biz.service.BabyService;
4   -import com.lyms.platform.biz.service.BasicConfigService;
5 4 import com.lyms.platform.common.annotation.TokenRequired;
6 5 import com.lyms.platform.common.base.BaseController;
7 6 import com.lyms.platform.common.base.LoginContext;
8 7 import com.lyms.platform.common.base.PageInfo;
9 8 import com.lyms.platform.common.constants.ErrorCodeConstants;
10 9 import com.lyms.platform.common.enums.ConfirmedEnums;
  10 +import com.lyms.platform.common.enums.HearingDiagnosisEnums;
11 11 import com.lyms.platform.common.enums.HighRiskEnum;
12 12 import com.lyms.platform.common.enums.SexEnum;
13 13 import com.lyms.platform.common.result.BaseListResponse;
... ... @@ -18,10 +18,7 @@
18 18 import com.lyms.platform.operate.web.result.HearingDiagnoseListResult;
19 19 import com.lyms.platform.operate.web.utils.MyComparator;
20 20 import com.lyms.platform.permission.model.*;
21   -import com.lyms.platform.permission.service.BabyPatientExtendEarHearingDiagnoseService;
22   -import com.lyms.platform.permission.service.BabyPatientExtendEarScreenService;
23   -import com.lyms.platform.permission.service.HighriskChangeHospitalService;
24   -import com.lyms.platform.permission.service.UsersService;
  21 +import com.lyms.platform.permission.service.*;
25 22 import com.lyms.platform.pojo.BabyModel;
26 23 import org.apache.commons.lang.StringUtils;
27 24 import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -50,7 +47,7 @@
50 47 @Autowired
51 48 private BabyService babyService;
52 49 @Autowired
53   - private BasicConfigService basicConfigService;
  50 + private OrganizationService organizationService;
54 51 //转诊记录
55 52 @Autowired
56 53 private HighriskChangeHospitalService highchangeService;
... ... @@ -70,6 +67,80 @@
70 67 @ResponseBody
71 68 public BaseResponse queryHearingDiagnoseOne(String hdId) {
72 69 BabyPatientExtendEarHearingDiagnose behd = hearingDiagnoseService.getBabyPatientExtendEarHearingDiagnose(hdId);
  70 + if(hdId==null){
  71 + return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("没有找到对应的数据");
  72 + }
  73 +
  74 + if(StringUtils.isNotEmpty(behd.getHospitalId())){//查询医院名称
  75 + //判断ID是否存在
  76 + Organization organization = organizationService.getOrganization(Integer.parseInt(behd.getHospitalId()));
  77 + if(organization!=null){
  78 + String hospitalName = organization.getName();
  79 + behd.setHospitalName(hospitalName);
  80 + }
  81 + }
  82 + if(StringUtils.isNotEmpty(behd.getDiagnDoctorId())){//查询医生名称
  83 + Users users = usersService.getUsers(Integer.parseInt(behd.getDiagnDoctorId()));
  84 + if(users!=null){
  85 + behd.setDiagnDoctorStr(users.getName() == null ? "-" : users.getName());
  86 + }
  87 + }
  88 + if(behd.getConfirmTime()!=null){//计算儿童月龄
  89 + String babyId = behd.getBabyId();
  90 + //查询baby档案查询出生日期
  91 + BabyModel babyModel = babyService.getOneBabyById(babyId);
  92 + if(babyModel!=null){
  93 + DateUtil.getBabyMonthAge(babyModel.getBirth(),behd.getConfirmTime());
  94 + }
  95 + behd.setConfirmTimeStr(DateUtil.getyyyy_MM_dd(behd.getConfirmTime()));
  96 + }
  97 + if(StringUtils.isNotEmpty(behd.getHighFactor()))//听力高危因素文字 HighRiskEnum
  98 + {
  99 + StringBuffer hfBuff = new StringBuffer();
  100 + String [] highFactors = behd.getHighFactor().split(",");
  101 + for(String hf : highFactors){
  102 + if(StringUtils.isNotEmpty(hf)){
  103 + String name = HighRiskEnum.getTitle(Integer.parseInt(hf));
  104 + hfBuff.append(name+"、");
  105 + }
  106 + }
  107 + behd.setHighFactorStr(hfBuff.toString());
  108 + }
  109 +
  110 + if(behd.getAabrLeftIfPass()!=null){//左耳是否通过 0-未通过,1-通过
  111 + behd.setAabrLeftIfPassStr(behd.getAabrLeftIfPass()==0?"未通过":"通过");
  112 + }
  113 +
  114 + if(behd.getAabrRightIfPass()!=null){//右耳耳是否通过
  115 + behd.setAabrRightIfPassStr(behd.getAabrRightIfPass()==0?"未通过":"通过");
  116 + }
  117 +
  118 + if(StringUtils.isNotEmpty(behd.getConfirmResult()))//确诊结果转换 ConfirmedEnums
  119 + {
  120 + StringBuffer hfBuff = new StringBuffer();
  121 + String [] highFactors = behd.getConfirmResult().split(",");
  122 + for(String hf : highFactors){
  123 + if(StringUtils.isNotEmpty(hf)){
  124 + String name = ConfirmedEnums.getTitle(Integer.parseInt(hf));
  125 + hfBuff.append(name+"、");
  126 + }
  127 + }
  128 + behd.setConfirmResultStr(hfBuff.toString());
  129 + }
  130 +
  131 + if(StringUtils.isNotEmpty(behd.getDiagnResult()))//诊断内容转换 HearingDiagnosisEnums
  132 + {
  133 + StringBuffer hfBuff = new StringBuffer();
  134 + String [] highFactors = behd.getConfirmResult().split(",");
  135 + for(String hf : highFactors){
  136 + if(StringUtils.isNotEmpty(hf)){
  137 + String name = HearingDiagnosisEnums.getTitle(Integer.parseInt(hf));
  138 + hfBuff.append(name+"、");
  139 + }
  140 + }
  141 + behd.setDiagnResultStr(hfBuff.toString());
  142 + }
  143 +
73 144 BaseResponse result = new BaseResponse();
74 145 result.setObject(behd);
75 146 result.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功");
76 147  
... ... @@ -230,13 +301,9 @@
230 301 query.setDiagnNextEndTime(hdReq.getDiagnNextEndTime());
231 302 }
232 303  
233   -
234 304 if (hdReq.getIsconfirm() != null) {//是否确诊 0-未确诊 1-确诊
235 305 query.setIsconfirm(hdReq.getIsconfirm());
236 306 }
237   -
238   -
239   -
240 307 if (hdReq.getConfirmDegree() != null) {//模糊查询确诊结果
241 308 List<String> cfList = new ArrayList<>();
242 309 if (hdReq.getConfirmDegree() == 1) {//轻度
platform-operate-api/src/main/webapp/WEB-INF/web.xml View file @ f4c6ab1
... ... @@ -13,7 +13,7 @@
13 13 version="2.5"
14 14 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
15 15  
16   -<!--
  16 + <!--start跨域开始-->
17 17 <filter>
18 18 <filter-name>CorsFilter</filter-name>
19 19 <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
... ... @@ -47,7 +47,7 @@
47 47 <url-pattern>/*</url-pattern>
48 48 </filter-mapping>
49 49  
50   --->
  50 +<!--end跨域结束-->
51 51  
52 52 <servlet-mapping>
53 53 <servlet-name>default</servlet-name>