Commit d593af85b7a8879219fc0c8b22ffefdf9ad486a3

Authored by jiangjiazhi
1 parent b799ea30bb

增加是否通知

Showing 3 changed files with 52 additions and 1 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java View file @ d593af8
... ... @@ -318,6 +318,32 @@
318 318 return patients;
319 319 }
320 320  
  321 + /**
  322 + * 查看是否满足产筛申请条件
  323 + *
  324 + * 1.孕周 15周-到20 周 并且没有做过产筛
  325 + * @param date
  326 + * @param parentId
  327 + * @return
  328 + */
  329 + public String cap(Date date,String parentId){
  330 + if(null==date){
  331 + return "0";
  332 + }
  333 + int day= DateUtil.getDays(date,new Date());
  334 + int start = 15*7;
  335 + int end = 20*7+6;
  336 + if(day>=start&&day<=end){
  337 + SieveApplyOrderQuery sieveApplyOrderQuery=new SieveApplyOrderQuery();
  338 + sieveApplyOrderQuery.setYn(YnEnums.YES.getId());
  339 + sieveApplyOrderQuery.setParentId(parentId);
  340 + List<SieveApplyOrderModel> list = applyOrderService.querySieveApplyOrderWithQuery(sieveApplyOrderQuery);
  341 + if(CollectionUtils.isNotEmpty(list)){
  342 + return "1";
  343 + }
  344 + }
  345 + return "0";
  346 + }
321 347  
322 348 /**
323 349 * 查询产前检查
... ... @@ -416,6 +442,12 @@
416 442 SieveApplyOrderQuery applyOrderQuery = new SieveApplyOrderQuery();
417 443 applyOrderQuery.setParentId(examinationModel.getParentId());
418 444 applyOrderQuery.setYn(YnEnums.YES.getId());
  445 + Patients patients = patientsService.findOnePatientById(examinationModel.getParentId());
  446 + Date data = null;
  447 + if(null!=data){
  448 + data=patients.getLastMenses();
  449 + }
  450 + antenatalExaminationResult.setIsSieve(cap(data, examinationModel.getParentId()));
419 451 antenatalExaminationResult.setHasSieve(CollectionUtils.isEmpty(applyOrderService.querySieveApplyOrderWithQuery(applyOrderQuery)) ? 0 : 1);
420 452 object = antenatalExaminationResult;
421 453 } else {
... ... @@ -452,6 +484,7 @@
452 484 applyOrderQuery.setParentId(antExChuModel.getParentId());
453 485 applyOrderQuery.setYn(YnEnums.YES.getId());
454 486 antexChuResult.setHasSieve(CollectionUtils.isEmpty(applyOrderService.querySieveApplyOrderWithQuery(applyOrderQuery)) ? 0 : 1);
  487 + antexChuResult.setIsSieve(cap(antExChuModel.getLastMenses(),antExChuModel.getParentId()));
455 488 object = antexChuResult;
456 489 }
457 490 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntenatalExaminationResult.java View file @ d593af8
... ... @@ -16,7 +16,7 @@
16 16 public class AntenatalExaminationResult implements IBasicResultConvert<AntenatalExaminationResult, AntenatalExaminationModel> {
17 17  
18 18 private String id;
19   -
  19 + private String isSieve;
20 20 private String parentId;
21 21 //当前孕周
22 22 private String currentDueDate;
... ... @@ -75,6 +75,14 @@
75 75 //是否有产筛
76 76 private int hasSieve;
77 77 private String cDueWeek;
  78 +
  79 + public String getIsSieve() {
  80 + return isSieve;
  81 + }
  82 +
  83 + public void setIsSieve(String isSieve) {
  84 + this.isSieve = isSieve;
  85 + }
78 86  
79 87 public String getcDueWeek() {
80 88 return cDueWeek;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntexChuResult.java View file @ d593af8
... ... @@ -16,6 +16,8 @@
16 16 public class AntexChuResult {
17 17  
18 18 private String parentId;
  19 +
  20 + private String isSieve;
19 21 /**
20 22 * 基本信息
21 23 **/
... ... @@ -207,6 +209,14 @@
207 209 private int hasRefer;
208 210 //是否有产筛
209 211 private int hasSieve;
  212 +
  213 + public String getIsSieve() {
  214 + return isSieve;
  215 + }
  216 +
  217 + public void setIsSieve(String isSieve) {
  218 + this.isSieve = isSieve;
  219 + }
210 220  
211 221 public Map getBp() {
212 222 return bp;