Commit e36fd209322e9ef81ce42d838e191fd8b3389e4a

Authored by dongqin

Merge remote-tracking branch 'origin/master'

Showing 4 changed files

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientWeightController.java View file @ e36fd20
... ... @@ -95,11 +95,11 @@
95 95 HttpServletRequest request,
96 96 @RequestParam(value = "rid", required = false) String rid,
97 97 @RequestParam(value = "doctorId") String doctorId,
98   - @RequestParam(value = "beforeWeight",required = false) String beforeWeight,
99   - @RequestParam(value = "bregmatic",required = false) String bregmatic,
100   - @RequestParam(value = "bregmaticOther",required = false) String bregmaticOther,
101   - String version) {
102   - return patientWeightService.report(id, getUserId(request), rid, version, doctorId,beforeWeight,bregmatic,bregmaticOther);
  98 + @RequestParam(value = "beforeWeight", required = false) String beforeWeight,
  99 + @RequestParam(value = "bregmatic", required = false) String bregmatic,
  100 + @RequestParam(value = "bregmaticOther", required = false) String bregmaticOther,
  101 + @RequestParam(value = "height", required = false) String height, String version) {
  102 + return patientWeightService.report(id, getUserId(request), rid, version, doctorId, beforeWeight, height, bregmatic, bregmaticOther);
103 103 }
104 104  
105 105  
106 106  
... ... @@ -278,14 +278,15 @@
278 278 public BaseResponse getWeightsReport(@PathVariable String pid,
279 279 HttpServletRequest request,
280 280 @RequestParam(value = "rid", required = false) String rid, String version,
281   - @RequestParam(value = "beforeWeight",required = false) String beforeWeight,
282   - @RequestParam(value = "bregmatic",required = false) String bregmatic,
283   - @RequestParam(value = "bregmaticOther",required = false) String bregmaticOther,
  281 + @RequestParam(value = "beforeWeight", required = false) String beforeWeight,
  282 + @RequestParam(value = "bregmatic", required = false) String bregmatic,
  283 + @RequestParam(value = "bregmaticOther", required = false) String bregmaticOther,
  284 + @RequestParam(value = "height", required = false) String height,
284 285 @RequestParam(value = "doctorId") String doctorId) {
285 286 if (pid.isEmpty() || "null".equals(pid)) {
286 287 return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.USER_PASSWORD_ERROR).setErrormsg("pid值不能为空!");
287 288 }
288   - return patientWeightService.getWeightsReport(pid, getUserId(request), rid, version, doctorId,beforeWeight,bregmatic,bregmaticOther);
  289 + return patientWeightService.getWeightsReport(pid, getUserId(request), rid, version, doctorId, beforeWeight, height, bregmatic, bregmaticOther);
289 290 }
290 291  
291 292  
292 293  
... ... @@ -301,14 +302,15 @@
301 302 public BaseResponse qhdReport(@PathVariable String pid,
302 303 HttpServletRequest request,
303 304 @RequestParam(value = "rid", required = false) String rid, String version,
304   - @RequestParam(value = "beforeWeight",required = false) String beforeWeight,
305   - @RequestParam(value = "bregmatic",required = false) String bregmatic,
306   - @RequestParam(value = "bregmaticOther",required = false) String bregmaticOther,
  305 + @RequestParam(value = "beforeWeight", required = false) String beforeWeight,
  306 + @RequestParam(value = "bregmatic", required = false) String bregmatic,
  307 + @RequestParam(value = "bregmaticOther", required = false) String bregmaticOther,
  308 + @RequestParam(value = "height", required = false) String height,
307 309 @RequestParam(value = "doctorId") String doctorId) {
308 310 if (pid.isEmpty() || "null".equals(pid)) {
309 311 return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.USER_PASSWORD_ERROR).setErrormsg("pid值不能为空!");
310 312 }
311   - return patientWeightService.qhdHighRiskReport(pid, getUserId(request), rid, version, doctorId,beforeWeight,bregmatic,bregmaticOther);
  313 + return patientWeightService.qhdHighRiskReport(pid, getUserId(request), rid, version, doctorId, beforeWeight, height, bregmatic, bregmaticOther);
