Commit d4e6ffcd39cfc8df396c9dcacbdd828094da2d9c
1 parent
dbd50f594e
Exists in
master
and in
6 other branches
update
Showing 3 changed files with 206 additions and 40 deletions
platform-dal/src/main/java/com/lyms/platform/pojo/VolumeComponentAnalysisModel.java
View file @
d4e6ffc
... | ... | @@ -32,6 +32,8 @@ |
32 | 32 | //手机号码 |
33 | 33 | private String phone; |
34 | 34 | private Integer yn; |
35 | + //前囟 单胎/双胎/多胎 | |
36 | + private String bregmatic; | |
35 | 37 | |
36 | 38 | |
37 | 39 | private String parentId; |
... | ... | @@ -108,6 +110,14 @@ |
108 | 110 | private String edemaMin; // 0.35;, //水肿系数正常范围的低值 |
109 | 111 | private String vfiMax; // 5;, //内脏脂肪指数正常范围的高值 |
110 | 112 | private String vfiMin; // 10; //内脏脂肪指数正常范围的低值 |
113 | + | |
114 | + public String getBregmatic() { | |
115 | + return bregmatic; | |
116 | + } | |
117 | + | |
118 | + public void setBregmatic(String bregmatic) { | |
119 | + this.bregmatic = bregmatic; | |
120 | + } | |
111 | 121 | |
112 | 122 | public Integer getYn() { |
113 | 123 | return yn; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/VolumeComponentAnalysisFacade.java
View file @
d4e6ffc
... | ... | @@ -13,6 +13,7 @@ |
13 | 13 | import com.lyms.platform.operate.web.service.PatientWeightService; |
14 | 14 | import com.lyms.platform.operate.web.service.impl.BaseServiceImpl; |
15 | 15 | import com.lyms.platform.operate.web.service.impl.ComputeKulServiceManager; |
16 | +import com.lyms.platform.operate.web.utils.ReportConfig; | |
16 | 17 | import com.lyms.platform.pojo.BodyMassAnalysisModel; |
17 | 18 | import com.lyms.platform.pojo.Patients; |
18 | 19 | import com.lyms.platform.pojo.TemporaryUserModel; |
... | ... | @@ -227,7 +228,7 @@ |
227 | 228 | userMap.put("week", DateUtil.getWeekDesc(patients.getLastMenses(), new Date()));//孕周 |
228 | 229 | //获取bmi值 |
229 | 230 | double bmi = Double.valueOf(patientWeightService.getBmi( |
230 | - volumeComponentAnalysisModel.getWeight(),//当前体重 | |
231 | + volumeComponentAnalysisModel.getBeforeWeight(),//孕前体重 | |
231 | 232 | volumeComponentAnalysisModel.getHeight()));//当前身高^ |
232 | 233 | //计算热量值 |
233 | 234 | Map<String, String> kmap = computeKulServiceManager.getComputeKulByRisk("").getComputeKul( |
234 | 235 | |
235 | 236 | |
236 | 237 | |
237 | 238 | |
238 | 239 | |
239 | 240 | |
240 | 241 | |
241 | 242 | |
... | ... | @@ -248,34 +249,46 @@ |
248 | 249 | Map<String, Object> componentInfo = new HashMap<>(); |
249 | 250 | // componentInfo.put("water", Double.valueOf(volumeComponentAnalysisModel.getIcw() + Double.valueOf(volumeComponentAnalysisModel.getEcw()))); |
250 | 251 | componentInfo.put("water",volumeComponentAnalysisModel.getWater());//身体总水分 |
251 | - componentInfo.put("waterMax",volumeComponentAnalysisModel.getWaterMax());//身体总 水分正常范围的高值 | |
252 | - componentInfo.put("waterMin",volumeComponentAnalysisModel.getWaterMax());//身体总 水分正常范围的低值 | |
252 | + Map<String, String> sfMap = rangeMap(DateUtil.getWeek2(patients.getLastMenses(), new Date()), | |
253 | + Double.valueOf(volumeComponentAnalysisModel.getWeight()), | |
254 | + "sf"); | |
255 | + componentInfo.put("waterMax",sfMap.get("max"));//身体总 水分正常范围的高值 | |
256 | + componentInfo.put("waterMin",sfMap.get("min"));//身体总 水分正常范围的低值 | |
253 | 257 | componentInfo.put("icw", volumeComponentAnalysisModel.getIcw());//细胞内液 |
254 | - Map<String, String> componentMap = rangeMap(DateUtil.getWeek2(patients.getLastMenses(), new Date()),//孕周 | |
255 | - Double.valueOf(volumeComponentAnalysisModel.getWeight()),//体重 | |
258 | + Map<String, String> xbnyMap = rangeMap(DateUtil.getWeek2(patients.getLastMenses(), new Date()), | |
259 | + Double.valueOf(volumeComponentAnalysisModel.getWeight()), | |
256 | 260 | "xbny"); |
257 | - componentInfo.put("icwMax", componentMap.get("max"));//细胞内液高值 | |
258 | - componentInfo.put("icwMin", componentMap.get("min"));//细胞内液低值 | |
261 | + componentInfo.put("icwMax", xbnyMap.get("max"));//细胞内液高值 | |
262 | + componentInfo.put("icwMin", xbnyMap.get("min"));//细胞内液低值 | |
259 | 263 | componentInfo.put("ecw", volumeComponentAnalysisModel.getEcw());//细胞外液 |
260 | - Map<String, String> componentMap1 = rangeMap(DateUtil.getWeek2(patients.getLastMenses(), new Date()),//孕周 | |
261 | - Double.valueOf(volumeComponentAnalysisModel.getWeight()),//体重 | |
264 | + Map<String, String> xbwyMap = rangeMap(DateUtil.getWeek2(patients.getLastMenses(), new Date()), | |
265 | + Double.valueOf(volumeComponentAnalysisModel.getWeight()), | |
262 | 266 | "xbwy"); |
263 | - componentInfo.put("ecwMax", componentMap1.get("max"));//细胞外液高值 | |
264 | - componentInfo.put("ecwMin", componentMap1.get("min"));//细胞外液低值 | |
267 | + componentInfo.put("ecwMax", xbwyMap.get("max"));//细胞外液高值 | |
268 | + componentInfo.put("ecwMin", xbwyMap.get("min"));//细胞外液低值 | |
265 | 269 | componentInfo.put("muscle", volumeComponentAnalysisModel.getMuscle());//肌肉 |
266 | - componentInfo.put("muscleMax", volumeComponentAnalysisModel.getMuscleMax());//肌肉正常范围的高值 | |
267 | - componentInfo.put("muscleMin", volumeComponentAnalysisModel.getMuscleMin());//肌肉正常范围的低值 | |
270 | + Map<String, String> jrMap = rangeMap(DateUtil.getWeek2(patients.getLastMenses(), new Date()), | |
271 | + Double.valueOf(volumeComponentAnalysisModel.getWeight()), | |
272 | + "jr"); | |
273 | + componentInfo.put("muscleMax", jrMap.get("max"));//肌肉正常范围的高值 | |
274 | + componentInfo.put("muscleMin", jrMap.get("min"));//肌肉正常范围的低值 | |
268 | 275 | componentInfo.put("lbm", volumeComponentAnalysisModel.getLbm());//瘦体重(去脂体重) |
269 | 276 | componentInfo.put("weight", volumeComponentAnalysisModel.getWeight());//体重 |
270 | 277 | componentInfo.put("protein", volumeComponentAnalysisModel.getProtein());//蛋白质 |
271 | - componentInfo.put("proteinMax", volumeComponentAnalysisModel.getProteinMax());//蛋白质正常范围的高值 | |
272 | - componentInfo.put("proteinMin", volumeComponentAnalysisModel.getProteinMin());//蛋白质正常范围的低值 | |
278 | + Map<String, String> dbzMap = rangeMap(DateUtil.getWeek2(patients.getLastMenses(), new Date()), | |
279 | + Double.valueOf(volumeComponentAnalysisModel.getWeight()), | |
280 | + "dbz"); | |
281 | + componentInfo.put("proteinMax", dbzMap.get("max"));//蛋白质正常范围的高值 | |
282 | + componentInfo.put("proteinMin", dbzMap.get("min"));//蛋白质正常范围的低值 | |
273 | 283 | componentInfo.put("bone", volumeComponentAnalysisModel.getBone());//骨质 |
274 | - componentInfo.put("boneMax", volumeComponentAnalysisModel.getBoneMax());//骨质正常范围的高值 | |
275 | - componentInfo.put("boneMin", volumeComponentAnalysisModel.getBoneMin());//骨质正常范围的低值 | |
284 | + componentInfo.put("boneMax", "2.5");//骨质正常范围的高值 | |
285 | + componentInfo.put("boneMin", "3.5");//骨质正常范围的低值 | |
276 | 286 | componentInfo.put("fat", volumeComponentAnalysisModel.getFat());//脂肪 |
277 | - componentInfo.put("fatMax", volumeComponentAnalysisModel.getFatMax());//脂肪正常范围的高值 | |
278 | - componentInfo.put("fatMin", volumeComponentAnalysisModel.getFatMin());//脂肪正常范围的低值 | |
287 | + Map<String, String> zfMap = rangeMap(DateUtil.getWeek2(patients.getLastMenses(), new Date()), | |
288 | + Double.valueOf(volumeComponentAnalysisModel.getWeight()), | |
289 | + "zf"); | |
290 | + componentInfo.put("fatMax", zfMap.get("max"));//脂肪正常范围的高值 | |
291 | + componentInfo.put("fatMin", zfMap.get("min"));//脂肪正常范围的低值 | |
279 | 292 | data.add(componentInfo); |
280 | 293 | |
281 | 294 | //体型判定(体型判定2赋值) |
282 | 295 | |
283 | 296 | |
284 | 297 | |
285 | 298 | |
286 | 299 | |
... | ... | @@ -284,29 +297,32 @@ |
284 | 297 | //基本评估 |
285 | 298 | Map<String, Object> basicInfo = new HashMap<>(); |
286 | 299 | basicInfo.put("basicWeight", volumeComponentAnalysisModel.getWeight());//体重 |
287 | - basicInfo.put("basicWeightMax", volumeComponentAnalysisModel.getWeightMax());//体重正常范围的高值 | |
288 | - basicInfo.put("basicWeightMin", volumeComponentAnalysisModel.getWeightMin());//体重正常范围的低值 | |
300 | + Map<String, String> tzMap = rangeMaptz( DateUtil.getWeek2(patients.getLastMenses(), new Date()), | |
301 | + Double.valueOf(volumeComponentAnalysisModel.getBeforeWeight()), bmi, volumeComponentAnalysisModel.getBregmatic()); | |
302 | + basicInfo.put("basicWeightMax", tzMap.get("max"));//体重正常范围的高值 | |
303 | + basicInfo.put("basicWeightMin", tzMap.get("min"));//体重正常范围的低值 | |
289 | 304 | basicInfo.put("basicMuscle", volumeComponentAnalysisModel.getMuscle());//肌肉 |
290 | - basicInfo.put("basicMuscleMax", volumeComponentAnalysisModel.getMuscleMax());//肌肉正常范围的高值 | |
291 | - basicInfo.put("basicMuscleMin", volumeComponentAnalysisModel.getMuscleMin());//肌肉正常范围的低值 | |
305 | + basicInfo.put("basicMuscleMax", jrMap.get("max"));//肌肉正常范围的高值 | |
306 | + basicInfo.put("basicMuscleMin", jrMap.get("min"));//肌肉正常范围的低值 | |
292 | 307 | basicInfo.put("basicPbf", volumeComponentAnalysisModel.getPbf());//体脂百分比 |
293 | - basicInfo.put("basicPbfMax", volumeComponentAnalysisModel.getPbfMax());//体脂率正常范围的高值 | |
294 | - basicInfo.put("basicPbfMin", volumeComponentAnalysisModel.getPbfMin());//体脂率正常范围的低值 | |
308 | + basicInfo.put("basicPbfMax", zfMap.get("max"));//体脂率正常范围的高值 | |
309 | + basicInfo.put("basicPbfMin", zfMap.get("min"));//体脂率正常范围的低值 | |
295 | 310 | basicInfo.put("basicBone", volumeComponentAnalysisModel.getBone());//骨质 |
296 | - basicInfo.put("basicBoneMax", volumeComponentAnalysisModel.getBoneMax());//骨质正常范围的高值 | |
297 | - basicInfo.put("basicBoneMin", volumeComponentAnalysisModel.getBoneMin());//骨质正常范围的低值 | |
311 | + basicInfo.put("basicBoneMax", "3.5");//骨质正常范围的高值 | |
312 | + basicInfo.put("basicBoneMin", "2.5");//骨质正常范围的低值 | |
298 | 313 | basicInfo.put("basicWater",volumeComponentAnalysisModel.getWater());//身体总水分 |
299 | - basicInfo.put("basicWaterMax",volumeComponentAnalysisModel.getWaterMax());//身体总 水分正常范围的高值 | |
300 | - basicInfo.put("basicWaterMin",volumeComponentAnalysisModel.getWaterMin());//身体总 水分正常范围的低值 | |
314 | + | |
315 | + basicInfo.put("basicWaterMax",sfMap.get("max"));//身体总 水分正常范围的高值 | |
316 | + basicInfo.put("basicWaterMin",sfMap.get("min"));//身体总 水分正常范围的低值 | |
301 | 317 | basicInfo.put("basicSmm", volumeComponentAnalysisModel.getSmm());//骨骼肌 |
302 | 318 | basicInfo.put("basicSmmMax", volumeComponentAnalysisModel.getSmmMax());//骨骼肌正常范围的高值 |
303 | 319 | basicInfo.put("basicSmmMin", volumeComponentAnalysisModel.getSmmMin());//骨骼肌正常范围的低值 |
304 | 320 | basicInfo.put("basicBmi", volumeComponentAnalysisModel.getBmi());//体质指数 |
305 | 321 | basicInfo.put("basicBmiMax", volumeComponentAnalysisModel.getBmiMax());//体质指数正常范围的高值 |
306 | 322 | basicInfo.put("basicBmiMin", volumeComponentAnalysisModel.getBmiMin());//体质指数正常范围的低值 |
307 | - basicInfo.put("basicWhr", volumeComponentAnalysisModel.getWhr());//腰臀比(2位小数) | |
308 | - basicInfo.put("basicWhrMax", volumeComponentAnalysisModel.getWhrMax());//腰臀比正常范围的高值 | |
309 | - basicInfo.put("basicWhrMin", volumeComponentAnalysisModel.getWhrMin());//腰臀比正常范围的低值 | |
323 | +// basicInfo.put("basicWhr", volumeComponentAnalysisModel.getWhr());//腰臀比(2位小数) 泉渝说郝总说不用做 | |
324 | +// basicInfo.put("basicWhrMax", volumeComponentAnalysisModel.getWhrMax());//腰臀比正常范围的高值 | |
325 | +// basicInfo.put("basicWhrMin", volumeComponentAnalysisModel.getWhrMin());//腰臀比正常范围的低值 | |
310 | 326 | data.add(basicInfo); |
311 | 327 | |
312 | 328 | //体重管理 |
313 | 329 | |
314 | 330 | |
315 | 331 | |
316 | 332 | |
317 | 333 | |
318 | 334 | |
319 | 335 | |
320 | 336 | |
321 | 337 | |
... | ... | @@ -715,42 +731,183 @@ |
715 | 731 | if ("xbny".equals(type)) {//细胞内液含量正常范围 |
716 | 732 | double min = weight * 0.175; |
717 | 733 | double max = weight * 0.188; |
734 | + max= new BigDecimal(max).setScale(2, RoundingMode.DOWN).doubleValue(); | |
735 | + min= new BigDecimal(min).setScale(2, RoundingMode.DOWN).doubleValue(); | |
718 | 736 | map.put("min", Double.toString(min)); |
719 | 737 | map.put("max", Double.toString(max)); |
720 | 738 | }else if ("xbwy".equals(type)) {//细胞外液体含量正常范围 |
721 | 739 | double min = weight * 0.12; |
722 | 740 | double max = weight * 0.16; |
741 | + max= new BigDecimal(max).setScale(2, RoundingMode.DOWN).doubleValue(); | |
742 | + min= new BigDecimal(min).setScale(2, RoundingMode.DOWN).doubleValue(); | |
723 | 743 | map.put("min", Double.toString(min)); |
724 | 744 | map.put("max", Double.toString(max)); |
745 | + }else if ("jr".equals(type)) {//肌肉正常范围 | |
746 | + double min = weight * 0.65; | |
747 | + double max = weight * 0.80; | |
748 | + max= new BigDecimal(max).setScale(2, RoundingMode.DOWN).doubleValue(); | |
749 | + min= new BigDecimal(min).setScale(2, RoundingMode.DOWN).doubleValue(); | |
750 | + map.put("min", Double.toString(min)); | |
751 | + map.put("max", Double.toString(max)); | |
752 | + }else if ("dbz".equals(type)) {//蛋白质 | |
753 | + double min = weight * 0.13; | |
754 | + double max = weight * 0.17; | |
755 | + max= new BigDecimal(max).setScale(2, RoundingMode.DOWN).doubleValue(); | |
756 | + min= new BigDecimal(min).setScale(2, RoundingMode.DOWN).doubleValue(); | |
757 | + map.put("min", Double.toString(min)); | |
758 | + map.put("max", Double.toString(max)); | |
759 | + }else if ("zf".equals(type)) {//体脂百分比正常范围 | |
760 | + double min = weight * 0.214; | |
761 | + double max = weight * 0.35; | |
762 | + max= new BigDecimal(max).setScale(2, RoundingMode.DOWN).doubleValue(); | |
763 | + min= new BigDecimal(min).setScale(2, RoundingMode.DOWN).doubleValue(); | |
764 | + map.put("min", Double.toString(min)); | |
765 | + map.put("max", Double.toString(max)); | |
766 | + /*体脂百分比正常范围 体重×21.4-35% 体重×21.4-35% 体重×25-35%*/ | |
767 | + }else if ("sf".equals(type)) {//人体总水分含量正常范围 | |
768 | + double min = weight * 0.375; | |
769 | + double max = weight * 0.48; | |
770 | + max= new BigDecimal(max).setScale(2, RoundingMode.DOWN).doubleValue(); | |
771 | + min= new BigDecimal(min).setScale(2, RoundingMode.DOWN).doubleValue(); | |
772 | + map.put("min", Double.toString(min)); | |
773 | + map.put("max", Double.toString(max)); | |
774 | + /*人体总水分含量正常范围 体重×37.5-48% 体重×40.57-50.1% 体重×42.7-52.74%*/ | |
725 | 775 | } |
726 | 776 | //孕中期 |
727 | 777 | } else if (week >= 13 && week <= 28) {//蛋白质 |
728 | 778 | if ("xbny".equals(type)) { |
729 | 779 | double min = weight * 0.175; |
730 | 780 | double max = weight * 0.188; |
781 | + max= new BigDecimal(max).setScale(2, RoundingMode.DOWN).doubleValue(); | |
782 | + min= new BigDecimal(min).setScale(2, RoundingMode.DOWN).doubleValue(); | |
731 | 783 | map.put("min", Double.toString(min)); |
732 | 784 | map.put("max", Double.toString(max)); |
733 | 785 | }else if ("xbwy".equals(type)) { |
734 | 786 | double min = weight * 0.13; |
735 | 787 | double max = weight * 0.17; |
788 | + max= new BigDecimal(max).setScale(2, RoundingMode.DOWN).doubleValue(); | |
789 | + min= new BigDecimal(min).setScale(2, RoundingMode.DOWN).doubleValue(); | |
736 | 790 | map.put("min", Double.toString(min)); |
737 | 791 | map.put("max", Double.toString(max)); |
792 | + }else if ("jr".equals(type)) {//肌肉正常范围 | |
793 | + double min = weight * 0.67; | |
794 | + double max = weight * 0.80; | |
795 | + max= new BigDecimal(max).setScale(2, RoundingMode.DOWN).doubleValue(); | |
796 | + min= new BigDecimal(min).setScale(2, RoundingMode.DOWN).doubleValue(); | |
797 | + map.put("min", Double.toString(min)); | |
798 | + map.put("max", Double.toString(max)); | |
799 | + }else if ("dbz".equals(type)) {//蛋白质 | |
800 | + double min = weight * 0.15; | |
801 | + double max = weight * 0.18; | |
802 | + max= new BigDecimal(max).setScale(2, RoundingMode.DOWN).doubleValue(); | |
803 | + min= new BigDecimal(min).setScale(2, RoundingMode.DOWN).doubleValue(); | |
804 | + map.put("min", Double.toString(min)); | |
805 | + map.put("max", Double.toString(max)); | |
806 | + }else if ("zf".equals(type)) {//体脂百分比正常范围 | |
807 | + double min = weight * 0.214; | |
808 | + double max = weight * 0.35; | |
809 | + max= new BigDecimal(max).setScale(2, RoundingMode.DOWN).doubleValue(); | |
810 | + min= new BigDecimal(min).setScale(2, RoundingMode.DOWN).doubleValue(); | |
811 | + map.put("min", Double.toString(min)); | |
812 | + map.put("max", Double.toString(max)); | |
813 | + /*体脂百分比正常范围 体重×21.4-35% 体重×21.4-35% 体重×25-35%*/ | |
814 | + }else if ("sf".equals(type)) {//人体总水分含量正常范围 | |
815 | + double min = weight * 0.4057; | |
816 | + double max = weight * 0.501; | |
817 | + max= new BigDecimal(max).setScale(2, RoundingMode.DOWN).doubleValue(); | |
818 | + min= new BigDecimal(min).setScale(2, RoundingMode.DOWN).doubleValue(); | |
819 | + map.put("min", Double.toString(min)); | |
820 | + map.put("max", Double.toString(max)); | |
821 | + /*人体总水分含量正常范围 体重×37.5-48% 体重×40.57-50.1% 体重×42.7-52.74%*/ | |
738 | 822 | } |
739 | 823 | //孕晚期 |
740 | 824 | } else if (week >= 29 && week <= 40) {//蛋白质 |
741 | 825 | if ("xbny".equals(type)) { |
742 | 826 | double min = weight * 0.175; |
743 | 827 | double max = weight * 0.188; |
828 | + max= new BigDecimal(max).setScale(2, RoundingMode.DOWN).doubleValue(); | |
829 | + min= new BigDecimal(min).setScale(2, RoundingMode.DOWN).doubleValue(); | |
744 | 830 | map.put("min", Double.toString(min)); |
745 | 831 | map.put("max", Double.toString(max)); |
746 | 832 | }else if ("xbwy".equals(type)) { |
747 | 833 | double min = weight * 0.15; |
748 | 834 | double max = weight * 0.18; |
835 | + max= new BigDecimal(max).setScale(2, RoundingMode.DOWN).doubleValue(); | |
836 | + min= new BigDecimal(min).setScale(2, RoundingMode.DOWN).doubleValue(); | |
749 | 837 | map.put("min", Double.toString(min)); |
750 | 838 | map.put("max", Double.toString(max)); |
839 | + }else if ("jr".equals(type)) {//肌肉正常范围 | |
840 | + double min = weight * 0.70; | |
841 | + double max = weight * 0.85; | |
842 | + max= new BigDecimal(max).setScale(2, RoundingMode.DOWN).doubleValue(); | |
843 | + min= new BigDecimal(min).setScale(2, RoundingMode.DOWN).doubleValue(); | |
844 | + map.put("min", Double.toString(min)); | |
845 | + map.put("max", Double.toString(max)); | |
846 | + }else if ("dbz".equals(type)) {//蛋白质 | |
847 | + double min = weight * 0.1578; | |
848 | + double max = weight * 0.192; | |
849 | + max= new BigDecimal(max).setScale(2, RoundingMode.DOWN).doubleValue(); | |
850 | + min= new BigDecimal(min).setScale(2, RoundingMode.DOWN).doubleValue(); | |
851 | + map.put("min", Double.toString(min)); | |
852 | + map.put("max", Double.toString(max)); | |
853 | + }else if ("zf".equals(type)) {//体脂百分比正常范围 | |
854 | + double min = weight * 0.25; | |
855 | + double max = weight * 0.35; | |
856 | + max= new BigDecimal(max).setScale(2, RoundingMode.DOWN).doubleValue(); | |
857 | + min= new BigDecimal(min).setScale(2, RoundingMode.DOWN).doubleValue(); | |
858 | + map.put("min", Double.toString(min)); | |
859 | + map.put("max", Double.toString(max)); | |
860 | + /*体脂百分比正常范围 体重×21.4-35% 体重×21.4-35% 体重×25-35%*/ | |
861 | + }else if ("sf".equals(type)) {//人体总水分含量正常范围 | |
862 | + double min = weight * 0.427; | |
863 | + double max = weight * 0.5274; | |
864 | + max= new BigDecimal(max).setScale(2, RoundingMode.DOWN).doubleValue(); | |
865 | + min= new BigDecimal(min).setScale(2, RoundingMode.DOWN).doubleValue(); | |
866 | + map.put("min", Double.toString(min)); | |
867 | + map.put("max", Double.toString(max)); | |
868 | + /*人体总水分含量正常范围 体重×37.5-48% 体重×40.57-50.1% 体重×42.7-52.74%*/ | |
751 | 869 | } |
752 | 870 | |
753 | 871 | } |
872 | + return map; | |
873 | + } | |
874 | + | |
875 | + private Map<String,String> rangeMaptz(Integer week, double weight,double bmi,String bregmatic){ | |
876 | + Map<String, String> map = new HashMap<>(); | |
877 | + // 前囟 单胎/双胎/多胎 | |
878 | + //private String bregmatic; lyms_patient_weight | |
879 | + String bmiStr = ""; | |
880 | + if (StringUtils.isEmpty(bregmatic) || "1".equals(bregmatic)) { | |
881 | + if (bmi < 18.5) { | |
882 | + bmiStr = "BMI<18.5孕" + week + "周"; | |
883 | + } else if (bmi <= 24.9 && bmi >= 18.5) { | |
884 | + bmiStr = "BMI=18.5-24.9孕" + week + "周"; | |
885 | + } else if (bmi <= 29.9 && bmi >= 25) { | |
886 | + bmiStr = "BMI=25-29.9孕" + week + "周"; | |
887 | + } else if (bmi >= 30) { | |
888 | + bmiStr = "BMI≥30孕" + week + "周"; | |
889 | + } | |
890 | + } else { | |
891 | + if (bmi <= 24.9) { | |
892 | + bmiStr = "BMI≤24.9孕" + week + "周"; | |
893 | + } else if (bmi <= 29.9 && bmi >= 25) { | |
894 | + bmiStr = "BMI=25-29.9孕" + week + "周"; | |
895 | + } else if (bmi >= 30) { | |
896 | + bmiStr = "BMI≥30孕" + week + "周"; | |
897 | + } | |
898 | + } | |
899 | + String[] rangeWeight = null; | |
900 | + if (StringUtils.isEmpty(bregmatic) || "1".equals(bregmatic)) { | |
901 | + rangeWeight = ReportConfig.getWeightRange(bmiStr).split("-"); | |
902 | + } else { | |
903 | + rangeWeight = ReportConfig.getDWeightRange(bmiStr).split("-"); | |
904 | + } | |
905 | + double addWeightStart = Double.parseDouble(rangeWeight[0]); | |
906 | + double addWeightEnd = Double.parseDouble(rangeWeight[1]); | |
907 | + double max= new BigDecimal(addWeightStart+weight).setScale(2, RoundingMode.DOWN).doubleValue(); | |
908 | + double min= new BigDecimal(addWeightEnd+weight).setScale(2, RoundingMode.DOWN).doubleValue(); | |
909 | + map.put("min", Double.toString(min)); | |
910 | + map.put("max", Double.toString(max)); | |
754 | 911 | return map; |
755 | 912 | } |
756 | 913 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/ReportConfig.java
View file @
d4e6ffc
... | ... | @@ -52,8 +52,7 @@ |
52 | 52 | N_S_AREA.put("宁夏回族自治区","北方"); |
53 | 53 | |
54 | 54 | |
55 | - | |
56 | - //WEIGHT_RANGE.put("BMI<18.5孕0-12周","1.00-1.50"); | |
55 | + WEIGHT_RANGE.put("BMI<18.5孕12周","1.00-1.50"); | |
57 | 56 | WEIGHT_RANGE.put("BMI<18.5孕13周","1.41-2.09"); |
58 | 57 | WEIGHT_RANGE.put("BMI<18.5孕14周","1.82-2.68"); |
59 | 58 | WEIGHT_RANGE.put("BMI<18.5孕15周","2.23-3.27"); |
... | ... | @@ -84,7 +83,7 @@ |
84 | 83 | WEIGHT_RANGE.put("BMI<18.5孕40周","12.50-18.00"); |
85 | 84 | |
86 | 85 | |
87 | - // WEIGHT_RANGE.put("BMI=18.5-24.9孕0-12周","1.00-1.50"); | |
86 | + WEIGHT_RANGE.put("BMI=18.5-24.9孕12周","1.00-1.50"); | |
88 | 87 | WEIGHT_RANGE.put("BMI=18.5-24.9孕13周","1.37-2.02"); |
89 | 88 | WEIGHT_RANGE.put("BMI=18.5-24.9孕14周","1.75-2.54"); |
90 | 89 | WEIGHT_RANGE.put("BMI=18.5-24.9孕15周","2.12-3.06"); |
... | ... | @@ -115,7 +114,7 @@ |
115 | 114 | WEIGHT_RANGE.put("BMI=18.5-24.9孕40周","11.50-16.00"); |
116 | 115 | |
117 | 116 | |
118 | - //WEIGHT_RANGE.put("BMI=25-29.9孕0-12周","1.00-1.50"); | |
117 | + WEIGHT_RANGE.put("BMI=25-29.9孕12周","1.00-1.50"); | |
119 | 118 | WEIGHT_RANGE.put("BMI=25-29.9孕13周","1.21-1.86"); |
120 | 119 | WEIGHT_RANGE.put("BMI=25-29.9孕14周","1.42-2.22"); |
121 | 120 | WEIGHT_RANGE.put("BMI=25-29.9孕15周","1.64-2.58"); |
... | ... | @@ -146,7 +145,7 @@ |
146 | 145 | WEIGHT_RANGE.put("BMI=25-29.9孕40周","7.00-11.50"); |
147 | 146 | |
148 | 147 | |
149 | - //WEIGHT_RANGE.put("BMI≥30孕0-12周","1.00-1.50"); | |
148 | + WEIGHT_RANGE.put("BMI≥30孕12周","1.00-1.50"); | |
150 | 149 | WEIGHT_RANGE.put("BMI≥30孕13周","1.14-1.77"); |
151 | 150 | WEIGHT_RANGE.put("BMI≥30孕14周","1.28-2.04"); |
152 | 151 | WEIGHT_RANGE.put("BMI≥30孕15周","1.42-2.31"); |
... | ... | @@ -177,7 +176,7 @@ |
177 | 176 | WEIGHT_RANGE.put("BMI≥30孕40周","5.00-9.00"); |
178 | 177 | |
179 | 178 | |
180 | - //DWEIGHT_RANGE.put("BMI≤24.9孕0-12周","1.00-1.50kg"); | |
179 | + DWEIGHT_RANGE.put("BMI≤24.9孕12周","1.00-1.50kg"); | |
181 | 180 | DWEIGHT_RANGE.put("BMI≤24.9孕13周","1.57-2.34"); |
182 | 181 | DWEIGHT_RANGE.put("BMI≤24.9孕14周","2.14-3.18"); |
183 | 182 | DWEIGHT_RANGE.put("BMI≤24.9孕15周","2.71-4.02"); |
... | ... | @@ -208,7 +207,7 @@ |
208 | 207 | DWEIGHT_RANGE.put("BMI≤24.9孕40周","17.00-25.00"); |
209 | 208 | |
210 | 209 | |
211 | - //DWEIGHT_RANGE.put("BMI=25-29.9孕0-12周","1.00-1.50"); | |
210 | + DWEIGHT_RANGE.put("BMI=25-29.9孕12周","1.00-1.50"); | |
212 | 211 | DWEIGHT_RANGE.put("BMI=25-29.9孕13周","1.46-2.27"); |
213 | 212 | DWEIGHT_RANGE.put("BMI=25-29.9孕14周","1.93-3.04"); |
214 | 213 | DWEIGHT_RANGE.put("BMI=25-29.9孕15周","2.39-3.81"); |
... | ... | @@ -238,7 +237,7 @@ |
238 | 237 | DWEIGHT_RANGE.put("BMI=25-29.9孕39周","13.55-22.29"); |
239 | 238 | DWEIGHT_RANGE.put("BMI=25-29.9孕40周","14.00-23.00"); |
240 | 239 | |
241 | - //DWEIGHT_RANGE.put("BMI≥30孕0-12周","1.00-1.50"); | |
240 | + DWEIGHT_RANGE.put("BMI≥30孕12周","1.00-1.50"); | |
242 | 241 | DWEIGHT_RANGE.put("BMI≥30孕13周","1.36-2.12"); |
243 | 242 | DWEIGHT_RANGE.put("BMI≥30孕14周","1.72-2.75"); |
244 | 243 | DWEIGHT_RANGE.put("BMI≥30孕15周","2.08-3.37"); |