Commit 64c97c6a4fe77bad365fbcdcca1d2a24befc1940

Authored by gengxiaokai
1 parent cb94dac97e

新生儿筛查

Showing 3 changed files with 95 additions and 0 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabySieveFacede.java View file @ 64c97c6
... ... @@ -4,6 +4,7 @@
4 4 import com.lyms.platform.biz.service.*;
5 5 import com.lyms.platform.common.constants.ErrorCodeConstants;
6 6 import com.lyms.platform.common.dao.operator.MongoQuery;
  7 +import com.lyms.platform.common.enums.FmTypeEnums;
7 8 import com.lyms.platform.common.enums.OptActionEnums;
8 9 import com.lyms.platform.common.enums.SexEnum;
9 10 import com.lyms.platform.common.enums.YnEnums;
... ... @@ -12,6 +13,7 @@
12 13 import com.lyms.platform.common.utils.BeanUtils;
13 14 import com.lyms.platform.common.utils.DateUtil;
14 15 import com.lyms.platform.common.utils.ExceptionUtils;
  16 +import com.lyms.platform.common.utils.JsonUtil;
15 17 import com.lyms.platform.operate.web.request.BabyScreenAddRequest;
16 18 import com.lyms.platform.operate.web.request.BabySieveAddRequest;
17 19 import com.lyms.platform.operate.web.result.*;
... ... @@ -36,6 +38,7 @@
36 38 import java.util.ArrayList;
37 39 import java.util.Date;
38 40 import java.util.List;
  41 +import java.util.Map;
39 42  
40 43 /**
41 44 * 新生儿筛查
... ... @@ -108,6 +111,52 @@
108 111 for(BabyModel babyModel : models){
109 112 if(null == babyModel.getSieveStatus()){//sieveStatus值为空时新生儿为未申请筛查的状态
110 113 BabySieveData data = new BabySieveData();
  114 + //查询分娩记录
  115 + MatDeliverQuery matDeliverQuery = new MatDeliverQuery();
  116 + matDeliverQuery.setParentId(babyModel.getParentId());
  117 + MaternalDeliverModel maternalDeliverModel = null;
  118 + List<MaternalDeliverModel> mList = matDeliverService.pageQuery(matDeliverQuery);
  119 + if(mList != null && mList.size() > 0){
  120 + maternalDeliverModel = mList.get(0);
  121 + }
  122 + data.setMatdeliverId(maternalDeliverModel.getId());
  123 + //分娩方式
  124 + String deliveryMode = "";
  125 + if (StringUtils.isNotEmpty(maternalDeliverModel.getDeliveryMode())) {
  126 +
  127 + StringBuilder sb = new StringBuilder();
  128 +
  129 + Map m = JsonUtil.str2Obj(maternalDeliverModel.getDeliveryMode(), Map.class);
  130 + String fmfs = null;
  131 + if (m != null) {
  132 + Object b = m.get("fmfs");
  133 + if (b != null) {
  134 + fmfs = b.toString();
  135 + if (fmfs != null) {
  136 + if (fmfs.equals("1")) {
  137 + String fmName = FmTypeEnums.getFmNameById(fmfs);
  138 + sb.append(fmName);
  139 + if (null != m.get("scfs") && !"null".equals(m.get("scfs").toString())) {
  140 + sb.append(",");
  141 + String scfs = m.get("scfs").toString();
  142 + sb.append(FmTypeEnums.getFmScNameById(scfs));
  143 + }
  144 + deliveryMode = sb.toString();
  145 + } else if (fmfs.equals("2")) {
  146 + String fmName = FmTypeEnums.getFmNameById(fmfs);
  147 + deliveryMode = fmName;
  148 + }
  149 + }
  150 + }
  151 + }
  152 + }
  153 + if (deliveryMode.contains("顺产")) {
  154 + data.setDueType(deliveryMode);
  155 + } else {
  156 + data.setDueType(deliveryMode);
  157 + data.setOperationCause(maternalDeliverModel.getOperationCause() == null ? "--" : maternalDeliverModel.getOperationCause());
  158 + }
  159 + data.setDueDate(maternalDeliverModel.getDueDate());
111 160 data.setId(babyModel.getId());
112 161 data.setCardNo(pat.getCardNo());
113 162 data.setMonthAge(DateUtil.getBabyMonthAge(babyModel.getBirth(), new Date()));
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabySieveAddRequest.java View file @ 64c97c6
... ... @@ -85,6 +85,8 @@
85 85 private String dueWeek;
86 86 //分娩方式
87 87 private String dueType;
  88 + //分娩详细方式
  89 + private String duescfs;
88 90 //性别
89 91 private Integer sex;
90 92 //35种疾病筛查
... ... @@ -113,6 +115,14 @@
113 115  
114 116 //医院ID
115 117 private Integer operatorId;
  118 +
  119 + public String getDuescfs() {
  120 + return duescfs;
  121 + }
  122 +
  123 + public void setDuescfs(String duescfs) {
  124 + this.duescfs = duescfs;
  125 + }
116 126  
117 127 public Integer getOperatorId() {
118 128 return operatorId;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabySieveData.java View file @ 64c97c6
... ... @@ -10,7 +10,43 @@
10 10 private String monthAge;//月龄
11 11 private String babyName;//儿童姓名
12 12 private String pid;//母亲ID
  13 + private String matdeliverId;//分娩id
13 14 private String sex;//性别
  15 + private String dueType;//分娩方式
  16 + private String dueDate;//出生日期
  17 + private String operationCause;//手术原因
  18 +
  19 + public String getMatdeliverId() {
  20 + return matdeliverId;
  21 + }
  22 +
  23 + public void setMatdeliverId(String matdeliverId) {
  24 + this.matdeliverId = matdeliverId;
  25 + }
  26 +
  27 + public String getOperationCause() {
  28 + return operationCause;
  29 + }
  30 +
  31 + public void setOperationCause(String operationCause) {
  32 + this.operationCause = operationCause;
  33 + }
  34 +
  35 + public String getDueType() {
  36 + return dueType;
  37 + }
  38 +
  39 + public void setDueType(String dueType) {
  40 + this.dueType = dueType;
  41 + }
  42 +
  43 + public String getDueDate() {
  44 + return dueDate;
  45 + }
  46 +
  47 + public void setDueDate(String dueDate) {
  48 + this.dueDate = dueDate;
  49 + }
14 50  
15 51 public String getId() {
16 52 return id;