Commit 9209c23464015db2dce46536972171b5626e2bf6
1 parent
2fb488386d
Exists in
master
and in
2 other branches
分娩作废产检劵
Showing 4 changed files with 177 additions and 57 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/AntExRecordService.java
- platform-dal/src/main/java/com/lyms/platform/pojo/AntExRecordModel.java
- platform-dal/src/main/java/com/lyms/platform/query/AntExRecordQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/AntExRecordService.java
View file @
9209c23
| ... | ... | @@ -3,6 +3,7 @@ |
| 3 | 3 | import com.lyms.platform.biz.dal.IAntExRecordDao; |
| 4 | 4 | import com.lyms.platform.common.dao.operator.MongoQuery; |
| 5 | 5 | import com.lyms.platform.common.enums.YnEnums; |
| 6 | +import com.lyms.platform.common.utils.DateUtil; | |
| 6 | 7 | import com.lyms.platform.common.utils.JsonUtil; |
| 7 | 8 | import com.lyms.platform.pojo.AntExChuModel; |
| 8 | 9 | import com.lyms.platform.pojo.AntExRecordModel; |
| ... | ... | @@ -157,49 +158,6 @@ |
| 157 | 158 | |
| 158 | 159 | |
| 159 | 160 | syncSingle(parentId); |
| 160 | - /* //先删除掉该人的 | |
| 161 | - AntExRecordQuery antExRecordQuery1 = new AntExRecordQuery(); | |
| 162 | - antExRecordQuery1.setParentId(parentId); | |
| 163 | - antExRecordDao.findAndMove(antExRecordQuery1.convertToQuery()); | |
| 164 | - | |
| 165 | - AntExQuery antExQuery = new AntExQuery(); | |
| 166 | - antExQuery.setYn(YnEnums.YES.getId()); | |
| 167 | - antExQuery.setParentId(parentId); | |
| 168 | - //复诊 | |
| 169 | - List<AntenatalExaminationModel> list = antExService.queryAntenatalExamination(antExQuery.convertToQuery()); | |
| 170 | - for (AntenatalExaminationModel antEx : list) { | |
| 171 | - AntExRecordModel record = convert(antEx); | |
| 172 | - if (null != record) { | |
| 173 | - AntExRecordQuery antExRecordQuery = new AntExRecordQuery(); | |
| 174 | - antExRecordQuery.setParentId(record.getParentId()); | |
| 175 | - antExRecordQuery.setcId(record.getCheckDoctor()); | |
| 176 | - Integer count = count(antExRecordQuery); | |
| 177 | - if (null == count || 0 == count) { | |
| 178 | - antExRecordDao.addOneRecord(record); | |
| 179 | - } | |
| 180 | - } | |
| 181 | - } | |
| 182 | - | |
| 183 | - //初诊 | |
| 184 | - AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
| 185 | - antExChuQuery.setYn(YnEnums.YES.getId()); | |
| 186 | - antExChuQuery.setParentId(parentId); | |
| 187 | - List<AntExChuModel> antExChuModelList = antExService.queryAntExChu(antExChuQuery.convertToQuery()); | |
| 188 | - | |
| 189 | - if (CollectionUtils.isNotEmpty(antExChuModelList)) { | |
| 190 | - for (AntExChuModel antEx : antExChuModelList) { | |
| 191 | - AntExRecordModel record = convert(antEx); | |
| 192 | - if (null != record) { | |
| 193 | - AntExRecordQuery antExRecordQuery = new AntExRecordQuery(); | |
| 194 | - antExRecordQuery.setParentId(record.getParentId()); | |
| 195 | - antExRecordQuery.setcId(record.getCheckDoctor()); | |
| 196 | - Integer count = count(antExRecordQuery); | |
| 197 | - if (null == count || 0 == count) { | |
| 198 | - antExRecordDao.addOneRecord(record); | |
| 199 | - } | |
| 200 | - } | |
| 201 | - } | |
| 202 | - }*/ | |
| 203 | 161 | } |
| 204 | 162 | |
| 205 | 163 | |
| 206 | 164 | |
| ... | ... | @@ -238,12 +196,21 @@ |
| 238 | 196 | } else { |
| 239 | 197 | antExRecordModel.setStatus(1); |
| 240 | 198 | } |
| 199 | + antExRecordModel.setcDay(DateUtil.daysBetween(patients.getLastMenses(),antEx.getCheckDate())); | |
| 241 | 200 | antExRecordModel.setCardNo(patients.getCardNo()); |
| 242 | - antExRecordModel.setAddressRegister(patients.getAddressRegister()); | |
| 243 | - antExRecordModel.setProvinceRegisterId(patients.getProvinceRegisterId()); | |
| 244 | - antExRecordModel.setCityRegisterId(patients.getCityRegisterId()); | |
| 245 | - antExRecordModel.setAreaRegisterId(patients.getAreaRegisterId()); | |
| 246 | - antExRecordModel.setStreetRegisterId(patients.getStreetRegisterId()); | |
| 201 | + //户籍地和居住地2个是相反的 | |
| 202 | + antExRecordModel.setAddressRegister(patients.getAddress()); | |
| 203 | + antExRecordModel.setProvinceRegisterId(patients.getProvinceId()); | |
| 204 | + antExRecordModel.setCityRegisterId(patients.getCityId()); | |
| 205 | + antExRecordModel.setAreaRegisterId(patients.getAreaId()); | |
| 206 | + antExRecordModel.setStreetRegisterId(patients.getStreetId()); | |
| 207 | + //户籍地和居住地2个是相反的 | |
| 208 | + antExRecordModel.setStreetId(patients.getStreetRegisterId()); | |
| 209 | + antExRecordModel.setAddress(patients.getAddressRegister()); | |
| 210 | + antExRecordModel.setProvinceId(patients.getProvinceRegisterId()); | |
| 211 | + antExRecordModel.setCityId(patients.getCityRegisterId()); | |
| 212 | + antExRecordModel.setAreaId(patients.getAreaRegisterId()); | |
| 213 | + | |
| 247 | 214 | antExRecordModel.setBuildDoctor(patients.getBookbuildingDoctor()); |
| 248 | 215 | antExRecordModel.setDueDate(patients.getDueDate()); |
| 249 | 216 | antExRecordModel.setPhone(patients.getPhone()); |
| ... | ... | @@ -252,9 +219,6 @@ |
| 252 | 219 | antExRecordModel.setLastMenses(patients.getLastMenses()); |
| 253 | 220 | antExRecordModel.setDueDate(patients.getDueDate()); |
| 254 | 221 | antExRecordModel.setName(patients.getUsername()); |
| 255 | - /* antExRecordModel.sethScore(null==patients.getRiskScore()?0:patients.getRiskScore()); | |
| 256 | - antExRecordModel.sethRisk(patients.getRiskFactorId()); | |
| 257 | - antExRecordModel.sethLevel(JsonUtil.toList(patients.getRiskLevelId(), List.class));*/ | |
| 258 | 222 | } else { |
| 259 | 223 | logger.info("antex find patient by id is null. parentId:" + antEx.getParentId()); |
| 260 | 224 | return null; |
| ... | ... | @@ -274,6 +238,7 @@ |
| 274 | 238 | antExRecordModel.setBarCode(antExChuModel.getBarCode()); |
| 275 | 239 | antExRecordModel.setCheckTime(antExChuModel.getCheckTime()); |
| 276 | 240 | antExRecordModel.setNextCheckTime(antExChuModel.getNextCheckTime()); |
| 241 | + | |
| 277 | 242 | //高危信息 |
| 278 | 243 | List li = null; |
| 279 | 244 | try { |
| 280 | 245 | |
| ... | ... | @@ -295,12 +260,23 @@ |
| 295 | 260 | } else { |
| 296 | 261 | antExRecordModel.setStatus(1); |
| 297 | 262 | } |
| 263 | + antExRecordModel.setcDay(DateUtil.daysBetween(patients.getLastMenses(),antExChuModel.getCheckTime())); | |
| 264 | + | |
| 265 | + //户籍地和居住地2个是相反的 | |
| 266 | + antExRecordModel.setAddressRegister(patients.getAddress()); | |
| 267 | + antExRecordModel.setProvinceRegisterId(patients.getProvinceId()); | |
| 268 | + antExRecordModel.setCityRegisterId(patients.getCityId()); | |
| 269 | + antExRecordModel.setAreaRegisterId(patients.getAreaId()); | |
| 270 | + antExRecordModel.setStreetRegisterId(patients.getStreetId()); | |
| 271 | + //户籍地和居住地2个是相反的 | |
| 272 | + antExRecordModel.setStreetId(patients.getStreetRegisterId()); | |
| 273 | + antExRecordModel.setAddress(patients.getAddressRegister()); | |
| 274 | + antExRecordModel.setProvinceId(patients.getProvinceRegisterId()); | |
| 275 | + antExRecordModel.setCityId(patients.getCityRegisterId()); | |
| 276 | + antExRecordModel.setAreaId(patients.getAreaRegisterId()); | |
| 277 | + | |
| 298 | 278 | antExRecordModel.setCardNo(patients.getCardNo()); |
| 299 | - antExRecordModel.setAddressRegister(patients.getAddressRegister()); | |
| 300 | - antExRecordModel.setProvinceRegisterId(patients.getProvinceRegisterId()); | |
| 301 | - antExRecordModel.setCityRegisterId(patients.getCityRegisterId()); | |
| 302 | - antExRecordModel.setAreaRegisterId(patients.getAreaRegisterId()); | |
| 303 | - antExRecordModel.setStreetRegisterId(patients.getStreetRegisterId()); | |
| 279 | + | |
| 304 | 280 | antExRecordModel.setBuildDoctor(patients.getBookbuildingDoctor()); |
| 305 | 281 | antExRecordModel.setDueDate(patients.getDueDate()); |
| 306 | 282 | antExRecordModel.setPhone(patients.getPhone()); |
platform-dal/src/main/java/com/lyms/platform/pojo/AntExRecordModel.java
View file @
9209c23
| ... | ... | @@ -26,6 +26,8 @@ |
| 26 | 26 | private String barCode; |
| 27 | 27 | private String cardNo; |
| 28 | 28 | |
| 29 | + //产检后的天数 | |
| 30 | + private Integer cDay; | |
| 29 | 31 | |
| 30 | 32 | private String parentId; |
| 31 | 33 | |
| 32 | 34 | |
| ... | ... | @@ -65,12 +67,67 @@ |
| 65 | 67 | private Date created; |
| 66 | 68 | //下次产检时间 |
| 67 | 69 | private Date nextCheckTime; |
| 68 | - | |
| 70 | + //户籍地 | |
| 69 | 71 | private String addressRegister; |
| 70 | 72 | private String provinceRegisterId; |
| 71 | 73 | private String cityRegisterId; |
| 72 | 74 | private String areaRegisterId; |
| 73 | 75 | private String streetRegisterId; |
| 76 | + //居住地 | |
| 77 | + private String address; | |
| 78 | + private String provinceId; | |
| 79 | + private String cityId; | |
| 80 | + private String areaId; | |
| 81 | + private String streetId; | |
| 82 | + | |
| 83 | + | |
| 84 | + public String getAddress() { | |
| 85 | + return address; | |
| 86 | + } | |
| 87 | + | |
| 88 | + public void setAddress(String address) { | |
| 89 | + this.address = address; | |
| 90 | + } | |
| 91 | + | |
| 92 | + public String getProvinceId() { | |
| 93 | + return provinceId; | |
| 94 | + } | |
| 95 | + | |
| 96 | + public void setProvinceId(String provinceId) { | |
| 97 | + this.provinceId = provinceId; | |
| 98 | + } | |
| 99 | + | |
| 100 | + public String getCityId() { | |
| 101 | + return cityId; | |
| 102 | + } | |
| 103 | + | |
| 104 | + public void setCityId(String cityId) { | |
| 105 | + this.cityId = cityId; | |
| 106 | + } | |
| 107 | + | |
| 108 | + public String getAreaId() { | |
| 109 | + return areaId; | |
| 110 | + } | |
| 111 | + | |
| 112 | + public void setAreaId(String areaId) { | |
| 113 | + this.areaId = areaId; | |
| 114 | + } | |
| 115 | + | |
| 116 | + public String getStreetId() { | |
| 117 | + return streetId; | |
| 118 | + } | |
| 119 | + | |
| 120 | + public void setStreetId(String streetId) { | |
| 121 | + this.streetId = streetId; | |
| 122 | + } | |
| 123 | + | |
| 124 | + public Integer getcDay() { | |
| 125 | + return cDay; | |
| 126 | + } | |
| 127 | + | |
| 128 | + public void setcDay(Integer cDay) { | |
| 129 | + this.cDay = cDay; | |
| 130 | + } | |
| 74 | 131 | |
| 75 | 132 | public String getCardNo() { |
| 76 | 133 | return cardNo; |
platform-dal/src/main/java/com/lyms/platform/query/AntExRecordQuery.java
View file @
9209c23
| ... | ... | @@ -37,6 +37,64 @@ |
| 37 | 37 | private Date birthEnd; |
| 38 | 38 | private Date birthStart; |
| 39 | 39 | |
| 40 | + //户籍地 | |
| 41 | + private String provinceRegisterId; | |
| 42 | + private String cityRegisterId; | |
| 43 | + private String areaRegisterId; | |
| 44 | + | |
| 45 | + //居住地 | |
| 46 | + private String provinceId; | |
| 47 | + private String cityId; | |
| 48 | + private String areaId; | |
| 49 | + | |
| 50 | + public String getProvinceRegisterId() { | |
| 51 | + return provinceRegisterId; | |
| 52 | + } | |
| 53 | + | |
| 54 | + public void setProvinceRegisterId(String provinceRegisterId) { | |
| 55 | + this.provinceRegisterId = provinceRegisterId; | |
| 56 | + } | |
| 57 | + | |
| 58 | + public String getCityRegisterId() { | |
| 59 | + return cityRegisterId; | |
| 60 | + } | |
| 61 | + | |
| 62 | + public void setCityRegisterId(String cityRegisterId) { | |
| 63 | + this.cityRegisterId = cityRegisterId; | |
| 64 | + } | |
| 65 | + | |
| 66 | + public String getAreaRegisterId() { | |
| 67 | + return areaRegisterId; | |
| 68 | + } | |
| 69 | + | |
| 70 | + public void setAreaRegisterId(String areaRegisterId) { | |
| 71 | + this.areaRegisterId = areaRegisterId; | |
| 72 | + } | |
| 73 | + | |
| 74 | + public String getProvinceId() { | |
| 75 | + return provinceId; | |
| 76 | + } | |
| 77 | + | |
| 78 | + public void setProvinceId(String provinceId) { | |
| 79 | + this.provinceId = provinceId; | |
| 80 | + } | |
| 81 | + | |
| 82 | + public String getCityId() { | |
| 83 | + return cityId; | |
| 84 | + } | |
| 85 | + | |
| 86 | + public void setCityId(String cityId) { | |
| 87 | + this.cityId = cityId; | |
| 88 | + } | |
| 89 | + | |
| 90 | + public String getAreaId() { | |
| 91 | + return areaId; | |
| 92 | + } | |
| 93 | + | |
| 94 | + public void setAreaId(String areaId) { | |
| 95 | + this.areaId = areaId; | |
| 96 | + } | |
| 97 | + | |
| 40 | 98 | public Date getBirthEnd() { |
| 41 | 99 | return birthEnd; |
| 42 | 100 | } |
| ... | ... | @@ -293,6 +351,27 @@ |
| 293 | 351 | } |
| 294 | 352 | if (null != fId) { |
| 295 | 353 | condition = condition.and("fId", fId, MongoOper.IS); |
| 354 | + } | |
| 355 | + | |
| 356 | + //居住地 | |
| 357 | + if (StringUtils.isNotEmpty(areaId)) { | |
| 358 | + condition = condition.and("areaId", areaId, MongoOper.IS); | |
| 359 | + } | |
| 360 | + if(StringUtils.isNotEmpty(cityId)){ | |
| 361 | + condition = condition.and("cityId", cityId, MongoOper.IS); | |
| 362 | + } | |
| 363 | + if(StringUtils.isNotEmpty(provinceId)){ | |
| 364 | + condition = condition.and("provinceId", provinceId, MongoOper.IS); | |
| 365 | + } | |
| 366 | + //户籍地 | |
| 367 | + if(StringUtils.isNotEmpty(provinceRegisterId)){ | |
| 368 | + condition = condition.and("provinceRegisterId", provinceRegisterId, MongoOper.IS); | |
| 369 | + } | |
| 370 | + if(StringUtils.isNotEmpty(cityRegisterId)){ | |
| 371 | + condition = condition.and("cityRegisterId", cityRegisterId, MongoOper.IS); | |
| 372 | + } | |
| 373 | + if(StringUtils.isNotEmpty(areaRegisterId)){ | |
| 374 | + condition = condition.and("areaRegisterId", areaRegisterId, MongoOper.IS); | |
| 296 | 375 | } |
| 297 | 376 | |
| 298 | 377 | if (null != hospitalId) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
View file @
9209c23
| ... | ... | @@ -82,6 +82,14 @@ |
| 82 | 82 | antExRecordQuery.setLevelId(antExManagerQueryRequest.getLevel()); |
| 83 | 83 | antExRecordQuery.setBarCode(antExManagerQueryRequest.getBarCode()); |
| 84 | 84 | antExRecordQuery.setCardNo(antExManagerQueryRequest.getCardNo()); |
| 85 | + antExRecordQuery.setProvinceRegisterId(antExManagerQueryRequest.getProvinceRegisterId()); | |
| 86 | + antExRecordQuery.setCityRegisterId(antExManagerQueryRequest.getCityRegisterId()); | |
| 87 | + antExRecordQuery.setAreaRegisterId(antExManagerQueryRequest.getAreaRegisterId()); | |
| 88 | + antExRecordQuery.setProvinceId(antExManagerQueryRequest.getProvinceId()); | |
| 89 | + antExRecordQuery.setCityId(antExManagerQueryRequest.getCityId()); | |
| 90 | + antExRecordQuery.setAreaId(antExManagerQueryRequest.getAreaId()); | |
| 91 | + | |
| 92 | + | |
| 85 | 93 | //产检日期 |
| 86 | 94 | |
| 87 | 95 | Date currentDate = DateUtil.formatDate(new Date()); |