Commit 3fd4442d3d91345f816a674dc31caaaadeb7c332

Authored by yangfei
Exists in master and in 1 other branch dev

Merge remote-tracking branch 'origin/master'

Showing 15 changed files

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/CommonService.java View file @ 3fd4442
... ... @@ -54,7 +54,6 @@
54 54 }
55 55  
56 56  
57   -
58 57 /**
59 58 * 高危id转成列表
60 59 *
... ... @@ -86,8 +85,6 @@
86 85 }
87 86  
88 87  
89   -
90   -
91 88 /**
92 89 * 高危id转成列表
93 90 *
94 91  
95 92  
96 93  
... ... @@ -137,16 +134,16 @@
137 134 * @param riskList
138 135 * @return
139 136 */
140   - public Map calculateRiskScore(List riskList ){
  137 + public Map calculateRiskScore(List riskList) {
141 138 Map result = new HashMap();
142   - int score=0;
143   - List<String> levelList = new ArrayList<>() ;
  139 + int score = 0;
  140 + List<String> levelList = new ArrayList<>();
144 141 for (int i = 0; i < riskList.size(); i++) {
145   - Object obj =riskList.get(i);
146   - if(null!=obj){
  142 + Object obj = riskList.get(i);
  143 + if (null != obj) {
147 144 BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(obj.toString());
148   - if(null!=basicConfig){
149   - if(null!=basicConfig.getCode()){
  145 + if (null != basicConfig) {
  146 + if (null != basicConfig.getCode()) {
150 147 score += Integer.valueOf(basicConfig.getCode());
151 148 }
152 149 basicConfig = basicConfigService.getOneBasicConfigById(basicConfig.getParentId());
... ... @@ -156,8 +153,38 @@
156 153 }
157 154 }
158 155 }
159   - result.put("score",score);
160   - result.put("levelList",levelList);
  156 + result.put("score", score);
  157 + result.put("levelList", levelList);
  158 + return result;
  159 + }
  160 +
  161 + public Map resolveOtherRisk(String risk) {
  162 + Map result = new HashMap();
  163 + if (StringUtils.isNotEmpty(risk) && !"{}".equals(risk)) {
  164 + Map map = JsonUtil.str2Obj(risk, Map.class);
  165 + Object obj = map.get("fxysu");
  166 + if (null != obj && !"null".equals(obj.toString()) && !"".equals(obj.toString())) {
  167 + result.put("name", map.get("fxysu"));
  168 + Object idObj1 = map.get("fyyse");
  169 + if (null != idObj1 && !"null".equals(idObj1.toString()) && !"".equals(idObj1.toString())) {
  170 + BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(idObj1.toString());
  171 + if (null != basicConfig) {
  172 + String name = basicConfig.getName();
  173 + if (name.indexOf("预警") > -1) {
  174 + name = name.replace("预警", "");
  175 + }
  176 + result.put("levelId", idObj1.toString());
  177 + result.put("level", name);
  178 + }
  179 + }
  180 + //风险评分
  181 + Object idObj = map.get("fxpf");
  182 + if (null != idObj && !"null".equals(idObj.toString()) && !"".equals(idObj.toString())) {
  183 + BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(idObj.toString());
  184 + result.put("score",NumberUtils.toInt(basicConfig.getName(), 0));
  185 + }
  186 + }
  187 + }
161 188 return result;
162 189 }
163 190 }
platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml View file @ 3fd4442
... ... @@ -327,7 +327,7 @@
327 327  
328 328 <select id="findCouponInfoCount" parameterType="map" resultType="integer">
329 329 select count(1) from (
330   - select a.used_hospital_id, c.type, b.coupon_order, a.sequence_id, d.name as send_hospital, a.use_date, a.used_id
  330 + select a.used_hospital_id, c.type, b.coupon_order, a.sequence_id, d.name as send_hospital, a.use_date, a.used_id, a.operator_use_id
331 331 from coupon_info a, coupon_template b, coupon_type c, organization d
332 332 where a.coupon_template_id = b.id and b.type_id = c.id and a.create_hospital_id = d.id
333 333 and a.used_hospital_id in
... ... @@ -338,6 +338,9 @@
338 338 <foreach collection="couponType" open="(" close=")" separator="," item="type">
339 339 #{type}
340 340 </foreach>
  341 + <if test="coupon_order != null">
  342 + and b.coupon_order = #{coupon_order}
  343 + </if>
341 344 <if test="startDate != null">
342 345 and a.use_date >= #{startDate}
343 346 </if>
platform-dal/src/main/java/com/lyms/platform/pojo/AntExChuModel.java View file @ 3fd4442
... ... @@ -134,6 +134,40 @@
134 134 //甲状腺功能
135 135 private String jzxgn;
136 136  
  137 +
  138 + //促甲状腺素
  139 + private String cjzxs;
  140 +
  141 + //游离甲状腺素
  142 + private String yljzxs;
  143 +
  144 + //甲状腺过氧化物酶抗体
  145 + private String jzxgyhwmkt;
  146 +
  147 + public String getCjzxs() {
  148 + return cjzxs;
  149 + }
  150 +
  151 + public void setCjzxs(String cjzxs) {
  152 + this.cjzxs = cjzxs;
  153 + }
  154 +
  155 + public String getYljzxs() {
  156 + return yljzxs;
  157 + }
  158 +
  159 + public void setYljzxs(String yljzxs) {
  160 + this.yljzxs = yljzxs;
  161 + }
  162 +
  163 + public String getJzxgyhwmkt() {
  164 + return jzxgyhwmkt;
  165 + }
  166 +
  167 + public void setJzxgyhwmkt(String jzxgyhwmkt) {
  168 + this.jzxgyhwmkt = jzxgyhwmkt;
  169 + }
  170 +
137 171 public static long getSerialVersionUID() {
138 172 return serialVersionUID;
139 173 }
platform-dal/src/main/java/com/lyms/platform/pojo/AntExRecordModel.java View file @ 3fd4442
... ... @@ -338,6 +338,9 @@
338 338 }
339 339  
340 340 public Integer gethScore() {
  341 + if(hScore ==null){
  342 + return 0;
  343 + }
341 344 return hScore;
342 345 }
343 346  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/UsersController.java View file @ 3fd4442
... ... @@ -191,20 +191,23 @@
191 191 @RequestMapping(value = "/usersbyorg", method = RequestMethod.GET)
192 192 @TokenRequired
193 193 @ResponseBody
194   - public BaseListResponse getUsers(@RequestParam(value = "orgId", required = false) Integer orgId){
  194 + public BaseListResponse getUsers(@RequestParam(value = "orgId", required = false) String orgId){
195 195 UsersQuery usersQuery = new UsersQuery();
196   -
197   - usersQuery.setYn(YnEnums.YES.getId());
198   - usersQuery.setType(1);
199   - usersQuery.setOrgId(orgId);
200   - List<Users> usersList = usersService.queryUsers(usersQuery);
201 196 List data = new ArrayList();
202   - for(Users users1:usersList){
203   - Map map = new HashMap();
204   - map.put("id",users1.getId());
205   - map.put("name",users1.getName());
206   - data.add(map);
  197 + if(NumberUtils.isNumber(orgId)){
  198 + usersQuery.setYn(YnEnums.YES.getId());
  199 + usersQuery.setType(1);
  200 + usersQuery.setOrgId(Integer.valueOf(orgId));
  201 + List<Users> usersList = usersService.queryUsers(usersQuery);
  202 +
  203 + for(Users users1:usersList){
  204 + Map map = new HashMap();
  205 + map.put("id",users1.getId());
  206 + map.put("name",users1.getName());
  207 + data.add(map);
  208 + }
207 209 }
  210 +
208 211 return new BaseListResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION).setData(data);
209 212 }
210 213  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java View file @ 3fd4442
... ... @@ -380,16 +380,6 @@
380 380 Patients patients = patientsService.findOnePatientById(record.getParentId());
381 381 String dueWeek = "";
382 382 if (null != patients) {
383   -// if (patients.getDueStatus() != null && patients.getDueStatus() == 1 && patients.getType() == 3) {
384   -// dueWeek = "终止妊娠";
385   -// } else if (patients.getType() == 3) {
386   -// dueWeek = "已分娩";
387   -// } else {
388   -// int days = DateUtil.daysBetween(patients.getLastMenses(), new Date());
389   -// String week = (days / 7) + "";
390   -// int day = (days % 7);
391   -// dueWeek = "孕" + week + "周" + (day > 0 ? "+" + day + "天" : "");
392   -// }
393 383 //2017-03-15 高帆说的改成这样
394 384 if (patients.getLastMenses() != null && record.getCheckTime() != null) {
395 385 int days = DateUtil.daysBetween(patients.getLastMenses(), record.getCheckTime());
396 386  
397 387  
... ... @@ -405,93 +395,10 @@
405 395 if (null != users) {
406 396 cjStatisticsListResult.setCheckDoctor(users.getName());
407 397 }
408   - List<String> factor = record.gethRisk();
409 398  
410   - if (CollectionUtils.isNotEmpty(factor)) {
411   - StringBuilder sb = new StringBuilder(56);
412   - for (String srt : factor) {
413   - if (org.apache.commons.lang.StringUtils.isNotEmpty(srt)) {
414   - BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(srt);
415   - if (null != basicConfig && sb.indexOf(basicConfig.getName()) == -1) {
416   - sb.append(basicConfig.getName()).append(',');
417   - }
418   - }
419   - }
420   - if (sb.toString().endsWith(",")) {
421   - cjStatisticsListResult.setrRisk(sb.substring(0, sb.length() - 1));
422   - } else {
423   - cjStatisticsListResult.setrRisk(sb.toString());
424   - }
425   - }
426   - String fxys = "";
427   - Map olevel = new HashMap();
428   - if (StringUtils.isNotEmpty(record.getfId())) {
429   - String risk = null;
430   - if (record.getType() == 2) {
431   - AntExChuModel model = antExService.findOne(record.getfId());
432   - if (null != model) {
433   - risk = model.getOtherHighRisk();
434   - }
435   - } else if (record.getType() == 1) {
436   - AntenatalExaminationModel model = antExService.findOneById(record.getfId());
437   - if (null != model) {
438   - risk = model.getOtherRisk();
439   - }
440   - }
  399 + //处理高危
  400 + handleRisk(record, cjStatisticsListResult);
441 401  
442   - try {
443   - Map map = JsonUtil.str2Obj(risk, Map.class);
444   - Object obj = map.get("fxysu");
445   - Object idObj1 = map.get("fyyse");
446   - if (null != obj) {
447   - fxys = obj.toString();
448   - }
449   - if (null != idObj1 && !"null".equals(idObj1.toString()) && !"".equals(idObj1.toString())) {
450   -
451   - BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(idObj1.toString());
452   - if (null != basicConfig) {
453   - String name = basicConfig.getName();
454   - if (name.indexOf("预警") > -1) {
455   - name = name.replace("预警", "");
456   - }
457   - olevel.put("name", name);
458   - olevel.put("color", "risk_" + RiskDefaultTypeEnum.getColor(name));
459   - }
460   - }
461   - } catch (Exception e1) {
462   - }
463   - }
464   - if (org.apache.commons.lang.StringUtils.isEmpty(cjStatisticsListResult.getrRisk())) {
465   - cjStatisticsListResult.setrRisk(fxys);
466   - } else if (StringUtils.isNotEmpty(fxys)) {
467   - cjStatisticsListResult.setrRisk(cjStatisticsListResult.getrRisk() + "," + fxys);
468   - }
469   -
470   -
471   - List level = new ArrayList();
472   - if(!olevel.isEmpty()){
473   - level.add(olevel);
474   - }
475   - try {
476   - for (Object str : record.gethLevel()) {
477   - if (null != str && StringUtils.isNotEmpty(str.toString())) {
478   - BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(str.toString());
479   - if (null != basicConfig) {
480   - Map map = new HashMap();
481   - String name = basicConfig.getName();
482   - if (name.indexOf("预警") > -1) {
483   - name = name.replace("预警", "");
484   - }
485   - map.put("name", name);
486   - map.put("color", "risk_" + RiskDefaultTypeEnum.getColor(name));
487   - level.add(map);
488   - }
489   - }
490   - }
491   - } catch (Exception e) {
492   - ExceptionUtils.catchException(e, "patients.getRiskLevelId error.");
493   - }
494   - cjStatisticsListResult.setrLevel(HighScoreResult.filter(level));
495 402 data.add(cjStatisticsListResult);
496 403 }
497 404 }
... ... @@ -527,6 +434,47 @@
527 434 }
528 435 return baseListResponse.setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS).setData(data).setPageInfo(antExRecordQuery.getPageInfo());
529 436 }
  437 +
  438 +
  439 + private void handleRisk(AntExRecordModel e, CjStatisticsListResult antExManagerResult) {
  440 + if (StringUtils.isNotEmpty(e.getfId())) {
  441 + String risk = null;
  442 + if (e.getType() == 2) {
  443 + AntExChuModel model = antExService.findOne(e.getfId());
  444 + if (null != model) {
  445 + risk = model.getOtherHighRisk();
  446 + }
  447 + } else if (e.getType() == 1) {
  448 + AntenatalExaminationModel model = antExService.findOneById(e.getfId());
  449 + if (null != model) {
  450 + risk = model.getOtherRisk();
  451 + }
  452 + }
  453 + String name = null, score = null;
  454 + Map result = commonService.resolveOtherRisk(risk);
  455 + if (!result.isEmpty()) {
  456 + //高危因素名字
  457 + name = result.get("name").toString();
  458 + String level = result.get("levelId").toString();
  459 + score = result.get("score").toString();
  460 +
  461 + if (org.apache.commons.lang.StringUtils.isNotEmpty(level) && !"null".equals(level)) {
  462 + e.gethLevel().add(level);
  463 + }
  464 + }
  465 + //高危因素
  466 + antExManagerResult.setrLevel(commonService.findRiskLevel(e.gethLevel()));
  467 + String ri = commonService.resloveFactor(e.gethRisk());
  468 + if (ri.isEmpty()) {
  469 + ri = name;
  470 + } else if (StringUtils.isNotEmpty(name)) {
  471 + ri += "," + name;
  472 + }
  473 + antExManagerResult.setrRisk(ri);
  474 + antExManagerResult.setScore((e.gethScore() + NumberUtils.toInt(score, 0)));
  475 + }
  476 + }
  477 +
530 478  
531 479 public void exportFindAntEx(AntExManagerQueryRequest antExManagerQueryRequest, Integer id, boolean b, HttpServletResponse httpServletResponse) {
532 480  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java View file @ 3fd4442
... ... @@ -2197,6 +2197,7 @@
2197 2197 if(CollectionUtils.isNotEmpty(list)){
2198 2198 status= list.get(0).getStatus();
2199 2199 }
  2200 + m.put("status",status);
2200 2201 if(CollectionUtils.isNotEmpty(examinationModelList)){
2201 2202 for(AntenatalExaminationModel model:examinationModelList){
2202 2203 String zybd=model.getZyqbd();
... ... @@ -2213,7 +2214,7 @@
2213 2214 m.put("textpjbc",text);
2214 2215 m.put("s75gdgtt",s75gdgtt);
2215 2216 m.put("jzxgn",jzxgn);
2216   - m.put("status",status);
  2217 +
2217 2218 break;
2218 2219 }
2219 2220 }
... ... @@ -2239,7 +2240,6 @@
2239 2240 m.put("textpjbc",text);
2240 2241 m.put("s75gdgtt",s75gdgtt);
2241 2242 m.put("jzxgn",jzxgn);
2242   - m.put("status",status);
2243 2243 break;
2244 2244 }
2245 2245 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LisFacade.java View file @ 3fd4442
... ... @@ -6,6 +6,7 @@
6 6 import com.lyms.hospitalapi.pojo.CheckItemResponse;
7 7 import com.lyms.hospitalapi.pojo.CheckResponse;
8 8 import com.lyms.hospitalapi.pojo.CheckType;
  9 +import com.lyms.hospitalapi.qhdfy.QhdfyHisService;
9 10 import com.lyms.platform.biz.service.*;
10 11 import com.lyms.platform.common.constants.ErrorCodeConstants;
11 12 import com.lyms.platform.common.enums.*;
12 13  
... ... @@ -55,10 +56,14 @@
55 56 private LisService lisService;
56 57  
57 58 @Autowired
  59 + private QhdfyHisService qhdfyHisService;
  60 +
  61 + @Autowired
58 62 @Qualifier("commonThreadPool")
59 63 private ThreadPoolTaskExecutor commonThreadPool;
60 64  
61 65 public static final String HIS_VERSION = PropertiesUtils.getPropertyValue("his_version");
  66 + public static final String run_mode = PropertiesUtils.getPropertyValue("run.mode");
62 67  
63 68 /**
64 69 * 获取lis和ris检验报告
65 70  
... ... @@ -770,8 +775,10 @@
770 775 titles.add("小儿血常规5分类");
771 776 isQuery = true;
772 777 }
  778 + //德州市妇幼保健院
  779 +
773 780 //如果不为上面的医院就直接返回
774   - if (!isQuery)
  781 + if (!isQuery || "2".equals(run_mode))
775 782 {
776 783 return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION).setData(map);
777 784 }
... ... @@ -779,7 +786,15 @@
779 786 query.setTitles(titles);
780 787 query.setHospitalId(hospitalId);
781 788 query.setCheckTime(DateUtil.parseYMD(checkTime));
782   - List<LisReportModel> lises = queryCheckLis(vcCardNo,phone,query);
  789 + List<LisReportModel> lises = null;
  790 + if ("216".equals(hospitalId))
  791 + {
  792 + lises = qhdfyHisService.queryQhdCheckLisInfo(vcCardNo,phone,"('尿常规','[丙]血常规(24项)','血常规(24项)','血细胞分析(末梢)')", checkTime);
  793 + }
  794 + else
  795 + {
  796 + lises = queryCheckLis(vcCardNo,phone,query);
  797 + }
783 798  
784 799 if (CollectionUtils.isNotEmpty(lises))
785 800 {
... ... @@ -800,6 +815,10 @@
800 815 {
801 816 for(LisReportItemModel item : items)
802 817 {
  818 + if (item == null)
  819 + {
  820 + continue;
  821 + }
803 822 if ("尿蛋白".equals(item.getName()))
804 823 {
805 824 map1.put("ndb",item.getCharResult() == null ? item.getNumberResult() : item.getCharResult());
... ... @@ -832,6 +851,10 @@
832 851 {
833 852 for(LisReportItemModel item : items)
834 853 {
  854 + if (item == null)
  855 + {
  856 + continue;
  857 + }
835 858 if ("血红蛋白".equals(item.getName()))
836 859 {
837 860 map1.put("xhdb",item.getNumberResult());
... ... @@ -864,6 +887,10 @@
864 887 {
865 888 for(LisReportItemModel item : items)
866 889 {
  890 + if (item == null)
  891 + {
  892 + continue;
  893 + }
867 894 if ("尿蛋白".equals(item.getName()))
868 895 {
869 896 map1.put("ndb",item.getCharResult() == null ? item.getNumberResult() : item.getCharResult());
... ... @@ -897,6 +924,10 @@
897 924 {
898 925 for(LisReportItemModel item : items)
899 926 {
  927 + if (item == null)
  928 + {
  929 + continue;
  930 + }
900 931 if ("血红蛋白".equals(item.getName()))
901 932 {
902 933 map1.put("xhdb",item.getNumberResult());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PredictedStatisticsFacade.java View file @ 3fd4442
1 1 package com.lyms.platform.operate.web.facade;
2 2  
3 3 import com.lyms.platform.biz.service.BasicConfigService;
  4 +import com.lyms.platform.biz.service.CommonService;
4 5 import com.lyms.platform.biz.service.PatientsService;
5 6 import com.lyms.platform.common.constants.ErrorCodeConstants;
6 7 import com.lyms.platform.common.enums.RiskDefaultTypeEnum;
... ... @@ -18,6 +19,7 @@
18 19 import com.lyms.platform.pojo.PredictedStatisticsCountModel;
19 20 import com.lyms.platform.query.PatientsQuery;
20 21 import net.sf.json.JSONArray;
  22 +import org.apache.commons.lang.StringUtils;
21 23 import org.springframework.beans.factory.annotation.Autowired;
22 24 import org.springframework.stereotype.Component;
23 25  
... ... @@ -93,7 +95,15 @@
93 95 List<RiskLevelResultModel> riskLevelResultModelList = getRiskLevel(patients.getRiskLevelId());
94 96 predictedStatisticsQueryModel.setRiskLevelResultModelList(riskLevelResultModelList);
95 97 predictedStatisticsQueryModel.setRiskLevelNameString(getRiskLevelString(riskLevelResultModelList));
96   - predictedStatisticsQueryModel.setRiskFactor(getRiskFactor(patients.getRiskFactorId()));
  98 +
  99 + String risk =getRiskFactor(patients.getRiskFactorId());
  100 + if(StringUtils.isEmpty(risk)){
  101 + risk=(StringUtils.isEmpty(patients.getoRiskFactor())?"":patients.getoRiskFactor());
  102 + }else{
  103 + risk=risk+(StringUtils.isEmpty(patients.getoRiskFactor())?"":","+patients.getoRiskFactor());
  104 + }
  105 +
  106 + predictedStatisticsQueryModel.setRiskFactor(risk);
97 107 predictedStatisticsQueryModel.setLastCheckEmployee(getLastCheckEmployee(patients.getLastCheckEmployeeId()));
98 108 predictedStatisticsQueryModel.setGestationalWeeks(getGestationalWeeks(patients.getLastMenses(), patients.getType(), patients.getDueStatus()));
99 109 predictedStatisticsQueryModel.setRiskScore(null == patients.getRiskScore() ? "" : patients.getRiskScore().toString());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/StopPregnancyFacade.java View file @ 3fd4442
... ... @@ -428,6 +428,7 @@
428 428 usersQuery.setYn(YnEnums.YES.getId());
429 429 usersQuery.setOrgId(dbuser.getOrgId());
430 430 usersQuery.setEnable(1);
  431 + usersQuery.setZhichenIds(lis);
431 432 List<Users> users = usersService.queryUsers(usersQuery);
432 433  
433 434 if (CollectionUtils.isNotEmpty(users)) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java View file @ 3fd4442
... ... @@ -1276,6 +1276,10 @@
1276 1276 map.put("syjg", FunvCommonUtil.checkYiGan(data.getSyjg()));
1277 1277 map.put("hivkt", FunvCommonUtil.checkYiGan(data.getHivkt()));
1278 1278  
  1279 + map.put("cjzxs",data.getCjzxs());//促甲状腺素
  1280 + map.put("yljzxs", data.getYljzxs());//游离甲状腺素
  1281 + map.put("jzxgyhwmkt", data.getJzxgyhwmkt());//甲状腺过氧化物酶抗体
  1282 +
1279 1283 String ydfmw = "";
1280 1284 String ydqjd = "";
1281 1285  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AntExcAddRequest.java View file @ 3fd4442
... ... @@ -211,6 +211,43 @@
211 211 //甲状腺功能
212 212 private String jzxgn;
213 213  
  214 +
  215 + /**
  216 + * 辅助检查中
  217 + */
  218 + //促甲状腺素
  219 + private String cjzxs;
  220 +
  221 + //游离甲状腺素
  222 + private String yljzxs;
  223 +
  224 + //甲状腺过氧化物酶抗体
  225 + private String jzxgyhwmkt;
  226 +
  227 + public String getCjzxs() {
  228 + return cjzxs;
  229 + }
  230 +
  231 + public void setCjzxs(String cjzxs) {
  232 + this.cjzxs = cjzxs;
  233 + }
  234 +
  235 + public String getYljzxs() {
  236 + return yljzxs;
  237 + }
  238 +
  239 + public void setYljzxs(String yljzxs) {
  240 + this.yljzxs = yljzxs;
  241 + }
  242 +
  243 + public String getJzxgyhwmkt() {
  244 + return jzxgyhwmkt;
  245 + }
  246 +
  247 + public void setJzxgyhwmkt(String jzxgyhwmkt) {
  248 + this.jzxgyhwmkt = jzxgyhwmkt;
  249 + }
  250 +
214 251 public String getZyqbdjc() {
215 252 return zyqbdjc;
216 253 }
... ... @@ -1163,6 +1200,9 @@
1163 1200  
1164 1201 antExChuModel.setAbortionRG(abortionRG);
1165 1202 antExChuModel.setAbortionZR(abortionZR);
  1203 + antExChuModel.setCjzxs(cjzxs);
  1204 + antExChuModel.setYljzxs(yljzxs);
  1205 + antExChuModel.setJzxgyhwmkt(jzxgyhwmkt);
1166 1206  
1167 1207 return antExChuModel;
1168 1208 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntexChuResult.java View file @ 3fd4442
... ... @@ -255,6 +255,39 @@
255 255 //人工流产
256 256 private Integer abortionRG;
257 257  
  258 + //促甲状腺素
  259 + private String cjzxs;
  260 +
  261 + //游离甲状腺素
  262 + private String yljzxs;
  263 +
  264 + //甲状腺过氧化物酶抗体
  265 + private String jzxgyhwmkt;
  266 +
  267 + public String getCjzxs() {
  268 + return cjzxs;
  269 + }
  270 +
  271 + public void setCjzxs(String cjzxs) {
  272 + this.cjzxs = cjzxs;
  273 + }
  274 +
  275 + public String getYljzxs() {
  276 + return yljzxs;
  277 + }
  278 +
  279 + public void setYljzxs(String yljzxs) {
  280 + this.yljzxs = yljzxs;
  281 + }
  282 +
  283 + public String getJzxgyhwmkt() {
  284 + return jzxgyhwmkt;
  285 + }
  286 +
  287 + public void setJzxgyhwmkt(String jzxgyhwmkt) {
  288 + this.jzxgyhwmkt = jzxgyhwmkt;
  289 + }
  290 +
258 291 public String getDiagnosisOther() {
259 292 return diagnosisOther;
260 293 }
... ... @@ -1193,6 +1226,11 @@
1193 1226  
1194 1227 setAbortionZR(antExChuModel.getAbortionZR());
1195 1228 setAbortionRG(antExChuModel.getAbortionRG());
  1229 +
  1230 + setCjzxs(antExChuModel.getCjzxs());
  1231 + setYljzxs(antExChuModel.getYljzxs());
  1232 + setJzxgyhwmkt(antExChuModel.getJzxgyhwmkt());
  1233 +
1196 1234 }
1197 1235 return this;
1198 1236 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/CjStatisticsListResult.java View file @ 3fd4442
... ... @@ -7,6 +7,7 @@
7 7 import com.lyms.platform.pojo.Patients;
8 8 import org.codehaus.jackson.annotate.JsonIgnore;
9 9  
  10 +import java.util.Collections;
