Commit 818a27387ae34e15e4bacf2b3f3262973836b854

Authored by xujiahong
1 parent 2f0ea7197c
Exists in master

分娩查看页面

Showing 10 changed files with 396 additions and 59 deletions

parent/base.common/src/main/java/com/lyms/base/common/service/organ/impl/OrganizationsServiceImpl.java View file @ 818a273
... ... @@ -89,12 +89,11 @@
89 89  
90 90 @Override
91 91 public List<Organizations> selectListByName(String name) {
92   - if(StringUtils.isEmpty(name)){
93   - return null;
94   - }
95 92 EntityWrapper<Organizations> ew = new EntityWrapper<Organizations>();
96 93 ew.where("1=1");
97   - ew.like("NAME", name);
  94 + if(!StringUtils.isEmpty(name)){
  95 + ew.like("NAME", name);
  96 + }
98 97 return this.selectList(ew);
99 98 }
100 99  
parent/hospital.mac/src/main/java/com/lyms/hospital/entity/childbirth/ChildbirthInfo.java View file @ 818a273
... ... @@ -154,22 +154,22 @@
154 154 * 产后1小时失血量
155 155 */
156 156 @TableField(value="LOSE_BLOOD_A")
157   - private Integer loseBloodA;
  157 + private Double loseBloodA;
158 158 /**
159 159 * 产后2小时失血量
160 160 */
161 161 @TableField(value="LOSE_BLOOD_B")
162   - private Integer loseBloodB;
  162 + private Double loseBloodB;
163 163 /**
164 164 * 产后24小时失血量
165 165 */
166 166 @TableField(value="LOSE_BLOOD_C")
167   - private Integer loseBloodC;
  167 + private Double loseBloodC;
168 168 /**
169 169 * 第三产程+产后2小时失血量
170 170 */
171 171 @TableField(value="LOSE_BLOOD_D")
172   - private Integer loseBloodD;
  172 + private Double loseBloodD;
