Commit 4692d0e34e471208a22c84e811f06e3e0b7034ce
1 parent
e05a02130f
Exists in
master
and in
3 other branches
建档与优惠券分开功能:添加 高危等级和高危因素字段
Showing 4 changed files with 80 additions and 5 deletions
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/YunBookbuildingAddRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientManagerQueryModel.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
4692d0e
... | ... | @@ -346,7 +346,7 @@ |
346 | 346 | } |
347 | 347 | } |
348 | 348 | |
349 | - Patients patient = getPatientsData(yunRequest); | |
349 | + Patients patient = getPatientsData(yunRequest); | |
350 | 350 | patient.setYyzyfmHospitalId(yunRequest.getYyzyfmHospitalId()); |
351 | 351 | |
352 | 352 | patient.setNextCheckTime(DateUtil.parseYMD(yunRequest.getNextCheckTime())); |
353 | 353 | |
... | ... | @@ -382,13 +382,20 @@ |
382 | 382 | //生成条形码 |
383 | 383 | getNumberCode(patient); |
384 | 384 | getTrackHospital(patient); |
385 | + | |
386 | + String riskFactorId = yunRequest.getRiskFactorId(); | |
387 | + if(org.apache.commons.lang3.StringUtils.isNotEmpty(riskFactorId)){ | |
388 | + patient.setRiskFactorId(Arrays.asList(riskFactorId.split(","))); | |
389 | + } | |
390 | + patient.setRiskLevelId(yunRequest.getLevel()); | |
391 | + | |
385 | 392 | //孕妇档案 |
386 | 393 | Patients p = yunBookbuildingService.addPregnantBookbuilding(patient); |
387 | 394 | |
388 | 395 | //添加追访信息 |
389 | 396 | addTrackDownInfo(userId, p); |
390 | 397 | |
391 | - operateLogFacade.addAddOptLog(userId, Integer.valueOf(yunRequest.getHospitalId()), p, OptActionEnums.ADD.getId(), "孕妇建档"); | |
398 | + operateLogFacade.addAddOptLog(userId, Integer.valueOf(yunRequest.getHospitalId()), null, OptActionEnums.ADD.getId(), "孕妇建档"); | |
392 | 399 | /** 建档核验模块 **/ |
393 | 400 | //建档成功后保存核验结果 |
394 | 401 | if(StringUtils.isNotEmpty(p.getId()) && null != yunRequest.getVerifyInfo()){ |
... | ... | @@ -1820,7 +1827,7 @@ |
1820 | 1827 | patients1.getHareaRegisterId(), patients1.getHstreetRegisterId(), patients1.getHaddressRegister(), |
1821 | 1828 | basicConfigService); |
1822 | 1829 | map.put("husbandRegister",husbandRegister ); //丈夫户籍地址 |
1823 | - // 院内信息 | |
1830 | + // 院内信息 | |
1824 | 1831 | map.put("lastMenses", DateUtil.getyyyy_MM_dd(patients1.getLastMenses()));//末次月经 |
1825 | 1832 | map.put("mensStopStartDay",patients1.getMensStopStartDay());//月经停留开始天数 |
1826 | 1833 | map.put("mensStopEndDay",patients1.getMensStopEndDay());//月经停留结束天数 |
... | ... | @@ -1965,6 +1972,12 @@ |
1965 | 1972 | |
1966 | 1973 | patient.setHlevelTypeId(""); |
1967 | 1974 | patient.setHusbandBirth(null); |
1975 | + | |
1976 | + patient.setRiskLevelId(yunRequest.getLevel()); | |
1977 | + String riskFactorId = yunRequest.getRiskFactorId(); | |
1978 | + if(org.apache.commons.lang3.StringUtils.isNotEmpty(riskFactorId)){ | |
1979 | + patient.setRiskFactorId(Arrays.asList(riskFactorId.split(","))); | |
1980 | + } | |
1968 | 1981 | if (StringUtils.isNotEmpty(yunRequest.getId())) |
1969 | 1982 | { |
1970 | 1983 | patientsService.updatePatientHusbandBirth(yunRequest.getId(),null); |
... | ... | @@ -3539,8 +3552,8 @@ |
3539 | 3552 | AggregationOperation queryParam = Aggregation.match(query.getCriteria()); |
3540 | 3553 | AggregationOperation group = Aggregation.group("townOrgId","recommend"); |
3541 | 3554 | AggregationOperation month = project(). |
3542 | - andExpression("townOrgId").as("townOrgId"). | |
3543 | - andExpression("recommend").as("recommend"); | |
3555 | + andExpression("townOrgId").as("townOrgId"). | |
3556 | + andExpression("recommend").as("recommend"); | |
3544 | 3557 | Aggregation aggregation= Aggregation.newAggregation(queryParam,month, group); |
3545 | 3558 | |
3546 | 3559 | final AggregationResults<Patients> lyms_patient = mongoTemplate.aggregate(aggregation, "lyms_patient", Patients.class); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
4692d0e
... | ... | @@ -2745,6 +2745,16 @@ |
2745 | 2745 | PatientManagerQueryModel patientManagerQueryModel = new PatientManagerQueryModel(); |
2746 | 2746 | BeanUtils.copy(patients, patientManagerQueryModel); |
2747 | 2747 | |
2748 | + patientManagerQueryModel.setLevel(patients.getRiskLevelId()); | |
2749 | + String join = org.apache.commons.lang.StringUtils.join( patients.getRiskFactorId(), ","); | |
2750 | + patientManagerQueryModel.setRiskFactorId(join); | |
2751 | + try { | |
2752 | + String hname = organizationService.getOrganization(Integer.valueOf(patients.getHospitalId())).getName(); | |
2753 | + patientManagerQueryModel.setCouponCommunity(hname); | |
2754 | + } catch (Exception e) { | |
2755 | + patientManagerQueryModel.setCouponCommunity(""); | |
2756 | + } | |
2757 | + | |
2748 | 2758 | patientManagerQueryModel.setTypeStr(patients.getType() == 1 ? "未分娩" : "已分娩"); |
2749 | 2759 | patientManagerQueryModel.setYyzyfmHospitalName( |
2750 | 2760 | (patients.getYyzyfmHospitalId() != null && "-1".equals(patients.getYyzyfmHospitalId())) ? "其他" : couponMapper.getHospitalName(patients.getYyzyfmHospitalId())); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/YunBookbuildingAddRequest.java
View file @
4692d0e
... | ... | @@ -86,6 +86,27 @@ |
86 | 86 | //归属地id |
87 | 87 | private String addressId; |
88 | 88 | |
89 | + //高危因素 | |
90 | + private String riskFactorId; | |
91 | + private String level; | |
92 | + | |
93 | + | |
94 | + public String getRiskFactorId() { | |
95 | + return riskFactorId; | |
96 | + } | |
97 | + | |
98 | + public void setRiskFactorId(String riskFactorId) { | |
99 | + this.riskFactorId = riskFactorId; | |
100 | + } | |
101 | + | |
102 | + public String getLevel() { | |
103 | + return level; | |
104 | + } | |
105 | + | |
106 | + public void setLevel(String level) { | |
107 | + this.level = level; | |
108 | + } | |
109 | + | |
89 | 110 | public String getBooksuifangDoctor() { |
90 | 111 | return booksuifangDoctor; |
91 | 112 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientManagerQueryModel.java
View file @
4692d0e
... | ... | @@ -114,6 +114,37 @@ |
114 | 114 | //随访医生 |
115 | 115 | private String booksuifangDoctor; |
116 | 116 | |
117 | + //高危因素 | |
118 | + private String riskFactorId; | |
119 | + //高危等级 | |
120 | + private String level; | |
121 | + //领劵社区 | |
122 | + private String couponCommunity; | |
123 | + | |
124 | + public String getCouponCommunity() { | |
125 | + return couponCommunity; | |
126 | + } | |
127 | + | |
128 | + public void setCouponCommunity(String couponCommunity) { | |
129 | + this.couponCommunity = couponCommunity; | |
130 | + } | |
131 | + | |
132 | + public String getRiskFactorId() { | |
133 | + return riskFactorId; | |
134 | + } | |
135 | + | |
136 | + public void setRiskFactorId(String riskFactorId) { | |
137 | + this.riskFactorId = riskFactorId; | |
138 | + } | |
139 | + | |
140 | + public String getLevel() { | |
141 | + return level; | |
142 | + } | |
143 | + | |
144 | + public void setLevel(String level) { | |
145 | + this.level = level; | |
146 | + } | |
147 | + | |
117 | 148 | public String getBooksuifangDoctor() { |
118 | 149 | return booksuifangDoctor; |
119 | 150 | } |