10 11 import java.util.Date;
11 12 import java.util.List;
12 13  
... ... @@ -27,7 +28,7 @@
27 28  
28 29 private Integer score;
29 30 //等级
30   - private List rLevel;
  31 + private List rLevel= Collections.EMPTY_LIST;
31 32 //因素
32 33 private String rRisk;
33 34 //产检医生
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/AntExRecordWorker.java View file @ 3fd4442
... ... @@ -126,49 +126,62 @@
126 126 //本院低次
127 127 int dichi = recordService.count(antExRecordQuery1);
128 128 antExRecordQuery1.setHospitalId(null);
129   - String fxys = "";
130   - if (StringUtils.isNotEmpty(e.getfId())) {
131   - String risk = null;
132   - if (e.getType() == 2) {
133   - AntExChuModel model = antenatalExaminationService.findOne(e.getfId());
134   - if (null != model) {
135   - risk = model.getOtherHighRisk();
136   - }
137   - } else if (e.getType() == 1) {
138   - AntenatalExaminationModel model = antenatalExaminationService.findOneById(e.getfId());
139   - if (null != model) {
140   - risk = model.getOtherRisk();
141   - }
142   - }
143 129  
144   - try {
145   - Map map = JsonUtil.str2Obj(risk, Map.class);
146   - Object obj = map.get("fxysu");
147   - if (null != obj) {
148   - fxys = obj.toString();
149   - }
150   - } catch (Exception e1) {
151   - }
  130 + antExManagerResult.settTimes(recordService.count(antExRecordQuery1));
  131 + antExManagerResult.setChTimes(dichi);
  132 + handleRisk(e,antExManagerResult);
  133 +
  134 + data.add(antExManagerResult);
  135 + } catch (Exception e1) {
  136 + ExceptionUtils.catchException(e1, "antex worker error.");
  137 + }
  138 + }
  139 + return data;
  140 + }
  141 +
  142 + /**
  143 + * 处理高危
  144 + *
  145 + * @param e
  146 + * @param antExManagerResult
  147 + */
  148 + private void handleRisk(AntExRecordModel e , AntExManagerResult antExManagerResult){
  149 + if (StringUtils.isNotEmpty(e.getfId())) {
  150 + String risk = null;
  151 + if (e.getType() == 2) {
  152 + AntExChuModel model = antenatalExaminationService.findOne(e.getfId());
  153 + if (null != model) {
  154 + risk = model.getOtherHighRisk();
152 155 }
  156 + } else if (e.getType() == 1) {
  157 + AntenatalExaminationModel model = antenatalExaminationService.findOneById(e.getfId());
  158 + if (null != model) {
  159 + risk = model.getOtherRisk();
  160 + }
  161 + }
  162 + Map result = commonService.resolveOtherRisk(risk);
  163 + if(!result.isEmpty()){
  164 + //高危因素名字
  165 + String name =result.get("name").toString();
  166 + String level =result.get("levelId").toString();
  167 + String score =result.get("score").toString();
153 168  
  169 + if(org.apache.commons.lang.StringUtils.isNotEmpty(level) &&!"null".equals(level)){
  170 + e.gethLevel().add(level);
  171 + }
154 172  
155   - antExManagerResult.settTimes(recordService.count(antExRecordQuery1));
156   - antExManagerResult.setChTimes(dichi);
157 173 //高危因素
158 174 antExManagerResult.setrLevel(commonService.findRiskLevel(e.gethLevel()));
159 175 String ri= commonService.resloveFactor(e.gethRisk());
160 176 if(ri.isEmpty()){
161   - ri=fxys;
162   - }else if(StringUtils.isNotEmpty(fxys)){
163   - ri+=","+fxys;
  177 + ri=name;
  178 + }else if(StringUtils.isNotEmpty(name)){
  179 + ri+=","+name;
164 180 }
165 181 antExManagerResult.setRiskFactor(ri);
166   - data.add(antExManagerResult);
167   - } catch (Exception e1) {
168   - ExceptionUtils.catchException(e1, "antex worker error.");
  182 + antExManagerResult.setRiskScore((e.gethScore()+NumberUtils.toInt(score,0))+"");
169 183 }
170 184 }
171   - return data;
172 185 }
173 186 }