Commit f9ea3fb9f4d0d2be49f10b14e5f13c37bcf40d40
1 parent
c8d7ac0aaa
Exists in
master
and in
1 other branch
1
Showing 8 changed files with 118 additions and 62 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IReferralApplyOrderDao.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/ReferralApplyOrderDaoImpl.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java
- platform-dal/src/main/java/com/lyms/platform/pojo/ReferralApplyOrderModel.java
- platform-dal/src/main/java/com/lyms/platform/query/ReferralApplyOrderQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ApplyOrderOutResult.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IReferralApplyOrderDao.java
View file @
f9ea3fb
| ... | ... | @@ -31,5 +31,12 @@ |
| 31 | 31 | Integer count(MongoQuery mongoQuery); |
| 32 | 32 | |
| 33 | 33 | void findAndModify(MongoQuery referralApplyOrderQuery,ReferralApplyOrderModel applyOrderModel); |
| 34 | + | |
| 35 | + /** | |
| 36 | + * 修改转诊记录 | |
| 37 | + * | |
| 38 | + * @param referralApplyOrderModel | |
| 39 | + */ | |
| 40 | + void updateOne(ReferralApplyOrderModel referralApplyOrderModel); | |
| 34 | 41 | } |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/ReferralApplyOrderDaoImpl.java
View file @
f9ea3fb
| ... | ... | @@ -2,6 +2,8 @@ |
| 2 | 2 | |
| 3 | 3 | import com.lyms.platform.biz.dal.IReferralApplyOrderDao; |
| 4 | 4 | import com.lyms.platform.common.dao.BaseMongoDAOImpl; |
| 5 | +import com.lyms.platform.common.dao.operator.MongoCondition; | |
| 6 | +import com.lyms.platform.common.dao.operator.MongoOper; | |
| 5 | 7 | import com.lyms.platform.common.dao.operator.MongoQuery; |
| 6 | 8 | import com.lyms.platform.pojo.ReferralApplyOrderModel; |
| 7 | 9 | import org.springframework.stereotype.Repository; |
| ... | ... | @@ -34,6 +36,9 @@ |
| 34 | 36 | public void findAndModify(MongoQuery referralApplyOrderQuery, ReferralApplyOrderModel orderModel) { |
| 35 | 37 | orderModel.setModified(new Date()); |
| 36 | 38 | updateMulti(referralApplyOrderQuery.convertToMongoQuery(), orderModel); |
| 39 | + } | |
| 40 | + public void updateOne(ReferralApplyOrderModel referralApplyOrderModel){ | |
| 41 | + update(new MongoQuery(new MongoCondition("id", referralApplyOrderModel.getId(), MongoOper.IS)).convertToMongoQuery(), referralApplyOrderModel); | |
| 37 | 42 | } |
| 38 | 43 | } |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java
View file @
f9ea3fb
| 1 | 1 | package com.lyms.platform.biz.service; |
| 2 | 2 | |
| 3 | 3 | import com.lyms.platform.biz.dal.IPatientDao; |
| 4 | +import com.lyms.platform.biz.dal.IReferralApplyOrderDao; | |
| 4 | 5 | import com.lyms.platform.biz.dal.ISieveApplyOrderDao; |
| 5 | 6 | import com.lyms.platform.biz.dal.ISieveDao; |
| 6 | 7 | import com.lyms.platform.common.dao.operator.MongoQuery; |
| 7 | 8 | |
| ... | ... | @@ -9,12 +10,10 @@ |
| 9 | 10 | import com.lyms.platform.common.utils.DateUtil; |
| 10 | 11 | import com.lyms.platform.common.utils.LogUtil; |
| 11 | 12 | import com.lyms.platform.pojo.Patients; |
| 13 | +import com.lyms.platform.pojo.ReferralApplyOrderModel; | |
| 12 | 14 | import com.lyms.platform.pojo.SieveApplyOrderModel; |
| 13 | 15 | import com.lyms.platform.pojo.SieveModel; |
| 14 | -import com.lyms.platform.query.AntExQuery; | |
| 15 | -import com.lyms.platform.query.PatientsQuery; | |
| 16 | -import com.lyms.platform.query.SieveApplyOrderQuery; | |
| 17 | -import com.lyms.platform.query.SieveQuery; | |
| 16 | +import com.lyms.platform.query.*; | |
| 18 | 17 | import org.apache.commons.collections.CollectionUtils; |
| 19 | 18 | import org.apache.commons.lang.StringUtils; |
| 20 | 19 | import org.springframework.beans.factory.annotation.Autowired; |
| ... | ... | @@ -37,6 +36,8 @@ |
| 37 | 36 | private ISieveDao sieveDao; |
| 38 | 37 | @Autowired |
| 39 | 38 | private ISieveApplyOrderDao sieveApplyOrderDao; |
| 39 | + @Autowired | |
| 40 | + private IReferralApplyOrderDao iReferralApplyOrderDao; | |
| 40 | 41 | |
| 41 | 42 | public Patients addPatient(Patients obj) { |
| 42 | 43 | return iPatientDao.addPatient(obj); |
| ... | ... | @@ -208,6 +209,18 @@ |
| 208 | 209 | * @param patients |
| 209 | 210 | */ |
| 210 | 211 | public void validata(Patients patients) { |
| 212 | + //修改产筛 | |
| 213 | + updateSieve(patients); | |
| 214 | + //修改转诊 | |
| 215 | + updateRefer(patients); | |
| 216 | + } | |
| 217 | + | |
| 218 | + /** | |
| 219 | + * 修改产筛数据 | |
| 220 | + * | |
| 221 | + * @param patients | |
| 222 | + */ | |
| 223 | + public void updateSieve(Patients patients){ | |
| 211 | 224 | if (null != patients && null != patients.getLastMenses()) { |
| 212 | 225 | int days = DateUtil.daysBetween(patients.getLastMenses(), new Date()); |
| 213 | 226 | //判断是否在区间 |
| ... | ... | @@ -263,6 +276,29 @@ |
| 263 | 276 | sieveDao.updateChanQianSieve(sieveModel); |
| 264 | 277 | } |
| 265 | 278 | } |
| 279 | + } | |
| 280 | + } | |
| 281 | + } | |
| 282 | + | |
| 283 | + | |
| 284 | + /** | |
| 285 | + * 修改转诊数据 | |
| 286 | + * | |
| 287 | + * @param patients | |
| 288 | + */ | |
| 289 | + public void updateRefer(Patients patients){ | |
| 290 | + ReferralApplyOrderQuery referralApplyOrderQuery=new ReferralApplyOrderQuery(); | |
| 291 | + referralApplyOrderQuery.setParentId(patients.getId()); | |
| 292 | + referralApplyOrderQuery.setHospitalId(patients.getHospitalId()); | |
| 293 | + List<ReferralApplyOrderModel> referralApplyOrderModel = iReferralApplyOrderDao.queryList(referralApplyOrderQuery.convertToQuery()); | |
| 294 | + if(CollectionUtils.isNotEmpty(referralApplyOrderModel)){ | |
| 295 | + for(ReferralApplyOrderModel referralApplyOrderModel1:referralApplyOrderModel){ | |
| 296 | + referralApplyOrderModel1.setBirth(patients.getBirth()); | |
| 297 | + referralApplyOrderModel1.setLastMenses(patients.getLastMenses()); | |
| 298 | + referralApplyOrderModel1.setName(patients.getUsername()); | |
| 299 | + referralApplyOrderModel1.setCardNo(patients.getCardNo()); | |
| 300 | + referralApplyOrderModel1.setPhone(patients.getPhone()); | |
| 301 | + iReferralApplyOrderDao.updateOne(referralApplyOrderModel1); | |
| 266 | 302 | } |
| 267 | 303 | } |
| 268 | 304 | } |
platform-dal/src/main/java/com/lyms/platform/pojo/ReferralApplyOrderModel.java
View file @
f9ea3fb
| ... | ... | @@ -28,11 +28,13 @@ |
| 28 | 28 | private String phone; |
| 29 | 29 | //生日 |
| 30 | 30 | private Date birth; |
| 31 | - //申请孕周、申请月龄(多少天) | |
| 32 | - private Integer dueWeek; | |
| 31 | + //申请时间(多少天) | |
| 32 | + private Date dueWeek; | |
| 33 | 33 | //末次月经 |
| 34 | 34 | private Date lastMenses; |
| 35 | 35 | private String otherHighRisk; |
| 36 | + //孕妇状态 1 已分勉 2 未分娩 | |
| 37 | + private Integer pStatus; | |
| 36 | 38 | //身份证号 |
| 37 | 39 | private String cardNo; |
| 38 | 40 | //母亲身份证号 |
| ... | ... | @@ -80,6 +82,14 @@ |
| 80 | 82 | |
| 81 | 83 | private Integer serviceType; |
| 82 | 84 | |
| 85 | + public Integer getpStatus() { | |
| 86 | + return pStatus; | |
| 87 | + } | |
| 88 | + | |
| 89 | + public void setpStatus(Integer pStatus) { | |
| 90 | + this.pStatus = pStatus; | |
| 91 | + } | |
| 92 | + | |
| 83 | 93 | public String getOtherHighRisk() { |
| 84 | 94 | return otherHighRisk; |
| 85 | 95 | } |
| 86 | 96 | |
| ... | ... | @@ -144,11 +154,11 @@ |
| 144 | 154 | this.expVip = expVip; |
| 145 | 155 | } |
| 146 | 156 | |
| 147 | - public Integer getDueWeek() { | |
| 157 | + public Date getDueWeek() { | |
| 148 | 158 | return dueWeek; |
| 149 | 159 | } |
| 150 | 160 | |
| 151 | - public void setDueWeek(Integer dueWeek) { | |
| 161 | + public void setDueWeek(Date dueWeek) { | |
| 152 | 162 | this.dueWeek = dueWeek; |
| 153 | 163 | } |
| 154 | 164 |
platform-dal/src/main/java/com/lyms/platform/query/ReferralApplyOrderQuery.java
View file @
f9ea3fb
| ... | ... | @@ -41,9 +41,9 @@ |
| 41 | 41 | //年龄 |
| 42 | 42 | private String age; |
| 43 | 43 | //孕周 |
| 44 | - private Integer dueDateStart; | |
| 44 | + private Date dueDateStart; | |
| 45 | 45 | //孕周 |
| 46 | - private Integer dueDateEnd; | |
| 46 | + private Date dueDateEnd; | |
| 47 | 47 | //风险等级 |
| 48 | 48 | private String rLevel; |
| 49 | 49 | private Integer scoreStart; |
| 50 | 50 | |
| 51 | 51 | |
| 52 | 52 | |
| ... | ... | @@ -271,19 +271,19 @@ |
| 271 | 271 | this.id = id; |
| 272 | 272 | } |
| 273 | 273 | |
| 274 | - public Integer getDueDateEnd() { | |
| 274 | + public Date getDueDateEnd() { | |
| 275 | 275 | return dueDateEnd; |
| 276 | 276 | } |
| 277 | 277 | |
| 278 | - public void setDueDateEnd(Integer dueDateEnd) { | |
| 278 | + public void setDueDateEnd(Date dueDateEnd) { | |
| 279 | 279 | this.dueDateEnd = dueDateEnd; |
| 280 | 280 | } |
| 281 | 281 | |
| 282 | - public Integer getDueDateStart() { | |
| 282 | + public Date getDueDateStart() { | |
| 283 | 283 | return dueDateStart; |
| 284 | 284 | } |
| 285 | 285 | |
| 286 | - public void setDueDateStart(Integer dueDateStart) { | |
| 286 | + public void setDueDateStart(Date dueDateStart) { | |
| 287 | 287 | this.dueDateStart = dueDateStart; |
| 288 | 288 | } |
| 289 | 289 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
f9ea3fb
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java
View file @
f9ea3fb
| ... | ... | @@ -130,7 +130,11 @@ |
| 130 | 130 | referralApplyOrderModel.setrLevel(lsit); |
| 131 | 131 | // referralApplyOrderModel.setOtherHighRisk(highScoreResult.getOtherHigh()); |
| 132 | 132 | referralApplyOrderModel.setPid(patients.getPid()); |
| 133 | - referralApplyOrderModel.setDueWeek(days); | |
| 133 | + referralApplyOrderModel.setDueWeek(new Date()); | |
| 134 | + referralApplyOrderModel.setpStatus(2); | |
| 135 | + if(null!=patients.getFmDate()){ | |
| 136 | + referralApplyOrderModel.setpStatus(1); | |
| 137 | + } | |
| 134 | 138 | referralApplyOrderModel.setServiceType(patients.getServiceType()); |
| 135 | 139 | id = patients.getId(); |
| 136 | 140 | if (StringUtils.isNotEmpty(referralApplyOrderModel.getTransferredHospital()) && NumberUtils.isNumber(referralApplyOrderModel.getTransferredHospital())) { |
| 137 | 141 | |
| ... | ... | @@ -175,8 +179,9 @@ |
| 175 | 179 | id = babyModel.getId(); |
| 176 | 180 | if (null != babyModel.getBirth()) { |
| 177 | 181 | referralApplyOrderModel.setAge(DateUtil.getAge(babyModel.getBirth())); |
| 178 | - referralApplyOrderModel.setDueWeek(DateUtil.getDays(babyModel.getBirth(), new Date())); | |
| 182 | +// referralApplyOrderModel.setDueWeek(DateUtil.getDays(babyModel.getBirth(), new Date())); | |
| 179 | 183 | } |
| 184 | + referralApplyOrderModel.setDueWeek(new Date()); | |
| 180 | 185 | Patients patients = patientsService.findOnePatientById(babyModel.getParentId()); |
| 181 | 186 | referralApplyOrderModel.setParentId(babyModel.getId()); |
| 182 | 187 | referralApplyOrderModel.setMname(patients.getUsername()); |
| 183 | 188 | |
| ... | ... | @@ -463,9 +468,8 @@ |
| 463 | 468 | referralApplyOrderQuery.setBirthEnd(new Date(DateUtil.parseYMD(str[1]).getTime() + 86398000)); |
| 464 | 469 | } |
| 465 | 470 | } |
| 466 | - | |
| 471 | + Date currentDate = DateUtil.formatDate(new Date()); | |
| 467 | 472 | if (StringUtils.isNotEmpty(applyOrderQueryRequest.getYlStart())) { |
| 468 | - Date currentDate = DateUtil.formatDate(new Date()); | |
| 469 | 473 | /* Date start = DateUtil.addMonth(currentDate, -request.getMonthAgeStart()); |
| 470 | 474 | Date end = DateUtil.addMonth(currentDate, -request.getMonthAgeEnd()-1);*/ |
| 471 | 475 | Date date= DateUtil.addMonth(currentDate, -NumberUtils.toInt(applyOrderQueryRequest.getYlStart()) - 1); |
| ... | ... | @@ -473,7 +477,6 @@ |
| 473 | 477 | referralApplyOrderQuery.setBirthEnd(date); |
| 474 | 478 | } |
| 475 | 479 | if (StringUtils.isNotEmpty(applyOrderQueryRequest.getYlEnd())) { |
| 476 | - Date currentDate = DateUtil.formatDate(new Date()); | |
| 477 | 480 | referralApplyOrderQuery.setBirthStart(DateUtil.addMonth(currentDate, -NumberUtils.toInt(applyOrderQueryRequest.getYlEnd()))); |
| 478 | 481 | } |
| 479 | 482 | |
| 480 | 483 | |
| 481 | 484 | |
| ... | ... | @@ -549,13 +552,15 @@ |
| 549 | 552 | referralApplyOrderQuery.setBirthEnd(date); |
| 550 | 553 | } |
| 551 | 554 | //根据孕周 |
| 555 | + Date currentDate = DateUtil.formatDate(new Date()); | |
| 552 | 556 | if (null != applyOrderQueryRequest.getEndDueWeek() && NumberUtils.isNumber(applyOrderQueryRequest.getEndDueWeek())) { |
| 553 | - int i = NumberUtils.toInt(applyOrderQueryRequest.getEndDueWeek()) * 7 + 6; | |
| 554 | - referralApplyOrderQuery.setDueDateEnd(i); | |
| 557 | + Date end= DateUtil.addDay(DateUtil.addWeek(currentDate, NumberUtils.toInt(applyOrderQueryRequest.getEndDueWeek())), 6); | |
| 558 | + referralApplyOrderQuery.setDueDateEnd(end); | |
| 555 | 559 | } |
| 556 | 560 | if (null != applyOrderQueryRequest.getStartDueWeek()) { |
| 557 | - int i = NumberUtils.toInt(applyOrderQueryRequest.getStartDueWeek()) * 7; | |
| 558 | - referralApplyOrderQuery.setDueDateStart(i); | |
| 561 | + Date end= DateUtil.addWeek(currentDate, NumberUtils.toInt(applyOrderQueryRequest.getEndDueWeek())); | |
| 562 | +// int i = NumberUtils.toInt(applyOrderQueryRequest.getStartDueWeek()) * 7; | |
| 563 | + referralApplyOrderQuery.setDueDateStart(end); | |
| 559 | 564 | } |
| 560 | 565 | |
| 561 | 566 | if (null != applyOrderQueryRequest.getStartScore()) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ApplyOrderOutResult.java
View file @
f9ea3fb
| 1 | 1 | package com.lyms.platform.operate.web.result; |
| 2 | 2 | |
| 3 | -import com.lyms.platform.common.base.IBasicResultConvert; | |
| 4 | 3 | import com.lyms.platform.common.enums.ApplyOrderStatusEnums; |
| 5 | 4 | import com.lyms.platform.common.utils.DateUtil; |
| 6 | 5 | import com.lyms.platform.common.utils.StringUtils; |
| 7 | 6 | import com.lyms.platform.pojo.ReferralApplyOrderModel; |
| 8 | -import org.apache.commons.collections.CollectionUtils; | |
| 9 | 7 | |
| 10 | -import java.util.ArrayList; | |
| 11 | 8 | import java.util.Date; |
| 12 | 9 | import java.util.List; |
| 13 | 10 | import java.util.Map; |
| ... | ... | @@ -17,7 +14,7 @@ |
| 17 | 14 | * Created by Administrator on 2016/6/27 0027. |
| 18 | 15 | */ |
| 19 | 16 | public class ApplyOrderOutResult { |
| 20 | - public static final String SPIT="-"; | |
| 17 | + public static final String SPIT = "-"; | |
| 21 | 18 | private String id; |
| 22 | 19 | |
| 23 | 20 | private String pid; |
| ... | ... | @@ -37,7 +34,7 @@ |
| 37 | 34 | //风险因素 |
| 38 | 35 | private String rRisk; |
| 39 | 36 | |
| 40 | - private Integer score=0; | |
| 37 | + private Integer score = 0; | |
| 41 | 38 | //病情描述 |
| 42 | 39 | private String diseaseDesc; |
| 43 | 40 | //转院必要性 |
| ... | ... | @@ -48,7 +45,7 @@ |
| 48 | 45 | private String transferMode; |
| 49 | 46 | //申请医生 |
| 50 | 47 | private String applyDoctor; |
| 51 | - //接收日期 | |
| 48 | + //接收日期 | |
| 52 | 49 | private String received; |
| 53 | 50 | //接收医生 |
| 54 | 51 | private String recDoctor; |
| ... | ... | @@ -77,7 +74,7 @@ |
| 77 | 74 | } |
| 78 | 75 | |
| 79 | 76 | public String getcDueWeek() { |
| 80 | - if(null==cDueWeek){ | |
| 77 | + if (null == cDueWeek) { | |
| 81 | 78 | return SPIT; |
| 82 | 79 | } |
| 83 | 80 | return cDueWeek; |
| ... | ... | @@ -121,7 +118,7 @@ |
| 121 | 118 | |
| 122 | 119 | public String getCardNo() { |
| 123 | 120 | |
| 124 | - if(null==cardNo){ | |
| 121 | + if (null == cardNo) { | |
| 125 | 122 | return SPIT; |
| 126 | 123 | } |
| 127 | 124 | return cardNo; |
| ... | ... | @@ -129,7 +126,7 @@ |
| 129 | 126 | |
| 130 | 127 | public String getRecDoctor() { |
| 131 | 128 | |
| 132 | - if(null==recDoctor){ | |
| 129 | + if (null == recDoctor) { | |
| 133 | 130 | return SPIT; |
| 134 | 131 | } |
| 135 | 132 | return recDoctor; |
| ... | ... | @@ -144,7 +141,7 @@ |
| 144 | 141 | } |
| 145 | 142 | |
| 146 | 143 | public String getAge() { |
| 147 | - if(StringUtils.isEmpty(cardNo)){ | |
| 144 | + if (StringUtils.isEmpty(cardNo)) { | |
| 148 | 145 | return SPIT; |
| 149 | 146 | } |
| 150 | 147 | |
| ... | ... | @@ -157,7 +154,7 @@ |
| 157 | 154 | |
| 158 | 155 | public String getTransferredHospital() { |
| 159 | 156 | |
| 160 | - if(null==transferredHospital){ | |
| 157 | + if (null == transferredHospital) { | |
| 161 | 158 | return SPIT; |
| 162 | 159 | } |
| 163 | 160 | return transferredHospital; |
| ... | ... | @@ -168,7 +165,7 @@ |
| 168 | 165 | } |
| 169 | 166 | |
| 170 | 167 | public String getStatus() { |
| 171 | - if(null==status){ | |
| 168 | + if (null == status) { | |
| 172 | 169 | return SPIT; |
| 173 | 170 | } |
| 174 | 171 | return status; |
| ... | ... | @@ -179,7 +176,7 @@ |
| 179 | 176 | } |
| 180 | 177 | |
| 181 | 178 | public String getApplyDoctor() { |
| 182 | - if(null==applyDoctor){ | |
| 179 | + if (null == applyDoctor) { | |
| 183 | 180 | return SPIT; |
| 184 | 181 | } |
| 185 | 182 | return applyDoctor; |
| ... | ... | @@ -198,7 +195,7 @@ |
| 198 | 195 | } |
| 199 | 196 | |
| 200 | 197 | public String getDiseaseDesc() { |
| 201 | - if(null==diseaseDesc){ | |
| 198 | + if (null == diseaseDesc) { | |
| 202 | 199 | return SPIT; |
| 203 | 200 | } |
| 204 | 201 | return diseaseDesc; |
| ... | ... | @@ -209,7 +206,7 @@ |
| 209 | 206 | } |
| 210 | 207 | |
| 211 | 208 | public String getDueDate() { |
| 212 | - if(null==dueDate){ | |
| 209 | + if (null == dueDate) { | |
| 213 | 210 | return SPIT; |
| 214 | 211 | } |
| 215 | 212 | return dueDate; |
| ... | ... | @@ -220,7 +217,7 @@ |
| 220 | 217 | } |
| 221 | 218 | |
| 222 | 219 | public String getDueWeek() { |
| 223 | - if(null==dueWeek){ | |
| 220 | + if (null == dueWeek) { | |
| 224 | 221 | return SPIT; |
| 225 | 222 | } |
| 226 | 223 | return dueWeek; |
| ... | ... | @@ -248,7 +245,7 @@ |
| 248 | 245 | |
| 249 | 246 | public String getPotentialRisk() { |
| 250 | 247 | |
| 251 | - if(null==potentialRisk){ | |
| 248 | + if (null == potentialRisk) { | |
| 252 | 249 | return SPIT; |
| 253 | 250 | } |
| 254 | 251 | return potentialRisk; |
| ... | ... | @@ -259,7 +256,7 @@ |
| 259 | 256 | } |
| 260 | 257 | |
| 261 | 258 | public String getReceived() { |
| 262 | - if(null==received){ | |
| 259 | + if (null == received) { | |
| 263 | 260 | return SPIT; |
| 264 | 261 | } |
| 265 | 262 | return received; |
| ... | ... | @@ -278,7 +275,7 @@ |
| 278 | 275 | } |
| 279 | 276 | |
| 280 | 277 | public String getrRisk() { |
| 281 | - if(StringUtils.isEmpty(rRisk)){ | |
| 278 | + if (StringUtils.isEmpty(rRisk)) { | |
| 282 | 279 | return SPIT; |
| 283 | 280 | } |
| 284 | 281 | return rRisk; |
| ... | ... | @@ -289,7 +286,7 @@ |
| 289 | 286 | } |
| 290 | 287 | |
| 291 | 288 | public Integer getScore() { |
| 292 | - if(null==score){ | |
| 289 | + if (null == score) { | |
| 293 | 290 | return 0; |
| 294 | 291 | } |
| 295 | 292 | return score; |
| ... | ... | @@ -301,7 +298,7 @@ |
| 301 | 298 | |
| 302 | 299 | public String getTransferMode() { |
| 303 | 300 | |
| 304 | - if(null==transferMode){ | |
| 301 | + if (null == transferMode) { | |
| 305 | 302 | return SPIT; |
| 306 | 303 | } |
| 307 | 304 | return transferMode; |
| ... | ... | @@ -312,7 +309,7 @@ |
| 312 | 309 | } |
| 313 | 310 | |
| 314 | 311 | public String getTransferredDisease() { |
| 315 | - if(null==transferredDisease){ | |
| 312 | + if (null == transferredDisease) { | |
| 316 | 313 | return SPIT; |
| 317 | 314 | } |
| 318 | 315 | return transferredDisease; |
| 319 | 316 | |
| 320 | 317 | |
| 321 | 318 | |
| 322 | 319 | |
| ... | ... | @@ -322,33 +319,28 @@ |
| 322 | 319 | this.transferredDisease = transferredDisease; |
| 323 | 320 | } |
| 324 | 321 | |
| 325 | - public ApplyOrderOutResult convertToResult(ReferralApplyOrderModel destModel,String zhuanCName,String zhuanRname) { | |
| 322 | + public ApplyOrderOutResult convertToResult(ReferralApplyOrderModel destModel, String zhuanCName, String zhuanRname) { | |
| 326 | 323 | setZhuanCName(zhuanCName); |
| 327 | 324 | setZhuanRname(zhuanRname); |
| 328 | 325 | setId(destModel.getId()); |
| 329 | 326 | setName(destModel.getName()); |
| 330 | 327 | setScore(destModel.getScore()); |
| 331 | - if(null!=destModel.getDueWeek()){ | |
| 332 | - if(-1==destModel.getDueWeek()){ | |
| 328 | + if (null != destModel.getDueWeek()) { | |
| 329 | + if (1 == destModel.getpStatus()) { | |
| 333 | 330 | setDueWeek("已分娩"); |
| 334 | 331 | setIsGravida("0"); |
| 335 | - }else{ | |
| 336 | - setDueWeek(StringUtils.dueWeek(destModel.getDueWeek())); | |
| 332 | + } else { | |
| 333 | + setDueWeek(StringUtils.dueWeek(DateUtil.daysBetween(destModel.getLastMenses(), destModel.getDueWeek()))); | |
| 337 | 334 | setIsGravida("1"); |
| 338 | 335 | } |
| 339 | 336 | } |
| 340 | 337 | |
| 341 | 338 | setPid(destModel.getPid()); |
| 342 | - if(null!=destModel.getLastMenses()) { | |
| 343 | - if (-1 == destModel.getDueWeek()){ | |
| 344 | - setcDueWeek("已分娩"); | |
| 345 | - setIsGravida("0"); | |
| 346 | - }else{ | |
| 347 | - setcDueWeek(com.lyms.platform.common.utils.StringUtils.dueWeek(DateUtil.daysBetween(destModel.getLastMenses(), new Date()))); | |
| 348 | - setIsGravida("1"); | |
| 349 | - } | |
| 339 | + if (null != destModel.getLastMenses()) { | |
| 340 | + setcDueWeek(com.lyms.platform.common.utils.StringUtils.dueWeek(DateUtil.daysBetween(destModel.getLastMenses(), new Date()))); | |
| 341 | + setIsGravida("1"); | |
| 350 | 342 | } |
| 351 | - if(null!=destModel.getReceived()){ | |
| 343 | + if (null != destModel.getReceived()) { | |
| 352 | 344 | setReceived(DateUtil.getyyyy_MM_dd(destModel.getReceived())); |
| 353 | 345 | } |
| 354 | 346 | setDueDate(DateUtil.getyyyy_MM_dd(destModel.getDueDate())); |
| 355 | 347 | |
| ... | ... | @@ -359,10 +351,10 @@ |
| 359 | 351 | setPotentialRisk(destModel.getPotentialRisk()); |
| 360 | 352 | setStatus(ApplyOrderStatusEnums.getTitle(destModel.getStatus())); |
| 361 | 353 | setTransferredHospital(destModel.getTransferredHospital()); |
| 362 | - if(null!=destModel.getBirth()){ | |
| 354 | + if (null != destModel.getBirth()) { | |
| 363 | 355 | Integer age = DateUtil.getAge(destModel.getBirth()); |
| 364 | - if(null!=age){ | |
| 365 | - setAge(age+""); | |
| 356 | + if (null != age) { | |
| 357 | + setAge(age + ""); | |
| 366 | 358 | } |
| 367 | 359 | } |
| 368 | 360 | setCardNo(destModel.getCardNo()); |