Commit 5a9ba6d7c53f73d1f9a63371694fbd3786973261

Authored by liquanyu
1 parent 3983d588fd

产筛

Showing 4 changed files with 265 additions and 40 deletions

platform-dal/src/main/java/com/lyms/platform/pojo/SieveResultModel.java View file @ 5a9ba6d
... ... @@ -5,6 +5,7 @@
5 5 import org.springframework.data.mongodb.core.mapping.Document;
6 6  
7 7 import java.util.Date;
  8 +import java.util.Map;
8 9  
9 10 /**
10 11 * 产筛结果
... ... @@ -35,6 +36,110 @@
35 36  
36 37 //结果录入时间
37 38 private Date resultTime;
  39 +
  40 + private Map<String,String> tszhzValue;// 唐氏综合症 21-三体
  41 + private Map<String,String> sbstValue;// 18-三体
  42 + private Map<String,String> stzhz13Value; //13-三体
  43 + private Map<String,String> sjgjxValue;// 神经管畸形 NTD
  44 +
  45 + //hCg
  46 + private String hCg;
  47 +
  48 + //hafp
  49 + private String hafp;
  50 +
  51 +
  52 + //hCgMom
  53 + private String hCgMom;
  54 +
  55 + //hafpMom
  56 + private String hafpMom;
  57 +
  58 + //审核者
  59 + private String examineId;
  60 +
  61 + //检验者
  62 + private String checkerId;
  63 +
  64 + public String getExamineId() {
  65 + return examineId;
  66 + }
  67 +
  68 + public void setExamineId(String examineId) {
  69 + this.examineId = examineId;
  70 + }
  71 +
  72 + public String getCheckerId() {
  73 + return checkerId;
  74 + }
  75 +
  76 + public void setCheckerId(String checkerId) {
  77 + this.checkerId = checkerId;
  78 + }
  79 +
  80 + public Map<String, String> getTszhzValue() {
  81 + return tszhzValue;
  82 + }
  83 +
  84 + public void setTszhzValue(Map<String, String> tszhzValue) {
  85 + this.tszhzValue = tszhzValue;
  86 + }
  87 +
  88 + public Map<String, String> getSbstValue() {
  89 + return sbstValue;
  90 + }
  91 +
  92 + public void setSbstValue(Map<String, String> sbstValue) {
  93 + this.sbstValue = sbstValue;
  94 + }
  95 +
  96 + public Map<String, String> getStzhz13Value() {
  97 + return stzhz13Value;
  98 + }
  99 +
  100 + public void setStzhz13Value(Map<String, String> stzhz13Value) {
  101 + this.stzhz13Value = stzhz13Value;
  102 + }
  103 +
  104 + public Map<String, String> getSjgjxValue() {
  105 + return sjgjxValue;
  106 + }
  107 +
  108 + public void setSjgjxValue(Map<String, String> sjgjxValue) {
  109 + this.sjgjxValue = sjgjxValue;
  110 + }
  111 +
  112 + public String gethCg() {
  113 + return hCg;
  114 + }
  115 +
  116 + public void sethCg(String hCg) {
  117 + this.hCg = hCg;
  118 + }
  119 +
  120 + public String getHafp() {
  121 + return hafp;
  122 + }
  123 +
  124 + public void setHafp(String hafp) {
  125 + this.hafp = hafp;
  126 + }
  127 +
  128 + public String gethCgMom() {
  129 + return hCgMom;
  130 + }
  131 +
  132 + public void sethCgMom(String hCgMom) {
  133 + this.hCgMom = hCgMom;
  134 + }
  135 +
  136 + public String getHafpMom() {
  137 + return hafpMom;
  138 + }
  139 +
  140 + public void setHafpMom(String hafpMom) {
  141 + this.hafpMom = hafpMom;
  142 + }
38 143  
39 144 public Date getResultTime() {
40 145 return resultTime;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java View file @ 5a9ba6d
... ... @@ -19,6 +19,7 @@
19 19 import com.lyms.platform.operate.web.request.SieveAddRequest;
20 20 import com.lyms.platform.operate.web.result.*;
21 21 import com.lyms.platform.operate.web.service.ITrackDownService;
  22 +import com.lyms.platform.operate.web.utils.CommonsHelper;
22 23 import com.lyms.platform.operate.web.worker.SieveWorker;
23 24 import com.lyms.platform.permission.model.Organization;
24 25 import com.lyms.platform.permission.model.Users;
25 26  
26 27  
27 28  
28 29  
... ... @@ -688,37 +689,25 @@
688 689  
689 690 map.put("sieveApplyInfo",result);
690 691  
691   - if (type == 1)
  692 + if (type == 1 || type == 3)
692 693 {
693   - if (com.lyms.platform.common.utils.StringUtils.isNum(sieveApply.getApplyDoctor())) {
694   - Users users = usersService.getUsers(Integer.parseInt(sieveApply.getApplyDoctor()));
695   - if (users != null && users.getYn() == YnEnums.YES.getId()) {
696   - viewInfo.put("applyDoctorName",users.getName());
697   - }
698   - }
  694 + String applyDoctorName = CommonsHelper.getUserName(sieveApply.getApplyDoctor(),usersService);
  695 + viewInfo.put("applyDoctorName",applyDoctorName);
699 696  
700   - if (com.lyms.platform.common.utils.StringUtils.isNum(sieveApply.getCollectionDoctorId())) {
701   - Users users = usersService.getUsers(Integer.parseInt(sieveApply.getCollectionDoctorId()));
702   - if (users != null && users.getYn() == YnEnums.YES.getId()) {
703   - viewInfo.put("collectionDoctorName",users.getName());
704   - }
705   - }
  697 + String collectionDoctorName = CommonsHelper.getUserName(sieveApply.getCollectionDoctorId(),usersService);
  698 + viewInfo.put("collectionDoctorName",collectionDoctorName);
706 699  
707   - if (com.lyms.platform.common.utils.StringUtils.isNum(sieveApply.getSendDoctor())) {
708   - Users users = usersService.getUsers(Integer.parseInt(sieveApply.getSendDoctor()));
709   - if (users != null && users.getYn() == YnEnums.YES.getId()) {
710   - viewInfo.put("sendDoctorName",users.getName());
711   - }
712   - }
713   - if (null != sieveApply.getApplyHospitalId()) {
714   - Organization org = organizationService.getOrganization(Integer.valueOf(sieveApply.getApplyHospitalId()));
715   - if (null != org) {
716   - viewInfo.put("applyHospitalName", org.getName());
717   - }
718   - }
  700 + String sendDoctorName = CommonsHelper.getUserName(sieveApply.getSendDoctor(),usersService);
  701 + viewInfo.put("sendDoctorName",sendDoctorName);
  702 +
  703 + String applyHospitalName = CommonsHelper.getHospitalName(sieveApply.getApplyHospitalId(),organizationService);
  704 + viewInfo.put("applyHospitalName", applyHospitalName);
  705 +
  706 + String currentHospitalName = CommonsHelper.getHospitalName(sieveApply.getHospitalId(),organizationService);
  707 + viewInfo.put("currentHospitalName", currentHospitalName);
  708 +
719 709 String isTire = "";
720 710 String tireNumber = "";
721   -
722 711 AntExChuQuery antExChuQuery1 = new AntExChuQuery();
723 712 antExChuQuery1.setParentId(parentId);
724 713 antExChuQuery1.setYn(YnEnums.YES.getId());
725 714  
726 715  
727 716  
728 717  
729 718  
... ... @@ -732,19 +721,35 @@
732 721 tireNumber = chuModel.getTireNumber();
733 722 }
734 723 }
735   -
736   - map.put("isTire",isTire);
  724 + map.put("isTire", isTire);
737 725 map.put("tireNumber",tireNumber);
738   -
739 726 map.put("viewInfo",viewInfo);
740   - }
741   - else if (type == 3)
742   - {
743   - Map<String,Object> sieveInfo = new HashMap<>();
744 727  
  728 + if (type == 3)
  729 + {
  730 + Map<String,Object> sieveResultInfo = new HashMap<>();
745 731  
746   - map.put("sieveInfo",sieveInfo);
  732 + SieveResultQuery sieveResultQuery = new SieveResultQuery();
  733 + sieveResultQuery.setParentId(parentId);
  734 + sieveResultQuery.setYn(YnEnums.YES.getId());
  735 + List<SieveResultModel> list = sieveService.queryListSieveResult(sieveResultQuery);
  736 + if (CollectionUtils.isNotEmpty(list))
  737 + {
  738 + SieveResultModel sieveResultModel = list.get(0);
  739 + sieveResultInfo.put("hcg",sieveResultModel.gethCg() != null ? sieveResultModel.gethCg()+"ng/ml" : "");
  740 + sieveResultInfo.put("hcgMom",sieveResultModel.gethCgMom() != null ? sieveResultModel.gethCgMom() : "");
  741 + sieveResultInfo.put("hafp",sieveResultModel.getHafp() != null ? sieveResultModel.getHafp()+"U/ml" : "");
  742 + sieveResultInfo.put("hafpMom",sieveResultModel.getHafpMom() != null ? sieveResultModel.getHafpMom() : "");
  743 + sieveResultInfo.put("examineName", CommonsHelper.getUserName(sieveResultModel.getExamineId(),usersService));
  744 + sieveResultInfo.put("checkerName",CommonsHelper.getUserName(sieveResultModel.getCheckerId(),usersService));
  745 + sieveResultInfo.put("reportTime",DateUtil.getyyyy_MM_dd(sieveResultModel.getResultTime()));
  746 +
  747 + }
  748 +
  749 + map.put("sieveResultInfo",sieveResultInfo);
  750 + }
747 751 }
  752 +
748 753  
749 754 }
750 755 return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(map);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/SieveAddRequest.java View file @ 5a9ba6d
... ... @@ -9,6 +9,7 @@
9 9 import java.util.ArrayList;
10 10 import java.util.Collections;
11 11 import java.util.List;
  12 +import java.util.Map;
12 13  
13 14 /**
14 15 * 增加产筛结果
... ... @@ -20,8 +21,8 @@
20 21 private String id;
21 22 private String parentId;
22 23  
23   - private String tszhz;// 唐氏综合症
24   - private String sjgjx;// 神经管畸形
  24 + private String tszhz;// 唐氏综合症 21-三体
  25 + private String sjgjx;// 神经管畸形 NTD
25 26 private String sbst;// 18-三体
26 27 private String dzhpx;// 地中海贫血
27 28 private String cspj;// 产筛评价
28 29  
... ... @@ -32,7 +33,109 @@
32 33 //结果录入时间
33 34 private String resultTime;
34 35  
  36 + private Map<String,String> tszhzValue;// 唐氏综合症 21-三体
  37 + private Map<String,String> sbstValue;// 18-三体
  38 + private Map<String,String> stzhz13Value; //13-三体
  39 + private Map<String,String> sjgjxValue;// 神经管畸形 NTD
35 40  
  41 + //hCg
  42 + private String hCg;
  43 +
  44 + //hafp
  45 + private String hafp;
  46 +
  47 + //hCgMom
  48 + private String hCgMom;
  49 +
  50 + //hafpMom
  51 + private String hafpMom;
  52 +
  53 + //审核者
  54 + private String examineId;
  55 +
  56 + //检验者
  57 + private String checkerId;
  58 +
  59 + public String getExamineId() {
  60 + return examineId;
  61 + }
  62 +
  63 + public void setExamineId(String examineId) {
  64 + this.examineId = examineId;
  65 + }
  66 +
  67 + public String getCheckerId() {
  68 + return checkerId;
  69 + }
  70 +
  71 + public void setCheckerId(String checkerId) {
  72 + this.checkerId = checkerId;
  73 + }
  74 +
  75 + public Map<String, String> getTszhzValue() {
  76 + return tszhzValue;
  77 + }
  78 +
  79 + public void setTszhzValue(Map<String, String> tszhzValue) {
  80 + this.tszhzValue = tszhzValue;
  81 + }
  82 +
  83 + public Map<String, String> getSbstValue() {
  84 + return sbstValue;
  85 + }
  86 +
  87 + public void setSbstValue(Map<String, String> sbstValue) {
  88 + this.sbstValue = sbstValue;
  89 + }
  90 +
  91 + public Map<String, String> getStzhz13Value() {
  92 + return stzhz13Value;
  93 + }
  94 +
  95 + public void setStzhz13Value(Map<String, String> stzhz13Value) {
  96 + this.stzhz13Value = stzhz13Value;
  97 + }
  98 +
  99 + public Map<String, String> getSjgjxValue() {
  100 + return sjgjxValue;
  101 + }
  102 +
  103 + public void setSjgjxValue(Map<String, String> sjgjxValue) {
  104 + this.sjgjxValue = sjgjxValue;
  105 + }
  106 +
  107 + public String gethCg() {
  108 + return hCg;
  109 + }
  110 +
  111 + public void sethCg(String hCg) {
  112 + this.hCg = hCg;
  113 + }
  114 +
  115 + public String getHafp() {
  116 + return hafp;
  117 + }
  118 +
  119 + public void setHafp(String hafp) {
  120 + this.hafp = hafp;
  121 + }
  122 +
  123 + public String gethCgMom() {
  124 + return hCgMom;
  125 + }
  126 +
  127 + public void sethCgMom(String hCgMom) {
  128 + this.hCgMom = hCgMom;
  129 + }
  130 +
  131 + public String getHafpMom() {
  132 + return hafpMom;
  133 + }
  134 +
  135 + public void setHafpMom(String hafpMom) {
  136 + this.hafpMom = hafpMom;
  137 + }
  138 +
36 139 public String getResultTime() {
37 140 return resultTime;
38 141 }
... ... @@ -133,6 +236,18 @@
133 236 sieveModel.setStzhz13(stzhz13);
134 237 sieveModel.setPublishName(publishName);
135 238 sieveModel.setResultTime(DateUtil.parseYMD(resultTime));
  239 +
  240 + sieveModel.setTszhzValue(tszhzValue);
  241 + sieveModel.setSbstValue(sbstValue);
  242 + sieveModel.setStzhz13Value(stzhz13Value);
  243 + sieveModel.setSjgjxValue(sjgjxValue);
  244 + sieveModel.sethCg(hCg);
  245 + sieveModel.sethCgMom(hCgMom);
  246 + sieveModel.setHafp(hafp);
  247 + sieveModel.sethCgMom(hafpMom);
  248 + sieveModel.setExamineId(examineId);
  249 + sieveModel.setCheckerId(checkerId);
  250 +
136 251 return sieveModel;
137 252 }
138 253 public Integer getMax(){
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java View file @ 5a9ba6d
... ... @@ -1466,13 +1466,13 @@
1466 1466 double kend = (beforeWeight + addWeightEnd) * 25 + basekul;
1467 1467  
1468 1468 status = "处于";
1469   - if (addWeightEnd < add && (add - addWeightEnd) >= 0.5)
  1469 + if (addWeightEnd < add && (Double.valueOf(String.format("%.2f",add - addWeightEnd))) >= 0.5)
1470 1470 {
1471 1471 status = "高于";
1472 1472 kstart -= 500;
1473 1473 kend -= 500;
1474 1474 }
1475   - else if (addWeightStart > add && (addWeightStart - add) >= 0.5)
  1475 + else if (addWeightStart > add && (Double.valueOf(String.format("%.2f",addWeightStart - add))) >= 0.5)
1476 1476 {
1477 1477 status = "低于";
1478 1478 kstart += 500;
... ... @@ -1491,8 +1491,8 @@
1491 1491  
1492 1492 public static void main(String[] args) {
1493 1493 PatientWeightServiceImpl patientWeightService = new PatientWeightServiceImpl();
1494   - String bmi = patientWeightService.getBmi("50", "172");
1495   - Map<String,String> map = patientWeightService.getComputeKul(50 , 52.13, 16, Double.parseDouble(bmi),"1");
  1494 + String bmi = patientWeightService.getBmi("68.07", "165");
  1495 + Map<String,String> map = patientWeightService.getComputeKul(68.07 , 70.43, 13, Double.parseDouble(bmi),"1");
1496 1496 System.out.println(map);
1497 1497  
1498 1498 // double kulStart = 750;