Commit af775e48a774e04bfe3d61f64c2ea172412b2978
1 parent
dcaafddd0c
Exists in
master
and in
6 other branches
测量
Showing 5 changed files with 125 additions and 7 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/BasicConfigServiceTest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MeasureInfoFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/SyncDataTaskService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/BasicConfigServiceTest.java
View file @
af775e4
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
af775e4
| ... | ... | @@ -632,6 +632,14 @@ |
| 632 | 632 | return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("您已经做过初诊"); |
| 633 | 633 | } |
| 634 | 634 | } |
| 635 | + | |
| 636 | + //聊城东昌府医院初诊的身高更新到随心测 | |
| 637 | + if ("1000000116".equals(hospitalId) || "2100001305".equals(hospitalId)) | |
| 638 | + { | |
| 639 | + measureInfoFacade.updateHeight(antExChuModel.getParentId(),hospitalId,antExChuModel.getHeight()); | |
| 640 | + } | |
| 641 | + | |
| 642 | + | |
| 635 | 643 | //处理自定义高危状态为已使用状态 |
| 636 | 644 | highRiskFacade.dispHospHighRiskUse(antExChuModel.getOtherHighRisk()); |
| 637 | 645 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MeasureInfoFacade.java
View file @
af775e4
| ... | ... | @@ -240,12 +240,12 @@ |
| 240 | 240 | MeasureDataInfoQuery measureDataInfoQuery = new MeasureDataInfoQuery(); |
| 241 | 241 | measureDataInfoQuery.setMeasureUserId(userInfo.getId()); |
| 242 | 242 | measureDataInfoQuery.setValueType(1); |
| 243 | - List<MeasureDataInfoModel> dataModels = mysqlMeasureDataInfoService.queryMeasureDataInfoList(measureDataInfoQuery); | |
| 244 | - if (CollectionUtils.isNotEmpty(dataModels)) | |
| 245 | - { | |
| 246 | - result.setHeight(dataModels.get(0).getValueTwo() == null ? "" : dataModels.get(0).getValueTwo()); | |
| 247 | - result.setWeight(dataModels.get(0).getValueOne() == null ? "" : dataModels.get(0).getValueOne()); | |
| 248 | - } | |
| 243 | +// List<MeasureDataInfoModel> dataModels = mysqlMeasureDataInfoService.queryMeasureDataInfoList(measureDataInfoQuery); | |
| 244 | +// if (CollectionUtils.isNotEmpty(dataModels)) | |
| 245 | +// { | |
| 246 | +// result.setHeight(dataModels.get(0).getValueTwo() == null ? "" : dataModels.get(0).getValueTwo()); | |
| 247 | +// result.setWeight(dataModels.get(0).getValueOne() == null ? "" : dataModels.get(0).getValueOne()); | |
| 248 | +// } | |
| 249 | 249 | } |
| 250 | 250 | else |
| 251 | 251 | { |
| ... | ... | @@ -267,6 +267,17 @@ |
| 267 | 267 | mysqlMeasureUserInfoService.addMeasureUserInfo(model); |
| 268 | 268 | } |
| 269 | 269 | |
| 270 | + AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
| 271 | + antExChuQuery.setHospitalId(hospitalId); | |
| 272 | + antExChuQuery.setParentId(patients.getId()); | |
| 273 | + antExChuQuery.setYn(YnEnums.YES.getId()); | |
| 274 | + List<AntExChuModel> chuModelList = antenatalExaminationService.queryAntExChu(antExChuQuery); | |
| 275 | + if (CollectionUtils.isNotEmpty(chuModelList)) { | |
| 276 | + AntExChuModel chuModel = chuModelList.get(0); | |
| 277 | + String beforeHeight = chuModel.getHeight() == null ? "" : chuModel.getHeight(); | |
| 278 | + result.setHeight(beforeHeight); | |
| 279 | + } | |
| 280 | + | |
| 270 | 281 | result.setHospitalId(patients.getHospitalId()); |
| 271 | 282 | result.setUserName(patients.getUsername()); |
| 272 | 283 | result.setPhone(patients.getPhone()); |
| ... | ... | @@ -545,6 +556,24 @@ |
| 545 | 556 | return valueOne; |
| 546 | 557 | } |
| 547 | 558 | |
| 559 | + | |
| 560 | + public int updateHeight(String patientId,String hospitalId,String height) | |
| 561 | + { | |
| 562 | + Patients pat = patientsService.findOnePatientById(patientId); | |
| 563 | + MeasureDataInfoQuery query = new MeasureDataInfoQuery(); | |
| 564 | + query.setHospitalId(hospitalId); | |
| 565 | + query.setCertNo(pat.getCardNo()); | |
| 566 | + query.setCertType(pat.getPcerteTypeId()); | |
| 567 | + query.setValueType(1); | |
| 568 | + List<MeasureDataInfoModel> list = mysqlMeasureDataInfoService.queryMeasureList(query); | |
| 569 | + if (CollectionUtils.isNotEmpty(list)) | |
| 570 | + { | |
| 571 | + MeasureDataInfoModel model = list.get(0); | |
| 572 | + model.setValueTwo(height); | |
| 573 | + return mysqlMeasureDataInfoService.updateMeasureDataInfo(model); | |
| 574 | + } | |
| 575 | + return 0; | |
| 576 | + } | |
| 548 | 577 | |
| 549 | 578 | |
| 550 | 579 | /** |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/SyncDataTaskService.java
View file @
af775e4
| ... | ... | @@ -55,6 +55,7 @@ |
| 55 | 55 | urls.put("rp-zk-api.healthbaby.com.cn","周口市妇幼保健院"); |
| 56 | 56 | urls.put("area-huaiyang-api.healthbaby.com.cn:12356","淮阳县人民医院"); |
| 57 | 57 | urls.put("area-rongcheng-api.healthbaby.com.cn:12356","荣成"); |
| 58 | + urls.put("area-changyi-api.healthbaby.com.cn:12356","昌邑"); | |
| 58 | 59 | } |
| 59 | 60 | |
| 60 | 61 | @Autowired |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
af775e4
| ... | ... | @@ -1223,5 +1223,85 @@ |
| 1223 | 1223 | WeightManageConfigModel.class); |
| 1224 | 1224 | return weightManageConfigModel; |
| 1225 | 1225 | } |
| 1226 | + | |
| 1227 | + | |
| 1228 | + /** | |
| 1229 | + * 孕妇期所需卡里计算 | |
| 1230 | + * @param beforeWeight | |
| 1231 | + * @param currentWeight | |
| 1232 | + * @return | |
| 1233 | + */ | |
| 1234 | + private Map<String,Double> getComputeKul(double beforeWeight,double currentWeight,int week,double bmi) | |
| 1235 | + { | |
| 1236 | + Map<String,Double> map = new HashMap<>(); | |
| 1237 | + | |
| 1238 | + double kulStart = 0; | |
| 1239 | + double kulEnd = 0; | |
| 1240 | + double add = currentWeight - beforeWeight; | |
| 1241 | + //孕早期 | |
| 1242 | + if (week <= 12) | |
| 1243 | + { | |
| 1244 | + if (add < 1 && (1 - add >= 0.5)) | |
| 1245 | + { | |
| 1246 | + kulStart = currentWeight*25+500; | |
| 1247 | + } | |
| 1248 | + else if (add > 1.5 && (add - 1.5 >= 0.5)) | |
| 1249 | + { | |
| 1250 | + kulStart = currentWeight*25-500; | |
| 1251 | + } | |
| 1252 | + else | |
| 1253 | + { | |
| 1254 | + kulStart = currentWeight*25; | |
| 1255 | + kulEnd = kulStart; | |
| 1256 | + } | |
| 1257 | + } | |
| 1258 | + //孕中期 //孕晚期 | |
| 1259 | + else if (week > 12) | |
| 1260 | + { | |
| 1261 | + //基础kcal值 | |
| 1262 | + int basekul = (week > 12 && week <= 27) ? 340 : 450; | |
| 1263 | + | |
| 1264 | + double avge = 0; | |
| 1265 | + if (bmi < 18.5) | |
| 1266 | + { | |
| 1267 | + avge = 0.51; | |
| 1268 | + } | |
| 1269 | + else if (bmi <= 24.9 && bmi >= 18.5) | |
| 1270 | + { | |
| 1271 | + avge = 0.42; | |
| 1272 | + } | |
| 1273 | + else if (bmi <= 29.9 && bmi >= 25) | |
| 1274 | + { | |
| 1275 | + avge = 0.28; | |
| 1276 | + } | |
| 1277 | + else if (bmi >= 30) | |
| 1278 | + { | |
| 1279 | + avge = 0.22; | |
| 1280 | + } | |
| 1281 | + | |
| 1282 | + double addWeightStart = 1 + (week - 12) * avge; | |
| 1283 | + double addWeightEnd = 1.5 + (week - 12) * avge; | |
| 1284 | + | |
| 1285 | + double kstart = (currentWeight + addWeightStart) * 25 + basekul; | |
| 1286 | + double kend = (currentWeight + addWeightEnd) * 25 + basekul; | |
| 1287 | + | |
| 1288 | + if (addWeightEnd > add && (addWeightEnd - add) > 0.5) | |
| 1289 | + { | |
| 1290 | + kstart -= 500; | |
| 1291 | + kend -= 500; | |
| 1292 | + } | |
| 1293 | + else if (addWeightEnd < add && (add - addWeightEnd) > 0.5) | |
| 1294 | + { | |
| 1295 | + kstart += 500; | |
| 1296 | + kend += 500; | |
| 1297 | + } | |
| 1298 | + kulStart = kstart; | |
| 1299 | + kulEnd = kend; | |
| 1300 | + } | |
| 1301 | + | |
| 1302 | + map.put("kulStart",kulStart); | |
| 1303 | + map.put("kulEnd",kulEnd); | |
| 1304 | + return map; | |
| 1305 | + } | |
| 1226 | 1306 | } |