312 314 }
313 315  
314 316 /**
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/PatientWeightService.java View file @ e36fd20
... ... @@ -35,7 +35,7 @@
35 35  
36 36 BaseResponse delete(String id);
37 37  
38   - BaseResponse report(String id, Integer userId, String rid, String version, String doctorId,String beforeWeight,String bregmatic,String bregmaticOther);
  38 + BaseResponse report(String id, Integer userId, String rid, String version, String doctorId, String beforeWeight, String height, String bregmatic, String bregmaticOther);
39 39  
40 40  
41 41 BaseResponse wxReport(String pid);
42 42  
... ... @@ -60,9 +60,9 @@
60 60  
61 61 public void getSeries(Map<String, Object> series, String bmiStr, String bregmatic);
62 62  
63   - BaseResponse getWeightsReport(String pid, Integer userId, String rid, String version, String doctorId,String beforeWeight,String bregmatic,String bregmaticOther);
  63 + BaseResponse getWeightsReport(String pid, Integer userId, String rid, String version, String doctorId, String beforeWeight, String height, String bregmatic, String bregmaticOther);
64 64  
65   - BaseResponse qhdHighRiskReport(String pid, Integer userId, String rid, String version, String doctorId,String beforeWeight,String bregmatic,String bregmaticOther);
  65 + BaseResponse qhdHighRiskReport(String pid, Integer userId, String rid, String version, String doctorId, String beforeWeight, String height, String bregmatic, String bregmaticOther);
66 66  
67 67 public void setReport(Map<String, Object> restMap, Map<Integer, String> weights, String beforeWeight,
68 68 String bmi, Map<String, String> dayWeights, String bregmatic);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java View file @ e36fd20
... ... @@ -484,6 +484,7 @@
484 484 return patientWeight;
485 485 }
486 486  
  487 + @Override
487 488 public BaseResponse lastCheckTime(String pid, String time) {
488 489 PatientWeight patientWeight = queryPatientWeight(pid);
489 490 Integer week = 0;
... ... @@ -504,6 +505,7 @@
504 505 return new BaseObjectResponse().setData(week).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
505 506 }
506 507  
  508 + @Override
507 509 public BaseResponse patientRecipeInfo(String pid, Integer type, String time) {
508 510 PatientWeight patientWeight = queryPatientWeight(pid);
509 511 Map<String, Object> map = new LinkedHashMap<>();
... ... @@ -584,6 +586,7 @@
584 586 }
585 587  
586 588  
  589 + @Override
587 590 public BaseResponse patientBaseInfo(String pid) {
588 591 PatientWeight patientWeight = queryPatientWeight(pid);
589 592 Map<String, Object> map = new LinkedHashMap<>();
590 593  
591 594  
... ... @@ -635,17 +638,25 @@
635 638 }
636 639  
637 640  
638   - public void updateWeight(String beforeWeight, PatientWeight patientWeight, String bregmatic, String bregmaticOther) {
  641 + public void updateWeight(String beforeWeight, PatientWeight patientWeight, String bregmatic, String bregmaticOther, String height) {
639 642 boolean isUpdate = false;
640 643 PatientWeight patientWeightBefore = new PatientWeight();
641 644  
642 645 if (patientWeight != null && StringUtils.isNotEmpty(beforeWeight) && StringUtils.isNotEmpty(patientWeight.getBeforeHeight())) {
643 646 isUpdate = true;
644 647 patientWeightBefore.setBeforeWeight(beforeWeight);
645   - String bmi = getBmi(beforeWeight, patientWeight.getBeforeHeight());
646   - patientWeightBefore.setBmi(bmi);
  648 + if (StringUtils.isNotEmpty(height)) {
  649 + String bmi = getBmi(beforeWeight, height);
  650 + patientWeightBefore.setBmi(bmi);
  651 + patientWeight.setBmi(bmi);
  652 + } else {
  653 + String bmi = getBmi(beforeWeight, patientWeight.getBeforeHeight());
  654 + patientWeightBefore.setBmi(bmi);
  655 + patientWeight.setBmi(bmi);
  656 + }
  657 +
647 658 patientWeight.setBeforeWeight(beforeWeight);
648   - patientWeight.setBmi(bmi);
  659 +
649 660 }
650 661  
651 662 if (StringUtils.isNotEmpty(bregmatic)) {
... ... @@ -654,6 +665,7 @@
654 665  
655 666 patientWeight.setBregmatic(bregmatic);
656 667 patientWeight.setBregmaticOther(bregmaticOther);
  668 +
657 669 }
658 670  
659 671 if (isUpdate) {
... ... @@ -663,7 +675,8 @@
663 675  
664 676  
665 677 @Override
666   - public BaseResponse report(String id, Integer userId, String rid, String version, String doctorId, String beforeWeight, String bregmatic, String bregmaticOther) {
  678 + public BaseResponse report(String id, Integer userId, String rid, String version, String doctorId, String beforeWeight, String height,
  679 + String bregmatic, String bregmaticOther) {
667 680 String hospitalId = autoMatchFacade.getHospitalId(userId);
668 681 Organization org = organizationService.getOrganization(Integer.parseInt(hospitalId));
669 682  
... ... @@ -673,7 +686,7 @@
673 686  
674 687 PatientWeight patientWeight = mongoTemplate.findById(id, PatientWeight.class);
675 688  
676   - updateWeight(beforeWeight, patientWeight, bregmatic, bregmaticOther);
  689 + updateWeight(beforeWeight, patientWeight, height, bregmatic, bregmaticOther);
677 690  
678 691 if (patientWeight != null) {
679 692 Map<String, Object> map = new LinkedHashMap<>();
... ... @@ -1985,6 +1998,7 @@
1985 1998 *
1986 1999 * @return
1987 2000 */
  2001 + @Override
