Commit 1773396c15e8352da7c568ca84239ab1208e897d
1 parent
8a71c96795
Exists in
dev
#fix:新增孕期、产后营养报告模版逻辑
Showing 12 changed files with 229 additions and 105 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PostpartumReportService.java
- platform-biz-service/src/main/resources/mainOrm/master/AppointmentMapper.xml
- platform-dal/src/main/java/com/lyms/platform/pojo/AppointmentModel.java
- platform-dal/src/main/java/com/lyms/platform/pojo/PostpartumReport.java
- platform-dal/src/main/java/com/lyms/platform/pojo/PregnancyReport.java
- platform-dal/src/main/java/com/lyms/platform/query/PostpartumReportQuery.java
- platform-operate-api/src/main/java/com/lyms/hospitalapi/dtdyrm/DtdyrmFmService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FmController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PostpartumReportController.java
- 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/MatDeliverFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PostpartumReportFacade.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PostpartumReportService.java
View file @
1773396
... | ... | @@ -14,6 +14,7 @@ |
14 | 14 | import org.apache.velocity.util.ArrayListWrapper; |
15 | 15 | import org.springframework.beans.factory.annotation.Autowired; |
16 | 16 | import org.springframework.stereotype.Service; |
17 | +import org.springframework.transaction.annotation.Transactional; | |
17 | 18 | |
18 | 19 | import java.util.ArrayList; |
19 | 20 | import java.util.HashMap; |
... | ... | @@ -39,6 +40,12 @@ |
39 | 40 | return postpartumReportDao.getPatient(id); |
40 | 41 | } |
41 | 42 | |
43 | + public List<PostpartumReport> queryPatientList(PostpartumReportQuery postpartumReportQuery){ | |
44 | + MongoQuery query = postpartumReportQuery.convertToQuery(); | |
45 | + List<PostpartumReport> results= postpartumReportDao.queryPatient(query); | |
46 | + return results; | |
47 | + } | |
48 | + | |
42 | 49 | public BaseResponse queryPatient(PostpartumReportQuery postpartumReportQuery){ |
43 | 50 | MongoQuery query = postpartumReportQuery.convertToQuery(); |
44 | 51 | if (StringUtils.isNotEmpty(postpartumReportQuery.getNeed())) { |
... | ... | @@ -54,6 +61,7 @@ |
54 | 61 | params.put("num",postpartumReport.getNum()); |
55 | 62 | params.put("riskFactorName",postpartumReport.getRiskFactorName()); |
56 | 63 | params.put("created",postpartumReport.getCreated()); |
64 | + params.put("deliveryModel",postpartumReport.getDeliveryModel()); | |
57 | 65 | mapList.add(params); |
58 | 66 | } |
59 | 67 | } |
platform-biz-service/src/main/resources/mainOrm/master/AppointmentMapper.xml
View file @
1773396
... | ... | @@ -13,6 +13,7 @@ |
13 | 13 | <result property="dept" column="dept" jdbcType="VARCHAR"/> |
14 | 14 | <result property="bhNum" column="bhNum" jdbcType="VARCHAR"/> |
15 | 15 | <result property="doctor" column="doctor" jdbcType="VARCHAR"/> |
16 | + <result property="pinyin" column="pinyin" jdbcType="VARCHAR"/> | |
16 | 17 | <result property="created" column="created" jdbcType="TIMESTAMP"/> |
17 | 18 | <result property="checkTime" column="checkTime" jdbcType="TIMESTAMP"/> |
18 | 19 | </resultMap> |
... | ... | @@ -27,7 +28,7 @@ |
27 | 28 | </if> |
28 | 29 | |
29 | 30 | <if test="name!=null"> |
30 | - and name like concat("%",#{name},"%") | |
31 | + and (name like concat("%",#{name},"%") or pinyin like concat("%",#{name},"%")) | |
31 | 32 | </if> |
32 | 33 | <if test="dept!=null"> |
33 | 34 | and dept=#{dept} |
platform-dal/src/main/java/com/lyms/platform/pojo/AppointmentModel.java
View file @
1773396
... | ... | @@ -24,7 +24,16 @@ |
24 | 24 | private Integer isBuild; |
25 | 25 | @Transient |
26 | 26 | private Date serEndTime; |
27 | + private String pinyin; | |
27 | 28 | private Date created; |
29 | + | |
30 | + public String getPinyin() { | |
31 | + return pinyin; | |
32 | + } | |
33 | + | |
34 | + public void setPinyin(String pinyin) { | |
35 | + this.pinyin = pinyin; | |
36 | + } | |
28 | 37 | |
29 | 38 | public Integer getId() { |
30 | 39 | return id; |
platform-dal/src/main/java/com/lyms/platform/pojo/PostpartumReport.java
View file @
1773396
... | ... | @@ -31,16 +31,55 @@ |
31 | 31 | private Integer num; |
32 | 32 | //高危风险id |
33 | 33 | private List<String> riskFactorId; |
34 | - //高危风险名称 | |
35 | - private List<String> riskFactorName; | |
36 | 34 | //风险等级颜色 |
37 | 35 | private String riskLevelId; |
36 | + //高危风险名称 逗号分隔 | |
37 | + private String riskFactorName; | |
38 | 38 | |
39 | 39 | private Integer yn; |
40 | + //分娩方式 1为顺产 2为剖腹产 | |
41 | + private Integer deliveryModel; | |
42 | + //知识tips | |
43 | + private String tips; | |
44 | + //产后体重管理 | |
45 | + private String deliveryWeight; | |
40 | 46 | |
41 | 47 | private Date created; |
42 | 48 | private Date modified; |
43 | 49 | |
50 | + | |
51 | + public Integer getDeliveryModel() { | |
52 | + return deliveryModel; | |
53 | + } | |
54 | + | |
55 | + public void setDeliveryModel(Integer deliveryModel) { | |
56 | + this.deliveryModel = deliveryModel; | |
57 | + } | |
58 | + | |
59 | + public String getTips() { | |
60 | + return tips; | |
61 | + } | |
62 | + | |
63 | + public void setTips(String tips) { | |
64 | + this.tips = tips; | |
65 | + } | |
66 | + | |
67 | + public String getDeliveryWeight() { | |
68 | + return deliveryWeight; | |
69 | + } | |
70 | + | |
71 | + public void setDeliveryWeight(String deliveryWeight) { | |
72 | + this.deliveryWeight = deliveryWeight; | |
73 | + } | |
74 | + | |
75 | + public String getRiskFactorName() { | |
76 | + return riskFactorName; | |
77 | + } | |
78 | + | |
79 | + public void setRiskFactorName(String riskFactorName) { | |
80 | + this.riskFactorName = riskFactorName; | |
81 | + } | |
82 | + | |
44 | 83 | public Integer getYn() { |
45 | 84 | return yn; |
46 | 85 | } |
... | ... | @@ -111,14 +150,6 @@ |
111 | 150 | |
112 | 151 | public void setRiskLevelId(String riskLevelId) { |
113 | 152 | this.riskLevelId = riskLevelId; |
114 | - } | |
115 | - | |
116 | - public List<String> getRiskFactorName() { | |
117 | - return riskFactorName; | |
118 | - } | |
119 | - | |
120 | - public void setRiskFactorName(List<String> riskFactorName) { | |
121 | - this.riskFactorName = riskFactorName; | |
122 | 153 | } |
123 | 154 | |
124 | 155 | public Date getCreated() { |
platform-dal/src/main/java/com/lyms/platform/pojo/PregnancyReport.java
View file @
1773396
... | ... | @@ -32,11 +32,31 @@ |
32 | 32 | private String suggest; |
33 | 33 | //孕期营养食谱 |
34 | 34 | private List<Map> weekRecipe; |
35 | + //知识 | |
36 | + private String tips; | |
37 | + //营养须知 | |
38 | + private String cooking; | |
35 | 39 | |
36 | 40 | private Integer yn; |
37 | 41 | |
38 | 42 | private Date created; |
39 | 43 | private Date modified; |
44 | + | |
45 | + public String getTips() { | |
46 | + return tips; | |
47 | + } | |
48 | + | |
49 | + public void setTips(String tips) { | |
50 | + this.tips = tips; | |
51 | + } | |
52 | + | |
53 | + public String getCooking() { | |
54 | + return cooking; | |
55 | + } | |
56 | + | |
57 | + public void setCooking(String cooking) { | |
58 | + this.cooking = cooking; | |
59 | + } | |
40 | 60 | |
41 | 61 | public String getId() { |
42 | 62 | return id; |
platform-dal/src/main/java/com/lyms/platform/query/PostpartumReportQuery.java
View file @
1773396
... | ... | @@ -23,7 +23,36 @@ |
23 | 23 | * 高危因素 |
24 | 24 | */ |
25 | 25 | private String rFactor; |
26 | + //次数 | |
27 | + private Integer num; | |
28 | + private String riskFactorNames; | |
26 | 29 | |
30 | + public String getRiskFactorNames() { | |
31 | + return riskFactorNames; | |
32 | + } | |
33 | + | |
34 | + public void setRiskFactorNames(String riskFactorNames) { | |
35 | + this.riskFactorNames = riskFactorNames; | |
36 | + } | |
37 | + | |
38 | + public Integer getNum() { | |
39 | + return num; | |
40 | + } | |
41 | + | |
42 | + public void setNum(Integer num) { | |
43 | + this.num = num; | |
44 | + } | |
45 | + | |
46 | + private Integer deliveryModel; | |
47 | + | |
48 | + public Integer getDeliveryModel() { | |
49 | + return deliveryModel; | |
50 | + } | |
51 | + | |
52 | + public void setDeliveryModel(Integer deliveryModel) { | |
53 | + this.deliveryModel = deliveryModel; | |
54 | + } | |
55 | + | |
27 | 56 | public String getrFactor() { |
28 | 57 | return rFactor; |
29 | 58 | } |
30 | 59 | |
31 | 60 | |
32 | 61 | |
... | ... | @@ -60,20 +89,27 @@ |
60 | 89 | public MongoQuery convertToQuery() { |
61 | 90 | MongoCondition condition = MongoCondition.newInstance(); |
62 | 91 | |
63 | - if (null != hospitalId) { | |
92 | + if (StringUtils.isNotEmpty(hospitalId)) { | |
64 | 93 | condition = condition.and("hospitalId", hospitalId, MongoOper.IS); |
65 | 94 | } |
66 | - | |
67 | 95 | if (StringUtils.isNotEmpty(rFactor)) { |
68 | 96 | condition = condition.and("riskFactorId", rFactor, MongoOper.IN); |
69 | 97 | } else if (null != rFactorList && !rFactorList.isEmpty()) { |
70 | 98 | condition = condition.and("riskFactorId", rFactorList, MongoOper.IN); |
71 | 99 | } |
100 | + if (deliveryModel!=null){ | |
101 | + condition=condition.and("deliveryModel", deliveryModel, MongoOper.IS); | |
102 | + } | |
103 | + if (num!=null){ | |
104 | + condition=condition.and("num",num,MongoOper.IS); | |
105 | + } | |
106 | + if (StringUtils.isNotEmpty(riskFactorNames)){ | |
107 | + condition=condition.and("riskFactorName",riskFactorNames,MongoOper.IS); | |
108 | + } | |
72 | 109 | if (-1 != yn) { |
73 | 110 | condition = condition.and("yn", yn, MongoOper.IS); |
74 | 111 | } |
75 | 112 | return condition.toMongoQuery(); |
76 | -// | |
77 | 113 | } |
78 | 114 | } |
platform-operate-api/src/main/java/com/lyms/hospitalapi/dtdyrm/DtdyrmFmService.java
View file @
1773396
... | ... | @@ -46,16 +46,6 @@ |
46 | 46 | @Autowired |
47 | 47 | private PersonService personService; |
48 | 48 | |
49 | - @Autowired | |
50 | - private BabyBookbuildingFacade babyBookbuildingFacade; | |
51 | - | |
52 | - @Autowired | |
53 | - private PatientServiceFacade patientServiceFacade; | |
54 | - | |
55 | - private static Map<Integer, String> ONE_ENUMS = new HashMap<>(); | |
56 | - | |
57 | - private static Map<String, List> babyMap = new HashMap<>(); | |
58 | - | |
59 | 49 | private static final String HOSPITALID = "2100002419"; |
60 | 50 | |
61 | 51 | @Override |
62 | 52 | |
63 | 53 | |
... | ... | @@ -80,13 +70,12 @@ |
80 | 70 | SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
81 | 71 | try { |
82 | 72 | System.out.println("fm= startup"); |
83 | - | |
84 | - List <Users> users = new ArrayList <Users>(); | |
85 | 73 | Date dueDate = null; |
86 | - List <MatDeliverAddRequest.Baby> babies = new ArrayList <>(); | |
87 | - MatDeliverAddRequest deliverAddRequest = new MatDeliverAddRequest(); | |
88 | 74 | Patients patient =null; |
89 | 75 | for (DtFm allFm : allList) { |
76 | + List <Users> users = new ArrayList <>(); | |
77 | + MatDeliverAddRequest deliverAddRequest = new MatDeliverAddRequest(); | |
78 | + List <MatDeliverAddRequest.Baby> babies = new ArrayList <>(); | |
90 | 79 | // System.out.println("0-------------" + allFm.getBABY_PREGNANCY_OUT()); |
91 | 80 | if (!"1".equals(allFm.getBaby_PREGNANCY_OUT())) { |
92 | 81 | System.out.println("BABY_PREGNANCY_OUT != 1"); |
93 | 82 | |
94 | 83 | |
... | ... | @@ -234,19 +223,26 @@ |
234 | 223 | if (placenta_Num != null) { |
235 | 224 | deliverAddRequest.setPlacenta(allFm.getPlacenta_NUM().toString());// 胎盘(之前赋值为死值1) |
236 | 225 | } |
237 | - if ("完好".equals(allFm.getPerineal_CONDITION()) || "".equals(allFm.getPerineal_CONDITION())) { | |
226 | + String condition=allFm.getPerineal_CONDITION(); | |
227 | + if (StringUtils.isNotEmpty(condition)){ | |
228 | + condition=condition.trim(); | |
229 | + if ("完好".equals(condition) || "".equals(condition)) { | |
230 | + deliverAddRequest.setPerinealCondition("full"); | |
231 | + } else if ("会阴切开".equals(condition) || "侧切".equals(condition)) { | |
232 | + deliverAddRequest.setPerinealCondition("split"); | |
233 | + } | |
234 | + | |
235 | + if ("一度裂伤".equals(condition)) { | |
236 | + deliverAddRequest.setSiLielevel(1); | |
237 | + } else if ("二度裂伤".equals(condition)) { | |
238 | + deliverAddRequest.setSiLielevel(2); | |
239 | + } else if ("三度裂伤".equals(condition)) { | |
240 | + deliverAddRequest.setSiLielevel(3); | |
241 | + } | |
242 | + }else { | |
238 | 243 | deliverAddRequest.setPerinealCondition("full"); |
239 | - } else if ("会阴切开".equals(allFm.getPerineal_CONDITION()) || "侧切".equals(allFm.getPerineal_CONDITION())) { | |
240 | - deliverAddRequest.setPerinealCondition("split"); | |
241 | 244 | } |
242 | 245 | |
243 | - if ("一度裂伤".equals(allFm.getPerineal_CONDITION())) { | |
244 | - deliverAddRequest.setSiLielevel(1); | |
245 | - } else if ("二度裂伤".equals(allFm.getPerineal_CONDITION())) { | |
246 | - deliverAddRequest.setSiLielevel(2); | |
247 | - } else if ("三度裂伤".equals(allFm.getPerineal_CONDITION())) { | |
248 | - deliverAddRequest.setSiLielevel(3); | |
249 | - } | |
250 | 246 | |
251 | 247 | Integer th_Lose = allFm.getTh_LOSE_BLOOD(); |
252 | 248 | if (th_Lose != null) { |
253 | 249 | |
254 | 250 | |
255 | 251 | |
256 | 252 | |
257 | 253 | |
258 | 254 | |
259 | 255 | |
260 | 256 | |
261 | 257 | |
262 | 258 | |
263 | 259 | |
264 | 260 | |
265 | 261 | |
... | ... | @@ -258,89 +254,96 @@ |
258 | 254 | Map deliveryMode = new HashMap(); //分娩方式 |
259 | 255 | |
260 | 256 | String fmfs = ""; |
261 | - if (allFm.getDelivery_MODE() != null | |
262 | - && ("手术产".equals(allFm.getDelivery_MODE()) | |
263 | - ||"剖宫产".equals(allFm.getDelivery_MODE())) | |
264 | - ) { | |
265 | - fmfs = FmTypeEnums.O1.getId(); | |
266 | - } else { | |
257 | + if (StringUtils.isNotEmpty(allFm.getDelivery_MODE())){ | |
258 | + if (("手术产".equals(allFm.getDelivery_MODE().trim()) | |
259 | + ||"剖宫产".equals(allFm.getDelivery_MODE().trim())) | |
260 | + ) { | |
261 | + fmfs = FmTypeEnums.O1.getId(); | |
262 | + } | |
263 | + }else { | |
267 | 264 | fmfs = FmTypeEnums.O.getId(); |
268 | 265 | } |
266 | + | |
269 | 267 | deliveryMode.put("fmfs", fmfs); |
270 | 268 | deliverAddRequest.setDeliveryMode(deliveryMode); |
271 | 269 | //胎盘信息 |
272 | 270 | List <MaternalDeliverModel.ExtPlacenta> extPlacentas = new ArrayList <>(); |
273 | 271 | MaternalDeliverModel.ExtPlacenta extPlacenta = new MaternalDeliverModel.ExtPlacenta(); |
274 | 272 | String tpmcType = ""; //胎盘娩出方式 |
275 | - if ("手术产".equals(allFm.getTmctype()) || "手取胎盘".equals(allFm.getTmctype())) { | |
276 | - tpmcType = TpmcTypeEnums.O2.getId(); | |
277 | - } else if ("自然产出".equals(allFm.getTmctype()) || "自然娩出".equals(allFm.getTmctype())) { | |
278 | - tpmcType = TpmcTypeEnums.O.getId(); | |
273 | + if (StringUtils.isNotEmpty(allFm.getTmctype())){ | |
274 | + tpmcType=allFm.getTmctype().trim(); | |
275 | + if ("手术产".equals(tpmcType) || "手取胎盘".equals(tpmcType)) { | |
276 | + tpmcType = TpmcTypeEnums.O2.getId(); | |
277 | + } else if ("自然产出".equals(tpmcType) || "自然娩出".equals(tpmcType)) { | |
278 | + tpmcType = TpmcTypeEnums.O.getId(); | |
279 | + } | |
279 | 280 | } |
281 | + | |
280 | 282 | extPlacenta.setTpmcType(tpmcType); |
281 | 283 | extPlacentas.add(extPlacenta); |
282 | 284 | deliverAddRequest.setExtPlacentas(extPlacentas); |
283 | 285 | |
286 | + for (int i = 0; i < allFm.getFetus_NUM() ; i++) { | |
287 | + //儿童 | |
288 | + MatDeliverAddRequest.Baby baby = new MatDeliverAddRequest.Baby(); | |
289 | + baby.setBabyWeight(allFm.getBaby_WEIGHT() == null ? null : allFm.getBaby_WEIGHT().toString()); | |
290 | + Map <String, String> as = new HashMap <>(); | |
291 | + String pf1 = String.valueOf(allFm.getBaby_APGAR_SCORE_ONE()); | |
292 | + String pf5 = String.valueOf(allFm.getBaby_APGAR_SCORE_FIVE()); | |
293 | + String pf10 = String.valueOf(allFm.getBaby_APGAR_SCORE_TEN()); | |
294 | + if (pf1 != null) { | |
295 | + as.put("pf1", pf1); | |
296 | + } | |
297 | + if (pf5 != null) { | |
298 | + as.put("pf5", pf5); | |
299 | + } | |
300 | + if (pf10 != null) { | |
301 | + as.put("pf10", pf10); | |
302 | + } | |
284 | 303 | |
285 | - //儿童 | |
286 | - MatDeliverAddRequest.Baby baby = new MatDeliverAddRequest.Baby(); | |
287 | - baby.setBabyWeight(allFm.getBaby_WEIGHT() == null ? null : allFm.getBaby_WEIGHT().toString()); | |
288 | - Map <String, String> as = new HashMap <>(); | |
289 | - String pf1 = String.valueOf(allFm.getBaby_APGAR_SCORE_ONE()); | |
290 | - String pf5 = String.valueOf(allFm.getBaby_APGAR_SCORE_FIVE()); | |
291 | - String pf10 = String.valueOf(allFm.getBaby_APGAR_SCORE_TEN()); | |
292 | - if (pf1 != null) { | |
293 | - as.put("pf1", pf1); | |
294 | - } | |
295 | - if (pf5 != null) { | |
296 | - as.put("pf5", pf5); | |
297 | - } | |
298 | - if (pf10 != null) { | |
299 | - as.put("pf10", pf10); | |
300 | - } | |
301 | 304 | |
305 | + baby.setApgarScore(as); | |
306 | + baby.setBabyGender("男".equals(allFm.getBaby_SEX().trim()) ? "1" : "0"); | |
307 | + String babyHeight = String.valueOf(allFm.getBaby_HEIGHT()); | |
308 | + String babyWeight = String.valueOf(allFm.getBaby_WEIGHT()); | |
309 | + Integer baby_Asphyxiam = allFm.getBaby_ASPHYXIAM(); | |
310 | + if (babyHeight != null) { | |
311 | + baby.setBabyHeight(babyHeight);//新生儿生长 | |
312 | + } | |
313 | + if (babyWeight != null) { | |
314 | + baby.setBabyWeight(babyWeight);//新生儿重量 | |
315 | + } | |
316 | + if (baby_Asphyxiam != null) { | |
317 | + baby.setAsphyxiaM(String.valueOf(baby_Asphyxiam)); //窒息分钟 | |
318 | + } | |
302 | 319 | |
303 | - baby.setApgarScore(as); | |
304 | - baby.setBabyGender("男".equals(allFm.getBaby_SEX()) ? "1" : "0"); | |
305 | - String babyHeight = String.valueOf(allFm.getBaby_HEIGHT()); | |
306 | - String babyWeight = String.valueOf(allFm.getBaby_WEIGHT()); | |
307 | - Integer baby_Asphyxiam = allFm.getBaby_ASPHYXIAM(); | |
308 | - if (babyHeight != null) { | |
309 | - baby.setBabyHeight(babyHeight);//新生儿生长 | |
310 | - } | |
311 | - if (babyWeight != null) { | |
312 | - baby.setBabyWeight(babyWeight);//新生儿重量 | |
313 | - } | |
314 | - if (baby_Asphyxiam != null) { | |
315 | - baby.setAsphyxiaM(String.valueOf(baby_Asphyxiam)); //窒息分钟 | |
316 | - } | |
320 | + baby.setDeformity((allFm.getBaby_DEFORMITY() != null ? allFm.getBaby_DEFORMITY() : 0)); //畸形 0非畸形 1畸形 | |
317 | 321 | |
318 | - baby.setDeformity((allFm.getBaby_DEFORMITY() == null ? 0 : 1)); //畸形 0非畸形 1畸形 | |
322 | + String baby_Pregnancy_Out = allFm.getBaby_PREGNANCY_OUT().trim()=="1"?"活产":""; | |
323 | + if(baby_Pregnancy_Out!=null && StringUtils.isNotEmpty(baby_Pregnancy_Out)){ | |
324 | + baby.setPregnancyOut(RenShenJieJuEnums.getIdByName("活产")); // 妊娠结局 | |
325 | + } | |
319 | 326 | |
320 | - String baby_Pregnancy_Out = allFm.getBaby_PREGNANCY_OUT()=="1"?"活产":""; | |
321 | - if(baby_Pregnancy_Out!=null && StringUtils.isNotEmpty(baby_Pregnancy_Out)){ | |
327 | +// System.out.println("7-------------" + allFm.getBABY_PREGNANCY_OUT() == "1" ? "活产" : ""); | |
322 | 328 | baby.setPregnancyOut(RenShenJieJuEnums.getIdByName("活产")); // 妊娠结局 |
329 | + | |
330 | + baby.setDueTime(DateUtil.getyyyy_MM_dd_hms(dueDate));//分娩时间 | |
331 | + babies.add(baby); | |
323 | 332 | } |
324 | 333 | |
325 | -// System.out.println("7-------------" + allFm.getBABY_PREGNANCY_OUT() == "1" ? "活产" : ""); | |
326 | - baby.setPregnancyOut(RenShenJieJuEnums.getIdByName("活产")); // 妊娠结局 | |
327 | - | |
328 | - baby.setDueTime(DateUtil.getyyyy_MM_dd_hms(dueDate));//分娩时间 | |
329 | - babies.add(baby); | |
330 | - | |
331 | 334 | } |
332 | 335 | } |
333 | - } | |
334 | - //因为每次传过来的是一个孕妇分娩数据,故在循环外 | |
335 | - if (patient != null && StringUtils.isNotEmpty(patient.getId()) && CollectionUtils.isNotEmpty(babies)) { | |
336 | - deliverAddRequest.setBabies(babies); | |
337 | - deliverAddRequest.setFmHospital(HOSPITALID); | |
338 | - ExceptionUtils.catchException("deliverAddRequest===" + deliverAddRequest); | |
339 | - if (users != null && users.size() > 0) { | |
340 | - matDeliverFacade.addOrUpdateMatDeliver(deliverAddRequest, users.get(0).getId()); | |
341 | - System.out.println("fm= end"); | |
336 | + //因为每次传过来的是一个孕妇分娩数据,故在循环外 | |
337 | + if (patient != null && StringUtils.isNotEmpty(patient.getId()) && CollectionUtils.isNotEmpty(babies)) { | |
338 | + deliverAddRequest.setBabies(babies); | |
339 | + deliverAddRequest.setFmHospital(HOSPITALID); | |
340 | + // ExceptionUtils.catchException("deliverAddRequest===" + deliverAddRequest); | |
341 | + if (users != null && users.size() > 0) { | |
342 | + matDeliverFacade.addOrUpdateMatDeliver(deliverAddRequest, users.get(0).getId()); | |
343 | + } | |
342 | 344 | } |
343 | 345 | } |
346 | + System.out.println("fm= end"); | |
344 | 347 | |
345 | 348 | } catch (Exception e) { |
346 | 349 | ExceptionUtils.catchException(e, "执行异常"); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FmController.java
View file @
1773396
... | ... | @@ -62,7 +62,7 @@ |
62 | 62 | |
63 | 63 | @RequestMapping(method = RequestMethod.POST, value = "/dtSaveFmData") |
64 | 64 | @ResponseBody |
65 | - public String dtSaveFmData(@Valid @RequestBody List<DtFm> models, HttpServletRequest httpServletRequest){ | |
65 | + public String dtSaveFmData(@Valid @RequestBody List<DtFm> models){ | |
66 | 66 | if (CollectionUtils.isNotEmpty(models)){ |
67 | 67 | if ("50".equals(models.get(0).getVision())){ |
68 | 68 | idtdyrmFmService.queryFmPatient(models); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PostpartumReportController.java
View file @
1773396
... | ... | @@ -29,12 +29,14 @@ |
29 | 29 | @ResponseBody |
30 | 30 | @TokenRequired |
31 | 31 | public BaseResponse getPostpartumReportList(@RequestParam(required = false) String rFactor, |
32 | + @RequestParam(required = false) Integer deliveryModel, | |
32 | 33 | @RequestParam("page") Integer page, |
33 | 34 | @RequestParam("limit") Integer limit, |
34 | 35 | HttpServletRequest request) { |
35 | 36 | |
36 | 37 | PostpartumReportQuery postpartumReportQuery=new PostpartumReportQuery(); |
37 | 38 | postpartumReportQuery.setrFactor(rFactor); |
39 | + postpartumReportQuery.setDeliveryModel(deliveryModel); | |
38 | 40 | postpartumReportQuery.setPage(page); |
39 | 41 | postpartumReportQuery.setLimit(limit); |
40 | 42 | return postpartumReportFacade.queryPatient(postpartumReportQuery,getUserId(request)); |
... | ... | @@ -47,8 +49,8 @@ |
47 | 49 | @RequestMapping(method = RequestMethod.POST, value = "/add") |
48 | 50 | @ResponseBody |
49 | 51 | @TokenRequired |
50 | - public BaseResponse addPostpartumReport(@RequestBody PostpartumReport postpartumReport){ | |
51 | - postpartumReportFacade.add(postpartumReport); | |
52 | + public BaseResponse addPostpartumReport(@RequestBody PostpartumReport postpartumReport,HttpServletRequest request){ | |
53 | + postpartumReportFacade.add(postpartumReport,getUserId(request)); | |
52 | 54 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
53 | 55 | } |
54 | 56 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
1773396
... | ... | @@ -1442,7 +1442,7 @@ |
1442 | 1442 | List<Patients> patientsList = patientsService.queryPatient(patientsQuery); |
1443 | 1443 | if (com.lyms.platform.operate.web.utils.CollectionUtils.isNotEmpty(patientsList)) { |
1444 | 1444 | appointmentModel.setIsBuild(1); |
1445 | - } else { | |
1445 | + } else { | |
1446 | 1446 | appointmentModel.setIsBuild(0); |
1447 | 1447 | } |
1448 | 1448 | } |
... | ... | @@ -1468,7 +1468,7 @@ |
1468 | 1468 | for (AppointmentModel appointmentModel : appointmentModels) { |
1469 | 1469 | MsgRequest request = new MsgRequest(); |
1470 | 1470 | String title = "建档提醒短信"; |
1471 | - String messageContent = "【大同市第一人民医院】提醒您:您还未在我院建立孕期档案,为了更好的给您提供产检服务,请尽快携带身份证、母子健康手册以及产检检查资料前往我院门诊二层孕妇网络中心进行建档。" + | |
1471 | + String messageContent = "【大同市第一人民医院】提醒您:您还未在我院建立孕期档案,为了更好 给您提供产检服务,请尽快携带身份证、母子健康手册以及产检检查资料前往我院门诊二层孕妇网络中心进行建档。" + | |
1472 | 1472 | "温馨提示:“母子健康手册”在个人居住地社区卫生服务机构领取(需携带孕妇身份证明及产检资料)。"; |
1473 | 1473 | request.setServiceType(3); |
1474 | 1474 | //短信发送状态 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
1773396
... | ... | @@ -2709,7 +2709,7 @@ |
2709 | 2709 | if("2100002419".equals(hid)){//大同 |
2710 | 2710 | Users u = usersService.getUsers(childbirthManagerRequest.getOperatorId()); |
2711 | 2711 | //产科网络 及 医务科 看全科室的 |
2712 | - if(2100004948 == u.getDeptId() || 2100004960 == u.getDeptId()){ | |
2712 | + if(2100004948 == u.getDeptId() || 2100004960 == u.getDeptId() || "dtcskf".equals(u.getAccount()) || "dtkf".equals(u.getAccount())){ | |
2713 | 2713 | if (StringUtils.isNotEmpty(childbirthManagerRequest.getDeliverDoctor())) { |
2714 | 2714 | patientsQuery.setDeliverDoctor(childbirthManagerRequest.getDeliverDoctor()); |
2715 | 2715 | } |
... | ... | @@ -2737,7 +2737,7 @@ |
2737 | 2737 | patientsQuery.setYyzyfmHospitalId(childbirthManagerRequest.getYyzyfmHospitalId()); |
2738 | 2738 | patientsQuery.setHospitalId(childbirthManagerRequest.getFirstHospitalId()); |
2739 | 2739 | |
2740 | - // System.out.println("fm patient query = " + patientsQuery.convertToQuery().convertToMongoQuery()); | |
2740 | + System.out.println("fm patient query = " + patientsQuery.convertToQuery().convertToMongoQuery()); | |
2741 | 2741 | List<Patients> patientsList = patientsService.queryPatient(patientsQuery); |
2742 | 2742 | |
2743 | 2743 | // 这里就设置分页内容 |
... | ... | @@ -2946,7 +2946,7 @@ |
2946 | 2946 | matDeliverQuery.setLimit(childbirthManagerRequest.getLimit()); |
2947 | 2947 | matDeliverQuery.setPage(childbirthManagerRequest.getPage()); |
2948 | 2948 | matDeliverQuery.setNeed("need"); |
2949 | - // System.out.println(matDeliverQuery.convertToQuery().convertToMongoQuery().toString()); | |
2949 | + //System.out.println(matDeliverQuery.convertToQuery().convertToMongoQuery().toString()); | |
2950 | 2950 | maternalDeliverModelList = matDeliverService.pageQuery(matDeliverQuery); |
2951 | 2951 | // 这里就设置分页内容 |
2952 | 2952 | childbirthManagerResult.setPageInfo(matDeliverQuery.getPageInfo()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PostpartumReportFacade.java
View file @
1773396
... | ... | @@ -2,11 +2,14 @@ |
2 | 2 | |
3 | 3 | import com.lyms.platform.biz.service.PostpartumReportService; |
4 | 4 | import com.lyms.platform.common.result.BaseResponse; |
5 | +import com.lyms.platform.operate.web.utils.CollectionUtils; | |
5 | 6 | import com.lyms.platform.pojo.PostpartumReport; |
6 | 7 | import com.lyms.platform.query.PostpartumReportQuery; |
7 | 8 | import org.springframework.beans.factory.annotation.Autowired; |
8 | 9 | import org.springframework.stereotype.Component; |
9 | 10 | |
11 | +import java.util.List; | |
12 | + | |
10 | 13 | @Component |
11 | 14 | public class PostpartumReportFacade { |
12 | 15 | @Autowired |
... | ... | @@ -22,7 +25,18 @@ |
22 | 25 | return postpartumReportService.queryPatient(postpartumReportQuery); |
23 | 26 | } |
24 | 27 | |
25 | - public PostpartumReport add(PostpartumReport postpartumReport){ | |
28 | + public PostpartumReport add(PostpartumReport postpartumReport,Integer userId){ | |
29 | + PostpartumReportQuery postpartumReportQuery=new PostpartumReportQuery(); | |
30 | + postpartumReportQuery.setNum(postpartumReport.getNum()); | |
31 | + postpartumReportQuery.setRiskFactorNames(postpartumReport.getRiskFactorName()); | |
32 | + postpartumReportQuery.setDeliveryModel(postpartumReport.getDeliveryModel()); | |
33 | + String hospitalId = autoMatchFacade.getHospitalId(userId); | |
34 | + postpartumReportQuery.setHospitalId(hospitalId); | |
35 | + postpartumReportQuery.setYn(1); | |
36 | + List<PostpartumReport> reportList= postpartumReportService.queryPatientList(postpartumReportQuery); | |
37 | + if (CollectionUtils.isNotEmpty(reportList)){ | |
38 | + throw new RuntimeException("已存在"); | |
39 | + } | |
26 | 40 | return postpartumReportService.add(postpartumReport); |
27 | 41 | } |
28 | 42 |