Commit 9ba41b2e9808b917cb59de7490e4961fe71d83a1

Authored by [wangbo]
1 parent 84c02be928

修改分娩住院预约时间

Showing 5 changed files with 104 additions and 6 deletions

platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java View file @ 9ba41b2
... ... @@ -1337,6 +1337,8 @@
1337 1337 downRecord.setTrackType(TrackDownDateEnums.C.getId());
1338 1338 //特殊处理 产筛预约追访时间
1339 1339 downRecord.setSieveAppointmentDate(new Date());
  1340 + //特殊处理 分娩住院预约追访时间
  1341 + downRecord.setFmzyAppointmentDate(new Date());
1340 1342 return downRecord;
1341 1343 }
1342 1344  
platform-dal/src/main/java/com/lyms/platform/pojo/TrackDownRecord.java View file @ 9ba41b2
... ... @@ -60,18 +60,41 @@
60 60 //预约追访日期
61 61 private Date appointmentDate;
62 62  
  63 + //追访日期
  64 + private Date trackDownDate;
  65 + //是否终止流程
  66 + private String stop;
  67 +
  68 + /*********孕妇追访 产筛、 分娩住院字段特殊处理***********/
63 69 //特殊 产筛预约追访时间
64 70 private Date sieveAppointmentDate;
65 71  
66 72 //特殊 产筛追访日期
67 73 private Date sieveTrackDownDate;
68 74  
69   - //追访日期
70   - private Date trackDownDate;
71 75  
  76 + //特殊 分娩住院预约追访时间
  77 + private Date fmzyAppointmentDate;
72 78  
73   - //是否终止流程
74   - private String stop;
  79 + //特殊 产筛追访日期
  80 + private Date fmzyTrackDownDate;
  81 +
  82 +
  83 + public Date getFmzyAppointmentDate() {
  84 + return fmzyAppointmentDate;
  85 + }
  86 +
  87 + public void setFmzyAppointmentDate(Date fmzyAppointmentDate) {
  88 + this.fmzyAppointmentDate = fmzyAppointmentDate;
  89 + }
  90 +
  91 + public Date getFmzyTrackDownDate() {
  92 + return fmzyTrackDownDate;
  93 + }
  94 +
  95 + public void setFmzyTrackDownDate(Date fmzyTrackDownDate) {
  96 + this.fmzyTrackDownDate = fmzyTrackDownDate;
  97 + }
75 98  
76 99 public Date getSieveAppointmentDate() {
77 100 return sieveAppointmentDate;
platform-dal/src/main/java/com/lyms/platform/query/TrackDownRecordQuery.java View file @ 9ba41b2
... ... @@ -415,7 +415,22 @@
415 415  
416 416 }
417 417  
  418 + /*****分娩住院特殊处理*********/
  419 + if (queryTrackType != null && queryTrackType == 5) {
  420 + if (null != followupStatus) {
  421 + if (followupStatus == 0) {
  422 + Date newDate = DateUtil.parseYMDHMS(DateUtil.getyyyy_MM_dd(new Date()) + " 00:00:00");
  423 + condition = condition.and("fmzyAppointmentDate", newDate, MongoOper.GTE);
  424 + } else if (followupStatus == 1) {
  425 + Date newDate = DateUtil.parseYMDHMS(DateUtil.getyyyy_MM_dd(new Date()) + " 00:00:00");
  426 + condition = condition.and("fmzyAppointmentDate", newDate, MongoOper.LT);
  427 + } else if (followupStatus == 2) {
  428 + condition = condition.and("stop", "1", MongoOper.IS);
  429 + }
  430 + }
418 431  
  432 + }
  433 +