1988 2002 public BaseResponse findRiskDietaryPrinciples(String patientId) {
1989 2003 Patients patients = patientsService.findOnePatientById(patientId);
1990 2004 List dataResp = new ArrayList();
1991 2005  
... ... @@ -2232,12 +2246,12 @@
2232 2246 }
2233 2247  
2234 2248 @Override
2235   - public BaseResponse getWeightsReport(String pid, Integer userId, String rid, String version, String doctorId, String beforeWeight, String bregmatic1, String bregmaticOther) {
  2249 + public BaseResponse getWeightsReport(String pid, Integer userId, String rid, String version, String doctorId, String beforeWeight, String height, String bregmatic1, String bregmaticOther) {
2236 2250 Map<String, Map<Integer, Double>> series = new HashMap<>();
2237 2251 Map<String, Map<String, Object>> datas = new TreeMap<>();
2238 2252 PatientWeight patientWeight = mongoTemplate.findOne(Query.query(Criteria.where("_id").is(pid)), PatientWeight.class);
2239 2253  
2240   - updateWeight(beforeWeight, patientWeight, bregmatic1, bregmaticOther);
  2254 + updateWeight(beforeWeight, patientWeight, bregmatic1, bregmaticOther, height);
2241 2255  
2242 2256 //1.获取该孕妇是否有推荐的高危项
2243 2257 Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("_id").is(patientWeight.getPatientId())), Patients.class);
... ... @@ -2372,7 +2386,7 @@
2372 2386 }
2373 2387 }
2374 2388 if (datas.size() == 0) {
2375   - BaseResponse baseResponse = this.report(pid, userId, rid, version, doctorId, beforeWeight, bregmatic, bregmaticOther);
  2389 + BaseResponse baseResponse = this.report(pid, userId, rid, version, doctorId, beforeWeight, height, bregmatic, bregmaticOther);
2376 2390 return baseResponse;
2377 2391 }
2378 2392 //同时出现高血压和肝硬化或肝功能不全则按照肝硬化或肝功能不全
2379 2393  
... ... @@ -2392,12 +2406,12 @@
2392 2406 * 秦皇岛高危报告
2393 2407 */
2394 2408 @Override
2395   - public BaseResponse qhdHighRiskReport(String pid, Integer userId, String rid, String version, String doctorId, String beforeWeight, String bregmatic1, String bregmaticOther) {
  2409 + public BaseResponse qhdHighRiskReport(String pid, Integer userId, String rid, String version, String doctorId, String beforeWeight, String height, String bregmatic1, String bregmaticOther) {
2396 2410 Map<String, Map<Integer, Double>> series = new HashMap<>();
2397 2411 Map<String, Map<String, Object>> datas = new TreeMap<>();
2398 2412 PatientWeight patientWeight = mongoTemplate.findOne(Query.query(Criteria.where("_id").is(pid)), PatientWeight.class);
2399 2413  
2400   - updateWeight(beforeWeight, patientWeight, bregmatic1, bregmaticOther);
  2414 + updateWeight(beforeWeight, patientWeight, bregmatic1, bregmaticOther, height);
2401 2415  
2402 2416 //1.获取该孕妇是否有推荐的高危项
2403 2417 Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("_id").is(patientWeight.getPatientId())), Patients.class);
... ... @@ -2497,7 +2511,7 @@
2497 2511 }
2498 2512 }
2499 2513 if (datas.size() == 0) {
2500   - BaseResponse baseResponse = this.report(pid, userId, rid, "1", doctorId, beforeWeight, bregmatic1, bregmaticOther);
  2514 + BaseResponse baseResponse = this.report(pid, userId, rid, "1", doctorId, beforeWeight, height, bregmatic1, bregmaticOther);
2501 2515 return baseResponse;
2502 2516 }
2503 2517 /*//同时出现高血压和肝硬化或肝功能不全则按照肝硬化或肝功能不全
platform-operate-api/src/main/resources/fm_record.xls View file @ e36fd20

No preview for this file type