Commit 3cdb99a8d3f7d77057fe9c780260618b21629e2d

Authored by yangfei
1 parent 2ea8cbd09e

听力诊断

Showing 5 changed files with 106 additions and 51 deletions

platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarHearingDiagnose.java View file @ 3cdb99a
... ... @@ -23,6 +23,10 @@
23 23 */
24 24 private Date diagnoseTime;
25 25 /**
  26 + * 诊断时间
  27 + */
  28 + private String diagnoseTimeStr;
  29 + /**
26 30 * 高危因素
27 31 */
28 32 private String highFactor;
... ... @@ -443,6 +447,14 @@
443 447 * 确诊时间
444 448 */
445 449 private String confirmTimeStr;
  450 +
  451 + public String getDiagnoseTimeStr() {
  452 + return diagnoseTimeStr;
  453 + }
  454 +
  455 + public void setDiagnoseTimeStr(String diagnoseTimeStr) {
  456 + this.diagnoseTimeStr = diagnoseTimeStr;
  457 + }
446 458  
447 459 public String getHospitalName() {
448 460 return hospitalName;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FollowUpController.java View file @ 3cdb99a
... ... @@ -5,6 +5,7 @@
5 5 import com.lyms.platform.common.base.BaseController;
6 6 import com.lyms.platform.common.base.LoginContext;
7 7 import com.lyms.platform.common.constants.ErrorCodeConstants;
  8 +import com.lyms.platform.common.enums.ConfirmedEnums;
8 9 import com.lyms.platform.common.result.BaseResponse;
9 10 import com.lyms.platform.common.utils.DateUtil;
10 11 import com.lyms.platform.operate.web.facade.AutoMatchFacade;
11 12  
12 13  
13 14  
... ... @@ -144,13 +145,35 @@
144 145 if (mb != null) {//没有找打儿童档案信息
145 146 res.setBabyName(mb.getName());
146 147 res.setMommyName(mb.getMname());
  148 + //根据诊断时间获取月龄
147 149 res.setMonthAge(DateUtil.getBabyMonthAge(mb.getBirth(), new Date()));
  150 +
148 151 res.setBirthday(DateUtil.getyyyy_MM_dd(mb.getBirth()));
149 152 res.setSex(mb.getSex() == 0 ? "女" : mb.getSex() == 1 ? "男" : "未知");
150   - res.setMommnyPhone(mb.getMname());
  153 + res.setMommnyPhone(mb.getMphone());
  154 + res.setMommnyEncryptPhone(com.lyms.platform.common.utils.StringUtils.encryPhone(mb.getMphone()));
151 155 }
152   - res.setDiagnose(fu.getMarkResult());
153   - res.setIsColse(fu.getIfclose() == 1 ? "结案" : "未结案");
  156 +
  157 + if (fu.getMarkResult() != null) {
  158 + String cr[] = fu.getMarkResult().split(",");
  159 + List<Map<Integer, String>> hdEnums = new ArrayList<>();
  160 + for (int b = 0; b < cr.length; b++) {
  161 + if (StringUtils.isNotEmpty(cr[b])) {
  162 + Map<Integer, String> map = new HashMap<>();
  163 + String title = ConfirmedEnums.getTitle(Integer.parseInt(cr[b]));
  164 + map.put(Integer.parseInt(cr[b]), title);
  165 + hdEnums.add(map);
  166 + }
  167 + }
  168 + //设置确诊结果
  169 + res.setDiagnResult(hdEnums);
  170 + }
  171 +
  172 + // res.setfollowTimeStr
  173 +
  174 + if(res.getIsColse()!=null){
  175 + res.setIsColse(fu.getIfclose() == 1 ? "结案" : "未结案");
  176 + }
154 177 Users user = usersService.getUsers(Integer.parseInt(fu.getFollowDoctorId()));
155 178 if (user != null) {
156 179 res.setDoctorName(user.getName());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearingDiagnoseController.java View file @ 3cdb99a
... ... @@ -67,75 +67,83 @@
67 67 @ResponseBody
68 68 public BaseResponse queryHearingDiagnoseOne(String hdId) {
69 69 BabyPatientExtendEarHearingDiagnose behd = hearingDiagnoseService.getBabyPatientExtendEarHearingDiagnose(hdId);
70   - if(hdId==null){
  70 + if (hdId == null) {
71 71 return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("没有找到对应的数据");
72 72 }
73 73  
74   - if(StringUtils.isNotEmpty(behd.getHospitalId())){//查询医院名称
  74 + if (StringUtils.isNotEmpty(behd.getHospitalId())) {//查询医院名称
75 75 //判断ID是否存在
76 76 Organization organization = organizationService.getOrganization(Integer.parseInt(behd.getHospitalId()));
77   - if(organization!=null){
  77 + if (organization != null) {
78 78 String hospitalName = organization.getName();
  79 + //设置医院名称
79 80 behd.setHospitalName(hospitalName);
80 81 }
81 82 }
82   - if(StringUtils.isNotEmpty(behd.getDiagnDoctorId())){//查询医生名称
  83 + if (StringUtils.isNotEmpty(behd.getDiagnDoctorId())) {//查询医生名称
83 84 Users users = usersService.getUsers(Integer.parseInt(behd.getDiagnDoctorId()));
84   - if(users!=null){
  85 + if (users != null) {
85 86 behd.setDiagnDoctorStr(users.getName() == null ? "-" : users.getName());
86 87 }
87 88 }
88   - if(behd.getConfirmTime()!=null){//计算儿童月龄
  89 + if (behd.getConfirmTime() != null) {//计算儿童月龄
89 90 String babyId = behd.getBabyId();
90 91 //查询baby档案查询出生日期
91 92 BabyModel babyModel = babyService.getOneBabyById(babyId);
92   - if(babyModel!=null){
93   - DateUtil.getBabyMonthAge(babyModel.getBirth(),behd.getConfirmTime());
  93 + if (babyModel != null) {
  94 + //设置确诊时宝宝月龄
  95 + DateUtil.getBabyMonthAge(babyModel.getBirth(), behd.getConfirmTime());
94 96 }
  97 + //设置确诊时间字符串
95 98 behd.setConfirmTimeStr(DateUtil.getyyyy_MM_dd(behd.getConfirmTime()));
96 99 }
97   - if(StringUtils.isNotEmpty(behd.getHighFactor()))//听力高危因素文字 HighRiskEnum
  100 + if (StringUtils.isNotEmpty(behd.getHighFactor()))//听力高危因素文字 HighRiskEnum
98 101 {
99 102 StringBuffer hfBuff = new StringBuffer();
100   - String [] highFactors = behd.getHighFactor().split(",");
101   - for(String hf : highFactors){
102   - if(StringUtils.isNotEmpty(hf)){
  103 + String[] highFactors = behd.getHighFactor().split(",");
  104 + for (String hf : highFactors) {
  105 + if (StringUtils.isNotEmpty(hf)) {
103 106 String name = HighRiskEnum.getTitle(Integer.parseInt(hf));
104   - hfBuff.append(name+"、");
  107 + hfBuff.append(name + "、");
105 108 }
106 109 }
107 110 behd.setHighFactorStr(hfBuff.toString());
108 111 }
109 112  
110   - if(behd.getAabrLeftIfPass()!=null){//左耳是否通过 0-未通过,1-通过
111   - behd.setAabrLeftIfPassStr(behd.getAabrLeftIfPass()==0?"未通过":"通过");
  113 + if (behd.getDiagnoseTime() != null) {
  114 + //设置诊断字符串
  115 + behd.setDiagnoseTimeStr(DateUtil.getyyyy_MM_dd(behd.getDiagnoseTime()));
112 116 }
113 117  
114   - if(behd.getAabrRightIfPass()!=null){//右耳耳是否通过
115   - behd.setAabrRightIfPassStr(behd.getAabrRightIfPass()==0?"未通过":"通过");
  118 + if (behd.getAabrLeftIfPass() != null) {//左耳是否通过 0-未通过,1-通过
  119 + behd.setAabrLeftIfPassStr(behd.getAabrLeftIfPass() == 0 ? "未通过" : "通过");
116 120 }
117 121  
118   - if(StringUtils.isNotEmpty(behd.getConfirmResult()))//确诊结果转换 ConfirmedEnums
  122 + if (behd.getAabrRightIfPass() != null) {//右耳耳是否通过
  123 + behd.setAabrRightIfPassStr(behd.getAabrRightIfPass() == 0 ? "未通过" : "通过");
  124 + }
  125 +
  126 + if (StringUtils.isNotEmpty(behd.getConfirmResult()))//确诊结果转换 ConfirmedEnums
119 127 {
120 128 StringBuffer hfBuff = new StringBuffer();
121   - String [] highFactors = behd.getConfirmResult().split(",");
122   - for(String hf : highFactors){
123   - if(StringUtils.isNotEmpty(hf)){
  129 + String[] highFactors = behd.getConfirmResult().split(",");
  130 + for (String hf : highFactors) {
  131 + if (StringUtils.isNotEmpty(hf)) {
124 132 String name = ConfirmedEnums.getTitle(Integer.parseInt(hf));
125   - hfBuff.append(name+"、");
  133 + hfBuff.append(name + "、");
126 134 }
127 135 }
128 136 behd.setConfirmResultStr(hfBuff.toString());
129 137 }
130 138  
131   - if(StringUtils.isNotEmpty(behd.getDiagnResult()))//诊断内容转换 HearingDiagnosisEnums
  139 + if (StringUtils.isNotEmpty(behd.getDiagnResult()))//诊断内容转换 HearingDiagnosisEnums
132 140 {
133 141 StringBuffer hfBuff = new StringBuffer();
134   - String [] highFactors = behd.getConfirmResult().split(",");
135   - for(String hf : highFactors){
136   - if(StringUtils.isNotEmpty(hf)){
  142 + String[] highFactors = behd.getConfirmResult().split(",");
  143 + for (String hf : highFactors) {
  144 + if (StringUtils.isNotEmpty(hf)) {
137 145 String name = HearingDiagnosisEnums.getTitle(Integer.parseInt(hf));
138   - hfBuff.append(name+"、");
  146 + hfBuff.append(name + "、");
139 147 }
140 148 }
141 149 behd.setDiagnResultStr(hfBuff.toString());
... ... @@ -148,7 +156,7 @@
148 156 }
149 157  
150 158 /**
151   - * 根据id获取听力诊断记录信息
  159 + * 根据id获取听力诊断记录信息列表
152 160 *
153 161 * @param babyId 儿童档案id
154 162 * @return
... ... @@ -199,7 +207,7 @@
199 207 /**
200 208 * 获取听力诊断记录列表
201 209 *
202   - * @param hdReq 听力诊断记录对象
  210 + * @param hdReq 听力诊断记录对象 多条件查询
203 211 * @param request
204 212 * @return
205 213 */
... ... @@ -276,7 +284,7 @@
276 284 //设置要查询的babyId
277 285 query.setBabyIds(babyIds.toArray(new String[babyIds.size()]));
278 286  
279   - if(hdReq.getConfirmResult()!=null){
  287 + if (hdReq.getConfirmResult() != null) {
280 288 query.setConfirmResult(String.valueOf(hdReq.getConfirmResult()));
281 289 }
282 290  
283 291  
... ... @@ -402,14 +410,14 @@
402 410 hea.setSex(com.lyms.platform.common.utils.StringUtils.emptyDeal(SexEnum.getTextById(babyModel.getSex())));
403 411 }
404 412 //诊断结果,肯定是有诊断记录
405   - if(hdReq.getConfirmResult()!=null||hdReq.getConfirmDegree()!=null){
  413 + if (hdReq.getConfirmResult() != null || hdReq.getConfirmDegree() != null) {
406 414 // 1、已诊断、2、待诊断、0、全部
407 415 if (StringUtils.isNotEmpty(hea.getId())) {//1、已诊断
408 416 confiList.add(hea);
409 417 //全部
410 418 hdrList.add(hea);
411 419 }
412   - }else{
  420 + } else {
413 421 // 1、已诊断、2、待诊断、0、全部
414 422 if (StringUtils.isEmpty(hea.getId())) {
415 423 waitConfiList.add(hea);
... ... @@ -424,8 +432,7 @@
424 432 BaseListResponse result = new BaseListResponse();
425 433 PageInfo pageInfo = new PageInfo();
426 434 List<HearingDiagnoseListResult> resList = new ArrayList<>();
427   - if (hdReq.getEnalble() != null)
428   - {
  435 + if (hdReq.getEnalble() != null) {
429 436 if (hdReq.getEnalble() == 1) {
430 437 for (int i = (hdReq.getPage() - 1) * hdReq.getLimit(); (i < confiList.size() && i < hdReq.getLimit()); i++) {
431 438 resList.add(confiList.get(i));
... ... @@ -445,8 +452,7 @@
445 452 pageInfo.setCount(hdrList.size());
446 453 result.setData(hdrList);
447 454 }
448   - } else
449   - {
  455 + } else {
450 456 for (int i = (hdReq.getPage() - 1) * hdReq.getLimit(); (i < hdrList.size() && i < hdReq.getLimit()); i++) {
451 457 resList.add(hdrList.get(i));
452 458 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/FollowUpListResult.java View file @ 3cdb99a
1 1 package com.lyms.platform.operate.web.result;
2 2  
  3 +import java.util.List;
  4 +import java.util.Map;
  5 +
3 6 /**
4 7 * 随访管理列表
5 8 * Created by yf on 2017/5/11.
6 9  
7 10  
8 11  
... ... @@ -16,18 +19,28 @@
16 19 //出生日期
17 20 private String birthday;
18 21 //诊断时间 --待确认
19   - private String hdTime;
  22 + private String followTimeStr;
20 23 //性别 0-女,1-男
21 24 private String sex;
22   - //确诊结果
23   - private String diagnose;
  25 + //诊断结果
  26 + private List<Map<Integer,String>> diagnResult;
24 27 //是否结案
25 28 private String isColse;
26 29 //随访医生名称
27 30 private String doctorName;
28 31 //母亲联系方式
29 32 private String mommnyPhone;
  33 + //母亲加密联系方式
  34 + private String mommnyEncryptPhone;
30 35  
  36 + public String getMommnyEncryptPhone() {
  37 + return mommnyEncryptPhone;
  38 + }
  39 +
  40 + public void setMommnyEncryptPhone(String mommnyEncryptPhone) {
  41 + this.mommnyEncryptPhone = mommnyEncryptPhone;
  42 + }
  43 +
31 44 public String getId() {
32 45 return id;
33 46 }
34 47  
... ... @@ -68,12 +81,12 @@
68 81 this.birthday = birthday;
69 82 }
70 83  
71   - public String getHdTime() {
72   - return hdTime;
  84 + public String getFollowTimeStr() {
  85 + return followTimeStr;
73 86 }
74 87  
75   - public void setHdTime(String hdTime) {
76   - this.hdTime = hdTime;
  88 + public void setFollowTimeStr(String followTimeStr) {
  89 + this.followTimeStr = followTimeStr;
77 90 }
78 91  
79 92 public String getSex() {
80 93  
... ... @@ -84,12 +97,12 @@
84 97 this.sex = sex;
85 98 }
86 99  
87   - public String getDiagnose() {
88   - return diagnose;
  100 + public List<Map<Integer, String>> getDiagnResult() {
  101 + return diagnResult;
89 102 }
90 103  
91   - public void setDiagnose(String diagnose) {
92   - this.diagnose = diagnose;
  104 + public void setDiagnResult(List<Map<Integer, String>> diagnResult) {
  105 + this.diagnResult = diagnResult;
93 106 }
94 107  
95 108 public String getIsColse() {
platform-operate-api/src/main/webapp/WEB-INF/web.xml View file @ 3cdb99a
... ... @@ -14,6 +14,7 @@
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 18 <filter>
18 19 <filter-name>CorsFilter</filter-name>
19 20 <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
... ... @@ -46,7 +47,7 @@
46 47 <filter-name>CorsFilter</filter-name>
47 48 <url-pattern>/*</url-pattern>
48 49 </filter-mapping>
49   -
  50 +-->
50 51 <!--end跨域结束-->
51 52  
52 53 <servlet-mapping>