419 434 Criteria c1 = null;
420 435  
421 436 if (StringUtils.isNotEmpty(key)) {
... ... @@ -555,6 +570,52 @@
555 570 }
556 571 }
557 572  
  573 + /**********分娩住院特殊处理**************/
  574 + if (null != queryTrackType && queryTrackType == 5) {
  575 + if (null != trackDownDateStart) {
  576 + if (null != c1) {
  577 + c1 = c1.and("fmzyTrackDownDate").gte(trackDownDateStart);
  578 + } else {
  579 + c1 = Criteria.where("fmzyTrackDownDate").gte(trackDownDateStart);
  580 + }
  581 + }
  582 + if (null != trackDownDateEnd) {
  583 + if (c1 != null) {
  584 + c1 = c1.lte(trackDownDateEnd);
  585 + } else {
  586 + c1 = Criteria.where("fmzyTrackDownDate").lte(trackDownDateEnd);
  587 + }
  588 + }
  589 +
  590 + if (null != startBeOverdueDays) {
  591 + if (null != c1) {
  592 + c1 = c1.and("fmzyAppointmentDate").gte(startBeOverdueDays);
  593 + } else {
  594 + c1 = Criteria.where("fmzyAppointmentDate").gte(startBeOverdueDays);
  595 + }
  596 + }
  597 + if (null != endBeOverdueDays) {
  598 + if (c1 != null) {
  599 + c1 = c1.lte(endBeOverdueDays);
  600 + } else {
  601 + c1 = Criteria.where("fmzyAppointmentDate").lte(endBeOverdueDays);
  602 + }
  603 + }
  604 + if (null != appointmentDateStart) {
  605 + if (null != c1) {
  606 + c1 = c1.and("fmzyAppointmentDate").gte(appointmentDateStart);
  607 + } else {
  608 + c1 = Criteria.where("fmzyAppointmentDate").gte(appointmentDateStart);
  609 + }
  610 + }
  611 + if (null != appointmentDateEnd) {
  612 + if (c1 != null) {
  613 + c1 = c1.lte(appointmentDateEnd);
  614 + } else {
  615 + c1 = Criteria.where("fmzyAppointmentDate").lte(appointmentDateEnd);
  616 + }
  617 + }
  618 + }
558 619 if (null != c1) {
559 620 condition = condition.andCondition(new MongoCondition(c1));
560 621 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/TrackDownFacade.java View file @ 9ba41b2
... ... @@ -955,6 +955,9 @@
955 955 if (downRecord.getTrackType() != null && downRecord.getTrackType() == 4) {
956 956 temp.put("yyzfTime", trackDown == null ? "--" : DateUtil.getyyyy_MM_dd(downRecord.getSieveAppointmentDate())); // 产筛预约时间
957 957 temp.put("trackDownTime", trackDown == null ? "--" : DateUtil.getyyyy_MM_dd(downRecord.getSieveTrackDownDate())); // 产筛追访时间
  958 + } else if (downRecord.getTrackType() != null && downRecord.getTrackType() == 5) {
  959 + temp.put("yyzfTime", trackDown == null ? "--" : DateUtil.getyyyy_MM_dd(downRecord.getFmzyAppointmentDate())); // 分娩住院预约时间
  960 + temp.put("trackDownTime", trackDown == null ? "--" : DateUtil.getyyyy_MM_dd(downRecord.getFmzyTrackDownDate())); // 分娩住院追访时间
958 961 } else {
959 962 temp.put("yyzfTime", trackDown == null ? "--" : DateUtil.getyyyy_MM_dd(downRecord.getAppointmentDate())); // 预约时间
960 963 temp.put("trackDownTime", trackDown == null ? "--" : DateUtil.getyyyy_MM_dd(trackDown.getTrackDownDate())); // 追访时间
961 964  
962 965  
... ... @@ -965,12 +968,12 @@
965 968 temp.put("trackDownTime", "--"); // 追访时间
966 969 if (downRecord.getTrackType() != null && downRecord.getTrackType() == 4) {
967 970 temp.put("yyzfTime", downRecord == null ? "--" : DateUtil.getyyyy_MM_dd(downRecord.getSieveAppointmentDate())); // 产筛预约时间
  971 + } else if (downRecord.getTrackType() != null && downRecord.getTrackType() == 5) {
  972 + temp.put("yyzfTime", downRecord == null ? "--" : DateUtil.getyyyy_MM_dd(downRecord.getSieveAppointmentDate())); // 分娩住院预约时间
968 973 } else {
969 974 temp.put("yyzfTime", downRecord == null ? "--" : DateUtil.getyyyy_MM_dd(downRecord.getAppointmentDate())); // 预约预约时间
970 975 }
971   -
972 976 }
973   -
974 977 //如果是产前检查取预约结果
975 978 //复诊
976 979 AntenatalExaminationModel examinationModel = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(downRecord.getParentId())).with(new Sort(Sort.Direction.DESC, "created")), AntenatalExaminationModel.class);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/TrackDownServiceImpl.java View file @ 9ba41b2
... ... @@ -903,6 +903,15 @@
903 903 trackDownRecord1.setSieveTrackDownDate(trackDown.getTrackDownDate());
904 904 }
905 905 }
  906 + //冗余分娩住院 预约追访时间
  907 + if (trackDown.getTrackDownDateType() == 5) {
  908 + if (trackDown.getReservatDate() != null) {
  909 + trackDownRecord1.setFmzyAppointmentDate(trackDown.getReservatDate());
  910 + }
  911 + if (null != trackDown.getTrackDownDate()) {
  912 + trackDownRecord1.setFmzyTrackDownDate(trackDown.getTrackDownDate());
  913 + }
  914 + }
906 915 trackDownRecordService.updateTrackDown(trackDownRecord1, trackDownRecord.getId());
907 916 }
908 917 }