Commit f9e8d3dbf5eedf988128730e23d05b044dca1e8b

Authored by baohanddd
1 parent f9e5a46a39

add risk enum color

Showing 4 changed files with 119 additions and 4 deletions

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/BasicConfigServiceTest.java View file @ f9e8d3d
... ... @@ -76,7 +76,112 @@
76 76 }*/
77 77 // addDataPermission(applicationContext);
78 78 // addVisit(applicationContext);
79   - addKidsGuidelines(applicationContext);
  79 +// addaw(applicationContext, "0-83月龄身长、高标准差数值表(男、女).csv", 1);
  80 +// addaw(applicationContext, "0-83月龄体重标准差数值表(男、女).csv", 0);
  81 + addZhenduan(applicationContext);
  82 + }
  83 +
  84 + public static void addZhenduan(ApplicationContext applicationContext) {
  85 + MongoTemplate mongoTemplate
  86 + =(MongoTemplate)applicationContext.getBean("mongoTemplate");
  87 + mongoTemplate.getDb().authenticate("platform", "platform123".toCharArray());
  88 + try {
  89 + List<String> list = FileUtils.readLines(new File("E:\\temp\\ICD-10编码(全)已删减.csv"));
  90 + int i=0;
  91 + for (String line:list) {
  92 + i++;
  93 + String[] array = line.split(",");
  94 + if (array.length == 9) {
  95 + BasicConfig config = new BasicConfig();
  96 + config.setName(array[5]);
  97 + config.setCode(array[6]);
  98 + config.setDescribe(array[4]);
  99 + config.setColor(array[2]);
  100 + config.setParentId("5768e5cf0cf2eaac7ba44a18");
  101 + config.setEnable(1);
  102 + config.setYn(1);
  103 +
  104 +
  105 + System.out.println(i + " == " + JsonUtil.obj2JsonString(config));
  106 + mongoTemplate.save(config);
  107 + }
  108 + }
  109 + } catch (IOException e) {
  110 + e.printStackTrace();
  111 + }
  112 + }
  113 +
  114 + public static void addaw(ApplicationContext applicationContext, String name, Integer type) {
  115 + MongoTemplate mongoTemplate
  116 + =(MongoTemplate)applicationContext.getBean("mongoTemplate");
  117 + mongoTemplate.getDb().authenticate("platform", "platform123".toCharArray());
  118 + try {
  119 + List<String> list = FileUtils.readLines(new File("E:\\temp\\"+name));
  120 + int i=0;
  121 + for (String line:list) {
  122 + i++;
  123 + String[] array = line.split(",");
  124 + if (array.length == 17) {
  125 + AwModel awModel = new AwModel();
  126 + awModel.setType(type);
  127 + awModel.setAge(Integer.valueOf(array[0]));
  128 + awModel.setSex(1);
  129 + awModel.setRthreeDs(Double.valueOf(array[1]));
  130 + awModel.setRtwoDs(Double.valueOf(array[2]));
  131 + awModel.setRoneDs(Double.valueOf(array[3]));
  132 + awModel.setMiddleDs(Double.valueOf(array[4]));
  133 + awModel.setPoneDs(Double.valueOf(array[5]));
  134 + awModel.setPtwoDs(Double.valueOf(array[6]));
  135 + awModel.setPthreeDs(Double.valueOf(array[7]));
  136 +
  137 + System.out.println(i + " == " + JsonUtil.obj2JsonString(awModel));
  138 + mongoTemplate.save(awModel);
  139 +
  140 + AwModel awModel2 = new AwModel();
  141 + awModel2.setType(type);
  142 + awModel2.setAge(Integer.valueOf(array[9]));
  143 + awModel2.setSex(0);
  144 + awModel2.setRthreeDs(Double.valueOf(array[10]));
  145 + awModel2.setRtwoDs(Double.valueOf(array[11]));
  146 + awModel2.setRoneDs(Double.valueOf(array[12]));
  147 + awModel2.setMiddleDs(Double.valueOf(array[13]));
  148 + awModel2.setPoneDs(Double.valueOf(array[14]));
  149 + awModel2.setPtwoDs(Double.valueOf(array[15]));
  150 + awModel2.setPthreeDs(Double.valueOf(array[16]));
  151 +
  152 + System.out.println(i + " == " + JsonUtil.obj2JsonString(awModel2));
  153 + mongoTemplate.save(awModel2);
  154 + }
  155 + }
  156 + } catch (IOException e) {
  157 + e.printStackTrace();
  158 + }
  159 + }
  160 +
  161 + public static void addhw(ApplicationContext applicationContext, String name, Integer sex) {
  162 + MongoTemplate mongoTemplate
  163 + =(MongoTemplate)applicationContext.getBean("mongoTemplate");
  164 + mongoTemplate.getDb().authenticate("platform", "platform123".toCharArray());
  165 + try {
  166 + List<String> list = FileUtils.readLines(new File("E:\\temp\\"+name));
  167 + int i=0;
  168 + for (String line:list) {
  169 + i++;
  170 + String[] array = line.split(",");
  171 + if (array.length == 4) {
  172 + HwModel hwModel = new HwModel();
  173 + hwModel.setSex(sex);
  174 + hwModel.setHeight(Double.valueOf(array[0]));
  175 + hwModel.setReduceSd(Double.valueOf(array[1]));
  176 + hwModel.setMiddleSd(Double.valueOf(array[2]));
  177 + hwModel.setPlusSd(Double.valueOf(array[3]));
  178 + System.out.println(i + " == " + JsonUtil.obj2JsonString(hwModel));
  179 + mongoTemplate.save(hwModel);
  180 + }
  181 + }
  182 + } catch (IOException e) {
  183 + e.printStackTrace();
  184 + }
80 185 }
81 186  
82 187 public static void addKidsGuidelines(ApplicationContext applicationContext) {
platform-dal/src/main/java/com/lyms/platform/pojo/HwModel.java View file @ f9e8d3d
... ... @@ -13,7 +13,7 @@
13 13 private Double reduceSd;
14 14 private Double middleSd;
15 15 private Double plusSd;
16   - private Double sex;
  16 + private Integer sex;
17 17  
18 18 public String getId() {
19 19 return id;
20 20  
... ... @@ -55,11 +55,11 @@
55 55 this.plusSd = plusSd;
56 56 }
57 57  
58   - public Double getSex() {
  58 + public Integer getSex() {
59 59 return sex;
60 60 }
61 61  
62   - public void setSex(Double sex) {
  62 + public void setSex(Integer sex) {
63 63 this.sex = sex;
64 64 }
65 65 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java View file @ f9e8d3d
... ... @@ -1139,6 +1139,7 @@
1139 1139 br.setEnable(data.getEnable());
1140 1140 br.setName(data.getName());
1141 1141 br.setParentId(data.getParentId());
  1142 + br.setDesc(data.getDescribe());
1142 1143 configResults.add(br);
1143 1144 }
1144 1145  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BasicConfigResult.java View file @ f9e8d3d
... ... @@ -10,6 +10,15 @@
10 10 private int enable;
11 11 private String parentId;
12 12 private String name;
  13 + private String desc;
  14 +
  15 + public String getDesc() {
  16 + return desc;
  17 + }
  18 +
  19 + public void setDesc(String desc) {
  20 + this.desc = desc;
  21 + }
13 22  
14 23 public String getName() {
15 24 return name;