Commit 31ea4df55a68fd11fad8f7a5ffa25c75b2d5b830
Exists in
master
and in
6 other branches
Merge remote-tracking branch 'origin/master'
# Conflicts: # platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java
Showing 4 changed files
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/SieveApplyOrderAddRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientBaseResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/SieveWorker.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java
View file @
31ea4df
| ... | ... | @@ -61,6 +61,12 @@ |
| 61 | 61 | private PatientsService patientsService; |
| 62 | 62 | |
| 63 | 63 | @Autowired |
| 64 | + private SmsTemplateService smsTemplateService; | |
| 65 | + | |
| 66 | + @Autowired | |
| 67 | + private SmsConfigFacade smsConfigFacade; | |
| 68 | + | |
| 69 | + @Autowired | |
| 64 | 70 | private UsersService usersService; |
| 65 | 71 | |
| 66 | 72 | @Autowired |
| ... | ... | @@ -128,6 +134,64 @@ |
| 128 | 134 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
| 129 | 135 | } |
| 130 | 136 | |
| 137 | + | |
| 138 | + | |
| 139 | + public void createSieveSms(String patientId) | |
| 140 | + { | |
| 141 | + Patients patient = patientsService.findOnePatientById(patientId); | |
| 142 | + //判断医院是否启动和对应的服务项是否启用 | |
| 143 | + SmsConfigModel configModel = new SmsConfigModel(); | |
| 144 | + int startType = smsConfigFacade.hospitalIsStart(patient.getHospitalId(), configModel, SmsServiceEnums.CSJGTZ.getId()); | |
| 145 | + if (startType == 0) { | |
| 146 | + return; | |
| 147 | + } | |
| 148 | + | |
| 149 | + //短信前缀 | |
| 150 | + String messagePrefix = smsConfigFacade.getMsgPrefix(configModel, patient.getLastCheckEmployeeId(), ServiceObjEnums.YUNOBJ.getId()); | |
| 151 | + | |
| 152 | + //发送推送类模板建档 | |
| 153 | + if (startType == 3) | |
| 154 | + { | |
| 155 | + return; | |
| 156 | + } | |
| 157 | + | |
| 158 | + List<MsgRequest> messages = new ArrayList<>(); | |
| 159 | + MsgRequest mr = new MsgRequest(); | |
| 160 | + | |
| 161 | + SieveApplyOrderQuery sieveApplyOrderQuery = new SieveApplyOrderQuery(); | |
| 162 | + sieveApplyOrderQuery.setParentId(patientId); | |
| 163 | + sieveApplyOrderQuery.setYn(YnEnums.YES.getId()); | |
| 164 | + List<SieveApplyOrderModel> sieveApplyOrderModels = applyOrderService.querySieveApplyOrderWithQuery(sieveApplyOrderQuery); | |
| 165 | + if (CollectionUtils.isNotEmpty(sieveApplyOrderModels)) | |
| 166 | + { | |
| 167 | + SieveApplyOrderModel model = sieveApplyOrderModels.get(0); | |
| 168 | + mr.setKeyword1(CommonsHelper.getHospitalName(model.getHospitalId(),organizationService)); | |
| 169 | + mr.setKeyword2(CommonsHelper.getHospitalName(model.getSieveHospitalId(), organizationService)); | |
| 170 | + mr.setRemark(DateUtil.gety_m_dhm(new Date())); | |
| 171 | + } | |
| 172 | + | |
| 173 | + String content = "提醒您,您申请的产前筛产结果已得出。"; | |
| 174 | + mr.setFirst("【" + messagePrefix + "】" + content); | |
| 175 | + mr.setObjType(ServiceObjEnums.YUNOBJ.getId()); | |
| 176 | + mr.setPhone(patient.getPhone()); | |
| 177 | + mr.setTimeType(SmsTimeTypeEnums.ONTIME.getId()); | |
| 178 | + mr.setPlanTime(DateUtil.getyyyy_MM_dd_hms(new Date())); | |
| 179 | + mr.setSubTypeId(SmsServiceEnums.CSJGTZ.getId()); | |
| 180 | + mr.setStatus(SmsStatusEnums.WFS.getId()); | |
| 181 | + mr.setHospitalId(patient.getHospitalId()); | |
| 182 | + mr.setTempId(com.lyms.platform.common.utils.StringUtils.uuid()); | |
| 183 | + mr.setPatientId(patient.getId()); | |
| 184 | + mr.setSmsStatus(SmsStatusEnums.WFS.getId()); | |
| 185 | + mr.setServiceType(startType); //判断发送类型 | |
| 186 | + mr.setTypeId(ProjectTypeEnums.YNXT.getId()); | |
| 187 | + mr.setCreated(DateUtil.getyyyy_MM_dd_hms(new Date())); | |
| 188 | + mr.setWxTempId(WxTempleteIdEnums.SHAI_CHA_TONG_ZHI.getId()); | |
| 189 | + messages.add(mr); | |
| 190 | + if (CollectionUtils.isNotEmpty(messages)) { | |
| 191 | + smsConfigFacade.saveMsg(messages, patient.getHospitalId()); | |
| 192 | + } | |
| 193 | + } | |
| 194 | + | |
| 131 | 195 | /** |
| 132 | 196 | * 产筛添加或更新追访信息 |
| 133 | 197 | * |
| 134 | 198 | |
| ... | ... | @@ -144,9 +208,9 @@ |
| 144 | 208 | if (CollectionUtils.isNotEmpty(records)) { |
| 145 | 209 | TrackDownRecord track = records.get(0); |
| 146 | 210 | trackDownRecord.setId(track.getId()); |
| 147 | - if (track.getTrackType() == TrackDownDateEnums.C.getId()) { | |
| 211 | + if (track.getTrackType()== TrackDownDateEnums.C.getId()) { | |
| 148 | 212 | trackDownRecord.setTrackType(TrackDownDateEnums.I.getId()); |
| 149 | - } else if (track.getTrackType() == TrackDownDateEnums.H.getId()) { | |
| 213 | + }else if(track.getTrackType()== TrackDownDateEnums.H.getId()){ | |
| 150 | 214 | trackDownRecord.setTrackType(TrackDownDateEnums.E.getId()); |
| 151 | 215 | } |
| 152 | 216 | } |
| ... | ... | @@ -245,7 +309,8 @@ |
| 245 | 309 | } |
| 246 | 310 | |
| 247 | 311 | |
| 248 | - public String getSieveStatus(String patientId, String hospitalId) { | |
| 312 | + public String getSieveStatus(String patientId,String hospitalId) | |
| 313 | + { | |
| 249 | 314 | |
| 250 | 315 | String siveStatus = ""; |
| 251 | 316 | SieveQuery sieveQuery = new SieveQuery(); |
| 252 | 317 | |
| 253 | 318 | |
| 254 | 319 | |
| 255 | 320 | |
| 256 | 321 | |
| 257 | 322 | |
| 258 | 323 | |
| 259 | 324 | |
| 260 | 325 | |
| 261 | 326 | |
| 262 | 327 | |
| 263 | 328 | |
| 264 | 329 | |
| 265 | 330 | |
| 266 | 331 | |
| ... | ... | @@ -254,58 +319,73 @@ |
| 254 | 319 | sieveQuery.setParentId(patientId); |
| 255 | 320 | //查询产筛list |
| 256 | 321 | List<SieveModel> list = sieveService.queryList1(sieveQuery, "order"); |
| 257 | - if (CollectionUtils.isNotEmpty(list)) { | |
| 322 | + if (CollectionUtils.isNotEmpty(list)) | |
| 323 | + { | |
| 258 | 324 | SieveModel model = list.get(0); |
| 259 | - if (model.getZtfx() == null) { | |
| 325 | + if (model.getZtfx() == null) | |
| 326 | + { | |
| 260 | 327 | SieveApplyOrderQuery sieveApplyOrderQuery1 = new SieveApplyOrderQuery(); |
| 261 | 328 | sieveApplyOrderQuery1.setParentId(patientId); |
| 262 | 329 | sieveApplyOrderQuery1.setHospitalId(hospitalId); |
| 263 | 330 | sieveApplyOrderQuery1.setYn(YnEnums.YES.getId()); |
| 264 | 331 | List<SieveApplyOrderModel> list1 = applyOrderService.querySieveApplyOrderWithQuery(sieveApplyOrderQuery1); |
| 265 | - if (CollectionUtils.isEmpty(list1)) { | |
| 332 | + if (CollectionUtils.isEmpty(list1)) | |
| 333 | + { | |
| 266 | 334 | siveStatus = "未产筛"; |
| 267 | - } else { | |
| 335 | + } | |
| 336 | + else | |
| 337 | + { | |
| 268 | 338 | siveStatus = "已申请"; |
| 269 | 339 | } |
| 270 | - } else { | |
| 340 | + } | |
| 341 | + else | |
| 342 | + { | |
| 271 | 343 | siveStatus = SieveEnums.getTitle(model.getZtfx()); |
| 272 | 344 | } |
| 273 | - } else { | |
| 345 | + } | |
| 346 | + else | |
| 347 | + { | |
| 274 | 348 | SieveApplyOrderQuery sieveApplyOrderQuery1 = new SieveApplyOrderQuery(); |
| 275 | 349 | sieveApplyOrderQuery1.setParentId(patientId); |
| 276 | 350 | sieveApplyOrderQuery1.setHospitalId(hospitalId); |
| 277 | 351 | sieveApplyOrderQuery1.setYn(YnEnums.YES.getId()); |
| 278 | 352 | List<SieveApplyOrderModel> list1 = applyOrderService.querySieveApplyOrderWithQuery(sieveApplyOrderQuery1); |
| 279 | - if (CollectionUtils.isEmpty(list1)) { | |
| 353 | + if (CollectionUtils.isEmpty(list1)) | |
| 354 | + { | |
| 280 | 355 | siveStatus = "未产筛"; |
| 281 | - } else { | |
| 356 | + } | |
| 357 | + else | |
| 358 | + { | |
| 282 | 359 | SieveResultQuery sieveResultQuery = new SieveResultQuery(); |
| 283 | 360 | sieveResultQuery.setParentId(patientId); |
| 284 | 361 | sieveResultQuery.setYn(YnEnums.YES.getId()); |
| 285 | 362 | List<SieveResultModel> resultModels = sieveService.queryListSieveResult(sieveResultQuery); |
| 286 | - if (CollectionUtils.isNotEmpty(resultModels)) { | |
| 363 | + if (CollectionUtils.isNotEmpty(resultModels)) | |
| 364 | + { | |
| 287 | 365 | |
| 288 | 366 | SieveResultModel resultModel = resultModels.get(0); |
| 289 | 367 | |
| 290 | - List<Integer> slist = new ArrayList<>(); | |
| 368 | + List<Integer> slist =new ArrayList<>(); | |
| 291 | 369 | |
| 292 | - if (StringUtils.isNotEmpty(resultModel.getTszhz())) { | |
| 370 | + if(StringUtils.isNotEmpty(resultModel.getTszhz())){ | |
| 293 | 371 | slist.add(Integer.valueOf(resultModel.getTszhz())); |
| 294 | 372 | } |
| 295 | - if (StringUtils.isNotEmpty(resultModel.getSjgjx())) { | |
| 373 | + if(StringUtils.isNotEmpty(resultModel.getSjgjx())){ | |
| 296 | 374 | slist.add(Integer.valueOf(resultModel.getSjgjx())); |
| 297 | 375 | } |
| 298 | - if (StringUtils.isNotEmpty(resultModel.getSbst())) { | |
| 376 | + if(StringUtils.isNotEmpty(resultModel.getSbst())){ | |
| 299 | 377 | slist.add(Integer.valueOf(resultModel.getSbst())); |
| 300 | 378 | } |
| 301 | - if (StringUtils.isNotEmpty(resultModel.getDzhpx())) { | |
| 379 | + if(StringUtils.isNotEmpty(resultModel.getDzhpx())){ | |
| 302 | 380 | slist.add(Integer.valueOf(resultModel.getDzhpx())); |
| 303 | 381 | } |
| 304 | - if (StringUtils.isNotEmpty(resultModel.getStzhz13())) { | |
| 382 | + if(StringUtils.isNotEmpty(resultModel.getStzhz13())){ | |
| 305 | 383 | slist.add(Integer.valueOf(resultModel.getStzhz13())); |
| 306 | 384 | } |
| 307 | 385 | siveStatus = SieveEnums.getTitle(Collections.max(slist)); |
| 308 | - } else { | |
| 386 | + } | |
| 387 | + else | |
| 388 | + { | |
| 309 | 389 | siveStatus = "已申请"; |
| 310 | 390 | } |
| 311 | 391 | } |
| ... | ... | @@ -321,7 +401,7 @@ |
| 321 | 401 | * @param cqSieveQueryRequest |
| 322 | 402 | * @return |
| 323 | 403 | */ |
| 324 | - public BaseResponse queryList(CqSieveQueryRequest cqSieveQueryRequest, Integer userId, String needPage, boolean isSieveLagManage) { | |
| 404 | + public BaseResponse queryList(CqSieveQueryRequest cqSieveQueryRequest, Integer userId, String needPage,boolean isSieveLagManage) { | |
| 325 | 405 | List<SieveListResult> data = new ArrayList<>(); |
| 326 | 406 | SieveQuery sieveQuery = new SieveQuery(); |
| 327 | 407 | sieveQuery.setQueryNo(cqSieveQueryRequest.getQueryNo()); |
| 328 | 408 | |
| 329 | 409 | |
| 330 | 410 | |
| 331 | 411 | |
| 332 | 412 | |
| ... | ... | @@ -380,28 +460,40 @@ |
| 380 | 460 | sieveQuery.setNeed(needPage); |
| 381 | 461 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
| 382 | 462 | |
| 383 | - if (isSieveLagManage) { | |
| 384 | - sieveQuery.setApplyHospitalId(hospitalId); | |
| 463 | + if(isSieveLagManage) | |
| 464 | + { | |
| 465 | + if (StringUtils.isNotEmpty(cqSieveQueryRequest.getApplyHospitalId())) | |
| 466 | + { | |
| 467 | + sieveQuery.setApplyHospitalId(cqSieveQueryRequest.getApplyHospitalId()); | |
| 468 | + } | |
| 385 | 469 | sieveQuery.setSieveHospitalId(hospitalId); |
| 386 | - } else { | |
| 470 | + } | |
| 471 | + else | |
| 472 | + { | |
| 387 | 473 | sieveQuery.setHospitalId(hospitalId); |
| 388 | 474 | } |
| 389 | 475 | |
| 390 | - if (StringUtils.isNotEmpty(cqSieveQueryRequest.getNumber())) { | |
| 476 | + if (StringUtils.isNotEmpty(cqSieveQueryRequest.getNumber())) | |
| 477 | + { | |
| 391 | 478 | List<String> parentIds = new ArrayList<>(); |
| 392 | 479 | SieveApplyOrderQuery sieveApplyOrderQuery = new SieveApplyOrderQuery(); |
| 393 | 480 | sieveApplyOrderQuery.setSieveHospitalId(hospitalId); |
| 394 | 481 | sieveApplyOrderQuery.setNumber(cqSieveQueryRequest.getNumber()); |
| 395 | 482 | sieveApplyOrderQuery.setYn(YnEnums.YES.getId()); |
| 396 | 483 | List<SieveApplyOrderModel> sieveApplyOrderModels = applyOrderService.querySieveApplyOrderWithQuery(sieveApplyOrderQuery); |
| 397 | - if (CollectionUtils.isNotEmpty(sieveApplyOrderModels)) { | |
| 398 | - for (SieveApplyOrderModel model : sieveApplyOrderModels) { | |
| 484 | + if (CollectionUtils.isNotEmpty(sieveApplyOrderModels)) | |
| 485 | + { | |
| 486 | + for(SieveApplyOrderModel model : sieveApplyOrderModels) | |
| 487 | + { | |
| 399 | 488 | parentIds.add(model.getParentId()); |
| 400 | 489 | } |
| 401 | 490 | } |
| 402 | - if (CollectionUtils.isNotEmpty(parentIds)) { | |
| 491 | + if (CollectionUtils.isNotEmpty(parentIds)) | |
| 492 | + { | |
| 403 | 493 | sieveQuery.setParentIds(parentIds); |
| 404 | - } else { | |
| 494 | + } | |
| 495 | + else | |
| 496 | + { | |
| 405 | 497 | return new BaseListResponse().setData(data).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setPageInfo(sieveQuery.getPageInfo()); |
| 406 | 498 | } |
| 407 | 499 | } |
| ... | ... | @@ -417,7 +509,7 @@ |
| 417 | 509 | if (end > list.size()) { |
| 418 | 510 | end = list.size(); |
| 419 | 511 | } |
| 420 | - listFuture.add(commonThreadPool.submit(new SieveWorker(hospitalId, list.subList(i, end), antenatalExaminationService, patientsService, applyOrderService, organizationService))); | |
| 512 | + listFuture.add(commonThreadPool.submit(new SieveWorker(hospitalId, list.subList(i, end), antenatalExaminationService, patientsService,applyOrderService,organizationService))); | |
| 421 | 513 | } |
| 422 | 514 | for (Future f : listFuture) { |
| 423 | 515 | try { |
| ... | ... | @@ -432,7 +524,7 @@ |
| 432 | 524 | public void exportCqsieves(CqSieveQueryRequest cqSieveQueryRequest, Integer id, HttpServletResponse response) { |
| 433 | 525 | try { |
| 434 | 526 | |
| 435 | - BaseListResponse listResponse = (BaseListResponse) queryList(cqSieveQueryRequest, id, null, false); | |
| 527 | + BaseListResponse listResponse = (BaseListResponse) queryList(cqSieveQueryRequest, id, null,false); | |
| 436 | 528 | |
| 437 | 529 | List<SieveListResult> list = listResponse.getData(); |
| 438 | 530 | List<Map<String, Object>> datas = new ArrayList<>(); |
| 439 | 531 | |
| 440 | 532 | |
| 441 | 533 | |
| 442 | 534 | |
| 443 | 535 | |
| 444 | 536 | |
| ... | ... | @@ -538,31 +630,38 @@ |
| 538 | 630 | } |
| 539 | 631 | |
| 540 | 632 | /** |
| 541 | - * 添加查询前 查询孕妇基本信息 如果孕妇没有在本院建档就添加隐藏档案 | |
| 542 | - * | |
| 633 | + * 添加查询前 查询孕妇基本信息 如果孕妇没有在本院建档就添加隐藏档案 | |
| 543 | 634 | * @param cardNo |
| 544 | 635 | * @param userId |
| 545 | 636 | * @return |
| 546 | 637 | */ |
| 547 | - public BaseResponse querySievePatientInfo(String cardNo, String vcCardNo, Integer userId) { | |
| 638 | + public BaseResponse querySievePatientInfo(String cardNo,String vcCardNo, Integer userId) { | |
| 548 | 639 | |
| 549 | 640 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
| 550 | 641 | |
| 642 | + | |
| 643 | + | |
| 551 | 644 | PatientsQuery patientsQuery = new PatientsQuery(); |
| 552 | 645 | patientsQuery.setHospitalId(hospitalId); |
| 553 | 646 | patientsQuery.setYn(YnEnums.YES.getId()); |
| 554 | - if (StringUtils.isNotEmpty(cardNo)) { | |
| 647 | + if (StringUtils.isNotEmpty(cardNo)) | |
| 648 | + { | |
| 555 | 649 | patientsQuery.setPhoneOrCert(cardNo); |
| 556 | - } else if (StringUtils.isNotEmpty(vcCardNo)) { | |
| 650 | + } | |
| 651 | + else if (StringUtils.isNotEmpty(vcCardNo)) | |
| 652 | + { | |
| 557 | 653 | patientsQuery.setVcCardNo(vcCardNo); |
| 558 | 654 | } |
| 559 | 655 | |
| 560 | 656 | |
| 561 | 657 | List<Patients> localPatients = patientsService.queryPatient(patientsQuery); |
| 562 | 658 | Patients pat = null; |
| 563 | - if (CollectionUtils.isNotEmpty(localPatients)) { | |
| 659 | + if (CollectionUtils.isNotEmpty(localPatients)) | |
| 660 | + { | |
| 564 | 661 | pat = localPatients.get(0); |
| 565 | - } else { | |
| 662 | + } | |
| 663 | + else | |
| 664 | + { | |
| 566 | 665 | patientsQuery.setHospitalId(null); |
| 567 | 666 | List<Patients> areaPatients = patientsService.queryPatient(patientsQuery); |
| 568 | 667 | if (CollectionUtils.isNotEmpty(areaPatients)) { |
| ... | ... | @@ -572,7 +671,9 @@ |
| 572 | 671 | String id = antenatalExaminationFacade.handHideBuild(pat.getPid(), pat.getId(), userId, 1); |
| 573 | 672 | |
| 574 | 673 | pat = patientsService.findOnePatientById(id); |
| 575 | - } else { | |
| 674 | + } | |
| 675 | + else | |
| 676 | + { | |
| 576 | 677 | return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("没有档案,请建档后申请产筛"); |
| 577 | 678 | } |
| 578 | 679 | } |
| ... | ... | @@ -581,6 +682,18 @@ |
| 581 | 682 | HighScoreResult highScoreResult = antenatalExaminationFacade.findLastRisk(pat.getPid(), false); |
| 582 | 683 | PatientBaseResult patientBaseResult = new PatientBaseResult(); |
| 583 | 684 | if (null != pat) { |
| 685 | + | |
| 686 | + SieveApplyOrderQuery sieveApplyOrderQuery1 = new SieveApplyOrderQuery(); | |
| 687 | + sieveApplyOrderQuery1.setParentId(pat.getId()); | |
| 688 | + sieveApplyOrderQuery1.setHospitalId(hospitalId); | |
| 689 | + sieveApplyOrderQuery1.setYn(YnEnums.YES.getId()); | |
| 690 | + | |
| 691 | + List<SieveApplyOrderModel> list = applyOrderService.querySieveApplyOrderWithQuery(sieveApplyOrderQuery1); | |
| 692 | + if (CollectionUtils.isNotEmpty(list)) | |
| 693 | + { | |
| 694 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.DATA_EXIST).setErrormsg("已申请过产筛!"); | |
| 695 | + } | |
| 696 | + | |
| 584 | 697 | patientBaseResult.convert(pat); |
| 585 | 698 | } |
| 586 | 699 | patientBaseResult.setRiskFactor(highScoreResult.getHighRisk()); |
| ... | ... | @@ -591,7 +704,8 @@ |
| 591 | 704 | antExChuQuery.setYn(YnEnums.YES.getId()); |
| 592 | 705 | |
| 593 | 706 | List<AntExChuModel> list = antenatalExaminationService.queryAntExChu(antExChuQuery); |
| 594 | - if (CollectionUtils.isNotEmpty(list)) { | |
| 707 | + if (CollectionUtils.isNotEmpty(list)) | |
| 708 | + { | |
| 595 | 709 | AntExChuModel chuModel = list.get(0); |
| 596 | 710 | patientBaseResult.setWeight(chuModel.getYqWeight()); |
| 597 | 711 | } |
| 598 | 712 | |
| 599 | 713 | |
| 600 | 714 | |
| 601 | 715 | |
| 602 | 716 | |
| 603 | 717 | |
| 604 | 718 | |
| 605 | 719 | |
| 606 | 720 | |
| 607 | 721 | |
| 608 | 722 | |
| 609 | 723 | |
| 610 | 724 | |
| 611 | 725 | |
| 612 | 726 | |
| 613 | 727 | |
| 614 | 728 | |
| 615 | 729 | |
| 616 | 730 | |
| 617 | 731 | |
| 618 | 732 | |
| 619 | 733 | |
| 620 | 734 | |
| 621 | 735 | |
| 622 | 736 | |
| ... | ... | @@ -599,134 +713,123 @@ |
| 599 | 713 | return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(patientBaseResult); |
| 600 | 714 | } |
| 601 | 715 | |
| 602 | - public BaseResponse getSieveApplyInfo(String parentId, Integer userId, Integer type) { | |
| 716 | + public BaseResponse getSieveApplyInfo(String parentId, Integer userId,Integer type) { | |
| 603 | 717 | |
| 604 | - Map<String, Object> map = new HashMap<>(); | |
| 718 | + Map<String,Object> map = new HashMap<>(); | |
| 605 | 719 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
| 606 | 720 | |
| 607 | 721 | PatientsQuery patientsQuery = new PatientsQuery(); |
| 608 | - patientsQuery.setHospitalId(hospitalId); | |
| 609 | 722 | patientsQuery.setYn(YnEnums.YES.getId()); |
| 610 | 723 | patientsQuery.setId(parentId); |
| 611 | 724 | |
| 612 | 725 | List<Patients> localPatients = patientsService.queryPatient(patientsQuery); |
| 613 | - Patients pat = null; | |
| 614 | - if (CollectionUtils.isNotEmpty(localPatients)) { | |
| 615 | - pat = localPatients.get(0); | |
| 616 | - } else { | |
| 617 | - patientsQuery.setHospitalId(null); | |
| 618 | - List<Patients> areaPatients = patientsService.queryPatient(patientsQuery); | |
| 619 | - if (CollectionUtils.isNotEmpty(areaPatients)) { | |
| 620 | - pat = areaPatients.get(0); | |
| 621 | - if (StringUtils.isNotEmpty(groupsFacade.findByCurrentUserId(hospitalId))) { | |
| 622 | - //建立隐藏档案 | |
| 623 | - String id = antenatalExaminationFacade.handHideBuild(pat.getPid(), pat.getId(), userId, 1); | |
| 624 | 726 | |
| 625 | - pat = patientsService.findOnePatientById(id); | |
| 626 | - } else { | |
| 627 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("没有档案,请建档后申请产筛"); | |
| 628 | - } | |
| 629 | - } | |
| 630 | - } | |
| 631 | - | |
| 632 | - HighScoreResult highScoreResult = antenatalExaminationFacade.findLastRisk(pat.getPid(), false); | |
| 633 | - PatientBaseResult patientBaseResult = new PatientBaseResult(); | |
| 634 | - if (null != pat) { | |
| 727 | + if (CollectionUtils.isNotEmpty(localPatients)) | |
| 728 | + { | |
| 729 | + Patients pat = localPatients.get(0); | |
| 730 | + HighScoreResult highScoreResult = antenatalExaminationFacade.findLastRisk(pat.getPid(), false); | |
| 731 | + PatientBaseResult patientBaseResult = new PatientBaseResult(); | |
| 635 | 732 | patientBaseResult.convert(pat); |
| 733 | + patientBaseResult.setRiskFactor(highScoreResult.getHighRisk()); | |
| 734 | + patientBaseResult.setRiskScore(highScoreResult.getScoreStr()); | |
| 735 | + | |
| 736 | + map.put("patientInfo", patientBaseResult); | |
| 636 | 737 | } |
| 637 | - patientBaseResult.setRiskFactor(highScoreResult.getHighRisk()); | |
| 638 | - patientBaseResult.setRiskScore(highScoreResult.getScoreStr()); | |
| 639 | 738 | |
| 640 | - map.put("patientInfo", patientBaseResult); | |
| 641 | - | |
| 642 | 739 | SieveApplyOrderQuery sieveApplyOrderQuery1 = new SieveApplyOrderQuery(); |
| 643 | 740 | sieveApplyOrderQuery1.setParentId(parentId); |
| 644 | 741 | sieveApplyOrderQuery1.setHospitalId(hospitalId); |
| 645 | 742 | sieveApplyOrderQuery1.setYn(YnEnums.YES.getId()); |
| 646 | 743 | |
| 647 | - if (type == 4) { | |
| 744 | + if (type == 4) | |
| 745 | + { | |
| 648 | 746 | |
| 649 | - Map<String, Object> sieveResultEditInfo = new HashMap<>(); | |
| 747 | + Map<String,Object> sieveResultEditInfo = new HashMap<>(); | |
| 650 | 748 | SieveResultQuery sieveResultQuery = new SieveResultQuery(); |
| 651 | 749 | sieveResultQuery.setParentId(parentId); |
| 652 | 750 | sieveResultQuery.setYn(YnEnums.YES.getId()); |
| 653 | 751 | List<SieveResultModel> list = sieveService.queryListSieveResult(sieveResultQuery); |
| 654 | - if (CollectionUtils.isNotEmpty(list)) { | |
| 752 | + if (CollectionUtils.isNotEmpty(list)) | |
| 753 | + { | |
| 655 | 754 | SieveResultModel model = list.get(0); |
| 656 | - sieveResultEditInfo.put("id", model.getId()); | |
| 657 | - sieveResultEditInfo.put("hcg", model.getHcg() != null ? model.getHcg() : ""); | |
| 658 | - sieveResultEditInfo.put("hcgMom", model.getHcgMom() != null ? model.getHcgMom() : ""); | |
| 659 | - sieveResultEditInfo.put("hafp", model.getHafp() != null ? model.getHafp() : ""); | |
| 660 | - sieveResultEditInfo.put("hafpMom", model.getHafpMom() != null ? model.getHafpMom() : ""); | |
| 755 | + sieveResultEditInfo.put("id",model.getId()); | |
| 756 | + sieveResultEditInfo.put("hcg",model.getHcg() != null ? model.getHcg() : ""); | |
| 757 | + sieveResultEditInfo.put("hcgMom",model.getHcgMom() != null ? model.getHcgMom() : ""); | |
| 758 | + sieveResultEditInfo.put("hafp",model.getHafp() != null ? model.getHafp() : ""); | |
| 759 | + sieveResultEditInfo.put("hafpMom",model.getHafpMom() != null ? model.getHafpMom() : ""); | |
| 661 | 760 | sieveResultEditInfo.put("examineId", model.getExamineId()); |
| 662 | - sieveResultEditInfo.put("checkerId", model.getCheckerId()); | |
| 663 | - sieveResultEditInfo.put("resultTime", DateUtil.getyyyy_MM_dd(model.getResultTime())); | |
| 761 | + sieveResultEditInfo.put("checkerId",model.getCheckerId()); | |
| 762 | + sieveResultEditInfo.put("resultTime",DateUtil.getyyyy_MM_dd(model.getResultTime())); | |
| 664 | 763 | |
| 665 | - sieveResultEditInfo.put("tszhz", model.getTszhz()); | |
| 666 | - sieveResultEditInfo.put("sbst", model.getSbst()); | |
| 667 | - sieveResultEditInfo.put("stzhz13", model.getStzhz13()); | |
| 668 | - sieveResultEditInfo.put("sjgjx", model.getSjgjx()); | |
| 764 | + sieveResultEditInfo.put("tszhz",model.getTszhz()); | |
| 765 | + sieveResultEditInfo.put("sbst",model.getSbst()); | |
| 766 | + sieveResultEditInfo.put("stzhz13",model.getStzhz13()); | |
| 767 | + sieveResultEditInfo.put("sjgjx",model.getSjgjx()); | |
| 669 | 768 | |
| 670 | 769 | |
| 671 | - sieveResultEditInfo.put("tszhzValue", model.getTszhzValue()); | |
| 672 | - sieveResultEditInfo.put("sbstValue", model.getSbstValue()); | |
| 673 | - sieveResultEditInfo.put("stzhz13Value", model.getStzhz13Value()); | |
| 674 | - sieveResultEditInfo.put("sjgjxValue", model.getSjgjxValue()); | |
| 675 | - sieveResultEditInfo.put("publishName", model.getPublishName()); | |
| 770 | + sieveResultEditInfo.put("tszhzValue",model.getTszhzValue()); | |
| 771 | + sieveResultEditInfo.put("sbstValue",model.getSbstValue()); | |
| 772 | + sieveResultEditInfo.put("stzhz13Value",model.getStzhz13Value()); | |
| 773 | + sieveResultEditInfo.put("sjgjxValue",model.getSjgjxValue()); | |
| 774 | + sieveResultEditInfo.put("publishName",model.getPublishName()); | |
| 676 | 775 | } |
| 677 | - map.put("sieveResultEditInfo", sieveResultEditInfo); | |
| 678 | - } else { | |
| 776 | + map.put("sieveResultEditInfo",sieveResultEditInfo); | |
| 777 | + } | |
| 778 | + else | |
| 779 | + { | |
| 679 | 780 | List<SieveApplyOrderModel> sieveApplyOrderModels = applyOrderService.querySieveApplyOrderWithQuery(sieveApplyOrderQuery1); |
| 680 | - if (CollectionUtils.isNotEmpty(sieveApplyOrderModels)) { | |
| 681 | - Map<String, Object> result = new HashMap<>(); | |
| 781 | + if (CollectionUtils.isNotEmpty(sieveApplyOrderModels)) | |
| 782 | + { | |
| 783 | + Map<String,Object> result = new HashMap<>(); | |
| 682 | 784 | |
| 683 | - Map<String, Object> viewInfo = new HashMap<>(); | |
| 785 | + Map<String,Object> viewInfo = new HashMap<>(); | |
| 684 | 786 | SieveApplyOrderModel sieveApply = sieveApplyOrderModels.get(0); |
| 685 | 787 | |
| 686 | - result.put("id", sieveApply.getId()); | |
| 687 | - result.put("parentId", sieveApply.getParentId()); | |
| 788 | + result.put("id",sieveApply.getId()); | |
| 789 | + result.put("parentId",sieveApply.getParentId()); | |
| 688 | 790 | |
| 689 | - result.put("check", sieveApply.getCheckItem()); | |
| 690 | - result.put("guide", sieveApply.getGuide()); | |
| 691 | - result.put("checkDate", sieveApply.getCheckDate()); | |
| 692 | - result.put("applyDoctor", sieveApply.getApplyDoctor()); | |
| 693 | - result.put("hospitalId", sieveApply.getHospitalId()); | |
| 694 | - result.put("applyTime", DateUtil.getyyyy_MM_dd(sieveApply.getApplyTime())); | |
| 695 | - result.put("birth", DateUtil.getyyyy_MM_dd(sieveApply.getBirth())); | |
| 696 | - result.put("weight", sieveApply.getWeight()); | |
| 697 | - result.put("lastMenses", DateUtil.getyyyy_MM_dd(sieveApply.getLastMenses())); | |
| 698 | - result.put("number", sieveApply.getNumber()); | |
| 699 | - result.put("collectionDoctorId", sieveApply.getCollectionDoctorId()); | |
| 700 | - result.put("collectionDate", DateUtil.getyyyy_MM_dd(sieveApply.getCollectionDate())); | |
| 701 | - result.put("crl", sieveApply.getCrl()); | |
| 702 | - result.put("bpd", sieveApply.getBpd()); | |
| 703 | - result.put("bcCheckDate", DateUtil.getyyyy_MM_dd(sieveApply.getBcCheckDate())); | |
| 704 | - result.put("historyBirth", sieveApply.getHistoryBirth()); | |
| 705 | - result.put("pastHistory", sieveApply.getPastHistory()); | |
| 706 | - result.put("sieveHospitalId", sieveApply.getSieveHospitalId()); | |
| 707 | - result.put("sendDoctor", sieveApply.getSendDoctor()); | |
| 708 | - result.put("sendTime", DateUtil.getyyyy_MM_dd(sieveApply.getSendTime())); | |
| 709 | - result.put("age", DateUtil.getAge(sieveApply.getBirth(), sieveApply.getCreated())); | |
| 710 | - result.put("mensesDay", sieveApply.getMensesDay()); | |
| 711 | - result.put("mensesWeek", sieveApply.getMensesWeek()); | |
| 712 | - result.put("experimentNum", ""); | |
| 791 | + result.put("check",sieveApply.getCheckItem()); | |
| 792 | + result.put("guide",sieveApply.getGuide()); | |
| 793 | + result.put("checkDate",sieveApply.getCheckDate()); | |
| 794 | + result.put("applyDoctor",sieveApply.getApplyDoctor()); | |
| 795 | + result.put("hospitalId",sieveApply.getHospitalId()); | |
| 796 | + result.put("applyTime",DateUtil.getyyyy_MM_dd(sieveApply.getApplyTime())); | |
| 797 | + result.put("birth",DateUtil.getyyyy_MM_dd(sieveApply.getBirth())); | |
| 798 | + result.put("weight",sieveApply.getWeight()); | |
| 799 | + result.put("lastMenses",DateUtil.getyyyy_MM_dd(sieveApply.getLastMenses())); | |
| 800 | + result.put("number",sieveApply.getNumber()); | |
| 801 | + result.put("collectionDoctorId",sieveApply.getCollectionDoctorId()); | |
| 802 | + result.put("collectionDate",DateUtil.getyyyy_MM_dd(sieveApply.getCollectionDate())); | |
| 803 | + result.put("crl",sieveApply.getCrl()); | |
| 804 | + result.put("bpd",sieveApply.getBpd()); | |
| 805 | + result.put("bcCheckDate",DateUtil.getyyyy_MM_dd(sieveApply.getBcCheckDate())); | |
| 806 | + result.put("historyBirth",sieveApply.getHistoryBirth()); | |
| 807 | + result.put("pastHistory","yes".equals(sieveApply.getPastHistory()) ? "是" : "否"); | |
| 808 | + result.put("sieveHospitalId",sieveApply.getSieveHospitalId()); | |
| 809 | + result.put("sendDoctor",sieveApply.getSendDoctor()); | |
| 810 | + result.put("sendTime",DateUtil.getyyyy_MM_dd(sieveApply.getSendTime())); | |
| 811 | + result.put("age",DateUtil.getAge(sieveApply.getBirth(), sieveApply.getCreated())); | |
| 812 | + result.put("mensesDay",sieveApply.getMensesDay()); | |
| 813 | + result.put("mensesWeek",sieveApply.getMensesWeek()); | |
| 814 | + result.put("experimentNum",""); | |
| 713 | 815 | |
| 714 | - map.put("sieveApplyInfo", result); | |
| 816 | + map.put("sieveApplyInfo",result); | |
| 715 | 817 | |
| 716 | - if (type == 1 || type == 3) { | |
| 717 | - String applyDoctorName = CommonsHelper.getUserName(sieveApply.getApplyDoctor(), usersService); | |
| 718 | - viewInfo.put("applyDoctorName", applyDoctorName); | |
| 818 | + if (type == 1 || type == 3) | |
| 819 | + { | |
| 820 | + String applyDoctorName = CommonsHelper.getUserName(sieveApply.getApplyDoctor(),usersService); | |
| 821 | + viewInfo.put("applyDoctorName",applyDoctorName); | |
| 719 | 822 | |
| 720 | - String collectionDoctorName = CommonsHelper.getUserName(sieveApply.getCollectionDoctorId(), usersService); | |
| 721 | - viewInfo.put("collectionDoctorName", collectionDoctorName); | |
| 823 | + String collectionDoctorName = CommonsHelper.getUserName(sieveApply.getCollectionDoctorId(),usersService); | |
| 824 | + viewInfo.put("collectionDoctorName",collectionDoctorName); | |
| 722 | 825 | |
| 723 | - String sendDoctorName = CommonsHelper.getUserName(sieveApply.getSendDoctor(), usersService); | |
| 724 | - viewInfo.put("sendDoctorName", sendDoctorName); | |
| 826 | + String sendDoctorName = CommonsHelper.getUserName(sieveApply.getSendDoctor(),usersService); | |
| 827 | + viewInfo.put("sendDoctorName",sendDoctorName); | |
| 725 | 828 | |
| 726 | - String applyHospitalName = CommonsHelper.getHospitalName(sieveApply.getSieveHospitalId(), organizationService); | |
| 829 | + String applyHospitalName = CommonsHelper.getHospitalName(sieveApply.getSieveHospitalId(),organizationService); | |
| 727 | 830 | viewInfo.put("applyHospitalName", applyHospitalName); |
| 728 | 831 | |
| 729 | - String currentHospitalName = CommonsHelper.getHospitalName(sieveApply.getHospitalId(), organizationService); | |
| 832 | + String currentHospitalName = CommonsHelper.getHospitalName(sieveApply.getHospitalId(),organizationService); | |
| 730 | 833 | viewInfo.put("currentHospitalName", currentHospitalName); |
| 731 | 834 | |
| 732 | 835 | String isTire = ""; |
| 733 | 836 | |
| 734 | 837 | |
| 735 | 838 | |
| 736 | 839 | |
| 737 | 840 | |
| 738 | 841 | |
| 739 | 842 | |
| 740 | 843 | |
| 741 | 844 | |
| 742 | 845 | |
| 743 | 846 | |
| 744 | 847 | |
| 745 | 848 | |
| 746 | 849 | |
| 747 | 850 | |
| 748 | 851 | |
| 749 | 852 | |
| 750 | 853 | |
| 751 | 854 | |
| ... | ... | @@ -735,74 +838,82 @@ |
| 735 | 838 | antExChuQuery1.setParentId(parentId); |
| 736 | 839 | antExChuQuery1.setYn(YnEnums.YES.getId()); |
| 737 | 840 | List<AntExChuModel> data1 = antenatalExaminationService.queryAntExChu(antExChuQuery1); |
| 738 | - if (CollectionUtils.isNotEmpty(data1)) { | |
| 841 | + if (CollectionUtils.isNotEmpty(data1)) | |
| 842 | + { | |
| 739 | 843 | AntExChuModel chuModel = data1.get(0); |
| 740 | - if (StringUtils.isNotEmpty(chuModel.getTireNumber())) { | |
| 741 | - isTire = Integer.parseInt(chuModel.getTireNumber()) > 1 ? "是" : "否"; | |
| 844 | + if (StringUtils.isNotEmpty(chuModel.getTireNumber())) | |
| 845 | + { | |
| 846 | + isTire = Integer.parseInt(chuModel.getTireNumber()) > 1 ? "是":"否"; | |
| 742 | 847 | tireNumber = chuModel.getTireNumber(); |
| 743 | 848 | } |
| 744 | 849 | } |
| 745 | 850 | map.put("isTire", isTire); |
| 746 | - map.put("tireNumber", tireNumber); | |
| 747 | - map.put("viewInfo", viewInfo); | |
| 851 | + map.put("tireNumber",tireNumber); | |
| 852 | + map.put("viewInfo",viewInfo); | |
| 748 | 853 | |
| 749 | - if (type == 3) { | |
| 750 | - Map<String, Object> sieveResultInfo = new HashMap<>(); | |
| 854 | + if (type == 3) | |
| 855 | + { | |
| 856 | + Map<String,Object> sieveResultInfo = new HashMap<>(); | |
| 751 | 857 | |
| 752 | 858 | SieveResultQuery sieveResultQuery = new SieveResultQuery(); |
| 753 | 859 | sieveResultQuery.setParentId(parentId); |
| 754 | 860 | sieveResultQuery.setYn(YnEnums.YES.getId()); |
| 755 | 861 | List<SieveResultModel> list = sieveService.queryListSieveResult(sieveResultQuery); |
| 756 | - if (CollectionUtils.isNotEmpty(list)) { | |
| 862 | + if (CollectionUtils.isNotEmpty(list)) | |
| 863 | + { | |
| 757 | 864 | SieveResultModel sieveResultModel = list.get(0); |
| 758 | - sieveResultInfo.put("hcg", sieveResultModel.getHcg() != null ? sieveResultModel.getHcg() + "ng/ml" : ""); | |
| 759 | - sieveResultInfo.put("hcgMom", sieveResultModel.getHcgMom() != null ? sieveResultModel.getHcgMom() : ""); | |
| 760 | - sieveResultInfo.put("hafp", sieveResultModel.getHafp() != null ? sieveResultModel.getHafp() + "U/ml" : ""); | |
| 761 | - sieveResultInfo.put("hafpMom", sieveResultModel.getHafpMom() != null ? sieveResultModel.getHafpMom() : ""); | |
| 865 | + sieveResultInfo.put("hcg",sieveResultModel.getHcg() != null ? sieveResultModel.getHcg()+"ng/ml" : ""); | |
| 866 | + sieveResultInfo.put("hcgMom",sieveResultModel.getHcgMom() != null ? sieveResultModel.getHcgMom() : ""); | |
| 867 | + sieveResultInfo.put("hafp",sieveResultModel.getHafp() != null ? sieveResultModel.getHafp()+"U/ml" : ""); | |
| 868 | + sieveResultInfo.put("hafpMom",sieveResultModel.getHafpMom() != null ? sieveResultModel.getHafpMom() : ""); | |
| 762 | 869 | sieveResultInfo.put("examineName", CommonsHelper.getUserName(sieveResultModel.getExamineId(), usersService)); |
| 763 | - sieveResultInfo.put("checkerName", CommonsHelper.getUserName(sieveResultModel.getCheckerId(), usersService)); | |
| 764 | - sieveResultInfo.put("reportTime", DateUtil.getyyyy_MM_dd(sieveResultModel.getResultTime())); | |
| 870 | + sieveResultInfo.put("checkerName",CommonsHelper.getUserName(sieveResultModel.getCheckerId(), usersService)); | |
| 871 | + sieveResultInfo.put("reportTime",DateUtil.getyyyy_MM_dd(sieveResultModel.getResultTime())); | |
| 765 | 872 | |
| 766 | 873 | String tszhzValue = ""; |
| 767 | - if (StringUtils.isNotEmpty(sieveResultModel.getTszhz()) && sieveResultModel.getTszhzValue() != null && sieveResultModel.getTszhzValue().size() > 0) { | |
| 874 | + if (StringUtils.isNotEmpty(sieveResultModel.getTszhz()) && sieveResultModel.getTszhzValue() != null && sieveResultModel.getTszhzValue().size() > 0) | |
| 875 | + { | |
| 768 | 876 | |
| 769 | 877 | String valueOne = sieveResultModel.getTszhzValue().get("valueOne"); |
| 770 | 878 | String valueTwo = sieveResultModel.getTszhzValue().get("valueTwo"); |
| 771 | - tszhzValue = valueOne + "/" + valueTwo + ("0".equals(sieveResultModel.getTszhz()) ? "低风险" : "1".equals(sieveResultModel.getTszhz()) ? "临界值" : "高风险"); | |
| 879 | + tszhzValue = valueOne + "/"+valueTwo+("0".equals(sieveResultModel.getTszhz()) ? "低风险" : "1".equals(sieveResultModel.getTszhz()) ? "临界值" : "高风险"); | |
| 772 | 880 | } |
| 773 | - sieveResultInfo.put("tszhz", tszhzValue); | |
| 881 | + sieveResultInfo.put("tszhz",tszhzValue); | |
| 774 | 882 | |
| 775 | 883 | |
| 776 | 884 | String sbst = ""; |
| 777 | - if (StringUtils.isNotEmpty(sieveResultModel.getSbst()) && sieveResultModel.getSbstValue() != null && sieveResultModel.getSbstValue().size() > 0) { | |
| 885 | + if (StringUtils.isNotEmpty(sieveResultModel.getSbst()) && sieveResultModel.getSbstValue() != null && sieveResultModel.getSbstValue().size() > 0) | |
| 886 | + { | |
| 778 | 887 | |
| 779 | 888 | String valueOne = sieveResultModel.getSbstValue().get("valueOne"); |
| 780 | 889 | String valueTwo = sieveResultModel.getSbstValue().get("valueTwo"); |
| 781 | - sbst = valueOne + "/" + valueTwo + ("0".equals(sieveResultModel.getSbst()) ? "低风险" : "1".equals(sieveResultModel.getSbst()) ? "临界值" : "高风险"); | |
| 890 | + sbst = valueOne + "/"+valueTwo+("0".equals(sieveResultModel.getSbst()) ? "低风险" : "1".equals(sieveResultModel.getSbst()) ? "临界值" : "高风险"); | |
| 782 | 891 | } |
| 783 | - sieveResultInfo.put("sbst", sbst); | |
| 892 | + sieveResultInfo.put("sbst",sbst); | |
| 784 | 893 | |
| 785 | 894 | |
| 786 | - String sjgjx = ""; | |
| 787 | - if (StringUtils.isNotEmpty(sieveResultModel.getSjgjx()) && sieveResultModel.getSjgjxValue() != null && sieveResultModel.getSjgjxValue().size() > 0) { | |
| 895 | + String sjgjx = ""; | |
| 896 | + if (StringUtils.isNotEmpty(sieveResultModel.getSjgjx()) && sieveResultModel.getSjgjxValue() != null && sieveResultModel.getSjgjxValue().size() > 0) | |
| 897 | + { | |
| 788 | 898 | |
| 789 | 899 | String valueOne = sieveResultModel.getSjgjxValue().get("valueOne"); |
| 790 | 900 | String valueTwo = sieveResultModel.getSjgjxValue().get("valueTwo"); |
| 791 | - sjgjx = valueOne + "/" + valueTwo + ("0".equals(sieveResultModel.getSjgjx()) ? "低风险" : "1".equals(sieveResultModel.getSjgjx()) ? "临界值" : "高风险"); | |
| 901 | + sjgjx = valueOne + "/"+valueTwo+("0".equals(sieveResultModel.getSjgjx()) ? "低风险" : "1".equals(sieveResultModel.getSjgjx()) ? "临界值" : "高风险"); | |
| 792 | 902 | } |
| 793 | - sieveResultInfo.put("sjgjx", sjgjx); | |
| 903 | + sieveResultInfo.put("sjgjx",sjgjx); | |
| 794 | 904 | |
| 795 | - String stzhz13 = ""; | |
| 796 | - if (StringUtils.isNotEmpty(sieveResultModel.getStzhz13()) && sieveResultModel.getStzhz13Value() != null && sieveResultModel.getStzhz13Value().size() > 0) { | |
| 905 | + String stzhz13 = ""; | |
| 906 | + if (StringUtils.isNotEmpty(sieveResultModel.getStzhz13()) && sieveResultModel.getStzhz13Value() != null && sieveResultModel.getStzhz13Value().size() > 0) | |
| 907 | + { | |
| 797 | 908 | String valueOne = sieveResultModel.getStzhz13Value().get("valueOne"); |
| 798 | 909 | String valueTwo = sieveResultModel.getStzhz13Value().get("valueTwo"); |
| 799 | - stzhz13 = valueOne + "/" + valueTwo + ("0".equals(sieveResultModel.getStzhz13()) ? "低风险" : "1".equals(sieveResultModel.getStzhz13()) ? "临界值" : "高风险"); | |
| 910 | + stzhz13 = valueOne + "/"+valueTwo+("0".equals(sieveResultModel.getStzhz13()) ? "低风险" : "1".equals(sieveResultModel.getStzhz13()) ? "临界值" : "高风险"); | |
| 800 | 911 | } |
| 801 | - sieveResultInfo.put("stzhz13", stzhz13); | |
| 912 | + sieveResultInfo.put("stzhz13",stzhz13); | |
| 802 | 913 | |
| 803 | 914 | |
| 804 | 915 | } |
| 805 | - map.put("sieveResultInfo", sieveResultInfo); | |
| 916 | + map.put("sieveResultInfo",sieveResultInfo); | |
| 806 | 917 | } |
| 807 | 918 | } |
| 808 | 919 | } |
| 809 | 920 | |
| ... | ... | @@ -952,15 +1063,18 @@ |
| 952 | 1063 | |
| 953 | 1064 | public BaseResponse reviceSieve(List<String> parentIds, Integer userId) { |
| 954 | 1065 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
| 955 | - if (CollectionUtils.isNotEmpty(parentIds)) { | |
| 1066 | + if (CollectionUtils.isNotEmpty(parentIds)) | |
| 1067 | + { | |
| 956 | 1068 | SieveQuery query = new SieveQuery(); |
| 957 | 1069 | query.setParentIds(parentIds); |
| 958 | 1070 | query.setYn(YnEnums.YES.getId()); |
| 959 | 1071 | query.setApplyHospitalId(hospitalId); |
| 960 | 1072 | List<SieveModel> list = sieveService.queryList(query); |
| 961 | 1073 | |
| 962 | - if (CollectionUtils.isNotEmpty(list)) { | |
| 963 | - for (SieveModel sieve : list) { | |
| 1074 | + if (CollectionUtils.isNotEmpty(list)) | |
| 1075 | + { | |
| 1076 | + for (SieveModel sieve : list) | |
| 1077 | + { | |
| 964 | 1078 | sieve.setReviceStatus(2); |
| 965 | 1079 | sieveService.updateOneChanQianDiaSieve(sieve); |
| 966 | 1080 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/SieveApplyOrderAddRequest.java
View file @
31ea4df
| ... | ... | @@ -89,7 +89,7 @@ |
| 89 | 89 | sieveApplyOrderModel.setParentId(parentId); |
| 90 | 90 | sieveApplyOrderModel.setApplyDoctor(applyDoctor); |
| 91 | 91 | sieveApplyOrderModel.setCheckItem(JsonUtil.array2JsonString(check)); |
| 92 | - sieveApplyOrderModel.setCheckDate(checkDate); | |
| 92 | + sieveApplyOrderModel.setCheckDate(checkDate == null ? sendTime : checkDate); | |
| 93 | 93 | sieveApplyOrderModel.setGuide(guide); |
| 94 | 94 | sieveApplyOrderModel.setApplyTime(DateUtil.parseYMD(applyTime)); |
| 95 | 95 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientBaseResult.java
View file @
31ea4df
| ... | ... | @@ -53,6 +53,16 @@ |
| 53 | 53 | |
| 54 | 54 | private String birth; |
| 55 | 55 | |
| 56 | + private String sex; | |
| 57 | + | |
| 58 | + public String getSex() { | |
| 59 | + return sex; | |
| 60 | + } | |
| 61 | + | |
| 62 | + public void setSex(String sex) { | |
| 63 | + this.sex = sex; | |
| 64 | + } | |
| 65 | + | |
| 56 | 66 | public String getBirth() { |
| 57 | 67 | return birth; |
| 58 | 68 | } |
| ... | ... | @@ -215,6 +225,7 @@ |
| 215 | 225 | setLastMenses(DateUtil.getyyyy_MM_dd(patients.getLastMenses())); |
| 216 | 226 | } |
| 217 | 227 | |
| 228 | + setSex("女"); | |
| 218 | 229 | |
| 219 | 230 | return this; |
| 220 | 231 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/SieveWorker.java
View file @
31ea4df
| ... | ... | @@ -114,15 +114,14 @@ |
| 114 | 114 | { |
| 115 | 115 | referralStatus = 2; |
| 116 | 116 | } |
| 117 | - | |
| 118 | - Organization organization = organizationService.getOrganization(Integer.parseInt(model.getHospitalId())); | |
| 119 | - sieveListResult.setApplyHospital(organization.getName()); | |
| 120 | 117 | } |
| 121 | - | |
| 122 | 118 | sieveListResult.setReferralStatus(referralStatus); |
| 123 | 119 | |
| 124 | - | |
| 125 | - | |
| 120 | + if (StringUtils.isNotEmpty(sieveModel.getApplyHospitalId())) | |
| 121 | + { | |
| 122 | + Organization organization = organizationService.getOrganization(Integer.parseInt(sieveModel.getApplyHospitalId())); | |
| 123 | + sieveListResult.setApplyHospital(organization.getName()); | |
| 124 | + } | |
| 126 | 125 | |
| 127 | 126 | results.add(sieveListResult); |
| 128 | 127 | } |