Commit f30ec7f69fd4240439c3b0ffb0e8daaa7a8ea607
1 parent
25760b538e
Exists in
master
and in
6 other branches
听力诊断模块
Showing 3 changed files with 46 additions and 17 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/HearDiagnManageController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearingDiagnoseController.java
platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarHearingDiagnose.java
View file @
f30ec7f
| 1 | 1 | package com.lyms.platform.permission.model; |
| 2 | 2 | |
| 3 | -import com.lyms.platform.common.dao.BaseQuery; | |
| 4 | - | |
| 5 | 3 | import java.util.Date; |
| 6 | 4 | |
| 7 | -public class BabyPatientExtendEarHearingDiagnose extends BaseQuery{ | |
| 5 | +public class BabyPatientExtendEarHearingDiagnose { | |
| 8 | 6 | |
| 9 | 7 | /** |
| 10 | 8 | * 主键 |
| 11 | 9 | |
| ... | ... | @@ -386,8 +384,12 @@ |
| 386 | 384 | /** |
| 387 | 385 | * 诊断指导处理意见 1-确诊纳入随访 2-未发现问题 |
| 388 | 386 | */ |
| 389 | - private String diagnHandSugge; | |
| 387 | + private Integer diagnHandSugge; | |
| 390 | 388 | /** |
| 389 | + * 诊断指导处理意见 1-确诊纳入随访 2-未发现问题 | |
| 390 | + */ | |
| 391 | + private String diagnHandSuggeStr; | |
| 392 | + /** | |
| 391 | 393 | * 诊断指导指导意见 |
| 392 | 394 | */ |
| 393 | 395 | private String diagnGuideSugge; |
| 394 | 396 | |
| 395 | 397 | |
| ... | ... | @@ -1280,12 +1282,20 @@ |
| 1280 | 1282 | this.assrRight4k = assrRight4k; |
| 1281 | 1283 | } |
| 1282 | 1284 | |
| 1283 | - public String getDiagnHandSugge() { | |
| 1285 | + public Integer getDiagnHandSugge() { | |
| 1284 | 1286 | return diagnHandSugge; |
| 1285 | 1287 | } |
| 1286 | 1288 | |
| 1287 | - public void setDiagnHandSugge(String diagnHandSugge) { | |
| 1289 | + public void setDiagnHandSugge(Integer diagnHandSugge) { | |
| 1288 | 1290 | this.diagnHandSugge = diagnHandSugge; |
| 1291 | + } | |
| 1292 | + | |
| 1293 | + public String getDiagnHandSuggeStr() { | |
| 1294 | + return diagnHandSuggeStr; | |
| 1295 | + } | |
| 1296 | + | |
| 1297 | + public void setDiagnHandSuggeStr(String diagnHandSuggeStr) { | |
| 1298 | + this.diagnHandSuggeStr = diagnHandSuggeStr; | |
| 1289 | 1299 | } |
| 1290 | 1300 | |
| 1291 | 1301 | public String getDiagnGuideSugge() { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearDiagnManageController.java
View file @
f30ec7f
| ... | ... | @@ -80,18 +80,21 @@ |
| 80 | 80 | //儿童听筛记录 |
| 81 | 81 | BabyPatientExtendEarScreenQuery earScreenQuery = new BabyPatientExtendEarScreenQuery(); |
| 82 | 82 | earScreenQuery.setBabyId(babyId); |
| 83 | + earScreenQuery.setSort("screen_date"); | |
| 83 | 84 | List<BabyPatientExtendEarScreen> earScreenList = screenService.queryBabyPatientExtendEarScreen(earScreenQuery); |
| 84 | 85 | |
| 85 | 86 | //儿童听力诊断记录 |
| 86 | 87 | BabyPatientExtendEarHearingDiagnoseQuery hearingDiagnoseQuery = new BabyPatientExtendEarHearingDiagnoseQuery(); |
| 87 | 88 | hearingDiagnoseQuery.setBabyId(babyId); |
| 88 | 89 | hearingDiagnoseQuery.setIfdel(0); |
| 90 | + hearingDiagnoseQuery.setSort("diagnose_time"); | |
| 89 | 91 | List<BabyPatientExtendEarHearingDiagnose> hearingDiagnoseList = hearingDiagnoseService.queryBabyPatientExtendEarHearingDiagnose(hearingDiagnoseQuery); |
| 90 | 92 | |
| 91 | 93 | //儿童听力随访记录 |
| 92 | 94 | BabyPatientExtendEarFollowUpQuery earFollowUpQuery = new BabyPatientExtendEarFollowUpQuery(); |
| 93 | 95 | earFollowUpQuery.setBabyId(babyId); |
| 94 | 96 | earFollowUpQuery.setIfdel(0); |
| 97 | + earFollowUpQuery.setSort("follow_time"); | |
| 95 | 98 | List<BabyPatientExtendEarFollowUp> earFollowUpList = babyPatientExtendEarFollowUpService.queryBabyPatientExtendEarFollowUpByBaby(earFollowUpQuery); |
| 96 | 99 | |
| 97 | 100 | List<Map<String,String>> resultList = new ArrayList<>(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearingDiagnoseController.java
View file @
f30ec7f
| ... | ... | @@ -197,8 +197,8 @@ |
| 197 | 197 | behd.setDiagnResultStr(hfBuff.toString()); |
| 198 | 198 | } |
| 199 | 199 | |
| 200 | - if(StringUtils.isNotEmpty(behd.getDiagnHandSugge())){ | |
| 201 | - behd.setDiagnHandSugge(HdEnums.getHsTitle(Integer.parseInt(behd.getDiagnHandSugge()))); | |
| 200 | + if(behd.getDiagnHandSugge()!=null){ | |
| 201 | + behd.setDiagnHandSuggeStr(HdEnums.getHsTitle(behd.getDiagnHandSugge())); | |
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | BaseResponse result = new BaseResponse(); |
| ... | ... | @@ -227,6 +227,7 @@ |
| 227 | 227 | |
| 228 | 228 | BabyPatientExtendEarHearingDiagnoseQuery query = new BabyPatientExtendEarHearingDiagnoseQuery(); |
| 229 | 229 | query.setBabyId(babyId); |
| 230 | + query.setIfdel(0); | |
| 230 | 231 | //查询听力转诊申请 // e、外院:有申请记录则允许进行新增听力筛查 |
| 231 | 232 | HighriskChangeHospitalQuery hcQuery = new HighriskChangeHospitalQuery(); |
| 232 | 233 | hcQuery.setIntoOrgid(hospitalId); |
| ... | ... | @@ -240,7 +241,7 @@ |
| 240 | 241 | } |
| 241 | 242 | } |
| 242 | 243 | query.setCheckHospitalIds((String[]) hospitalIds.toArray(new String[hospitalIds.size()])); |
| 243 | - | |
| 244 | + query.setSort("diagnose_time"); | |
| 244 | 245 | List<BabyPatientExtendEarHearingDiagnose> behdList = hearingDiagnoseService.queryBabyPatientExtendEarHearingDiagnose(query); |
| 245 | 246 | List<Map<String, String>> list = new ArrayList<>(); |
| 246 | 247 | for (BabyPatientExtendEarHearingDiagnose hd : behdList) { |
| ... | ... | @@ -569,7 +570,7 @@ |
| 569 | 570 | * @param request |
| 570 | 571 | * @return |
| 571 | 572 | */ |
| 572 | - @RequestMapping(method = RequestMethod.POST, value = "/delHearingDiagnose") | |
| 573 | + @RequestMapping(method = RequestMethod.DELETE, value = "/delHearingDiagnose") | |
| 573 | 574 | @ResponseBody |
| 574 | 575 | @TokenRequired |
| 575 | 576 | public BaseResponse delHearingDiagnose(BabyPatientExtendEarHearingDiagnose obj, HttpServletRequest request) { |
| 576 | 577 | |
| ... | ... | @@ -585,14 +586,29 @@ |
| 585 | 586 | //医院id |
| 586 | 587 | String hospitalId = autoMatchFacade.getHospitalId(loginState.getId()); |
| 587 | 588 | BabyPatientExtendEarHearingDiagnose hearDiag = hearingDiagnoseService.getBabyPatientExtendEarHearingDiagnose(obj.getId()); |
| 588 | - if (hearDiag == null) {// | |
| 589 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.DATA_EXIST).setErrormsg("没有找到要修改的数据"); | |
| 589 | + if (hearDiag == null||hearDiag.getIfdel()!=0) {//没有找到数据 | |
| 590 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.DATA_EXIST).setErrormsg("没有找到要删除的数据"); | |
| 590 | 591 | } |
| 591 | - obj.setModifyId(String.valueOf(loginState.getId())); | |
| 592 | - obj.setModifyTime(new Date()); | |
| 593 | - obj.setIfdel(1); | |
| 594 | - hearingDiagnoseService.updateBabyPatientExtendEarHearingDiagnose(obj); | |
| 595 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("删除成功"); | |
| 592 | + | |
| 593 | + BabyPatientExtendEarHearingDiagnoseQuery earHearingDiagnoseQuery = new BabyPatientExtendEarHearingDiagnoseQuery(); | |
| 594 | + earHearingDiagnoseQuery.setIfdel(0); | |
| 595 | + earHearingDiagnoseQuery.setBabyId(hearDiag.getBabyId()); | |
| 596 | + earHearingDiagnoseQuery.setSort("diagnose_time"); | |
| 597 | + List<BabyPatientExtendEarHearingDiagnose> earHearingDiagnoseList = hearingDiagnoseService.queryBabyPatientExtendEarHearingDiagnose(earHearingDiagnoseQuery); | |
| 598 | + if(CollectionUtils.isNotEmpty(earHearingDiagnoseList)){ | |
| 599 | + BabyPatientExtendEarHearingDiagnose earHearingDiagnose = earHearingDiagnoseList.get(earHearingDiagnoseList.size()-1); | |
| 600 | + if(earHearingDiagnose.getId().equals(obj.getId())){ | |
| 601 | + obj.setModifyId(String.valueOf(loginState.getId())); | |
| 602 | + obj.setModifyTime(new Date()); | |
| 603 | + obj.setIfdel(1); | |
| 604 | + hearingDiagnoseService.updateBabyPatientExtendEarHearingDiagnose(obj); | |
| 605 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("删除成功"); | |
| 606 | + }else{ | |
| 607 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.DATA_EXIST).setErrormsg("删除失败!只能删除最后一次听诊记录"); | |
| 608 | + } | |
| 609 | + }else{ | |
| 610 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.DATA_EXIST).setErrormsg("没有找到要删除的数据"); | |
| 611 | + } | |
| 596 | 612 | } |
| 597 | 613 | |
| 598 | 614 | /** |