Commit e4f394c4a271b9cd44bb7b9d1a8b71ca73aa4ef6
1 parent
0d7f03c154
Exists in
master
and in
6 other branches
秦皇岛11月需求-孕产统计报表-(2)在产前筛查下添加乳房管理判断条件判断到27周时跳转乳房管理已到医院检查为白色未到医院检查为黄色
Showing 5 changed files with 119 additions and 0 deletions
- platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java
- platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BreastController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BreastFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/QuanPatientsResult.java
platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java
View file @
e4f394c
| ... | ... | @@ -415,6 +415,17 @@ |
| 415 | 415 | */ |
| 416 | 416 | private Integer cesareanTimeType; |
| 417 | 417 | |
| 418 | + //秦皇岛乳房检查状态0:未做,1:已做。 是否检查 | |
| 419 | + private String breastType; | |
| 420 | + | |
| 421 | + public String getBreastType() { | |
| 422 | + return breastType; | |
| 423 | + } | |
| 424 | + | |
| 425 | + public void setBreastType(String breastType) { | |
| 426 | + this.breastType = breastType; | |
| 427 | + } | |
| 428 | + | |
| 418 | 429 | public Integer getCesareanTimeType() { |
| 419 | 430 | return cesareanTimeType; |
| 420 | 431 | } |
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
e4f394c
| ... | ... | @@ -397,6 +397,17 @@ |
| 397 | 397 | */ |
| 398 | 398 | private String prodDoctor; |
| 399 | 399 | |
| 400 | + //秦皇岛乳房检查状态0:未做,1:已做。 是否检查 | |
| 401 | + private String breastType; | |
| 402 | + | |
| 403 | + public String getBreastType() { | |
| 404 | + return breastType; | |
| 405 | + } | |
| 406 | + | |
| 407 | + public void setBreastType(String breastType) { | |
| 408 | + this.breastType = breastType; | |
| 409 | + } | |
| 410 | + | |
| 400 | 411 | public String getProdDoctor() { |
| 401 | 412 | return prodDoctor; |
| 402 | 413 | } |
| ... | ... | @@ -813,6 +824,10 @@ |
| 813 | 824 | }else { |
| 814 | 825 | condition=condition.and("firstCheckId",null,MongoOper.IS); |
| 815 | 826 | } |
| 827 | + } | |
| 828 | + //筛选乳房列表是否做过检查0,1 | |
| 829 | + if(StringUtils.isNotEmpty(breastType)){ | |
| 830 | + condition = condition.and("breastType", breastType, MongoOper.IS); | |
| 816 | 831 | } |
| 817 | 832 | |
| 818 | 833 | Criteria c1 = null; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BreastController.java
View file @
e4f394c
| ... | ... | @@ -10,8 +10,10 @@ |
| 10 | 10 | import com.lyms.platform.operate.web.facade.BreastFacade; |
| 11 | 11 | import com.lyms.platform.operate.web.request.AntenatalExaminationQueryRequest; |
| 12 | 12 | import com.lyms.platform.operate.web.request.BreastRequest; |
| 13 | +import com.lyms.platform.pojo.Patients; | |
| 13 | 14 | import com.lyms.platform.query.BreastModelQuery; |
| 14 | 15 | import com.lyms.platform.query.FamilyPlanningModelQuery; |
| 16 | +import com.lyms.platform.query.PatientsQuery; | |
| 15 | 17 | import org.springframework.beans.factory.annotation.Autowired; |
| 16 | 18 | import org.springframework.stereotype.Controller; |
| 17 | 19 | import org.springframework.web.bind.annotation.*; |
| ... | ... | @@ -165,6 +167,32 @@ |
| 165 | 167 | @TokenRequired |
| 166 | 168 | public BaseResponse queryAllNew(BreastModelQuery breastModelQuery, HttpServletRequest request) { |
| 167 | 169 | return breastFacade.queryAllNew(breastModelQuery,getUserId(request)); |
| 170 | + } | |
| 171 | + | |
| 172 | + /** | |
| 173 | + * 秦皇岛乳房管理列表 | |
| 174 | + * @param patientsQuery | |
| 175 | + * @param request | |
| 176 | + * @return | |
| 177 | + */ | |
| 178 | + @RequestMapping(value = "/queryBreastManage", method = RequestMethod.GET) | |
| 179 | + @ResponseBody | |
| 180 | + @TokenRequired | |
| 181 | + public BaseResponse queryBreastManage(PatientsQuery patientsQuery, HttpServletRequest request) { | |
| 182 | + return breastFacade.queryBreastManage(patientsQuery,getUserId(request)); | |
| 183 | + } | |
| 184 | + /** | |
| 185 | + * 秦皇岛乳房管理列表-修改检查状态 | |
| 186 | + * @param patients | |
| 187 | + * @param request | |
| 188 | + * @return | |
| 189 | + */ | |
| 190 | + @RequestMapping(value = "/updateBreastType", method = RequestMethod.POST) | |
| 191 | + @ResponseBody | |
| 192 | + @TokenRequired | |
| 193 | + public BaseResponse updateBreastType(Patients patients, HttpServletRequest request) { | |
| 194 | + BaseResponse baseResponse = breastFacade.updateBreastType(patients); | |
| 195 | + return baseResponse; | |
| 168 | 196 | } |
| 169 | 197 | |
| 170 | 198 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BreastFacade.java
View file @
e4f394c
| ... | ... | @@ -14,6 +14,7 @@ |
| 14 | 14 | import com.lyms.platform.operate.web.result.BabyHighRiskBabyResult; |
| 15 | 15 | import com.lyms.platform.operate.web.result.BreastResult; |
| 16 | 16 | import com.lyms.platform.operate.web.result.FamilyPlanningResult; |
| 17 | +import com.lyms.platform.operate.web.result.QuanPatientsResult; | |
| 17 | 18 | import com.lyms.platform.operate.web.service.impl.BaseServiceImpl; |
| 18 | 19 | import com.lyms.platform.operate.web.utils.CollectionUtils; |
| 19 | 20 | import com.lyms.platform.operate.web.utils.CommonsHelper; |
| ... | ... | @@ -27,6 +28,7 @@ |
| 27 | 28 | import org.springframework.stereotype.Component; |
| 28 | 29 | |
| 29 | 30 | import java.util.*; |
| 31 | +import java.util.regex.Pattern; | |
| 30 | 32 | |
| 31 | 33 | /** |
| 32 | 34 | * 乳腺检查 逻辑处理 |
| 33 | 35 | |
| 34 | 36 | |
| ... | ... | @@ -485,7 +487,55 @@ |
| 485 | 487 | } |
| 486 | 488 | |
| 487 | 489 | |
| 490 | + public BaseResponse queryBreastManage(PatientsQuery patientsQuery, Integer userId) { | |
| 491 | + BaseObjectResponse br = new BaseObjectResponse(); | |
| 492 | + String hospitalId = autoMatchFacade.getHospitalId(userId); | |
| 488 | 493 | |
| 494 | + List <Patients> patientsList = new ArrayList <>(); | |
| 495 | + patientsQuery.setNeed("true"); | |
| 496 | + patientsQuery.setYn(YnEnums.YES.getId()); | |
| 497 | + patientsQuery.setHospitalId(hospitalId); | |
| 498 | + patientsQuery.setType(1);//只查孕妇 | |
| 499 | + Calendar curr = Calendar.getInstance();//创建Calendar 的实例 | |
| 500 | + curr.add(Calendar.DAY_OF_MONTH,-7*27);//当前时间减去27周 | |
| 501 | + patientsQuery.setLastMensesEnd(curr.getTime());//通过末次月经推算。当前时间减去27周,小于等于推算的时间。 | |
| 502 | + patientsList = patientsService.queryPatient1(patientsQuery,"created"); | |
| 489 | 503 | |
| 504 | + List <Map<String,Object>> listMapResult =new ArrayList<>(); | |
| 505 | + for (Patients patients : patientsList) { | |
| 506 | + QuanPatientsResult quanPatientsResult=new QuanPatientsResult(); | |
| 507 | + quanPatientsResult.convertToResult(patients); | |
| 508 | + Map<String,Object> map=new HashMap<>(); | |
| 509 | + map.put("id",quanPatientsResult.getId()); | |
| 510 | + map.put("cardNo",quanPatientsResult.getCardNo()); | |
| 511 | + map.put("name",quanPatientsResult.getName()); | |
| 512 | + map.put("age",quanPatientsResult.getAge()); | |
| 513 | + map.put("phone",patients.getPhone());//没有电话保密,需要保密quanPatientsResult.getPhone() | |
| 514 | + map.put("dueWeek",quanPatientsResult.getDueWeek());//convertToResult(patients)算出的孕周 | |
| 515 | + map.put("breastType",quanPatientsResult.getBreastType()); | |
| 516 | + listMapResult.add(map); | |
| 517 | + } | |
| 518 | + | |
| 519 | + br.setData(listMapResult); | |
| 520 | + br.setPageInfo(patientsQuery.getPageInfo()); | |
| 521 | + br.setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 522 | + br.setErrormsg("成功"); | |
| 523 | + return br; | |
| 524 | + } | |
| 525 | + | |
| 526 | + public BaseResponse updateBreastType(Patients patients) { | |
| 527 | + BaseResponse br=new BaseResponse(); | |
| 528 | + if (StringUtils.isEmpty(patients.getId())) { | |
| 529 | + return br.setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("ID不能为空"); | |
| 530 | + } | |
| 531 | + try { | |
| 532 | + patientsService.updatePatient(patients); | |
| 533 | + } catch (Exception e) { | |
| 534 | + e.printStackTrace(); | |
| 535 | + br.setErrormsg(e.getMessage()); | |
| 536 | + } | |
| 537 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
| 538 | + | |
| 539 | + } | |
| 490 | 540 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/QuanPatientsResult.java
View file @
e4f394c
| ... | ... | @@ -98,6 +98,17 @@ |
| 98 | 98 | return cardNo; |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | + //秦皇岛乳房检查状态0:未做,1:已做。 是否检查 | |
| 102 | + private String breastType; | |
| 103 | + | |
| 104 | + public String getBreastType() { | |
| 105 | + return breastType; | |
| 106 | + } | |
| 107 | + | |
| 108 | + public void setBreastType(String breastType) { | |
| 109 | + this.breastType = breastType; | |
| 110 | + } | |
| 111 | + | |
| 101 | 112 | public void setCardNo(String cardNo) { |
| 102 | 113 | this.cardNo = cardNo; |
| 103 | 114 | } |
| ... | ... | @@ -422,6 +433,7 @@ |
| 422 | 433 | @Override |
| 423 | 434 | public QuanPatientsResult convertToResult(Patients destModel) { |
| 424 | 435 | setId(destModel.getId()); |
| 436 | + setCardNo(destModel.getCardNo()); | |
| 425 | 437 | setName(destModel.getUsername()); |
| 426 | 438 | setAge(destModel.getAge()); |
| 427 | 439 | String dueWeek = ""; |
| ... | ... | @@ -467,6 +479,9 @@ |
| 467 | 479 | } |
| 468 | 480 | if (null != destModel.getServiceStatus()) { |
| 469 | 481 | setServiceStatus(ServiceStatusEnums.getNameById(destModel.getServiceStatus())); |
| 482 | + } | |
| 483 | + if(StringUtils.isNotEmpty(destModel.getBreastType())){ | |
| 484 | + setBreastType(destModel.getBreastType()); | |
| 470 | 485 | } |
| 471 | 486 | return this; |
| 472 | 487 | } |