diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientWeightController.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientWeightController.java index fcb84fe..d985d82 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientWeightController.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientWeightController.java @@ -95,11 +95,11 @@ public class PatientWeightController extends BaseController { HttpServletRequest request, @RequestParam(value = "rid", required = false) String rid, @RequestParam(value = "doctorId") String doctorId, - @RequestParam(value = "beforeWeight",required = false) String beforeWeight, - @RequestParam(value = "bregmatic",required = false) String bregmatic, - @RequestParam(value = "bregmaticOther",required = false) String bregmaticOther, - String version) { - return patientWeightService.report(id, getUserId(request), rid, version, doctorId,beforeWeight,bregmatic,bregmaticOther); + @RequestParam(value = "beforeWeight", required = false) String beforeWeight, + @RequestParam(value = "bregmatic", required = false) String bregmatic, + @RequestParam(value = "bregmaticOther", required = false) String bregmaticOther, + @RequestParam(value = "height", required = false) String height, String version) { + return patientWeightService.report(id, getUserId(request), rid, version, doctorId, beforeWeight, height, bregmatic, bregmaticOther); } @@ -278,14 +278,15 @@ public class PatientWeightController extends BaseController { public BaseResponse getWeightsReport(@PathVariable String pid, HttpServletRequest request, @RequestParam(value = "rid", required = false) String rid, String version, - @RequestParam(value = "beforeWeight",required = false) String beforeWeight, - @RequestParam(value = "bregmatic",required = false) String bregmatic, - @RequestParam(value = "bregmaticOther",required = false) String bregmaticOther, + @RequestParam(value = "beforeWeight", required = false) String beforeWeight, + @RequestParam(value = "bregmatic", required = false) String bregmatic, + @RequestParam(value = "bregmaticOther", required = false) String bregmaticOther, + @RequestParam(value = "height", required = false) String height, @RequestParam(value = "doctorId") String doctorId) { if (pid.isEmpty() || "null".equals(pid)) { return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.USER_PASSWORD_ERROR).setErrormsg("pid值不能为空!"); } - return patientWeightService.getWeightsReport(pid, getUserId(request), rid, version, doctorId,beforeWeight,bregmatic,bregmaticOther); + return patientWeightService.getWeightsReport(pid, getUserId(request), rid, version, doctorId, beforeWeight, height, bregmatic, bregmaticOther); } @@ -301,14 +302,15 @@ public class PatientWeightController extends BaseController { public BaseResponse qhdReport(@PathVariable String pid, HttpServletRequest request, @RequestParam(value = "rid", required = false) String rid, String version, - @RequestParam(value = "beforeWeight",required = false) String beforeWeight, - @RequestParam(value = "bregmatic",required = false) String bregmatic, - @RequestParam(value = "bregmaticOther",required = false) String bregmaticOther, + @RequestParam(value = "beforeWeight", required = false) String beforeWeight, + @RequestParam(value = "bregmatic", required = false) String bregmatic, + @RequestParam(value = "bregmaticOther", required = false) String bregmaticOther, + @RequestParam(value = "height", required = false) String height, @RequestParam(value = "doctorId") String doctorId) { if (pid.isEmpty() || "null".equals(pid)) { return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.USER_PASSWORD_ERROR).setErrormsg("pid值不能为空!"); } - return patientWeightService.qhdHighRiskReport(pid, getUserId(request), rid, version, doctorId,beforeWeight,bregmatic,bregmaticOther); + return patientWeightService.qhdHighRiskReport(pid, getUserId(request), rid, version, doctorId, beforeWeight, height, bregmatic, bregmaticOther); } /** diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/PatientWeightService.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/PatientWeightService.java index 173ec55..3847d76 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/PatientWeightService.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/PatientWeightService.java @@ -35,7 +35,7 @@ public interface PatientWeightService extends IBaseService { BaseResponse delete(String id); - BaseResponse report(String id, Integer userId, String rid, String version, String doctorId,String beforeWeight,String bregmatic,String bregmaticOther); + BaseResponse report(String id, Integer userId, String rid, String version, String doctorId, String beforeWeight, String height, String bregmatic, String bregmaticOther); BaseResponse wxReport(String pid); @@ -60,9 +60,9 @@ public interface PatientWeightService extends IBaseService { public void getSeries(Map series, String bmiStr, String bregmatic); - BaseResponse getWeightsReport(String pid, Integer userId, String rid, String version, String doctorId,String beforeWeight,String bregmatic,String bregmaticOther); + BaseResponse getWeightsReport(String pid, Integer userId, String rid, String version, String doctorId, String beforeWeight, String height, String bregmatic, String bregmaticOther); - BaseResponse qhdHighRiskReport(String pid, Integer userId, String rid, String version, String doctorId,String beforeWeight,String bregmatic,String bregmaticOther); + BaseResponse qhdHighRiskReport(String pid, Integer userId, String rid, String version, String doctorId, String beforeWeight, String height, String bregmatic, String bregmaticOther); public void setReport(Map restMap, Map weights, String beforeWeight, String bmi, Map dayWeights, String bregmatic); diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java index 2b9f82b..e0dcffa 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java @@ -484,6 +484,7 @@ public class PatientWeightServiceImpl extends BaseServiceImpl implements Patient return patientWeight; } + @Override public BaseResponse lastCheckTime(String pid, String time) { PatientWeight patientWeight = queryPatientWeight(pid); Integer week = 0; @@ -504,6 +505,7 @@ public class PatientWeightServiceImpl extends BaseServiceImpl implements Patient return new BaseObjectResponse().setData(week).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); } + @Override public BaseResponse patientRecipeInfo(String pid, Integer type, String time) { PatientWeight patientWeight = queryPatientWeight(pid); Map map = new LinkedHashMap<>(); @@ -584,6 +586,7 @@ public class PatientWeightServiceImpl extends BaseServiceImpl implements Patient } + @Override public BaseResponse patientBaseInfo(String pid) { PatientWeight patientWeight = queryPatientWeight(pid); Map map = new LinkedHashMap<>(); @@ -635,17 +638,25 @@ public class PatientWeightServiceImpl extends BaseServiceImpl implements Patient } - public void updateWeight(String beforeWeight, PatientWeight patientWeight, String bregmatic, String bregmaticOther) { + public void updateWeight(String beforeWeight, PatientWeight patientWeight, String bregmatic, String bregmaticOther, String height) { boolean isUpdate = false; PatientWeight patientWeightBefore = new PatientWeight(); if (patientWeight != null && StringUtils.isNotEmpty(beforeWeight) && StringUtils.isNotEmpty(patientWeight.getBeforeHeight())) { isUpdate = true; patientWeightBefore.setBeforeWeight(beforeWeight); - String bmi = getBmi(beforeWeight, patientWeight.getBeforeHeight()); - patientWeightBefore.setBmi(bmi); + if (StringUtils.isNotEmpty(height)) { + String bmi = getBmi(beforeWeight, height); + patientWeightBefore.setBmi(bmi); + patientWeight.setBmi(bmi); + } else { + String bmi = getBmi(beforeWeight, patientWeight.getBeforeHeight()); + patientWeightBefore.setBmi(bmi); + patientWeight.setBmi(bmi); + } + patientWeight.setBeforeWeight(beforeWeight); - patientWeight.setBmi(bmi); + } if (StringUtils.isNotEmpty(bregmatic)) { @@ -654,6 +665,7 @@ public class PatientWeightServiceImpl extends BaseServiceImpl implements Patient patientWeight.setBregmatic(bregmatic); patientWeight.setBregmaticOther(bregmaticOther); + } if (isUpdate) { @@ -663,7 +675,8 @@ public class PatientWeightServiceImpl extends BaseServiceImpl implements Patient @Override - public BaseResponse report(String id, Integer userId, String rid, String version, String doctorId, String beforeWeight, String bregmatic, String bregmaticOther) { + public BaseResponse report(String id, Integer userId, String rid, String version, String doctorId, String beforeWeight, String height, + String bregmatic, String bregmaticOther) { String hospitalId = autoMatchFacade.getHospitalId(userId); Organization org = organizationService.getOrganization(Integer.parseInt(hospitalId)); @@ -673,7 +686,7 @@ public class PatientWeightServiceImpl extends BaseServiceImpl implements Patient PatientWeight patientWeight = mongoTemplate.findById(id, PatientWeight.class); - updateWeight(beforeWeight, patientWeight, bregmatic, bregmaticOther); + updateWeight(beforeWeight, patientWeight, height, bregmatic, bregmaticOther); if (patientWeight != null) { Map map = new LinkedHashMap<>(); @@ -1985,6 +1998,7 @@ public class PatientWeightServiceImpl extends BaseServiceImpl implements Patient * * @return */ + @Override public BaseResponse findRiskDietaryPrinciples(String patientId) { Patients patients = patientsService.findOnePatientById(patientId); List dataResp = new ArrayList(); @@ -2232,12 +2246,12 @@ public class PatientWeightServiceImpl extends BaseServiceImpl implements Patient } @Override - public BaseResponse getWeightsReport(String pid, Integer userId, String rid, String version, String doctorId, String beforeWeight, String bregmatic1, String bregmaticOther) { + public BaseResponse getWeightsReport(String pid, Integer userId, String rid, String version, String doctorId, String beforeWeight, String height, String bregmatic1, String bregmaticOther) { Map> series = new HashMap<>(); Map> datas = new TreeMap<>(); PatientWeight patientWeight = mongoTemplate.findOne(Query.query(Criteria.where("_id").is(pid)), PatientWeight.class); - updateWeight(beforeWeight, patientWeight, bregmatic1, bregmaticOther); + updateWeight(beforeWeight, patientWeight, bregmatic1, bregmaticOther, height); //1.获取该孕妇是否有推荐的高危项 Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("_id").is(patientWeight.getPatientId())), Patients.class); @@ -2372,7 +2386,7 @@ public class PatientWeightServiceImpl extends BaseServiceImpl implements Patient } } if (datas.size() == 0) { - BaseResponse baseResponse = this.report(pid, userId, rid, version, doctorId, beforeWeight, bregmatic, bregmaticOther); + BaseResponse baseResponse = this.report(pid, userId, rid, version, doctorId, beforeWeight, height, bregmatic, bregmaticOther); return baseResponse; } //同时出现高血压和肝硬化或肝功能不全则按照肝硬化或肝功能不全 @@ -2392,12 +2406,12 @@ public class PatientWeightServiceImpl extends BaseServiceImpl implements Patient * 秦皇岛高危报告 */ @Override - public BaseResponse qhdHighRiskReport(String pid, Integer userId, String rid, String version, String doctorId, String beforeWeight, String bregmatic1, String bregmaticOther) { + public BaseResponse qhdHighRiskReport(String pid, Integer userId, String rid, String version, String doctorId, String beforeWeight, String height, String bregmatic1, String bregmaticOther) { Map> series = new HashMap<>(); Map> datas = new TreeMap<>(); PatientWeight patientWeight = mongoTemplate.findOne(Query.query(Criteria.where("_id").is(pid)), PatientWeight.class); - updateWeight(beforeWeight, patientWeight, bregmatic1, bregmaticOther); + updateWeight(beforeWeight, patientWeight, bregmatic1, bregmaticOther, height); //1.获取该孕妇是否有推荐的高危项 Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("_id").is(patientWeight.getPatientId())), Patients.class); @@ -2497,7 +2511,7 @@ public class PatientWeightServiceImpl extends BaseServiceImpl implements Patient } } if (datas.size() == 0) { - BaseResponse baseResponse = this.report(pid, userId, rid, "1", doctorId, beforeWeight, bregmatic1, bregmaticOther); + BaseResponse baseResponse = this.report(pid, userId, rid, "1", doctorId, beforeWeight, height, bregmatic1, bregmaticOther); return baseResponse; } /*//同时出现高血压和肝硬化或肝功能不全则按照肝硬化或肝功能不全 diff --git a/platform-operate-api/src/main/resources/fm_record.xls b/platform-operate-api/src/main/resources/fm_record.xls index 7edc1f2d893fdd72d4e0c8a48db1a47aa2378a18..976969b3ce61cf366575dd4a9e8ad4ad8e578999 100644 GIT binary patch delta 58 zcmZoT!Q60yc|#5h>w~~^%JG{ES-!Aw6s=K?pM8~)d9osl@a6{YIp_H}88{gj7#M*h M5OQwTx_ylU0AflJ$^ZZW delta 58 zcmZoT!Q60yc|#5h>w$9ym*X}UvV39VsGD;sZuV71=E;gI!kZho=bYygU=U