Commit 8a1687b179da6cd6f95002941b819a002d1f0f01

Authored by jiangjiazhi

Merge remote-tracking branch 'origin/master'

Showing 5 changed files

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/BasicConfigServiceTest.java View file @ 8a1687b
... ... @@ -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 @ 8a1687b
... ... @@ -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 @ 8a1687b
... ... @@ -126,16 +126,22 @@
126 126  
127 127 list.add(checkRecord);
128 128 }
  129 +
  130 + Collections.reverse(list);
129 131 }
130 132 //查询儿童的基本信息
131 133 BabyModel model = babyCheckFacade.getBabyModel(babyId, base);
132 134  
  135 +
  136 + List<Map<String, String>> tempList = new ArrayList<>();
133 137 if(CollectionUtils.isNotEmpty(models)){
134 138 for(BabyModel babyModel:models){
135   - babyCheckFacade.getBabyCheckList(babyModel.getId(), babyModel, list);
  139 + babyCheckFacade.getBabyCheckList(babyModel.getId(), babyModel, tempList);
136 140 }
137 141 }
138 142  
  143 + list.addAll(tempList);
  144 +
139 145 resMap.put("baseInfo", base);
140 146 resMap.put("checkList", list);
141 147 br.setData(resMap);
... ... @@ -248,6 +254,22 @@
248 254 }
249 255 }
250 256  
  257 + //判断就诊卡号是否已经建档
  258 + if (StringUtils.isNotEmpty(request.getVcCardNo()) )
  259 + {
  260 + BabyModelQuery babyQuery = new BabyModelQuery();
  261 + babyQuery.setYn(YnEnums.YES.getId());
  262 + babyQuery.setVcCardNo(request.getVcCardNo());
  263 + babyQuery.setHospitalId(request.getHospitalId());
  264 + List<BabyModel> models = babyBookbuildingService.queryBabyBuildByCond(babyQuery);
  265 + if (CollectionUtils.isNotEmpty(models))
  266 + {
  267 + br.setErrorcode(ErrorCodeConstants.DATA_EXIST);
  268 + br.setErrormsg("儿童就诊卡号在该医院已经建档");
  269 + return br;
  270 + }
  271 + }
  272 +
251 273 Patients patients = null;
252 274 PersonModel resperson = null;
253 275 String babyPersonId = "";
... ... @@ -1139,6 +1161,7 @@
1139 1161 br.setEnable(data.getEnable());
1140 1162 br.setName(data.getName());
1141 1163 br.setParentId(data.getParentId());
  1164 + br.setDesc(data.getDescribe());
1142 1165 configResults.add(br);
1143 1166 }
1144 1167  
... ... @@ -1298,7 +1321,7 @@
1298 1321 }
1299 1322 }
1300 1323 }
1301   - result.setDiagnose(diagnose);
  1324 + result.setDiagnose(StringUtils.emptyDeal(diagnose));
1302 1325 list.add(result);
1303 1326 }
1304 1327 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java View file @ 8a1687b
... ... @@ -113,6 +113,20 @@
113 113 }
114 114 }
115 115  
  116 + //就诊卡号判断
  117 + if (StringUtils.isNotEmpty(yunRequest.getVcCardNo()))
  118 + {
  119 + patientsQuery.setVcCardNo(yunRequest.getVcCardNo());
  120 + patientsQuery.setHospitalId(yunRequest.getHospitalId());
  121 + List<Patients> patients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery);
  122 + if (CollectionUtils.isNotEmpty(patients))
  123 + {
  124 + br.setErrorcode(ErrorCodeConstants.DATA_EXIST);
  125 + br.setErrormsg("该就诊卡号在该医院已经建档");
  126 + return br;
  127 + }
  128 + }
  129 +
116 130 Integer type = 1; //1孕妇 2儿童 3产妇
117 131 Date date = null;
118 132 if (yunRequest.getLastMenstrualPeriod() != null)
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BasicConfigResult.java View file @ 8a1687b
... ... @@ -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;