Commit 66dccf9e76f0c64a8c87127f3c1f08dd27234504
1 parent
e93fde8170
Exists in
master
and in
6 other branches
update
Showing 5 changed files with 394 additions and 6 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/BasicConfigServiceTest.java
- platform-common/src/main/java/com/lyms/platform/common/utils/StringUtils.java
- platform-dal/src/main/java/com/lyms/platform/pojo/PatientDdbWeightReportModel.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanChanPatientWorker.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/BasicConfigServiceTest.java
View file @
66dccf9
| ... | ... | @@ -6825,6 +6825,121 @@ |
| 6825 | 6825 | } |
| 6826 | 6826 | } |
| 6827 | 6827 | |
| 6828 | + | |
| 6829 | + public static void saveDdb(String fileName) { | |
| 6830 | + ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:/spring/applicationContext_biz_patient1.xml"); | |
| 6831 | + MongoTemplate mongoTemplate | |
| 6832 | + = (MongoTemplate) applicationContext.getBean("mongoTemplate"); | |
| 6833 | + mongoTemplate.getDb().authenticate("platform", "platform123".toCharArray()); | |
| 6834 | + File file = new File(fileName); | |
| 6835 | + Workbook wb = null; | |
| 6836 | + try { | |
| 6837 | + wb = Workbook.getWorkbook(file); | |
| 6838 | + Sheet s = wb.getSheet(0); | |
| 6839 | + System.out.println(s.getName() + " : "); | |
| 6840 | + int rows = s.getRows(); | |
| 6841 | + if (rows > 0) { | |
| 6842 | + //遍历每行 | |
| 6843 | + for (int i = 2; i < rows; i++) { | |
| 6844 | + System.out.println("rows=" + i); | |
| 6845 | + PatientDdbWeightReportModel model = new PatientDdbWeightReportModel(); | |
| 6846 | + Cell[] cells = s.getRow(i); | |
| 6847 | + if (cells.length > 0) { | |
| 6848 | + for (int j = 0; j < cells.length; j++) { | |
| 6849 | + String str = cells[j].getContents() == null ? null : cells[j].getContents().trim(); | |
| 6850 | + switch (j) { | |
| 6851 | + case 0: | |
| 6852 | + model.setKcal(StringUtils.isNotEmpty(str) ? Integer.parseInt(str.replace("kcal", "")) : null); | |
| 6853 | + continue; | |
| 6854 | + case 1: | |
| 6855 | + model.setType(str.replace("\n","").equals("早期") ? 1 : (str.replace("\n","").equals("中期") ? 2 : 3)); | |
| 6856 | + continue; | |
| 6857 | + case 2: | |
| 6858 | + List<String> list1 = Arrays.asList(str.split("\n")); | |
| 6859 | + model.setBreakfast(list1); | |
| 6860 | + continue; | |
| 6861 | + case 3: | |
| 6862 | + List<String> list2 = Arrays.asList(str.split("\n")); | |
| 6863 | + model.setBreakfastAdd(list2); | |
| 6864 | + continue; | |
| 6865 | + case 4: | |
| 6866 | + List<String> list3 = Arrays.asList(str.split("\n")); | |
| 6867 | + model.setLunch(list3); | |
| 6868 | + continue; | |
| 6869 | + case 5: | |
| 6870 | + List<String> list4 = Arrays.asList(str.split("\n")); | |
| 6871 | + model.setLunchAdd(list4); | |
| 6872 | + continue; | |
| 6873 | + case 6: | |
| 6874 | + List<String> list5 = Arrays.asList(str.split("\n")); | |
| 6875 | + model.setDinner(list5); | |
| 6876 | + continue; | |
| 6877 | + case 7: | |
| 6878 | + List<String> list6 = Arrays.asList(str.split("\n")); | |
| 6879 | + model.setDinnerAdd(list6); | |
| 6880 | + continue; | |
| 6881 | + case 8: | |
| 6882 | + List<String> list7 = Arrays.asList(str.split("\n")); | |
| 6883 | + List<String> listTemp = new ArrayList<>(); | |
| 6884 | + for (String key : list7) | |
| 6885 | + { | |
| 6886 | + if (!key.equals("*参考《中国妇幼人群膳食指南2016》")) | |
| 6887 | + { | |
| 6888 | + listTemp.add(key); | |
| 6889 | + } | |
| 6890 | + } | |
| 6891 | + model.setDietStructures(listTemp); | |
| 6892 | + continue; | |
| 6893 | + } | |
| 6894 | + } | |
| 6895 | + } | |
| 6896 | + mongoTemplate.save(model); | |
| 6897 | + } | |
| 6898 | + } | |
| 6899 | + } catch (Exception e) { | |
| 6900 | + e.printStackTrace(); | |
| 6901 | + } | |
| 6902 | + } | |
| 6903 | + public static void saveDdb1(String fileName) { | |
| 6904 | + ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:/spring/applicationContext_biz_patient1.xml"); | |
| 6905 | + MongoTemplate mongoTemplate | |
| 6906 | + = (MongoTemplate) applicationContext.getBean("mongoTemplate"); | |
| 6907 | + mongoTemplate.getDb().authenticate("platform", "platform123".toCharArray()); | |
| 6908 | + File file = new File(fileName); | |
| 6909 | + Workbook wb = null; | |
| 6910 | + try { | |
| 6911 | + wb = Workbook.getWorkbook(file); | |
| 6912 | + Sheet s = wb.getSheet(1); | |
| 6913 | + System.out.println(s.getName() + " : "); | |
| 6914 | + int rows = s.getRows(); | |
| 6915 | + if (rows > 0) { | |
| 6916 | + //遍历每行 | |
| 6917 | + for (int i = 1; i < rows; i++) { | |
| 6918 | + System.out.println("rows=" + i); | |
| 6919 | + PatientDdbWeightReportModel model = new PatientDdbWeightReportModel(); | |
| 6920 | + Cell[] cells = s.getRow(i); | |
| 6921 | + if (cells.length > 0) { | |
| 6922 | + for (int j = 0; j < cells.length; j++) { | |
| 6923 | + String str = cells[j].getContents() == null ? null : cells[j].getContents().trim(); | |
| 6924 | + switch (j) { | |
| 6925 | + case 0: | |
| 6926 | + model.setWeek(StringUtils.isNotEmpty(str) ? Integer.parseInt(str) : null); | |
| 6927 | + continue; | |
| 6928 | + case 1: | |
| 6929 | + List<String> list1 = Arrays.asList(str.split("\n")); | |
| 6930 | + model.setWeekCarefuls(list1); | |
| 6931 | + continue; | |
| 6932 | + } | |
| 6933 | + } | |
| 6934 | + } | |
| 6935 | + mongoTemplate.save(model); | |
| 6936 | + } | |
| 6937 | + } | |
| 6938 | + } catch (Exception e) { | |
| 6939 | + e.printStackTrace(); | |
| 6940 | + } | |
| 6941 | + } | |
| 6942 | + | |
| 6828 | 6943 | public static void main(String[] args) { |
| 6829 | 6944 | // getData(); |
| 6830 | 6945 | //weightWeek("F:\\体重与营养管理\\体重与营养管理第三版(北方)改标红“、冰淇淋”-晓萌.xls"); |
| 6831 | 6946 | |
| ... | ... | @@ -6874,8 +6989,10 @@ |
| 6874 | 6989 | //saveMicroelements("E:\\dev\\微量元素指导报告模板.xls"); |
| 6875 | 6990 | //saveBabyMicroelements("F:\\技术文档\\儿童微量元素\\儿童微量元素指导报告模板.xls"); |
| 6876 | 6991 | //saveBabyBone("F:\\技术文档\\骨密度\\儿童骨密度报告模板内容表.xls"); |
| 6877 | - saveQhdDist("F:\儿童营养报告\秦皇岛市妇幼新版选择儿童膳食报告\(泉渝)秦皇岛市妇幼儿童膳食报告20210129.xls"); | |
| 6992 | +// saveQhdDist("F:\儿童营养报告\秦皇岛市妇幼新版选择儿童膳食报告\(泉渝)秦皇岛市妇幼儿童膳食报告20210129.xls"); | |
| 6878 | 6993 | // saveQhdDist1("F:\\儿童营养报告\\秦皇岛市妇幼新版选择儿童膳食报告\\秦皇岛市妇幼儿童膳食报告0-11.xls"); |
| 6994 | + saveDdb("F:\\体重与营养管理\\低蛋白.xls"); | |
| 6995 | + saveDdb1("F:\\体重与营养管理\\低蛋白.xls"); | |
| 6879 | 6996 | } |
| 6880 | 6997 | |
| 6881 | 6998 |
platform-common/src/main/java/com/lyms/platform/common/utils/StringUtils.java
View file @
66dccf9
| ... | ... | @@ -413,6 +413,13 @@ |
| 413 | 413 | } |
| 414 | 414 | return null; |
| 415 | 415 | } |
| 416 | + public static String listToString(List list, char separator) { | |
| 417 | + StringBuilder sb = new StringBuilder(); | |
| 418 | + for (int i = 0; i < list.size(); i++) { | |
| 419 | + sb.append(list.get(i)).append(separator); | |
| 420 | + } | |
| 421 | + return list.isEmpty() ? "" : sb.toString().substring(0, sb.toString().length() - 1); | |
| 422 | + } | |
| 416 | 423 | |
| 417 | 424 | |
| 418 | 425 | public static String numCodeStr(Long numCode) { |
platform-dal/src/main/java/com/lyms/platform/pojo/PatientDdbWeightReportModel.java
View file @
66dccf9
| 1 | +package com.lyms.platform.pojo; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.result.BaseModel; | |
| 4 | +import org.springframework.data.mongodb.core.mapping.Document; | |
| 5 | + | |
| 6 | +import java.util.List; | |
| 7 | + | |
| 8 | +@Document(collection = "lyms_patient_ddb_report") | |
| 9 | +public class PatientDdbWeightReportModel extends BaseModel { | |
| 10 | + private String id; | |
| 11 | + | |
| 12 | + //热量值 | |
| 13 | + private Integer kcal; | |
| 14 | + | |
| 15 | + //1 孕早期 2 孕中期 3孕晚期 | |
| 16 | + private Integer type; | |
| 17 | + | |
| 18 | + //孕周 | |
| 19 | + private Integer week; | |
| 20 | + | |
| 21 | + //膳食结构 | |
| 22 | + private List<String> dietStructures; | |
| 23 | + //本周注意 | |
| 24 | + private List<String> weekCarefuls; | |
| 25 | + | |
| 26 | + private List<String> breakfast;//早餐 | |
| 27 | + private List<String> breakfastAdd;//上午加餐 | |
| 28 | + private List<String> lunch;//午餐 | |
| 29 | + private List<String> lunchAdd;//下午加餐 | |
| 30 | + private List<String> dinner;//晚餐 | |
| 31 | + private List<String> dinnerAdd;//晚加餐 | |
| 32 | + | |
| 33 | + public String getId() { | |
| 34 | + return id; | |
| 35 | + } | |
| 36 | + | |
| 37 | + public void setId(String id) { | |
| 38 | + this.id = id; | |
| 39 | + } | |
| 40 | + | |
| 41 | + public Integer getKcal() { | |
| 42 | + return kcal; | |
| 43 | + } | |
| 44 | + | |
| 45 | + public void setKcal(Integer kcal) { | |
| 46 | + this.kcal = kcal; | |
| 47 | + } | |
| 48 | + | |
| 49 | + public Integer getType() { | |
| 50 | + return type; | |
| 51 | + } | |
| 52 | + | |
| 53 | + public void setType(Integer type) { | |
| 54 | + this.type = type; | |
| 55 | + } | |
| 56 | + | |
| 57 | + public Integer getWeek() { | |
| 58 | + return week; | |
| 59 | + } | |
| 60 | + | |
| 61 | + public void setWeek(Integer week) { | |
| 62 | + this.week = week; | |
| 63 | + } | |
| 64 | + | |
| 65 | + public List<String> getDietStructures() { | |
| 66 | + return dietStructures; | |
| 67 | + } | |
| 68 | + | |
| 69 | + public void setDietStructures(List<String> dietStructures) { | |
| 70 | + this.dietStructures = dietStructures; | |
| 71 | + } | |
| 72 | + | |
| 73 | + public List<String> getWeekCarefuls() { | |
| 74 | + return weekCarefuls; | |
| 75 | + } | |
| 76 | + | |
| 77 | + public void setWeekCarefuls(List<String> weekCarefuls) { | |
| 78 | + this.weekCarefuls = weekCarefuls; | |
| 79 | + } | |
| 80 | + | |
| 81 | + public List<String> getBreakfast() { | |
| 82 | + return breakfast; | |
| 83 | + } | |
| 84 | + | |
| 85 | + public void setBreakfast(List<String> breakfast) { | |
| 86 | + this.breakfast = breakfast; | |
| 87 | + } | |
| 88 | + | |
| 89 | + public List<String> getBreakfastAdd() { | |
| 90 | + return breakfastAdd; | |
| 91 | + } | |
| 92 | + | |
| 93 | + public void setBreakfastAdd(List<String> breakfastAdd) { | |
| 94 | + this.breakfastAdd = breakfastAdd; | |
| 95 | + } | |
| 96 | + | |
| 97 | + public List<String> getLunch() { | |
| 98 | + return lunch; | |
| 99 | + } | |
| 100 | + | |
| 101 | + public void setLunch(List<String> lunch) { | |
| 102 | + this.lunch = lunch; | |
| 103 | + } | |
| 104 | + | |
| 105 | + public List<String> getLunchAdd() { | |
| 106 | + return lunchAdd; | |
| 107 | + } | |
| 108 | + | |
| 109 | + public void setLunchAdd(List<String> lunchAdd) { | |
| 110 | + this.lunchAdd = lunchAdd; | |
| 111 | + } | |
| 112 | + | |
| 113 | + public List<String> getDinner() { | |
| 114 | + return dinner; | |
| 115 | + } | |
| 116 | + | |
| 117 | + public void setDinner(List<String> dinner) { | |
| 118 | + this.dinner = dinner; | |
| 119 | + } | |
| 120 | + | |
| 121 | + public List<String> getDinnerAdd() { | |
| 122 | + return dinnerAdd; | |
| 123 | + } | |
| 124 | + | |
| 125 | + public void setDinnerAdd(List<String> dinnerAdd) { | |
| 126 | + this.dinnerAdd = dinnerAdd; | |
| 127 | + } | |
| 128 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
66dccf9
| ... | ... | @@ -2762,13 +2762,15 @@ |
| 2762 | 2762 | Integer gjKcal = this.getRounding((int) this.getKcal(bregmatic, residualWeight, low, high, week, bmiD, patients, patientWeight, heights, 1.0)); |
| 2763 | 2763 | String gjKcalStr = gjKcal + "kcal"; |
| 2764 | 2764 | //获取改孕妇的高危项 |
| 2765 | + List<String> reiskFactor = patients.getRiskFactorId(); | |
| 2765 | 2766 | String risk = patients.getRiskLevelId(); |
| 2767 | + Map<Integer, String> weights = new LinkedHashMap<>(); | |
| 2766 | 2768 | if (risk.contains("eb146c03-b19f-4e28-b85f-fda574b2283b")) { |
| 2767 | 2769 | return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.DEPT_NOT_EXISTS).setErrormsg("警告").setData("该风险已超过管控范围,请到医生处进行咨询"); |
| 2768 | 2770 | } else { |
| 2769 | 2771 | //获取视图 |
| 2770 | 2772 | Map<String, String> dayWeights = patientWeight.getDayWeights(); |
| 2771 | - Map<Integer, String> weights = new LinkedHashMap<>(); | |
| 2773 | + | |
| 2772 | 2774 | if (MapUtils.isNotEmpty(dayWeights)) { |
| 2773 | 2775 | Set<Map.Entry<String, String>> entries = dayWeights.entrySet(); |
| 2774 | 2776 | for (Map.Entry<String, String> entry : entries) { |
| ... | ... | @@ -2782,7 +2784,7 @@ |
| 2782 | 2784 | Map<String, Object> data4 = new HashMap<>(); |
| 2783 | 2785 | Map<String, Object> data5 = new HashMap<>(); |
| 2784 | 2786 | Map<String, Object> data6 = new HashMap<>(); |
| 2785 | - List<String> reiskFactor = patients.getRiskFactorId(); | |
| 2787 | + | |
| 2786 | 2788 | List<WeightReportModel> weightReport = mongoTemplate.findAll(WeightReportModel.class); |
| 2787 | 2789 | if (reiskFactor.isEmpty() && weightReport.isEmpty()) { |
| 2788 | 2790 | return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("对象值为空!").setData(""); |
| ... | ... | @@ -2827,8 +2829,135 @@ |
| 2827 | 2829 | } |
| 2828 | 2830 | } |
| 2829 | 2831 | if (datas.size() == 0) { |
| 2830 | - BaseResponse baseResponse = this.report(pid, userId, rid, version, doctorId, beforeWeight, height, bregmatic, bregmaticOther); | |
| 2831 | - return baseResponse; | |
| 2832 | + if (CollectionUtils.isNotEmpty(reiskFactor) && reiskFactor.contains("603c54a85bfc648e856f20aa")) | |
| 2833 | + { | |
| 2834 | + | |
| 2835 | + Map data = new HashMap(); | |
| 2836 | + setReport(data,weights, patientWeight.getBeforeWeight(), patientWeight.getBmi(), patientWeight.getDayWeights(), patientWeight.getBregmatic()); | |
| 2837 | + | |
| 2838 | + Map<String, String> kmap = computeKulServiceManager.getComputeKulByRisk(rid).getComputeKul(Double.parseDouble(patientWeight.getBeforeWeight()), | |
| 2839 | + Double.parseDouble(patientWeight.getNowWeight()), week, bmiD, patientWeight.getBregmatic(), patientWeight.getBeforeHeight(), version); | |
| 2840 | + | |
| 2841 | + double kulStart = Double.valueOf(kmap.get("kulStart")); | |
| 2842 | + int k1 = ((int) kulStart / 100) * 100; | |
| 2843 | + if (k1 < 1000) { | |
| 2844 | + k1 = 1000; | |
| 2845 | + } else if (k1 > 3300) { | |
| 2846 | + k1 = 3300; | |
| 2847 | + } | |
| 2848 | + int type = 0; | |
| 2849 | + //孕早期 | |
| 2850 | + if (week < 12) { | |
| 2851 | + type = 1; | |
| 2852 | + //孕中期 | |
| 2853 | + } else if (week <= 28) { | |
| 2854 | + type = 2; | |
| 2855 | + //孕晚期 | |
| 2856 | + } else { | |
| 2857 | + type = 3; | |
| 2858 | + } | |
| 2859 | + | |
| 2860 | + Map userMap = new HashMap(); | |
| 2861 | + userMap.put("userName", patients.getUsername()); | |
| 2862 | + userMap.put("age", patients.getAge() + "岁"); | |
| 2863 | + userMap.put("height", patientWeight.getBeforeHeight() + "cm"); | |
| 2864 | + userMap.put("bmi", bmiD); | |
| 2865 | + userMap.put("ddb", true); | |
| 2866 | + userMap.put("week", "孕" + week + "周"); | |
| 2867 | + userMap.put("vcCardNo", patients.getVcCardNo()); | |
| 2868 | + userMap.put("phone", patients.getPhone()); | |
| 2869 | + userMap.put("dueDate", DateUtil.getyyyy_MM_dd(patients.getDueDate())); | |
| 2870 | + userMap.put("NowWeight", patientWeight.getNowWeight() + "kg"); | |
| 2871 | + userMap.put("BeforeWeight", patientWeight.getBeforeWeight() + "kg"); | |
| 2872 | + //userMap.put("riskFactor", set); | |
| 2873 | + userMap.put("state", this.getState(patientWeight.getNowWeight(), patientWeight.getBeforeWeight(), patientWeight.getBregmatic(), week, bmiD)); | |
| 2874 | + data.put("userInfo", userMap); | |
| 2875 | + | |
| 2876 | + PatientDdbWeightReportModel patientDdbWeightReportModel = | |
| 2877 | + mongoTemplate.findOne(Query.query(Criteria.where("kcal").is(k1).and("type").is(type)), PatientDdbWeightReportModel.class); | |
| 2878 | + | |
| 2879 | + | |
| 2880 | + | |
| 2881 | + Map map2 = new HashMap(); | |
| 2882 | + List<String> yyzl = Arrays.asList( | |
| 2883 | + "各种营养素均衡摄入", | |
| 2884 | + "补充充足的叶酸,依据医嘱补充叶酸制剂,选择叶酸含量丰富的食物如动物的内脏、蛋、鱼、梨、蚕豆、甜菜、菠菜、芹菜、坚果等。各种营养素的均衡摄入,每日保证碳水化合物、脂肪、蛋白质、维生素、水、无机盐、膳食纤维七大营养素的均衡摄入,每日保证至少足量的蔬菜和水果的摄入,建议蔬菜种类摄入齐全,根茎叶茄花果类的蔬菜推荐都选择,酸性的水果含维生素C和维生素B族类较多,也可选择时令新鲜的食材。", | |
| 2885 | + "贫血严重请咨询医生补充铁剂", | |
| 2886 | + "贫血严重的情况下请在医生的指导下补充铁制剂。", | |
| 2887 | + "维持正常体重", | |
| 2888 | + "每周测量体重,维持孕期适宜增重。保证规律的饮食,不得挑食、偏食;避免过食,从而引起体重增长过快。咨询医生,关注个体化体重增长范围。", | |
| 2889 | + "保证动物性蛋白质的摄入", | |
| 2890 | + "每日保证推荐的奶制品的摄入量,例如牛奶、酸奶、奶酪等;经常摄入排骨、鱼虾类等以达到钙质的补充。肉类、鱼虾类、蔬菜、水果均衡摄入。", | |
| 2891 | + "随着孕期的变化需要注意肉类和鸡蛋的摄入增加。", | |
| 2892 | + "准备母乳喂养", | |
| 2893 | + "孕期准备母乳喂养,不饮酒不吸烟远离二手烟。", | |
| 2894 | + "保持健康的饮食习惯", | |
| 2895 | + "增加用餐次数,应采取少食多餐的原则,每日进餐次数由孕前的3次增加至5-6次,每日可在3次正餐中间加2-3次的加餐,每餐时间间隔约2小时左右。", | |
| 2896 | + "保证饮食的清淡,每日食盐的摄入不得超过6g;适当摄入油脂,保证饮食的清淡,少吃或不吃油炸食物、辛辣食物、糕点、饮料等含糖量过高的食物。", | |
| 2897 | + "保证食物的清洁卫生,保证食物的卫生,新鲜,不吃隔夜、变质的食物,不吃没有熟透的肉类和海鲜,尽量减少外出用餐。", | |
| 2898 | + "洁净饮水,少喝含糖饮料,保证每日2300ml水的摄入。", | |
| 2899 | + "保证规律的生活习惯", | |
| 2900 | + "规律的生活,适当的运动,养成规律的睡眠习惯,早睡——11点以前入睡,避免熬夜,早起——7:30-8:00间起床吃早餐,以免晚上失眠。", | |
| 2901 | + "保持健康的运动习惯", | |
| 2902 | + "每天根据自己的情况保证20-40分钟的适当的运动,孕早期以散步为宜,中期以游泳、瑜伽为宜,孕晚期以散步、助产运动为宜。" | |
| 2903 | + ); | |
| 2904 | + map2.put("guideTitle","孕期营养指南"); | |
| 2905 | + map2.put("guideInfo", yyzl); | |
| 2906 | + data.put("nutritionGuide", map2); | |
| 2907 | + Map map3 = new HashMap(); | |
| 2908 | + map3.put("dietTitle", "低蛋白的饮食原则"); | |
| 2909 | + | |
| 2910 | + List<String> yz = Arrays.asList("1、保证每公斤体重每日1.5-2.0g的蛋白质摄入。增加食用含蛋白质丰富的肉类包括红肉类:猪肉、牛肉、羊肉;白肉类:鸡肉、鱼肉、虾肉、贝肉;补充充足的奶制品如:纯牛奶、酸奶、奶酪、奶粉等;补充充足的蛋类,蛋类的生物学效价最高,人体吸收和利用率也最高,保证蛋类的摄入充足有助于提高机体蛋白质吸收利用的效率。", | |
| 2911 | + "2、保证能量摄入充足,能量摄入充足是保证蛋白质在体内有效利用的前提,能量摄入不充足容易导致摄入的蛋白质优先燃烧供能,从而造成浪费。日常饮食主要的能量来源为主食,因此每日要保证主食摄入量。", | |
| 2912 | + "3、补充充足的富含B族维生素的食物如肝脏、蛋、牛奶、糙米、全麦制品、芝麻、香菇、花生、绿豆等,有助于维持机体正常的能量代谢。" , | |
| 2913 | + "4、补充充足的维生素C和锌有助于机体蛋白组织的合成。保证蔬菜水果的摄入,丰富的维生素和矿物质有助于促进血液蛋白质的合成。" , | |
| 2914 | + "5、血蛋白过低或机体蛋白质缺乏严重的情况下,通过肠内或者饮食的方式进行高蛋白饮食补充时需要循序渐进,以避免胃肠道不耐受,从而有助于降低再喂养综合征的发生。" , | |
| 2915 | + "6、蛋白质缺乏严重的情况下,必要时请在临床医生或者临床营养师的建议下选择高蛋白型肠内营养制剂或者通过静脉通路进行蛋白质的补充。"); | |
| 2916 | + | |
| 2917 | + map3.put("dietInfo", yz); | |
| 2918 | + data.put("dietaryRules", map3); | |
| 2919 | + | |
| 2920 | + if (null != patientDdbWeightReportModel) { | |
| 2921 | + | |
| 2922 | + Map map1 = new HashMap(); | |
| 2923 | + map1.put("kacl", patientDdbWeightReportModel.getKcal()+"kcal"); | |
| 2924 | + map1.put("breakfast", com.lyms.platform.common.utils.StringUtils.listToString(patientDdbWeightReportModel.getBreakfast(),',')); | |
| 2925 | + map1.put("breakfastAdd", com.lyms.platform.common.utils.StringUtils.listToString(patientDdbWeightReportModel.getBreakfastAdd(),',')); | |
| 2926 | + map1.put("lunch", com.lyms.platform.common.utils.StringUtils.listToString(patientDdbWeightReportModel.getLunch(),',')); | |
| 2927 | + map1.put("lunchAdd", com.lyms.platform.common.utils.StringUtils.listToString(patientDdbWeightReportModel.getLunchAdd(),',')); | |
| 2928 | + map1.put("dinner", com.lyms.platform.common.utils.StringUtils.listToString(patientDdbWeightReportModel.getDinner(),',')); | |
| 2929 | + map1.put("dinnerAdd", com.lyms.platform.common.utils.StringUtils.listToString(patientDdbWeightReportModel.getDinnerAdd(),',')); | |
| 2930 | + map1.put("proposalInfo", patientDdbWeightReportModel.getDietStructures()); | |
| 2931 | + PatientDdbWeightReportModel patientDdbWeightReportModel1 = | |
| 2932 | + mongoTemplate.findOne(Query.query(Criteria.where("week").is(week)), PatientDdbWeightReportModel.class); | |
| 2933 | + if (patientDdbWeightReportModel1 != null) | |
| 2934 | + { | |
| 2935 | + Map map = new HashMap(); | |
| 2936 | + map.put("weeks", week); | |
| 2937 | + map.put("becareful", patientDdbWeightReportModel1.getWeekCarefuls()); | |
| 2938 | + data.put("attentionWeek", map); | |
| 2939 | + } | |
| 2940 | + data.put("recipes", map1); | |
| 2941 | + | |
| 2942 | + List<String> healthy = new ArrayList(); | |
| 2943 | + healthy.add("d42eec03-aa86-45b8-a4e0-78a0ff365fb6");//健康id// | |
| 2944 | + healthy.add("a427da89-594a-46c2-b9f7-1b0d355ce54c");//28>BMI>25 | |
| 2945 | + healthy.add("5a40c6c5422b03d4ad2bf7bd");//BMI<18.5 | |
| 2946 | + if (patients.getRiskFactorId().size() - this.getSame(healthy, patients.getRiskFactorId()).size() >= 2) { | |
| 2947 | + Map map = new HashMap(); | |
| 2948 | + map.put("tipsInfo", "您当前情况存在两种及以上高危风险因素,需请您的主管医生结合临床实际情况对报告进行解读,并根据医生解读建议,指导日常营养膳食"); | |
| 2949 | + data.put("tips", map); | |
| 2950 | + } | |
| 2951 | + | |
| 2952 | + datas.put("1",data); | |
| 2953 | + } | |
| 2954 | + } | |
| 2955 | + else | |
| 2956 | + { | |
| 2957 | + BaseResponse baseResponse = this.report(pid, userId, rid, version, doctorId, beforeWeight, height, bregmatic, bregmaticOther); | |
| 2958 | + return baseResponse; | |
| 2959 | + } | |
| 2960 | + | |
| 2832 | 2961 | } |
| 2833 | 2962 | //同时出现高血压和肝硬化或肝功能不全则按照肝硬化或肝功能不全 |
| 2834 | 2963 | if (datas.containsKey("3") && datas.containsKey("8")) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanChanPatientWorker.java
View file @
66dccf9
| ... | ... | @@ -122,6 +122,12 @@ |
| 122 | 122 | //唐山滦县判断复诊是否是本院 |
| 123 | 123 | if (CollectionUtils.isNotEmpty(ant)) { |
| 124 | 124 | for (int k = 0; k < ant.size(); k++) { |
| 125 | + | |
| 126 | + if (ant.get(k) == null || ant.get(k).getHospitalId() == null) | |
| 127 | + { | |
| 128 | + continue; | |
| 129 | + } | |
| 130 | + | |
| 125 | 131 | if (k >= 4) { |
| 126 | 132 | break; |
| 127 | 133 | } |
| ... | ... | @@ -220,7 +226,7 @@ |
| 220 | 226 | MatDeliverQuery matDeliverQuery = new MatDeliverQuery(); |
| 221 | 227 | matDeliverQuery.setPid(patients.getPid()); |
| 222 | 228 | matDeliverQuery.setCreatedStart(patients.getLastMenses()); |
| 223 | - matDeliverQuery.setYn(YnEnums.YES.getId()); | |
| 229 | +// matDeliverQuery.setYn(YnEnums.YES.getId()); | |
| 224 | 230 | stopWatch.start("query matdeliver"); |
| 225 | 231 | List <MaternalDeliverModel> maternalDeliverModels = matDeliverService.query(matDeliverQuery); |
| 226 | 232 | if (CollectionUtils.isNotEmpty(maternalDeliverModels)) { |
| ... | ... | @@ -353,6 +359,7 @@ |
| 353 | 359 | logger.debug(stopWatch.toString()); |
| 354 | 360 | } |
| 355 | 361 | } catch (Exception e) { |
| 362 | + e.printStackTrace(); | |
| 356 | 363 | ExceptionUtils.catchException(e, "convertToQuanCPatient get result error."); |
| 357 | 364 | } |
| 358 | 365 |