173 173 /**
174 174 * 失血原因(枚举)
175 175 */
176 176  
177 177  
178 178  
179 179  
180 180  
181 181  
182 182  
... ... @@ -446,35 +446,35 @@
446 446 this.pulse = pulse;
447 447 }
448 448  
449   - public Integer getLoseBloodA() {
  449 + public Double getLoseBloodA() {
450 450 return loseBloodA;
451 451 }
452 452  
453   - public void setLoseBloodA(Integer loseBloodA) {
  453 + public void setLoseBloodA(Double loseBloodA) {
454 454 this.loseBloodA = loseBloodA;
455 455 }
456 456  
457   - public Integer getLoseBloodB() {
  457 + public Double getLoseBloodB() {
458 458 return loseBloodB;
459 459 }
460 460  
461   - public void setLoseBloodB(Integer loseBloodB) {
  461 + public void setLoseBloodB(Double loseBloodB) {
462 462 this.loseBloodB = loseBloodB;
463 463 }
464 464  
465   - public Integer getLoseBloodC() {
  465 + public Double getLoseBloodC() {
466 466 return loseBloodC;
467 467 }
468 468  
469   - public void setLoseBloodC(Integer loseBloodC) {
  469 + public void setLoseBloodC(Double loseBloodC) {
470 470 this.loseBloodC = loseBloodC;
471 471 }
472 472  
473   - public Integer getLoseBloodD() {
  473 + public Double getLoseBloodD() {
474 474 return loseBloodD;
475 475 }
476 476  
477   - public void setLoseBloodD(Integer loseBloodD) {
  477 + public void setLoseBloodD(Double loseBloodD) {
478 478 this.loseBloodD = loseBloodD;
479 479 }
480 480  
parent/hospital.mac/src/main/java/com/lyms/hospital/entity/childbirth/ChildbirthNewborn.java View file @ 818a273
... ... @@ -111,20 +111,33 @@
111 111 private Integer ifDel;
112 112  
113 113 //==========查询冗余字段(需要查询映射)============
  114 + @TableField(exist = false)
114 115 private String childbirthTimeText;//分娩孕周
  116 + @TableField(exist = false)
115 117 private String childbirthType;//分娩方式
  118 + @TableField(exist = false)
116 119 private String motherName;//母亲姓名
  120 + @TableField(exist = false)
117 121 private String womanBirth;//孕妇出生日期(计算年龄用)
  122 + @TableField(exist = false)
118 123 private String papersNumber;//母亲证件号
  124 + @TableField(exist = false)
119 125 private String contactWay;//联系方式
  126 + @TableField(exist = false)
120 127 private String doctorName;//接生医生
121 128  
122 129 //==========查询冗余字段(无需查询映射)============
  130 + @TableField(exist = false)
123 131 private String childName;//姓名
  132 + @TableField(exist = false)
124 133 private Integer daysAfterBirth;//出生天数
  134 + @TableField(exist = false)
125 135 private Integer motherAge;//母亲年龄
  136 + @TableField(exist = false)
126 137 private String queryDateBegin;//查询-分娩日期范围开始
  138 + @TableField(exist = false)
127 139 private String queryDateEnd;//查询-分娩日期范围结束
  140 + @TableField(exist = false)
128 141 private Integer orgId;//分娩医院ID
129 142  
130 143 public String getId() {
parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/CfEnums.java View file @ 818a273
... ... @@ -10,8 +10,8 @@
10 10 * Created by Administrator on 2016/6/24 0024.
11 11 */
12 12 public enum CfEnums {
13   - O("良好","1"),
14   - O1("死亡","2");
  13 + O("良好","0"),
  14 + O1("死亡","1");
15 15  
16 16 public static List<Map<String,String>> getList(){
17 17 List<Map<String,String>> list = new ArrayList<>();
parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/DeathCauseEnums.java View file @ 818a273
... ... @@ -13,7 +13,7 @@
13 13 * Created by Administrator on 2016/6/24 0024.
14 14 */
15 15 public enum DeathCauseEnums {
16   - O("产科出血", "1"), O2("妊娠高血压疾病", "2"), O3("内科合并症", "3"), O4("羊水栓塞", "4"), O5("其他", "5");
  16 + O2("产科出血", "2"), O3("妊娠高血压疾病", "3"), O4("内科合并症", "4"), O5("羊水栓塞", "5"), O6("其他", "6");
17 17  
18 18 public static List<Map<String,String>> getList(){
19 19 List<Map<String,String>> list = new ArrayList<>();
parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/QiDaiEnums.java View file @ 818a273
... ... @@ -24,6 +24,18 @@
24 24 }
25 25 return list;
26 26 }
  27 +
  28 + public static String getTitle(String id){
  29 + if (id==null){
  30 + return "";
  31 + }
  32 + for (QiDaiEnums e:QiDaiEnums.values()){
  33 + if (id.equals(e.getId())){
  34 + return e.getName();
  35 + }
  36 + }
  37 + return "";
  38 + }
27 39  
28 40 private QiDaiEnums(String name, String id) {
29 41 this.name = name;
parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/SXCauseEnums.java View file @ 818a273
... ... @@ -25,6 +25,18 @@
25 25 return list;
26 26 }
27 27  
  28 + public static String getTitle(String id){
  29 + if (id==null){
  30 + return "";
  31 + }
  32 + for (SXCauseEnums e:SXCauseEnums.values()){
  33 + if (id.equals(e.getId())){
  34 + return e.getName();
  35 + }
  36 + }
  37 + return "";
  38 + }
  39 +
28 40 private SXCauseEnums(String name, String id){
29 41 this.id=id;
30 42 this.name=name;
parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/TpmcTypeEnums.java View file @ 818a273
... ... @@ -24,6 +24,18 @@
24 24 return list;
25 25 }
26 26  
  27 + public static String getTitle(String id){
  28 + if (id==null){
  29 + return "";
  30 + }
  31 + for (TpmcTypeEnums e:values()){
  32 + if (id.equals(e.getId())){
  33 + return e.getName();
  34 + }
  35 + }
  36 + return "";
  37 + }
  38 +
27 39 private TpmcTypeEnums(String name,String id){
28 40 this.id=id;
29 41 this.name=name;
parent/hospital.web/src/main/java/com/lyms/hospital/controller/childbirth/ChildbirthController.java View file @ 818a273
1 1 package com.lyms.hospital.controller.childbirth;
2 2  
  3 +import java.math.BigDecimal;
3 4 import java.util.ArrayList;
4 5 import java.util.Date;
5 6 import java.util.HashMap;
6 7  
7 8  
... ... @@ -9,12 +10,15 @@
9 10 import org.springframework.beans.factory.annotation.Autowired;
10 11 import org.springframework.stereotype.Controller;
11 12 import org.springframework.util.StringUtils;
  13 +import org.springframework.web.bind.annotation.RequestBody;
12 14 import org.springframework.web.bind.annotation.RequestMapping;
13 15 import org.springframework.web.bind.annotation.RequestMethod;
14 16 import org.springframework.web.bind.annotation.ResponseBody;
15 17  
  18 +import com.lyms.base.common.entity.conf.HighriskConf;
16 19 import com.lyms.base.common.entity.user.Users;
17 20 import com.lyms.base.common.service.organ.OrganizationsService;
  21 +import com.lyms.base.common.service.user.UsersService;
18 22 import com.lyms.hospital.entity.childbirth.ChildbirthInfo;
19 23 import com.lyms.hospital.entity.childbirth.ChildbirthInfoVo;
20 24 import com.lyms.hospital.entity.childbirth.ChildbirthNewborn;
21 25  
... ... @@ -36,7 +40,10 @@
36 40 import com.lyms.hospital.request.exam.ChildbirthAddRequest;
37 41 import com.lyms.hospital.request.exam.ChildbirthAddRequestWrapper;
38 42 import com.lyms.hospital.service.childbirth.ChildbirthInfoService;
  43 +import com.lyms.hospital.service.diagnose.DiagnoseInfoService;
39 44 import com.lyms.hospital.service.woman.WomanFetationRecordService;
  45 +import com.lyms.hospital.util.HospitalUtil;
  46 +import com.lyms.hospital.util.UnitConstants;
40 47 import com.lyms.shiro.ShiroWebUtils;
41 48 import com.lyms.util.DateUtil;
42 49 import com.lyms.web.bean.AjaxResult;
... ... @@ -51,7 +58,7 @@
51 58 * [--]保存分娩记录<br/>
52 59 * []依据cardNo或vcCardNo查询孕妇分娩记录<br/>
53 60 * []查看表单<br/>
54   - * 查看页面<br/>
  61 + * []查看页面<br/>
55 62 * 删除分娩信息<br/>
56 63 *
57 64 * @author xujiahong
... ... @@ -67,6 +74,10 @@
67 74 private ChildbirthInfoService birthService;
68 75 @Autowired
69 76 private OrganizationsService orgService;
  77 + @Autowired
  78 + private DiagnoseInfoService diagnoseInfoService;
  79 + @Autowired
  80 + private UsersService usersService;
70 81  
71 82 /**
72 83 * <li>@Description:查看分娩页面
... ... @@ -77,6 +88,7 @@
77 88 * <li>修改人:
78 89 * <li>修改时间:
79 90 */
  91 + @SuppressWarnings({ "unchecked", "rawtypes" })
80 92 @RequestMapping(value = "/findMatDeliverData", method = RequestMethod.GET)
81 93 @ResponseBody
82 94 public AjaxResult getDetailForPage(String id) {
83 95  
... ... @@ -91,8 +103,269 @@
91 103 List<ChildbirthNewborn> newbornList = vo.getNewbornList();
92 104 List<ChildbirthTaipan> taipanList = vo.getTaipanList();
93 105 List<ChildbirthTai> taiList = vo.getTaiList();
  106 + // 查询孕妇基本信息
  107 + WomanFetationRecord fetation = fetationService.selectById(info.getWomanId());
  108 + // 查询孕妇末次高危
  109 + // 高危因素列表
  110 + BigDecimal riskScore = new BigDecimal(0);
  111 + List riskFactor = new ArrayList();
  112 + List<HighriskConf> highriskConfList = diagnoseInfoService.getLastHighrisk(fetation.getWomanPersonId());
  113 + if (highriskConfList != null && !highriskConfList.isEmpty()) {
  114 + for (HighriskConf hc : highriskConfList) {
  115 + Map<String, Object> map = new HashMap<>();
  116 + map.put("id", hc.getId());
  117 + map.put("name", hc.getName());
  118 + map.put("color", hc.getColortext());
  119 + map.put("code", hc.getColorcode());
  120 + riskFactor.add(map);
  121 + if (hc.getGrade() != null) {
  122 + BigDecimal big = new BigDecimal(hc.getGrade());
  123 + riskScore = riskScore.add(big);
  124 + }
  125 + }
  126 + }
94 127  
95   - return AjaxResult.returnFail();
  128 + Map<String, Object> map = new HashMap<>();
  129 + map.put("riskFactor", riskFactor);// 高危因素列表
  130 + map.put("riskScore", riskScore.toString());// 高危评分
  131 +
  132 + map.put("id", fetation.getId());
  133 + map.put("username", fetation.getBaseWomanName());
  134 + map.put("birth", DateUtil.getyyyy_MM_dd(fetation.getBaseWomanBirth()));
  135 + map.put("age", UnitConstants.splice(DateUtil.getAge(fetation.getBaseWomanBirth()), UnitConstants.SUI));
  136 + map.put("phone", fetation.getContactWomanWay());
  137 + map.put("fmWeek", checkWeek(fetation));
  138 + map.put("dueDate", DateUtil.getyyyy_MM_dd(fetation.getHospitalExpectedDate()));
  139 + map.put("mremark", fetation.getHospitalRecordRemark());
  140 +
  141 + map.put("deliveryDate", DateUtil.getyyyy_MM_dd(info.getChildbirthTime()));// 分娩日期
  142 + map.put("dueWeek", info.getChildbirthTimeText());
  143 +
  144 + String fmHospital = "";
  145 + if (!StringUtils.isEmpty(info.getOrgId())) {
  146 + fmHospital = orgService.getNameById(info.getOrgId());
  147 + }
  148 + map.put("fmHospital", fmHospital);
  149 +
  150 + String deliverDoctor = "";
  151 + if (!StringUtils.isEmpty(info.getDoctorId())) {
  152 + Users users = usersService.selectById(info.getDoctorId());
  153 + deliverDoctor = users.getName();
  154 + }
  155 + map.put("deliverDoctor", deliverDoctor);
  156 +
  157 + /* 分娩信息 */
  158 + map.put("tireNumber", TaiShuEnums.getTitle(info.getFetusNum() + ""));// 胎数
  159 + map.put("placenta", UnitConstants.splice(info.getPlacentaNum(), UnitConstants.GE));// 胎盘
  160 +
  161 + // 胎儿信息
  162 + List<Map<String, Object>> placetaList = new ArrayList<>();
  163 + if (taiList != null && !taiList.isEmpty()) {
  164 + for (ChildbirthTai tai : taiList) {
  165 + Map<String, Object> placetaMap = new HashMap<>();
  166 + placetaMap.put("fetalPosition", FetalPositionEnums.getTitle(tai.getPosition() + ""));
  167 + placetaMap.put("fetalPresentation", FetalEnums.getTitle(tai.getFirstExpose() + ""));
  168 + placetaMap.put("heartRate", UnitConstants.splice(tai.getHeartRate(), UnitConstants.CIFEN));
  169 + placetaList.add(placetaMap);
  170 + }
  171 + }
  172 + map.put("placentaData", placetaList);// 胎儿信息
  173 +
  174 + String deliveryMode = "";
  175 + if (!StringUtils.isEmpty(info.getChildbirthType())) {
  176 + if (FmTypeEnums.O1.getId().equals(info.getChildbirthType().toString())) {// 剖宫产
  177 + deliveryMode = "剖宫产";
  178 + } else {// 顺产
  179 + deliveryMode = "顺产," + FmTypeEnums.getFmScNameById(info.getChildbirthType().toString());
  180 + }
  181 + }
  182 + map.put("deliveryMode", deliveryMode);// 分娩方式
  183 +
  184 + if (deliveryMode.contains("顺产")) {
  185 + map.put("operationCause", "");
  186 + } else {
  187 + map.put("operationCause", info.getOperationReason() == null ? "--" : info.getOperationReason());
  188 + }
  189 +
  190 + // 1,2,3产程、总产程
  191 + if (!StringUtils.isEmpty(info.getProcessFirst())) {
  192 + map.put("one", info.getProcessFirst().replace("-", "时") + "分");
  193 + }
  194 + if (!StringUtils.isEmpty(info.getProcessSecond())) {
  195 + map.put("two", info.getProcessSecond().replace("-", "时") + "分");
  196 + }
  197 + if (!StringUtils.isEmpty(info.getProcessThird())) {
  198 + map.put("three", info.getProcessThird().replace("-", "时") + "分");
  199 + }
  200 + if (!StringUtils.isEmpty(info.getProcessTotal())) {
  201 + map.put("totalProcess", info.getProcessTotal().replace("-", "时") + "分");
  202 + }
  203 +
  204 + // 会阴情况
  205 + if (info.getPerineumSituation() != null) {
  206 + if (info.getPerineumSituation() == ChildbirthInfo.PERINEUM_SITUATION_SPLIT) {
  207 + map.put("perinealCondition", "切开");
  208 + } else if (info.getPerineumSituation() == ChildbirthInfo.PERINEUM_SITUATION_WHOLE) {
  209 + map.put("perinealCondition", "完整");
  210 + }
  211 + }
  212 +
  213 + // 会阴撕裂程度
  214 + if (info.getPerineumSplit() != null) {
  215 + if (info.getPerineumSplit() == 1) {
  216 + map.put("siLielevel", "Ⅰ度");
  217 + } else if (info.getPerineumSplit() == 2) {
  218 + map.put("siLielevel", "Ⅱ度");
  219 + } else if (info.getPerineumSplit() == 3) {
  220 + map.put("siLielevel", "Ⅲ度");
  221 + } else {
  222 + map.put("siLielevel", "");
  223 + }
  224 + }
  225 +
  226 + map.put("needleNum", UnitConstants.splice(info.getNeedleNum(), UnitConstants.ZHEN));
  227 +
  228 + /* 产后生理 */
  229 + // 产妇情况
  230 + if (info.getWomanSituation() != null) {
  231 + if (CfEnums.O.getId().equals(info.getWomanSituation())) {// 良好
  232 + map.put("maternalInfo", "良好");
  233 + } else if (CfEnums.O1.getId().equals(info.getWomanSituation())) {
  234 + map.put("maternalInfo", "死亡," + DeathCauseEnums.getName(info.getWomanSituation().toString()));
  235 + }
  236 + }
  237 + map.put("deathCause",
  238 + StringUtils.isEmpty(info.getOtherDeathReasonText()) ? "--" : info.getOtherDeathReasonText());
  239 +
  240 + // 产后血压 收缩压,舒张压
  241 + map.put("ssy", UnitConstants.splice(info.getBloodShrink(), UnitConstants.MMHG));
  242 + map.put("szy", UnitConstants.splice(info.getBloodDiastole(), UnitConstants.MMHG));
  243 + // 产后2小时血压 收缩压,舒张压
  244 + map.put("ssy2h", UnitConstants.splice(info.getBloodShrinkLater(), UnitConstants.MMHG));
  245 + map.put("szy2h", UnitConstants.splice(info.getBloodDiastoleLater(), UnitConstants.MMHG));
  246 +
  247 + map.put("breath", UnitConstants.splice(info.getBreath(), UnitConstants.CIFEN));
  248 + map.put("pulse", UnitConstants.splice(info.getPulse(), UnitConstants.CIFEN));
  249 +
  250 + map.put("oHloseBloodL", UnitConstants.splice(info.getLoseBloodA(), UnitConstants.ML));
  251 + map.put("tHloseBloodL", UnitConstants.splice(info.getLoseBloodB(), UnitConstants.ML));
  252 + map.put("rHloseBloodL", UnitConstants.splice(info.getLoseBloodC(), UnitConstants.ML));
  253 + map.put("sHloseBloodL", UnitConstants.splice(info.getLoseBloodD(), UnitConstants.ML));
  254 +
  255 + if (info.getLoseBloodReason() != null) {
  256 + if (SXCauseEnums.O5.getId().equals(info.getLoseBloodReason())) {// 其他失血原因
  257 + if (StringUtils.isEmpty(info.getLoseBloodOtherText())) {
  258 + map.put("loseBloodCause", "");
  259 + } else {
  260 + map.put("loseBloodCause", info.getLoseBloodOtherText());
  261 + }
  262 + } else {
  263 + map.put("loseBloodCause", SXCauseEnums.getTitle(info.getLoseBloodReason() + ""));
  264 + }
  265 + }
  266 +
  267 + // 产科并发症(需要解析)
  268 + StringBuffer ocs = new StringBuffer();
  269 + if (info.getComplicationQztp() != null && info.getComplicationQztp() == 1) {
  270 + ocs.append("前置胎盘,");
  271 + }
  272 + if (info.getComplicationTpzb() != null && info.getComplicationTpzb() == 1) {
  273 + ocs.append("胎盘早剥,");
  274 + }
  275 + if (info.getComplicationTpzl() != null && info.getComplicationTpzl() == 1) {
  276 + ocs.append("胎盘滞留,");
  277 + }
  278 + if (info.getComplicationTmzp() != null && info.getComplicationTmzp() == 1) {
  279 + ocs.append("胎膜早破,");
  280 + }
  281 + if (info.getComplicationChcx() != null && info.getComplicationChcx() == 1) {
  282 + ocs.append("产后出血,");
  283 + }
  284 + if (info.getComplicationRsqgxy() != null && info.getComplicationRsqgxy() == 1) {
  285 + ocs.append("妊娠期高血压,");
  286 + }
  287 + if (info.getComplicationZxa() != null && info.getComplicationZxa() == 1) {
  288 + ocs.append("子痫前期(轻),");
  289 + }
  290 + if (info.getComplicationZxb() != null && info.getComplicationZxb() == 1) {
  291 + ocs.append("子痫前期(重),");
  292 + }
  293 + if (info.getComplicationZxc() != null && info.getComplicationZxc() == 1) {
  294 + ocs.append("子痫慢性高血压并发子痫前期,");
  295 + }
  296 + if (info.getComplicationRshbmxgxy() != null && info.getComplicationRshbmxgxy() == 1) {
  297 + ocs.append("妊娠合并慢性高血压,");
  298 + }
  299 + if (info.getComplicationOther() != null && info.getComplicationOther() == 1) {
  300 + if (!StringUtils.isEmpty(info.getComplicationOtherText())) {
  301 + ocs.append(info.getComplicationOtherText());
  302 + }
  303 + }
  304 + String ocsStr = ocs.toString();
  305 + if (!StringUtils.isEmpty(ocsStr) && ocsStr.charAt(ocsStr.length() - 1) == ',') {
  306 + ocsStr = ocsStr.substring(0, ocsStr.length() - 1);
  307 + }
  308 + map.put("ocs", ocsStr);
  309 +
  310 + /* 胎盘及新生儿信息 */
  311 +
  312 + // 胎盘信息
  313 + List<Map<String, Object>> ExtPlacentaList = new ArrayList<>();
  314 + if (taipanList != null && !taipanList.isEmpty()) {
  315 + for (ChildbirthTaipan taipan : taipanList) {
  316 + Map<String, Object> extMap = new HashMap<>();
  317 + extMap.put("tpmcType", TpmcTypeEnums.getTitle(taipan.getPlacentaBirthType() + ""));// 胎盘娩出方式(枚举)1自然2手术
  318 + extMap.put("umbilicalCordLength", UnitConstants.splice(taipan.getUmbilicalLength(), UnitConstants.CM));// 脐带长度
  319 + if (taipan.getUmbilicalException() != null && taipan.getUmbilicalException().intValue() == 0) {// 0代表没有异常,其他为异常代号
  320 + extMap.put("umbilicalCordEx", "无");// 脐带异常
  321 + } else {
  322 + extMap.put("umbilicalCordEx", "有");// 脐带异常
  323 + extMap.put("umbilicalCordExType", QiDaiEnums.getTitle(taipan.getUmbilicalException().toString()));// 脐带异常类型
  324 + }
  325 + if (taipan.getBirthType() != null) {
  326 + if (taipan.getBirthType().intValue() == 1) {
  327 + extMap.put("mcType", "子面");// 娩出方式 1子面2母面
  328 + } else if (taipan.getBirthType().intValue() == 2) {
  329 + extMap.put("mcType", "母面");// 娩出方式 1子面2母面
  330 + }
  331 + }
  332 + extMap.put("tpWeight", UnitConstants.splice(taipan.getPlacentaWeight(), UnitConstants.G));// 胎盘重量
  333 + extMap.put("tpSize", taipan.getPlacentaLength() + UnitConstants.CM + "*" + taipan.getPlacentaWidth()
  334 + + UnitConstants.CM + "*" + taipan.getPlacentaThick() + UnitConstants.CM);// 胎盘大小
  335 + ExtPlacentaList.add(extMap);
  336 + }
  337 + }
  338 + map.put("extPlacentas", ExtPlacentaList);
  339 +
  340 + // 新生儿信息
  341 +
  342 + List<Map<String, Object>> babyList = new ArrayList<>();
  343 + if(newbornList!=null && !newbornList.isEmpty()){
  344 + for (ChildbirthNewborn nb : newbornList) {
  345 + Map<String, Object> babyMap = new HashMap<>();
  346 + babyMap.put("dueTime", DateUtil.getyyyy_MM_dd_hms(nb.getBirthTime()));
  347 + babyMap.put("pregnancyOut", nb.getGestationEnding() == null ? ""
  348 + : RenShenJieJuEnums.getTitle(nb.getGestationEnding().toString()));
  349 + babyMap.put("deformity", nb.getDeformity() == null ? "" : nb.getDeformity() == 1 ? "是" : "否");
  350 + babyMap.put("babyGender", nb.getGender() == null ? "" : nb.getGender() == 1 ? "男" : "女");
  351 + babyMap.put("babyWeight", UnitConstants.splice(nb.getWeight(), UnitConstants.G));
  352 + babyMap.put("babyHeight", UnitConstants.splice(nb.getHeight(), UnitConstants.CM));
  353 + babyMap.put("babyHealthy", nb.getDisease());
  354 + String apgarScore = "";
  355 + apgarScore += nb.getApgarScoreOne() == null ? "" : nb.getApgarScoreOne().toString()+ UnitConstants.FEN;
  356 + apgarScore += nb.getApgarScoreFive() == null ? "" : "-"+nb.getApgarScoreFive().toString()+ UnitConstants.FEN;
  357 + apgarScore += nb.getApgarScoreTen() == null ? "" : "-"+nb.getApgarScoreTen().toString()+ UnitConstants.FEN;
  358 + babyMap.put("apgarScore", apgarScore);
  359 + babyMap.put("asphyxiaM", UnitConstants.splice(nb.getAsphyxia(), UnitConstants.FZ));
  360 + babyMap.put("contactStartM", UnitConstants.splice(nb.getTouchBegin(), UnitConstants.FZ));
  361 + babyMap.put("contactM", UnitConstants.splice(nb.getTouchStay(), UnitConstants.FZ));
  362 + babyMap.put("earlySuck",nb.getSuck() == null ? "" : nb.getSuck().intValue()==1 ? "是" : "否");
  363 +
  364 + babyList.add(babyMap);
  365 + }
  366 + }
  367 + map.put("baby", babyList);
  368 + return AjaxResult.returnSuccess(map);
96 369 }
97 370  
98 371 /**
... ... @@ -195,7 +468,7 @@
195 468 */
196 469 @RequestMapping(value = "/matdel", method = RequestMethod.POST)
197 470 @ResponseBody
198   - public AjaxResult saveChildbirthVo(ChildbirthAddRequest request) {
  471 + public AjaxResult saveChildbirthVo(@RequestBody ChildbirthAddRequest request) {
199 472 /*
200 473 * 验证
201 474 */
... ... @@ -212,7 +485,10 @@
212 485 } else {// 修改
213 486 birthService.updateChildbirthVo(vo);
214 487 }
215   - return AjaxResult.returnFail();
  488 +
  489 + // 分娩后、更新相关的孕妇基本信息 TODO
  490 +
  491 + return AjaxResult.returnSuccess();
216 492 }
217 493  
218 494 /**
219 495  
220 496  
221 497  
... ... @@ -261,25 +537,40 @@
261 537 data.add(map);
262 538 }
263 539 }
264   -
  540 +
265 541 /*
266 542 * 应前端魏增辉要求,增加以下字段
267 543 */
268   - dataMap.put("dueType", "0");//是否需要补录分娩,为"1"时需要补录 TODO
269   - if(birthList==null || birthList.isEmpty()){
270   - dataMap.put("isGravida", "1");//是否是孕妇 "1"孕妇 "0"产妇
271   - dataMap.put("dueDate", "");//分娩日期,当分娩后有该字段
272   - }else{
273   - dataMap.put("isGravida", "0");//是否是孕妇 "1"孕妇 "0"产妇
274   -
275   - dataMap.put("dueDate", "");//分娩日期,当分娩后有该字段
  544 + dataMap.put("dueType", "0");// 是否需要补录分娩,为"1"时需要补录 TODO
  545 + if (birthList == null || birthList.isEmpty()) {
  546 + dataMap.put("isGravida", "1");// 是否是孕妇 "1"孕妇 "0"产妇
  547 + dataMap.put("dueDate", "");// 分娩日期,当分娩后有该字段
  548 + } else {
  549 + dataMap.put("isGravida", "0");// 是否是孕妇 "1"孕妇 "0"产妇
  550 + ChildbirthInfo lastInfo = birthList.get(birthList.size() - 1);
  551 + dataMap.put("dueDate", DateUtil.getyyyy_MM_dd(lastInfo.getChildbirthTime()));// 分娩日期,当分娩后有该字段
276 552 }
277   - dataMap.put("status", "1");//? TODO
278   - dataMap.put("type", "3");//? TODO
  553 + dataMap.put("status", "1");// ? TODO
  554 + dataMap.put("type", "3");// ? TODO
279 555  
280 556 dataMap.put("data", data);// 分娩记录列表
281 557 dataMap.remove("dbFetationRecord");
282 558 return AjaxResult.returnSuccess(dataMap);
  559 + }
  560 +
  561 + // ==============================================================================
  562 +
  563 + private static String checkWeek(WomanFetationRecord fetation) {
  564 + if (fetation.getDueStatus() != null && fetation.getDueStatus() == 1) {// 分娩状态
  565 + // 0未终止妊娠
  566 + // 1终止妊娠
  567 + return "终止妊娠";
  568 + } else if (fetation.getWomanType() != null && fetation.getWomanType() == 3) {// 妇女类别:1孕妇,3产妇
  569 + return "已分娩";
  570 + } else if (fetation.getHospitalCorrectLastMenstruation() != null) {
  571 + return HospitalUtil.getPregnantWeek(fetation.getHospitalCorrectLastMenstruation());
  572 + }
  573 + return "";
283 574 }
284 575  
285 576 }
parent/hospital.web/src/main/java/com/lyms/hospital/request/exam/ChildbirthAddRequestWrapper.java View file @ 818a273
... ... @@ -172,9 +172,9 @@
172 172  
173 173 Map<String, Object> apgarScore = (Map<String, Object>) baby.get("apgarScore");
174 174 if (apgarScore != null && !apgarScore.isEmpty()) {
175   - newborn.setApgarScoreOne(OldNewWrapper.obj2Int(baby.get("pf1")));// apgar评分1分钟
176   - newborn.setApgarScoreFive(OldNewWrapper.obj2Int(baby.get("pf5")));// apgar评分5分钟
177   - newborn.setApgarScoreTen(OldNewWrapper.obj2Int(baby.get("pf10")));// apgar评分10分钟
  175 + newborn.setApgarScoreOne(OldNewWrapper.obj2Int(apgarScore.get("pf1")));// apgar评分1分钟
  176 + newborn.setApgarScoreFive(OldNewWrapper.obj2Int(apgarScore.get("pf5")));// apgar评分5分钟
  177 + newborn.setApgarScoreTen(OldNewWrapper.obj2Int(apgarScore.get("pf10")));// apgar评分10分钟
178 178 }
179 179  
180 180 newborn.setAsphyxia(OldNewWrapper.obj2Int(baby.get("asphyxiaM")));// 窒息分钟
181 181  
... ... @@ -229,14 +229,15 @@
229 229 /*
230 230 * 特殊字段处理
231 231 */
  232 + this.request.setDueDate(DateUtil.getyyyy_MM_dd_hms(info.getChildbirthTime()));
232 233 // 胎儿 placentas
233 234 List<Map<String, Object>> placentas = new ArrayList<>();
234 235 if (taiList != null && !taiList.isEmpty()) {
235 236 for (ChildbirthTai tai : taiList) {
236 237 Map<String, Object> map = new HashMap<>();
237 238 map.put("heartRate", tai.getHeartRate());
238   - map.put("fetalPosition", tai.getPosition().toString());
239   - map.put("fetalPresentation", tai.getFirstExpose().toString());
  239 + map.put("fetalPosition", OldNewWrapper.obj2Str(tai.getPosition()));
  240 + map.put("fetalPresentation", OldNewWrapper.obj2Str(tai.getFirstExpose()));
240 241 placentas.add(map);
241 242 }
242 243 }
... ... @@ -245,11 +246,13 @@
245 246 // 分娩方式 deliveryMode
246 247 Map<String, Object> deliveryMode = new HashMap<>();
247 248 Integer childbirthType = info.getChildbirthType();
248   - if (childbirthType.equals(1)) {// 剖宫产
249   - deliveryMode.put("fmfs", "1");
250   - } else {// 顺产
251   - deliveryMode.put("fmfs", "0");
252   - deliveryMode.put("scfs", childbirthType.toString());
  249 + if(childbirthType!=null){
  250 + if (childbirthType.equals(1)) {// 剖宫产
  251 + deliveryMode.put("fmfs", "1");
  252 + } else {// 顺产
  253 + deliveryMode.put("fmfs", "0");
  254 + deliveryMode.put("scfs", childbirthType.toString());
  255 + }
253 256 }
254 257 this.request.setDeliveryMode(deliveryMode);
255 258  
... ... @@ -286,13 +289,8 @@
286 289  
287 290 // loseBloodCause 其他失血原因文本
288 291 Map<String, Object> loseBloodCause = new HashMap<>();
289   - if (!StringUtils.isEmpty(info.getLoseBloodOtherText())) {
290   - loseBloodCause.put("select", "1");
291   - loseBloodCause.put("other", info.getLoseBloodOtherText());
292   - } else {
293   - loseBloodCause.put("select", "0");
294   - loseBloodCause.put("other", "");
295   - }
  292 + loseBloodCause.put("select", OldNewWrapper.obj2Str(info.getLoseBloodReason()));
  293 + loseBloodCause.put("other", OldNewWrapper.obj2Str(info.getLoseBloodOtherText()));
296 294 this.request.setLoseBloodCause(loseBloodCause);
297 295  
298 296 // ocs
... ... @@ -352,7 +350,7 @@
352 350 for (ChildbirthTaipan taipan : taipanList) {
353 351 Map<String, Object> map = new HashMap<>();
354 352  
355   - map.put("tpmcType", taipan.getPlacentaBirthType());
  353 + map.put("tpmcType", OldNewWrapper.obj2Str(taipan.getPlacentaBirthType()));
356 354 if (taipan.getBirthType().intValue() == ChildbirthTaipan.BIRTH_TYPE_MUM) {
357 355 map.put("mcType", "muMian");
358 356 } else if (taipan.getBirthType().intValue() == ChildbirthTaipan.BIRTH_TYPE_SON) {
... ... @@ -368,7 +366,7 @@
368 366 if (taipan.getUmbilicalException() != null) {
369 367 if (taipan.getUmbilicalException().intValue() != 0) {
370 368 map.put("umbilicalCordEx", "yes");
371   - map.put("umbilicalCordExType", taipan.getUmbilicalException());
  369 + map.put("umbilicalCordExType", taipan.getUmbilicalException().toString());
372 370 }
373 371 }
374 372 extPlacentas.add(map);
... ... @@ -382,9 +380,9 @@
382 380 for (ChildbirthNewborn newborn : newbornList) {
383 381 Map<String, Object> map = new HashMap<>();
384 382 map.put("id", newborn.getId());
385   - map.put("babyGender", newborn.getGender().toString());
386   - map.put("babyWeight", newborn.getWeight().toString());
387   - map.put("babyHeight", newborn.getHeight().toString());
  383 + map.put("babyGender", OldNewWrapper.obj2Str(newborn.getGender()));
  384 + map.put("babyWeight", OldNewWrapper.obj2Str(newborn.getWeight()));
  385 + map.put("babyHeight", OldNewWrapper.obj2Str(newborn.getHeight()));
388 386 map.put("deformity", newborn.getDeformity());
389 387  
390 388 Map<String, Object> apgarScore = new HashMap<>();
... ... @@ -394,7 +392,7 @@
394 392 map.put("apgarScore", apgarScore);
395 393  
396 394 map.put("asphyxiaM", newborn.getAsphyxia());
397   - map.put("pregnancyOut", newborn.getGestationEnding().toString());
  395 + map.put("pregnancyOut", OldNewWrapper.obj2Str(newborn.getGestationEnding()));
398 396 map.put("babyHealthy", newborn.getDisease());
399 397 map.put("contactStartM", newborn.getTouchBegin());
400 398 map.put("contactM", newborn.getTouchStay());
... ... @@ -438,7 +436,7 @@
438 436 return map;
439 437 }
440 438  
441   - private int obj2Bool2Int(Object obj) {
  439 + private Integer obj2Bool2Int(Object obj) {
442 440 Boolean bool = OldNewWrapper.obj2Bool(obj);
443 441 return OldNewWrapper.bool2Int(bool);
444 442 }