Commit 95afaaae75e08115d14a6530a1e66a1496b76790

Authored by jiangjiazhi

Merge remote-tracking branch 'origin/master'

Showing 7 changed files

platform-common/src/main/java/com/lyms/platform/common/utils/JsonUtil.java View file @ 95afaaa
... ... @@ -163,6 +163,7 @@
163 163 }
164 164 return data;
165 165 } catch (Exception e) {
  166 + e.printStackTrace();
166 167 return null;
167 168 }
168 169 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java View file @ 95afaaa
... ... @@ -6,9 +6,17 @@
6 6 public class Test {
7 7  
8 8 public static void main(String[] args) {
9   - String a = "3.220.33";
10   - int b = a.lastIndexOf('.');
11   - System.out.println("-----:"+b);
  9 + // String a = "3.220.33";
  10 + // int b = a.lastIndexOf('.');
  11 + // System.out.println("-----:"+b);
  12 + // List<String> arrayList = new ArrayList<>();
  13 + // arrayList.add(3,"aaa");
  14 + // System.out.println(arrayList.size());
  15 + String[] strs = new String[4];
  16 + strs[0] = "111";
  17 + strs[2] = "111";
  18 + strs[3] = "111";
  19 + strs[1] = "111";
12 20  
13 21 // ConfirmedEnums [] strs = ConfirmedEnums.values();
14 22 // String vas = ConfirmedEnums.getTitle(1);
... ... @@ -88,7 +96,7 @@
88 96 // }
89 97 // }
90 98  
91   - System.out.println(39/20);
  99 + System.out.println(39 / 20);
92 100 // String sql = "INSERT INTO LIS_REPORT_TBL( LIS_ID, TITLE) VALUES ('122', 'bbbb')";
93 101 // sql = sql.replaceFirst("\\(","(ID,");
94 102 //
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ViewController.java View file @ 95afaaa
... ... @@ -5,6 +5,7 @@
5 5 import com.lyms.platform.common.base.BaseController;
6 6 import com.lyms.platform.common.base.LoginContext;
7 7 import com.lyms.platform.common.result.BaseObjectResponse;
  8 +import com.lyms.platform.operate.web.facade.AntenatalExaminationFacade;
8 9 import com.lyms.platform.operate.web.facade.ViewFacade;
9 10 import org.springframework.beans.factory.annotation.Autowired;
10 11 import org.springframework.stereotype.Controller;
... ... @@ -17,6 +18,7 @@
17 18 import java.io.InputStream;
18 19 import java.util.List;
19 20 import java.util.Map;
  21 +import java.util.List;
20 22  
21 23 /**
22 24 * 所有查看页面接口
23 25  
... ... @@ -28,8 +30,9 @@
28 30  
29 31 @Autowired
30 32 private ViewFacade viewFacade;
  33 + @Autowired
  34 + private AntenatalExaminationFacade antenatalExaminationFacade;
31 35  
32   -
33 36 /**
34 37 * 查询初诊接口
35 38 *
36 39  
37 40  
... ... @@ -47,18 +50,19 @@
47 50 }
48 51  
49 52 /**
50   - * 下载word
  53 + * 下载初诊word
51 54 *
52 55 * @param id
53 56 * @param request
54 57 * @return
55 58 */
56 59 @RequestMapping(value = "/downExChuData", method = RequestMethod.GET)
57   - @TokenRequired
  60 + // @TokenRequired
58 61 public void downExChuData(@RequestParam("id") String id, HttpServletRequest request, HttpServletResponse response) {
59 62 LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
60 63  
61   - Map<String, Object> map = viewFacade.exChuData(id, loginState.getId());
  64 + // Map<String, Object> map = viewFacade.exChuData(id, loginState.getId());
  65 + Map<String, Object> map = viewFacade.exChuData(id, 1000000185);
62 66  
63 67 if (map == null) {
64 68 return;
... ... @@ -71,7 +75,7 @@
71 75 }
72 76 Document doc = null;// 原始word路径
73 77 try {
74   - doc = new Document("D:\\经济开发区乡镇涉及妇幼公卫表格(外联部).dotx");
  78 + doc = new Document("D:\\经济开发区乡镇涉及妇幼公卫表格(外联部)_初诊.dotx");
75 79 specialData(doc, map);//特殊数据
76 80 markData(doc, map);//普通数据
77 81 sendToBrowser(doc, "导出", "doc", true, response);
... ... @@ -83,6 +87,45 @@
83 87 e.printStackTrace();
84 88 }
85 89 }
  90 +
  91 + /**
  92 + * 下载复诊word
  93 + *
  94 + * @param id
  95 + * @param request
  96 + * @return
  97 + */
  98 + @RequestMapping(value = "/downExFuData", method = RequestMethod.GET)
  99 + // @TokenRequired
  100 + public void downExFuData(@RequestParam("id") String id,@RequestParam("num") int num, HttpServletRequest request, HttpServletResponse response) {
  101 + LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
  102 +
  103 + Map<String, Object> map = viewFacade.exFuData(id, num);
  104 +
  105 + if (map == null) {
  106 + return;
  107 + }
  108 +
  109 + try {
  110 + // 验证License
  111 + if (!getLicense()) {
  112 + return;
  113 + }
  114 + Document doc = null;// 原始word路径
  115 + try {
  116 + doc = new Document("D:\\经济开发区乡镇涉及妇幼公卫表格(外联部)_复诊.dotx");
  117 + specialData(doc, map);//特殊数据
  118 + markData(doc, map);//普通数据
  119 + sendToBrowser(doc, "导出", "doc", true, response);
  120 + } catch (Exception e) {
  121 + e.printStackTrace();
  122 + }
  123 + response.flushBuffer();
  124 + } catch (IOException e) {
  125 + e.printStackTrace();
  126 + }
  127 + }
  128 +
86 129  
87 130 public void specialData(Document doc, Map<String, Object> data) {
88 131 try {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java View file @ 95afaaa
... ... @@ -23,9 +23,11 @@
23 23 import com.lyms.platform.query.*;
24 24 import org.apache.commons.collections.CollectionUtils;
25 25 import org.apache.commons.collections.MapUtils;
  26 +import org.apache.commons.collections.map.HashedMap;
26 27 import org.apache.commons.lang.StringUtils;
27 28 import org.apache.commons.lang.math.NumberUtils;
28 29 import org.springframework.beans.factory.annotation.Autowired;
  30 +import org.springframework.data.domain.Sort;
29 31 import org.springframework.stereotype.Component;
30 32  
31 33 import java.util.*;
... ... @@ -247,6 +249,123 @@
247 249 }
248 250  
249 251 /**
  252 + * 导出复诊查询
  253 + *
  254 + * @param id 复诊id
  255 + * @param num 当前位置
  256 + * @return
  257 + */
  258 + public Map<String, Object> exFuData(String id, int num) {
  259 + Map<String, Object> map = new HashedMap();
  260 + AntenatalExaminationModel[] exData = new AntenatalExaminationModel[4];
  261 + AntenatalExaminationModel antenatalExaminationModel = antExService.findOneById(id);
  262 + Patients patients = patientsService.findOnePatientById(antenatalExaminationModel.getParentId());
  263 + if (num < 3) {
  264 + exData[num - 1] = antenatalExaminationModel;
  265 + } else {//全部
  266 + String patientsId = antenatalExaminationModel.getParentId();
  267 + AntExQuery antExQuery = new AntExQuery();
  268 + antExQuery.setYn(YnEnums.YES.getId());
  269 + antExQuery.setParentId(patientsId);
  270 +
  271 + //复诊
  272 + List<AntenatalExaminationModel> list = antExService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.ASC, "checkDate"));
  273 + exData[0] = list.get(0);
  274 + exData[1] = list.get(1);
  275 + exData[2] = list.get(2);
  276 + exData[3] = list.get(3);
  277 +
  278 + }
  279 +
  280 + // Map<String, Object> map = new HashMap<>();
  281 + for (int i = 0; i < exData.length; i++) {
  282 + AntenatalExaminationModel data = exData[i];
  283 + if (data == null) {
  284 + continue;
  285 + }
  286 + String numStr = "";
  287 + if (i == 0) {
  288 + numStr = "one";
  289 + } else if (i == 1) {
  290 + numStr = "two";
  291 + } else if (i == 2) {
  292 + numStr = "thre";
  293 + } else if (i == 3) {
  294 + numStr = "four";
  295 + }
  296 +
  297 + if (data.getCheckDate() != null) {
  298 + map.put(numStr + "checkDate", DateUtil.getyyyy_MM_dd(data.getCheckDate()));
  299 + }
  300 + map.put(numStr + "currentDueDate", ResolveUtils.getPregnancyWeek(patients.getLastMenses(), data.getCheckDate()));
  301 + if (StringUtils.isNotEmpty(data.getChiefComplaint())) {
  302 + map.put(numStr + "chiefComplaint", data.getChiefComplaint());
  303 + }
  304 + if (data.getWeight() != null) {
  305 + map.put(numStr + "weight", UnitUtils.unitSplice(data.getWeight(), UnitConstants.KG));
  306 + }
  307 + if (StringUtils.isNotEmpty(data.getGongGao())) {
  308 + map.put(numStr + "gongGao", UnitUtils.unitSplice(data.getGongGao(), UnitConstants.CM));
  309 + }
  310 + if (StringUtils.isNotEmpty(data.getAbdominalCircumference())) {
  311 + map.put(numStr + "abdominalCircumference", UnitUtils.unitSplice(data.getAbdominalCircumference(), UnitConstants.CM));
  312 + }
  313 + if (CollectionUtils.isNotEmpty(data.getTireData())) {
  314 + StringBuffer fposiSb = new StringBuffer();
  315 + StringBuffer hrateSb = new StringBuffer();
  316 + for (Object temp : data.getTireData()) {
  317 + Map<String, String> tire = JsonUtil.getMap(temp.toString());
  318 + if (tire != null) {
  319 + String heartRate = tire.get("heartRate");
  320 + String fetalPosition = tire.get("fetalPosition");
  321 + hrateSb.append(UnitUtils.unitSplice(heartRate, UnitConstants.CIFEN) + "/");
  322 + fposiSb.append(FetalPositionEnums.getTitle(fetalPosition) + "/");
  323 + }
  324 + }
  325 + if (StringUtils.isNotEmpty(hrateSb.toString())) {
  326 + map.put(numStr + "heartRate", hrateSb.toString());
  327 + }
  328 + if (StringUtils.isNotEmpty(fposiSb.toString())) {
  329 + map.put(numStr + "fetalPosition", fposiSb.toString());
  330 + }
  331 + }
  332 + Map<String, String> chBpMap = JsonUtil.getMap(data.getBp());
  333 + if (MapUtils.isNotEmpty(chBpMap)) {
  334 + if (StringUtils.isNotEmpty(chBpMap.get("ssy"))) {
  335 + map.put(numStr + "ssy", chBpMap.get("ssy"));
  336 + }
  337 + if (StringUtils.isNotEmpty(chBpMap.get("szy"))) {
  338 + map.put(numStr + "szy", chBpMap.get("szy"));
  339 + }
  340 + }
  341 + if (StringUtils.isNotEmpty(data.getHemoglobin())) {
  342 + map.put(numStr + "hemoglobin", UnitUtils.unitSplice(data.getHemoglobin(), UnitConstants.GL));
  343 + }
  344 + if (StringUtils.isNotEmpty(data.getUrineProtein())) {
  345 + map.put(numStr + "urineProtein", data.getUrineProtein());
  346 +
  347 + }
  348 + if (StringUtils.isNotEmpty(data.getbChao())) {
  349 + map.put(numStr + "bChao", data.getbChao());
  350 +
  351 + }
  352 + if (data.getNextCheckTime() != null) {
  353 + map.put(numStr + "nextCheckTime", DateUtil.getyyyy_MM_dd(data.getNextCheckTime()));
  354 + }
  355 + String checkDoctor = "";
  356 +
  357 + if (org.apache.commons.lang.StringUtils.isNotEmpty(data.getCheckDoctor())) {
  358 + Users users = usersService.getUsers(Integer.parseInt(data.getCheckDoctor()));
  359 + if (users != null && users.getYn() == YnEnums.YES.getId()) {
  360 + checkDoctor = users.getName();
  361 + }
  362 + }
  363 + map.put(numStr + "checkDoctor", checkDoctor);
  364 + }
  365 + return map;
  366 + }
  367 +
  368 + /**
250 369 * 导出初诊
251 370 *
252 371 * @param id
253 372  
... ... @@ -261,7 +380,13 @@
261 380 br.setErrormsg("id为空");
262 381 return null;
263 382 }
  383 + String hospitId = autoMatchFacade.getHospitalId(userId);
264 384  
  385 + AntExChuQuery antExQuery = new AntExChuQuery();
  386 + antExQuery.setParentId(id);
  387 + antExQuery.setHospitalId(hospitId);
  388 + List<AntExChuModel> antExChuModels = antExService.queryAntExChu(antExQuery);
  389 +
265 390 AntExChuModel data = antExService.findOne(id);
266 391 if (data == null || data.getYn() == YnEnums.NO.getId()) {
267 392 br.setErrorcode(ErrorCodeConstants.NO_DATA);
... ... @@ -286,7 +411,7 @@
286 411 Map<String, Object> map = new HashMap<>();
287 412 /* 基本信息 */
288 413 //孕妇基本信息
289   - map.put("id", data.getId());
  414 + map.put("parentId", data.getParentId());
290 415 map.put("name", patients.getUsername());
291 416 Calendar calendar = Calendar.getInstance();
292 417 map.put("inYear", calendar.get(Calendar.YEAR));
293 418  
... ... @@ -316,10 +441,10 @@
316 441 if (data.getLastMenses() != null) {
317 442 Calendar lastCal = Calendar.getInstance();
318 443 lastCal.setTime(data.getLastMenses());
319   - int mYear = lastCal.get(Calendar.YEAR);
  444 + int mYear = lastCal.get(Calendar.YEAR);
320 445 map.put("mYear", String.valueOf(mYear));
321   - int mMonth =lastCal.get(Calendar.MONTH);
322   - map.put("mMonth", String.valueOf(mMonth));
  446 + int mMonth = lastCal.get(Calendar.MONTH);
  447 + map.put("mMonth", String.valueOf(mMonth + 1));
323 448 int mDay = lastCal.get(Calendar.DAY_OF_MONTH);
324 449 map.put("mDay", String.valueOf(mDay));
325 450 }
... ... @@ -330,7 +455,7 @@
330 455 int yYear = dueCal.get(Calendar.YEAR);
331 456 map.put("yYear", String.valueOf(yYear));
332 457 int yMonth = dueCal.get(Calendar.MONTH);
333   - map.put("yMonth", String.valueOf(yMonth));
  458 + map.put("yMonth", String.valueOf(yMonth + 1));
334 459 int yDay = dueCal.get(Calendar.DAY_OF_MONTH);
335 460 map.put("yDay", String.valueOf(yDay));
336 461 }
337 462  
338 463  
339 464  
340 465  
341 466  
342 467  
343 468  
344 469  
345 470  
346 471  
347 472  
348 473  
349 474  
350 475  
351 476  
352 477  
353 478  
354 479  
355 480  
356 481  
357 482  
358 483  
359 484  
360 485  
361 486  
362 487  
363 488  
364 489  
365 490  
366 491  
367 492  
368 493  
369 494  
370 495  
371 496  
372 497  
373 498  
374 499  
... ... @@ -488,148 +613,148 @@
488 613 }
489 614  
490 615  
491   - if(StringUtils.isNotEmpty(data.getHeart())){
492   - if("未见异常".equals(data.getHeart())){
  616 + if (StringUtils.isNotEmpty(data.getHeart())) {
  617 + if ("未见异常".equals(data.getHeart())) {
493 618 map.put("heart", "1");
494   - }else{
  619 + } else {
495 620 map.put("heart", "2");
496 621 map.put("heartOther", data.getHeart());
497 622 }
498 623 }
499 624  
500   - if(StringUtils.isNotEmpty(data.getLungs())){
501   - if("未见异常".equals(data.getLungs())){
  625 + if (StringUtils.isNotEmpty(data.getLungs())) {
  626 + if ("未见异常".equals(data.getLungs())) {
502 627 map.put("lungs", "1");
503   - }else{
  628 + } else {
504 629 map.put("lungs", "2");
505 630 map.put("lungsOther", data.getLungs());
506 631 }
507 632 }
508 633  
509   - if(StringUtils.isNotEmpty(data.getVulva())){
510   - if("未见异常".equals(data.getVulva())){
  634 + if (StringUtils.isNotEmpty(data.getVulva())) {
  635 + if ("未见异常".equals(data.getVulva())) {
511 636 map.put("vulva", "1");
512   - }else{
  637 + } else {
513 638 map.put("vulva", "2");
514 639 map.put("vulvaOther", data.getVulva());
515 640 }
516 641 }
517 642  
518   - if(StringUtils.isNotEmpty(data.getVagina())){
519   - if("未见异常".equals(data.getVagina())){
  643 + if (StringUtils.isNotEmpty(data.getVagina())) {
  644 + if ("未见异常".equals(data.getVagina())) {
520 645 map.put("vagina", "1");
521   - }else{
  646 + } else {
522 647 map.put("vagina", "2");
523 648 map.put("vaginaOther", data.getVagina());
524 649 }
525 650 }
526 651  
527   - if(StringUtils.isNotEmpty(data.getCervical())){
528   - if("未见异常".equals(data.getCervical())){
  652 + if (StringUtils.isNotEmpty(data.getCervical())) {
  653 + if ("未见异常".equals(data.getCervical())) {
529 654 map.put("cervical", "1");
530   - }else{
  655 + } else {
531 656 map.put("cervical", "2");
532 657 map.put("cervicalOther", data.getCervical());
533 658 }
534 659 }
535 660  
536   - if(StringUtils.isNotEmpty(data.getUterus())){
537   - if("未见异常".equals(data.getUterus())){
  661 + if (StringUtils.isNotEmpty(data.getUterus())) {
  662 + if ("未见异常".equals(data.getUterus())) {
538 663 map.put("uterus", "1");
539   - }else{
  664 + } else {
540 665 map.put("uterus", "2");
541 666 map.put("uterusOther", data.getUterus());
542 667 }
543 668 }
544 669  
545   - if(StringUtils.isNotEmpty(data.getFujian())){
546   - if("未见异常".equals(data.getFujian())){
  670 + if (StringUtils.isNotEmpty(data.getFujian())) {
  671 + if ("未见异常".equals(data.getFujian())) {
547 672 map.put("fujian", "1");
548   - }else{
  673 + } else {
549 674 map.put("fujian", "2");
550 675 map.put("fujianOther", data.getFujian());
551 676 }
552 677 }
553 678  
554 679 /* 辅助检查 */
555   - if(StringUtils.isNotEmpty(data.getXhdb())){
556   - map.put("xhdb", data.getXhdb());
557   - }
558   - if(StringUtils.isNotEmpty(data.getBxbjs())){
  680 + if (StringUtils.isNotEmpty(data.getXhdb())) {
  681 + map.put("xhdb", data.getXhdb());
  682 + }
  683 + if (StringUtils.isNotEmpty(data.getBxbjs())) {
559 684 map.put("bxbjs", data.getBxbjs());
560 685 }
561   - if(StringUtils.isNotEmpty(data.getPlatelet())) {
  686 + if (StringUtils.isNotEmpty(data.getPlatelet())) {
562 687 map.put("platelet", data.getPlatelet());
563 688 }
564   - if(StringUtils.isNotEmpty(data.getChgOther())) {
  689 + if (StringUtils.isNotEmpty(data.getChgOther())) {
565 690 map.put("chgOther", data.getChgOther());
566 691 }
567   - if(StringUtils.isNotEmpty(data.getNdb())) {
  692 + if (StringUtils.isNotEmpty(data.getNdb())) {
568 693 map.put("ndb", data.getNdb());
569 694 }
570   - if(StringUtils.isNotEmpty(data.getNt())) {
  695 + if (StringUtils.isNotEmpty(data.getNt())) {
571 696 map.put("nt", data.getNt());
572 697 }
573   - if(StringUtils.isNotEmpty(data.getUrineKetone())) {
  698 + if (StringUtils.isNotEmpty(data.getUrineKetone())) {
574 699 map.put("urineKetone", data.getUrineKetone());
575 700 }
576   - if(StringUtils.isNotEmpty(data.getBld())) {
  701 + if (StringUtils.isNotEmpty(data.getBld())) {
577 702 map.put("bld", data.getBld());
578 703 }
579   - if(StringUtils.isNotEmpty(data.getNcgOther())) {
  704 + if (StringUtils.isNotEmpty(data.getNcgOther())) {
580 705 map.put("ncgOther", data.getNcgOther());
581 706 }
582 707  
583   - if(StringUtils.isNotEmpty(data.getAbo())) {
  708 + if (StringUtils.isNotEmpty(data.getAbo())) {
584 709 map.put("abo", FunvCommonUtil.getBaseicConfigByid(data.getAbo(), basicConfigService));
585 710 }
586   - if(StringUtils.isNotEmpty(data.getRh())) {
  711 + if (StringUtils.isNotEmpty(data.getRh())) {
587 712 map.put("rh", FunvCommonUtil.checkYiGan(data.getRh()));
588 713 }
589   - if(StringUtils.isNotEmpty(data.getBloodSugar())) {
  714 + if (StringUtils.isNotEmpty(data.getBloodSugar())) {
590 715 map.put("bloodSugar", data.getBloodSugar());
591 716 }
592   - if(StringUtils.isNotEmpty(data.getXqgbzam())) {
  717 + if (StringUtils.isNotEmpty(data.getXqgbzam())) {
593 718 map.put("xqgbzam", data.getXqgbzam());
594 719 }
595   - if(StringUtils.isNotEmpty(data.getXqgczam())) {
  720 + if (StringUtils.isNotEmpty(data.getXqgczam())) {
596 721 map.put("xqgczam", data.getXqgczam());
597 722 }
598   - if(StringUtils.isNotEmpty(data.getAlbumin())) {
  723 + if (StringUtils.isNotEmpty(data.getAlbumin())) {
599 724 map.put("albumin", data.getAlbumin());
600 725 }
601   - if(StringUtils.isNotEmpty(data.getTotalBilirubin())) {
  726 + if (StringUtils.isNotEmpty(data.getTotalBilirubin())) {
602 727 map.put("totalBilirubin", data.getTotalBilirubin());
603 728 }
604   - if(StringUtils.isNotEmpty(data.getJhBilirubin())) {
  729 + if (StringUtils.isNotEmpty(data.getJhBilirubin())) {
605 730 map.put("jhBilirubin", data.getJhBilirubin());
606 731 }
607   - if(StringUtils.isNotEmpty(data.getBg())) {
  732 + if (StringUtils.isNotEmpty(data.getBg())) {
608 733 map.put("bg", FunvCommonUtil.checkYiGan(data.getBg()));
609 734 }
610   - if(StringUtils.isNotEmpty(data.getYgbmky())) {
  735 + if (StringUtils.isNotEmpty(data.getYgbmky())) {
611 736 map.put("ygbmky", FunvCommonUtil.checkYiGan(data.getYgbmky()));
612 737 }
613   - if(StringUtils.isNotEmpty(data.getYgbmkt())) {
  738 + if (StringUtils.isNotEmpty(data.getYgbmkt())) {
614 739 map.put("ygbmkt", FunvCommonUtil.checkYiGan(data.getYgbmkt()));
615 740 }
616   - if(StringUtils.isNotEmpty(data.getYgeky())) {
  741 + if (StringUtils.isNotEmpty(data.getYgeky())) {
617 742 map.put("ygeky", FunvCommonUtil.checkYiGan(data.getYgeky()));
618 743 }
619   - if(StringUtils.isNotEmpty(data.getYgekt())) {
  744 + if (StringUtils.isNotEmpty(data.getYgekt())) {
620 745 map.put("ygekt", FunvCommonUtil.checkYiGan(data.getYgekt()));
621 746 }
622   - if(StringUtils.isNotEmpty(data.getYghxkt())) {
  747 + if (StringUtils.isNotEmpty(data.getYghxkt())) {
623 748 map.put("yghxkt", FunvCommonUtil.checkYiGan(data.getYghxkt()));
624 749 }
625   - if(StringUtils.isNotEmpty(data.getXqjq())) {
  750 + if (StringUtils.isNotEmpty(data.getXqjq())) {
626 751 map.put("xqjq", data.getXqjq());
627 752 }
628   - if(StringUtils.isNotEmpty(data.getXnsd())) {
  753 + if (StringUtils.isNotEmpty(data.getXnsd())) {
629 754 map.put("xnsd", data.getXnsd());
630 755 }
631   - if(StringUtils.isNotEmpty(data.getSyjg())) {
632   - if (StringUtils.isNotEmpty(data.getSyjg())){
  756 + if (StringUtils.isNotEmpty(data.getSyjg())) {
  757 + if (StringUtils.isNotEmpty(data.getSyjg())) {
633 758 if (data.getSyjg().equals("yin")) {
634 759 map.put("syjg", "1");
635 760 }
... ... @@ -638,8 +763,8 @@
638 763 }
639 764 }
640 765 }
641   - if(StringUtils.isNotEmpty(data.getHivkt())) {
642   - if (StringUtils.isNotEmpty(data.getHivkt())){
  766 + if (StringUtils.isNotEmpty(data.getHivkt())) {
  767 + if (StringUtils.isNotEmpty(data.getHivkt())) {
643 768 if (data.getHivkt().equals("yin")) {
644 769 map.put("hivkt", "1");
645 770 }
646 771  
647 772  
648 773  
649 774  
650 775  
... ... @@ -657,23 +782,23 @@
657 782 ydqjd = ResolveUtils.replaceYDFMW(ydfmwMap, 2);
658 783 }
659 784  
660   - if(StringUtils.isNotEmpty(ydfmw)) {
  785 + if (StringUtils.isNotEmpty(ydfmw)) {
661 786 List<String> ydfmwList = new ArrayList<>();
662 787  
663   - if(ydfmw.contains("滴虫")){
  788 + if (ydfmw.contains("滴虫")) {
664 789 ydfmwList.add("2");
665 790 }
666   - if(ydfmw.contains("假丝酵母菌")){
  791 + if (ydfmw.contains("假丝酵母菌")) {
667 792 ydfmwList.add("3");
668 793 }
669   - if(ydfmw.contains("其他")){
  794 + if (ydfmw.contains("其他")) {
670 795 ydfmwList.add("4");
671 796  
672   - ydfmw = ydfmw.replace("滴虫","");
673   - ydfmw = ydfmw.replace("假丝酵母菌","");
674   - ydfmw = ydfmw.replace("其他","");
  797 + ydfmw = ydfmw.replace("滴虫", "");
  798 + ydfmw = ydfmw.replace("假丝酵母菌", "");
  799 + ydfmw = ydfmw.replace("其他", "");
675 800 ydfmw = ydfmw.replace(",", "");
676   - map.put("ydfmwOther", ydfmw.substring(ydfmw.indexOf("其他")+2,ydfmw.length()));
  801 + map.put("ydfmwOther", ydfmw.substring(ydfmw.indexOf("其他") + 2, ydfmw.length()));
677 802 }
678 803  
679 804 if (CollectionUtils.isEmpty(ydfmwList)) {
680 805  
681 806  
682 807  
683 808  
684 809  
... ... @@ -683,22 +808,22 @@
683 808  
684 809 map.put("ydfmw", ydfmwList);
685 810 }
686   - if(StringUtils.isNotEmpty(ydqjd)) {
  811 + if (StringUtils.isNotEmpty(ydqjd)) {
687 812 ydqjd = FunvCommonUtil.getBaseicConfigByid(ydqjd, basicConfigService);
688   - if("Ⅰ度".equals(ydqjd)){
  813 + if ("Ⅰ度".equals(ydqjd)) {
689 814 map.put("ydqjd", "1");
690 815 }
691   - if("Ⅱ度".equals(ydqjd)){
  816 + if ("Ⅱ度".equals(ydqjd)) {
692 817 map.put("ydqjd", "2");
693 818 }
694   - if("Ⅲ度".equals(ydqjd)){
  819 + if ("Ⅲ度".equals(ydqjd)) {
695 820 map.put("ydqjd", "3");
696 821 }
697   - if("Ⅳ度".equals(ydqjd)){
  822 + if ("Ⅳ度".equals(ydqjd)) {
698 823 map.put("ydqjd", "4");
699 824 }
700 825 }
701   - if(StringUtils.isNotEmpty(data.getbChao())) {
  826 + if (StringUtils.isNotEmpty(data.getbChao())) {
702 827 map.put("bChao", data.getbChao());
703 828 }
704 829  
705 830  
706 831  
... ... @@ -708,21 +833,21 @@
708 833 referralApplyOrderQuery.setParentId(data.getParentId());
709 834 referralApplyOrderQuery.setOutHospitalId(hospital);
710 835 List<ReferralApplyOrderModel> orderModels = applyOrderService.queryReferralApplyOrderWithQuery(referralApplyOrderQuery);
711   - if(CollectionUtils.isNotEmpty(orderModels)){
  836 + if (CollectionUtils.isNotEmpty(orderModels)) {
712 837 //转院必要性
713 838 if (NumberUtils.isNumber(hospital)) {
714 839 try {
715 840 Organization zhuanc1 = organizationService.getOrganization(Integer.valueOf(hospital));
716 841 if (null != zhuanc1) {
717   - map.put("zhuancl",zhuanc1.getName());
718   - map.put("isZhuan","2");
  842 + map.put("zhuancl", zhuanc1.getName());
  843 + map.put("isZhuan", "2");
719 844 }
720 845 } catch (Exception e) {
721 846  
722 847 }
723 848 }
724   - }else{
725   - map.put("isZhuan","1");
  849 + } else {
  850 + map.put("isZhuan", "1");
726 851 }
727 852  
728 853  
... ... @@ -732,7 +857,7 @@
732 857 int yYear = nextCheck.get(Calendar.YEAR);
733 858 map.put("sYear", String.valueOf(yYear));
734 859 int yMonth = nextCheck.get(Calendar.MONTH);
735   - map.put("sMonth", String.valueOf(yMonth));
  860 + map.put("sMonth", String.valueOf(yMonth + 1));
736 861 int yDay = nextCheck.get(Calendar.DAY_OF_MONTH);
737 862 map.put("sDay", String.valueOf(yDay));
738 863 }
739 864  
... ... @@ -1031,11 +1156,11 @@
1031 1156 }
1032 1157  
1033 1158 if (placenta.getGjkd() != null) {
1034   - placetaMap.put("gjkd", placenta.getGjkd());
  1159 + placetaMap.put("gjkd", UnitUtils.unitSplice(placenta.getGjkd(), UnitConstants.CM));
1035 1160 }
1036 1161  
1037 1162 if (placenta.getGjrs() != null) {
1038   - placetaMap.put("gjrs", placenta.getGjrs());
  1163 + placetaMap.put("gjrs", UnitUtils.unitSplice(placenta.getGjrs(), UnitConstants.BF));
1039 1164 }
1040 1165  
1041 1166 if (StringUtils.isNotEmpty(placenta.getGjwzOther())) {
1042 1167  
... ... @@ -1047,12 +1172,12 @@
1047 1172 }
1048 1173  
1049 1174 if (placenta.getYszs() != null) {
1050   - placetaMap.put("yszs", placenta.getYszs());
  1175 + placetaMap.put("yszs", UnitUtils.unitSplice(placenta.getYszs(), UnitConstants.CM));
1051 1176 }
1052 1177 }
1053 1178  
1054 1179 if ("java.util.LinkedHashMap".equals(obj.getClass().getName())) {
1055   - Map<String, String> placenta = JsonUtil.getMap(obj.toString());
  1180 + Map<String, Object> placenta = (Map<String, Object>)obj;
1056 1181 if (MapUtils.isNotEmpty(placenta)) {
1057 1182 if (placenta.get("fetalPosition") != null) {
1058 1183 for (FetalPositionEnums fetalPositionEnums : FetalPositionEnums.values()) {
1059 1184  
1060 1185  
1061 1186  
1062 1187  
1063 1188  
1064 1189  
1065 1190  
1066 1191  
1067 1192  
1068 1193  
... ... @@ -1068,45 +1193,45 @@
1068 1193 heartRate = String.valueOf(a);
1069 1194 }
1070 1195 fetalPresentation += placenta.get("fetalPresentation") == null ? "" : placenta.get("fetalPresentation");
1071   - join = placenta.get("join");
  1196 + join = String.valueOf(placenta.get("join"));
1072 1197  
1073   - if (StringUtils.isNotEmpty(placenta.get("xlwz"))) {
1074   - placetaMap.put("xlwz", GongJingEnums.getXLWeiZhiNameById(placenta.get("xlwz")));
  1198 + if (placenta.get("xlwz")!=null) {
  1199 + placetaMap.put("xlwz", GongJingEnums.getXLWeiZhiNameById(String.valueOf(placenta.get("xlwz"))));
1075 1200 }
1076   - if (StringUtils.isNotEmpty(placenta.get("gjwz"))) {
1077   - placetaMap.put("gjwz", GongJingEnums.getWeiZhiNameById(placenta.get("gjwz")));
  1201 + if (placenta.get("gjwz")!=null) {
  1202 + placetaMap.put("gjwz", GongJingEnums.getWeiZhiNameById(String.valueOf(placenta.get("gjwz"))));
1078 1203 }
1079 1204  
1080   - if (StringUtils.isNotEmpty(placenta.get("gjyd"))) {
1081   - placetaMap.put("gjyd", GongJingEnums.getYinDuNameById(placenta.get("gjyd")));
  1205 + if (placenta.get("gjyd")!=null) {
  1206 + placetaMap.put("gjyd", GongJingEnums.getYinDuNameById(String.valueOf(placenta.get("gjyd"))));
1082 1207 }
1083 1208  
1084   - if (StringUtils.isNotEmpty(placenta.get("ydjc"))) {
1085   - placetaMap.put("tm", TaiShuEnums.getTmNameById(placenta.get("ydjc")));
  1209 + if (placenta.get("tm")!=null) {
  1210 + placetaMap.put("tm", TaiShuEnums.getTmNameById(String.valueOf(placenta.get("tm"))));
1086 1211 }
1087 1212  
1088   - if (StringUtils.isNotEmpty(placenta.get("ydjc"))) {
1089   - placetaMap.put("ydjc", GongJingEnums.getYDJianCeNameById(placenta.get("ydjc")));
  1213 + if (placenta.get("ydjc")!=null) {
  1214 + placetaMap.put("ydjc", GongJingEnums.getYDJianCeNameById(String.valueOf(placenta.get("ydjc"))));
1090 1215 }
1091 1216  
1092 1217 if (placenta.get("gjkd") != null) {
1093   - placetaMap.put("gjkd", placenta.get("gjkd"));
  1218 + placetaMap.put("gjkd", UnitUtils.unitSplice(placenta.get("gjkd"), UnitConstants.CM));
1094 1219 }
1095 1220  
1096 1221 if (placenta.get("gjrs") != null) {
1097   - placetaMap.put("gjrs", placenta.get("gjrs"));
  1222 + placetaMap.put("gjrs", UnitUtils.unitSplice(placenta.get("gjrs"), UnitConstants.BF));
1098 1223 }
1099 1224  
1100   - if (StringUtils.isNotEmpty(placenta.get("gjwzOther"))) {
1101   - placetaMap.put("gjwzOther", placenta.get("gjwzOther "));
  1225 + if (placenta.get("gjwzOther")!=null) {
  1226 + placetaMap.put("gjwzOther", placenta.get("gjwzOther"));
1102 1227 }
1103 1228  
1104   - if (StringUtils.isNotEmpty(placenta.get("gjydOther"))) {
  1229 + if (placenta.get("gjydOther")!=null) {
1105 1230 placetaMap.put("gjydOther", placenta.get("gjydOther"));
1106 1231 }
1107 1232  
1108 1233 if (placenta.get("yszs") != null) {
1109   - placetaMap.put("yszs", placenta.get("yszs"));
  1234 + placetaMap.put("yszs", UnitUtils.unitSplice(placenta.get("yszs"), UnitConstants.CM));
1110 1235 }
1111 1236 }
1112 1237 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntenatalExaminationResult.java View file @ 95afaaa
... ... @@ -85,20 +85,39 @@
85 85 //是否有产筛
86 86 private int hasSieve;
87 87 private String cDueWeek;
  88 + //宫高选择
  89 + private String gongGaoSelect;
  90 + //宫高类型
  91 + private String gongGaoType;
  92 + //早孕期病毒检测
  93 + private String zyqbdjc;
  94 + //nt检查
  95 + private String ntjc;
  96 + //产前筛查
  97 + private String cjsc;
  98 + // //胎儿系统排畸b吵
  99 + private String textpjbc;
  100 + //75gODTT
  101 + private String s75gdgtt;
  102 + // //甲状腺功能
  103 + private String jzxgn;
88 104  
89   - // //早孕期病毒检测
90   - private String zyqbdjc;
91   -// //nt检查
92   - private String ntjc;
93   - //产前筛查
94   - private String cjsc;
95   -// //胎儿系统排畸b吵
96   - private String textpjbc;
97   - //75gODTT
98   - private String s75gdgtt;
99   -// //甲状腺功能
100   - private String jzxgn;
  105 + public String getGongGaoSelect() {
  106 + return gongGaoSelect;
  107 + }
101 108  
  109 + public void setGongGaoSelect(String gongGaoSelect) {
  110 + this.gongGaoSelect = gongGaoSelect;
  111 + }
  112 +
  113 + public String getGongGaoType() {
  114 + return gongGaoType;
  115 + }
  116 +
  117 + public void setGongGaoType(String gongGaoType) {
  118 + this.gongGaoType = gongGaoType;
  119 + }
  120 +
102 121 public String getZyqbdjc() {
103 122 return zyqbdjc;
104 123 }
... ... @@ -205,6 +224,8 @@
205 224  
206 225 @Override
207 226 public AntenatalExaminationResult convertToResult(AntenatalExaminationModel destModel) {
  227 + setGongGaoType(destModel.getGongGaoType());
  228 + setGongGaoSelect(destModel.getGongGaoSelect());
208 229 setEdema(destModel.getEdema());
209 230 setParentId(destModel.getParentId());
210 231 setBarCode(destModel.getBarCode());
211 232  
212 233  
... ... @@ -228,13 +249,13 @@
228 249 } catch (Exception e) {
229 250 }
230 251 try {
231   - if(null!=destModel.getNextCheckTime()){
  252 + if (null != destModel.getNextCheckTime()) {
232 253 setNextCheckTime(DateUtil.getyyyy_MM_dd(destModel.getNextCheckTime()));
233 254 }
234   - if(null!=destModel.getCheckDate()){
  255 + if (null != destModel.getCheckDate()) {
235 256 setCheckDate(DateUtil.getyyyy_MM_dd(destModel.getCheckDate()));
236 257 }
237   - }catch (Exception e){
  258 + } catch (Exception e) {
238 259 }
239 260 setcDueWeek(destModel.getcDueWeek());
240 261 setChiefComplaint(destModel.getChiefComplaint());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntexChuResult.java View file @ 95afaaa
... ... @@ -161,8 +161,11 @@
161 161 private String checkTime;
162 162 //下次产检时间
163 163 private String nextCheckTime;
  164 + //宫高选择
  165 + private String gongGaoSelect;
  166 + //宫高类型
  167 + private String gongGaoType;
164 168  
165   -
166 169 /**
167 170 * -------------辅助检查结果录入------------------
168 171 **/
... ... @@ -268,6 +271,22 @@
268 271 return neoDeath;
269 272 }
270 273  
  274 + public String getGongGaoSelect() {
  275 + return gongGaoSelect;
  276 + }
  277 +
  278 + public void setGongGaoSelect(String gongGaoSelect) {
  279 + this.gongGaoSelect = gongGaoSelect;
  280 + }
  281 +
  282 + public String getGongGaoType() {
  283 + return gongGaoType;
  284 + }
  285 +
  286 + public void setGongGaoType(String gongGaoType) {
  287 + this.gongGaoType = gongGaoType;
  288 + }
  289 +
271 290 public void setNeoDeath(Integer neoDeath) {
272 291 this.neoDeath = neoDeath;
273 292 }
... ... @@ -1028,6 +1047,8 @@
1028 1047 setBarCode(antExChuModel.getBarCode());
1029 1048 setId(antExChuModel.getId());
1030 1049 setParentId(antExChuModel.getParentId());
  1050 + setGongGaoSelect(antExChuModel.getGonggaoSelect());
  1051 + setGongGaoType(antExChuModel.getGonggaoType());
1031 1052 // //早孕期病毒检测
1032 1053 // private String zyqbdjc;
1033 1054 // //nt检查
... ... @@ -1088,6 +1109,7 @@
1088 1109 setBirthDefectTodo(antExChuModel.getBirthDefectTodo());
1089 1110 setHeart(antExChuModel.getHeart());
1090 1111 setLungs(antExChuModel.getLungs());
  1112 +
1091 1113 setVulva(antExChuModel.getVulva());
1092 1114 setVagina(antExChuModel.getVagina());
1093 1115 setCervical(antExChuModel.getCervical());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/UnitConstants.java View file @ 95afaaa
... ... @@ -13,6 +13,7 @@
13 13 public static final String MMHG = " mmHg";
14 14 public static final String CIFEN = " 次/分";
15 15 public static final String GL = " g/L";
  16 + public static final String BF = " %";
16 17 public static final String MMOLL = " mmol/L";
17 18 public static final String CI = " 次";
18 19 public static final String UL = " U/L";