Commit 15820a17634e4a2bfffae6ca63bf41a58a0cb0df

Authored by yangfei
1 parent b031dd6dee

听力诊断模块

Showing 2 changed files with 57 additions and 64 deletions

platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarFollowUp.java View file @ 15820a1
... ... @@ -96,7 +96,7 @@
96 96 /**
97 97 * 是否结案 0-未结案,1-结案
98 98 */
99   - private Integer ifclose;
  99 + private int ifclose;
100 100 /**
101 101 * 是否结案 0-未结案,1-结案
102 102 */
103 103  
104 104  
... ... @@ -370,14 +370,12 @@
370 370  
371 371 }
372 372  
373   - public Integer getIfclose() {
  373 + public int getIfclose() {
374 374 return ifclose;
375 375 }
376 376  
377   -
378   - public void setIfclose(Integer ifclose) {
  377 + public void setIfclose(int ifclose) {
379 378 this.ifclose = ifclose;
380   -
381 379 }
382 380  
383 381 public String getHospitalId() {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FollowUpController.java View file @ 15820a1
... ... @@ -63,7 +63,7 @@
63 63 /**
64 64 * 根据babyId获取随访列表
65 65 *
66   - * @param babyId 随访记录id
  66 + * @param babyId 随访记录id
67 67 * @return
68 68 */
69 69 @RequestMapping(method = RequestMethod.GET, value = "/getFollowUpList")
... ... @@ -71,7 +71,7 @@
71 71 @TokenRequired
72 72 public BaseResponse getFollowUpList(String babyId, HttpServletRequest request) {
73 73  
74   - if(StringUtils.isEmpty(babyId)){
  74 + if (StringUtils.isEmpty(babyId)) {
75 75 return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入儿童ID");
76 76 }
77 77  
... ... @@ -84,7 +84,7 @@
84 84 String hospitalId = autoMatchFacade.getHospitalId(loginState.getId());
85 85  
86 86 BabyPatientExtendEarFollowUpQuery query = new BabyPatientExtendEarFollowUpQuery();
87   - List<String> babyIds = babyEarFacade.getBabyIdsByItemOrg(babyId,hospitalId);
  87 + List<String> babyIds = babyEarFacade.getBabyIdsByItemOrg(babyId, hospitalId);
88 88 query.setBabyIds((String[]) babyIds.toArray(new String[babyIds.size()]));
89 89 query.setSort("follow_time");
90 90  
... ... @@ -92,12 +92,12 @@
92 92 query.setCheckHospitalIds((String[]) hospitalIds.toArray(new String[hospitalIds.size()]));
93 93  
94 94 List<BabyPatientExtendEarFollowUp> followUpList = babyPatientExtendEarFollowUpService.queryBabyPatientExtendEarFollowUpByBaby(query);
95   - List<Map<String,String>> list = new ArrayList<>();
96   - for(BabyPatientExtendEarFollowUp fu:followUpList){
97   - Map<String,String> fuMap = new HashMap<>();
98   - fuMap.put("hospitalId",fu.getHospitalId());
99   - fuMap.put("id",fu.getId());
100   - fuMap.put("followTime",DateUtil.getyyyy_MM_dd(fu.getFollowTime()));
  95 + List<Map<String, String>> list = new ArrayList<>();
  96 + for (BabyPatientExtendEarFollowUp fu : followUpList) {
  97 + Map<String, String> fuMap = new HashMap<>();
  98 + fuMap.put("hospitalId", fu.getHospitalId());
  99 + fuMap.put("id", fu.getId());
  100 + fuMap.put("followTime", DateUtil.getyyyy_MM_dd(fu.getFollowTime()));
101 101 list.add(fuMap);
102 102 }
103 103 BaseResponse result = new BaseResponse();
... ... @@ -110,7 +110,7 @@
110 110 /**
111 111 * 获取随访记录详情
112 112 *
113   - * @param fuId 随访记录id
  113 + * @param fuId 随访记录id
114 114 * @return
115 115 */
116 116 @RequestMapping(method = RequestMethod.GET, value = "/queryBabyPatientExtendEarFollowUpOne")
... ... @@ -119,7 +119,7 @@
119 119 BabyPatientExtendEarFollowUp followUp = babyPatientExtendEarFollowUpService.getBabyPatientExtendEarFollowUp(fuId);
120 120 FollowUpOneResult fuResult = new FollowUpOneResult();
121 121  
122   - if(followUp!=null){
  122 + if (followUp != null) {
123 123 fuResult.setBabyId(followUp.getBabyId());
124 124 fuResult.setId(followUp.getId());
125 125 fuResult.setFollowAddr(followUp.getFollowAddr());
... ... @@ -130,7 +130,7 @@
130 130 for (int b = 0; b < cr.length; b++) {
131 131 if (StringUtils.isNotEmpty(cr[b])) {
132 132 String title = ConfirmedEnums.getTitle(Integer.parseInt(cr[b]));
133   - mrSb.append(title+"、");
  133 + mrSb.append(title + "、");
134 134 JSONObject confiJo = new JSONObject();
135 135 confiJo.put("id", cr[b]);
136 136 confiJo.put("name", title);
137 137  
138 138  
139 139  
140 140  
141 141  
142 142  
143 143  
144 144  
145 145  
... ... @@ -160,29 +160,29 @@
160 160 fuResult.setIsOperation(followUp.getIsOperation());
161 161 fuResult.setVerdict(followUp.getVerdict());
162 162  
163   - StringBuffer interStrate = new StringBuffer();
  163 + StringBuffer interStrate = new StringBuffer();
164 164  
165   - if(followUp.getAudiphone()!=null){
  165 + if (followUp.getAudiphone() != null) {
166 166 //1-左耳,2-右耳,3-全部
167   - interStrate.append("助听器:"+(followUp.getAudiphone()==1?"左耳":followUp.getAudiphone()==2?"右耳":"全部"));
  167 + interStrate.append("助听器:" + (followUp.getAudiphone() == 1 ? "左耳" : followUp.getAudiphone() == 2 ? "右耳" : "全部"));
168 168 }
169   - if(followUp.getOperation()!=null){
  169 + if (followUp.getOperation() != null) {
170 170 //1-左耳,2-右耳,3-全部
171   - if(StringUtils.isNotEmpty(interStrate.toString())){//如果不为空
  171 + if (StringUtils.isNotEmpty(interStrate.toString())) {//如果不为空
172 172 interStrate.append(",");
173 173 }
174   - interStrate.append("手术:"+(followUp.getOperation()==1?"左耳":followUp.getOperation()==2?"右耳":"全部"));
  174 + interStrate.append("手术:" + (followUp.getOperation() == 1 ? "左耳" : followUp.getOperation() == 2 ? "右耳" : "全部"));
175 175 }
176   - if(followUp.getArtifiCochlea()!=null){
  176 + if (followUp.getArtifiCochlea() != null) {
177 177 //1-左耳,2-右耳,3-全部
178   - if(StringUtils.isNotEmpty(interStrate.toString())){//如果不为空
  178 + if (StringUtils.isNotEmpty(interStrate.toString())) {//如果不为空
179 179 interStrate.append(",");
180 180 }
181   - interStrate.append("人工耳蜗:"+(followUp.getArtifiCochlea()==1?"左耳":followUp.getArtifiCochlea()==2?"右耳":"全部"));
  181 + interStrate.append("人工耳蜗:" + (followUp.getArtifiCochlea() == 1 ? "左耳" : followUp.getArtifiCochlea() == 2 ? "右耳" : "全部"));
182 182 }
183 183 fuResult.setInterStrate(interStrate.toString());
184 184  
185   - if(StringUtils.isNotEmpty(followUp.getFollowDoctorId())){
  185 + if (StringUtils.isNotEmpty(followUp.getFollowDoctorId())) {
186 186 fuResult.setFollowDoctorId(followUp.getFollowDoctorId());
187 187 String docotorId = followUp.getFollowDoctorId();
188 188 Users users = usersService.getUsers(Integer.parseInt(docotorId));
189 189  
190 190  
191 191  
... ... @@ -192,27 +192,25 @@
192 192 }
193 193  
194 194 //随访时间
195   - if(followUp.getFollowTime()!=null){
  195 + if (followUp.getFollowTime() != null) {
196 196 fuResult.setFollowTime(DateUtil.getyyyy_MM_dd(followUp.getFollowTime()));
197 197 BabyModel babyModel = babyService.getOneBabyById(followUp.getBabyId());
198 198 if (babyModel != null) {
199 199 fuResult.setcMonthAge(DateUtil.getBabyMonthAge(babyModel.getBirth(), followUp.getFollowTime()));
200 200 }
201 201 }
202   - if(followUp.getMarkTime()!=null){
  202 + if (followUp.getMarkTime() != null) {
203 203 fuResult.setMarkTime(DateUtil.getyyyy_MM_dd(followUp.getMarkTime()));
204 204 }
205 205  
206   - if(followUp.getNextTime()!=null){
  206 + if (followUp.getNextTime() != null) {
207 207 fuResult.setNextTime(DateUtil.getyyyy_MM_dd(followUp.getNextTime()));
208 208 //根据babyId查询档案信息
209 209 BabyModel babyModel = babyService.getOneBabyById(followUp.getBabyId());
210 210 fuResult.setNextTimeMouseAge(DateUtil.getBabyMonthAge(babyModel.getBirth(), followUp.getNextTime()));
211 211 }
212   - if(followUp.getIfclose()!=null){
213   - fuResult.setIfclose(followUp.getIfclose());
214   - fuResult.setIfcloseStr(followUp.getIfclose()==0?"未结案":"已结案");
215   - }
  212 + fuResult.setIfclose(followUp.getIfclose());
  213 + fuResult.setIfcloseStr(followUp.getIfclose() == 0 ? "未结案" : "已结案");
216 214 if (StringUtils.isNotEmpty(followUp.getHospitalId())) {//查询医院名称
217 215 fuResult.setHospitalId(followUp.getHospitalId());
218 216 //判断ID是否存在
... ... @@ -236,7 +234,7 @@
236 234 /**
237 235 * 获取随访记录列表
238 236 *
239   - * @param fur 随访记录对象
  237 + * @param fur 随访记录对象
240 238 * @param request
241 239 * @return
242 240 */
243 241  
244 242  
245 243  
... ... @@ -265,20 +263,20 @@
265 263 babyQuery.setHospitalId(hospitalId);
266 264 List<BabyPatientExtendEarBaby> models = earBabyService.queryBabyPatientExtendEarBaby(babyQuery);
267 265  
268   - if(CollectionUtils.isNotEmpty(models)){
  266 + if (CollectionUtils.isNotEmpty(models)) {
269 267 List<String> babyIds = new ArrayList<>();
270   - for(BabyPatientExtendEarBaby babyModel:models){
  268 + for (BabyPatientExtendEarBaby babyModel : models) {
271 269 babyIds.add(babyModel.getBabyPatientId());
272 270 }
273 271 query.setBabyIds(babyIds.toArray(new String[babyIds.size()]));
274   - }else{
  272 + } else {
275 273 return new FrontEndResult().setData(new ArrayList()).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("没有找到数据");
276 274 }
277 275 }
278 276  
279 277 //确诊结果
280 278 if (fur.getMarkResult() != null) {
281   - query.setMarkResult(","+fur.getMarkResult()+",");
  279 + query.setMarkResult("," + fur.getMarkResult() + ",");
282 280 }
283 281  
284 282 //医院ID 集合。本院、外院、全部...
285 283  
286 284  
287 285  
... ... @@ -300,17 +298,17 @@
300 298  
301 299 BabyPatientExtendEarBabyQuery babyQuery = new BabyPatientExtendEarBabyQuery();
302 300 babyQuery.setHospitalId(hospitalId);
303   - babyQuery.setEnables(new String[]{"0","1","2"});
  301 + babyQuery.setEnables(new String[]{"0", "1", "2"});
304 302 List<BabyPatientExtendEarBaby> earBabies = earBabyService.queryBabyPatientExtendEarBaby(babyQuery);
305   - for (BabyPatientExtendEarBaby eb:earBabies){
  303 + for (BabyPatientExtendEarBaby eb : earBabies) {
306 304 pids.add(eb.getPersonId());
307 305 }
308   - }else if (fur.getSource() == 1) {//1.本院
  306 + } else if (fur.getSource() == 1) {//1.本院
309 307 BabyPatientExtendEarBabyQuery babyQuery = new BabyPatientExtendEarBabyQuery();
310 308 babyQuery.setHospitalId(hospitalId);
311 309 babyQuery.setIsEnable("1");
312 310 List<BabyPatientExtendEarBaby> earBabies = earBabyService.queryBabyPatientExtendEarBaby(babyQuery);
313   - for (BabyPatientExtendEarBaby eb:earBabies){
  311 + for (BabyPatientExtendEarBaby eb : earBabies) {
314 312 pids.add(eb.getPersonId());
315 313 }
316 314 }
317 315  
318 316  
319 317  
320 318  
321 319  
... ... @@ -323,23 +321,23 @@
323 321  
324 322 StringBuffer sqlStr = new StringBuffer();
325 323  
326   - if(fur.getInterCure()!=null&&fur.getInterCure().length>0){
327   - for(int i =0;i<fur.getInterCure().length;i++){
  324 + if (fur.getInterCure() != null && fur.getInterCure().length > 0) {
  325 + for (int i = 0; i < fur.getInterCure().length; i++) {
328 326 String ic = fur.getInterCure()[i];
329   - if(i>0){
  327 + if (i > 0) {
330 328 sqlStr.append(" or ");
331 329 }
332   - if(StringUtils.isNotEmpty(ic)){
333   - if(ic.equals("2")){//0-未干预治疗,1-人工耳蜗,2-助听器,3-手术
  330 + if (StringUtils.isNotEmpty(ic)) {
  331 + if (ic.equals("2")) {//0-未干预治疗,1-人工耳蜗,2-助听器,3-手术
334 332 query.setAudiphone(2);
335 333 sqlStr.append(" audiphone is not null ");
336   - }else if(ic.equals("3")){//0-未干预治疗,1-人工耳蜗,2-助听器,3-手术
  334 + } else if (ic.equals("3")) {//0-未干预治疗,1-人工耳蜗,2-助听器,3-手术
337 335 query.setOperation(3);
338 336 sqlStr.append(" operation is not null ");
339   - }else if(ic.equals("1")){
  337 + } else if (ic.equals("1")) {
340 338 query.setArtifiCochlea(1);
341 339 sqlStr.append(" artifi_cochlea is not null ");
342   - }else{
  340 + } else {
343 341 query.setAudiphone(2);
344 342 query.setOperation(3);
345 343 query.setArtifiCochlea(3);
... ... @@ -347,7 +345,7 @@
347 345 }
348 346 }
349 347 }
350   - // System.out.println(sqlStr.toString());
  348 + // System.out.println(sqlStr.toString());
351 349 query.setSqlStr(sqlStr.toString());
352 350 query.setNextStartTime(fur.getNextStartTime());
353 351 query.setNextEndTime(fur.getNextEndTime());
354 352  
... ... @@ -358,10 +356,10 @@
358 356 query.setSort("create_time");
359 357 query.setLimit(fur.getLimit());
360 358 query.setPage(fur.getPage());
361   - if(CollectionUtils.isNotEmpty(pids)){
  359 + if (CollectionUtils.isNotEmpty(pids)) {
362 360 query.setPids((String[]) pids.toArray(new String[pids.size()]));
363 361 }
364   - if(CollectionUtils.isEmpty(pids)&&fur.getSource()!=null){
  362 + if (CollectionUtils.isEmpty(pids) && fur.getSource() != null) {
365 363 return new FrontEndResult().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("没有找到数据");
366 364 }
367 365 List<BabyPatientExtendEarFollowUp> BabyPatientExtendEarFollowUpList = babyPatientExtendEarFollowUpService.queryBabyPatientExtendEarFollowUp(query);
... ... @@ -377,7 +375,7 @@
377 375 if (mb != null) {//没有找到儿童档案信息
378 376 res.setBabyName(mb.getName());
379 377 res.setMommyName(mb.getMname());
380   - if(fu.getFollowTime()!=null){
  378 + if (fu.getFollowTime() != null) {
381 379 //根据诊断时间获取月龄
382 380 res.setcMonthAge(DateUtil.getBabyMonthAge(mb.getBirth(), fu.getFollowTime()));
383 381 }
384 382  
... ... @@ -402,13 +400,11 @@
402 400 res.setDiagnResult(hdEnums);
403 401 }
404 402 //设置随访的时间
405   - if(fu.getFollowTime()!=null){
  403 + if (fu.getFollowTime() != null) {
406 404 res.setFollowTimeStr(DateUtil.getyyyy_MM_dd(fu.getFollowTime()));
407 405 }
408 406  
409   - if(fu.getIfclose()!=null){
410   - res.setIsColse(fu.getIfclose() == 1 ? "结案" : "未结案");
411   - }
  407 + res.setIsColse(fu.getIfclose() == 1 ? "结案" : "未结案");
412 408  
413 409 BabyModel babyModel = babyService.getOneBabyById(fu.getBabyId());
414 410 if (babyModel != null) {
... ... @@ -420,7 +416,7 @@
420 416 res.setBirthday(com.lyms.platform.common.utils.StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(babyModel.getBirth())));
421 417 res.setSex(com.lyms.platform.common.utils.StringUtils.emptyDeal(SexEnum.getTextById(babyModel.getSex())));
422 418 }
423   - if(StringUtils.isNotEmpty(fu.getFollowDoctorId())){
  419 + if (StringUtils.isNotEmpty(fu.getFollowDoctorId())) {
424 420 Users user = usersService.getUsers(Integer.parseInt(fu.getFollowDoctorId()));
425 421 if (user != null) {
426 422 //设置随访医生名称
... ... @@ -518,7 +514,7 @@
518 514 @ResponseBody
519 515 @TokenRequired
520 516 public BaseResponse addBabyPatientExtendEarFollowUp(@Valid BabyPatientExtendEarFollowUp obj,
521   - HttpServletRequest request) {
  517 + HttpServletRequest request) {
522 518 BaseResponse basResp = validata(obj);
523 519 if (basResp.getErrorcode() != 0) return basResp;
524 520 //获取当前登录用户ID
... ... @@ -531,8 +527,7 @@
531 527 obj.setPid(pid);
532 528 String hospitalId = autoMatchFacade.getHospitalId(loginState.getId());
533 529 obj.setId(UUID.randomUUID().toString().replace("-", ""));
534   - obj.setIfdel(0);
535   - //obj.setIfclose(0);//是否结案
  530 + obj.setIfdel(0);//默认值,未删除
536 531 obj.setCreateTime(new Date());
537 532 obj.setCreateId(String.valueOf(loginState.getId()));
538 533 obj.setHospitalId(hospitalId);
... ... @@ -540,7 +535,7 @@
540 535  
541 536 //听力筛查-当某个儿童在同一院组内某家医院完成了的听筛建档后去院组内其他医院做了听筛、听诊或随访,应该要在对应的医院下创建一个隐藏档案
542 537 //建立隐藏档案
543   - babyEarFacade.addhideBabyEar(obj.getBabyId(),hospitalId,"2");
  538 + babyEarFacade.addhideBabyEar(obj.getBabyId(), hospitalId, "2");
544 539  
545 540 babyPatientExtendEarFollowUpService.addBabyPatientExtendEarFollowUp(obj);
546 541 BaseResponse result = new BaseResponse();