Commit 88f4ca33b9c3f3a418e33f0de08516c79d5ddcd7
1 parent
fddce8e071
Exists in
master
and in
8 other branches
孕妇分娩后 变成产妇
Showing 4 changed files with 47 additions and 19 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java
- platform-dal/src/main/java/com/lyms/platform/pojo/SieveModel.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/MatDeliverListResult.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java
View file @
88f4ca3
| ... | ... | @@ -146,6 +146,9 @@ |
| 146 | 146 | }**/ |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | + private void delSieve(){ | |
| 150 | + | |
| 151 | + } | |
| 149 | 152 | /** |
| 150 | 153 | * 孕妇建档时调用的方法 |
| 151 | 154 | * |
| ... | ... | @@ -161,6 +164,7 @@ |
| 161 | 164 | List<SieveModel> list = sieveDao.queryList(sieveQuery.convertToQuery()); |
| 162 | 165 | if (CollectionUtils.isEmpty(list)) { |
| 163 | 166 | SieveModel sieveModel = convertToModel(patients); |
| 167 | + sieveModel.setForm("1"); | |
| 164 | 168 | sieveDao.addChanQianSieve(sieveModel); |
| 165 | 169 | } |
| 166 | 170 | } |
| ... | ... | @@ -219,6 +223,7 @@ |
| 219 | 223 | List<SieveModel> list = sieveDao.queryList(sieveQuery.convertToQuery()); |
| 220 | 224 | if (CollectionUtils.isEmpty(list)) { |
| 221 | 225 | SieveModel sieveModel = convertToModel(patient); |
| 226 | + sieveModel.setForm("0"); | |
| 222 | 227 | sieveDao.addChanQianSieve(sieveModel); |
| 223 | 228 | } |
| 224 | 229 | } |
platform-dal/src/main/java/com/lyms/platform/pojo/SieveModel.java
View file @
88f4ca3
| ... | ... | @@ -45,10 +45,20 @@ |
| 45 | 45 | private String diaUnit; |
| 46 | 46 | //录入人员 |
| 47 | 47 | private String publishName; |
| 48 | + //数据来源 0 自动跑进来的 1 建档进来 2 产筛申请进来 | |
| 49 | + private String form; | |
| 48 | 50 | |
| 49 | 51 | private Date created; |
| 50 | 52 | private Date modified; |
| 51 | 53 | private Integer yn; |
| 54 | + | |
| 55 | + public String getForm() { | |
| 56 | + return form; | |
| 57 | + } | |
| 58 | + | |
| 59 | + public void setForm(String form) { | |
| 60 | + this.form = form; | |
| 61 | + } | |
| 52 | 62 | |
| 53 | 63 | public String getHospitalId() { |
| 54 | 64 | return hospitalId; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java
View file @
88f4ca3
| ... | ... | @@ -133,6 +133,7 @@ |
| 133 | 133 | Patients patients = patientsService.findOnePatientById(orderModel.getParentId()); |
| 134 | 134 | if (null != patients) { |
| 135 | 135 | SieveModel sieveModel = patientsService.convertToModel(patients); |
| 136 | + sieveModel.setForm("2"); | |
| 136 | 137 | sieveModel.setHospitalId(orderModel.getHospitalId()); |
| 137 | 138 | sieveService.addChanQianSieve(sieveModel); |
| 138 | 139 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/MatDeliverListResult.java
View file @
88f4ca3
| 1 | 1 | package com.lyms.platform.operate.web.result; |
| 2 | 2 | |
| 3 | -import com.lyms.platform.common.base.IBasicResultConvert; | |
| 4 | 3 | import com.lyms.platform.common.utils.DateUtil; |
| 5 | 4 | import com.lyms.platform.pojo.MaternalDeliverModel; |
| 6 | 5 | import com.lyms.platform.pojo.Patients; |
| 7 | 6 | |
| ... | ... | @@ -12,10 +11,10 @@ |
| 12 | 11 | |
| 13 | 12 | /** |
| 14 | 13 | * 分娩信息记录表 |
| 15 | - * | |
| 14 | + * <p> | |
| 16 | 15 | * Created by Administrator on 2016/6/17 0017. |
| 17 | 16 | */ |
| 18 | -public class MatDeliverListResult { | |
| 17 | +public class MatDeliverListResult { | |
| 19 | 18 | |
| 20 | 19 | private String id; |
| 21 | 20 | //名字 |
| ... | ... | @@ -29,7 +28,7 @@ |
| 29 | 28 | //手机号 |
| 30 | 29 | private String phone; |
| 31 | 30 | //高危因素 |
| 32 | - private List riskFactor; | |
| 31 | + private List riskFactor; | |
| 33 | 32 | |
| 34 | 33 | public List getRiskFactor() { |
| 35 | 34 | return riskFactor; |
| 36 | 35 | |
| 37 | 36 | |
| 38 | 37 | |
| 39 | 38 | |
| 40 | 39 | |
| ... | ... | @@ -55,32 +54,32 @@ |
| 55 | 54 | this.tireNumber1 = tireNumber1; |
| 56 | 55 | } |
| 57 | 56 | |
| 58 | - public MatDeliverListResult convertToResult(List<MaternalDeliverModel> destList,Patients patients) { | |
| 57 | + public MatDeliverListResult convertToResult(List<MaternalDeliverModel> destList, Patients patients) { | |
| 59 | 58 | setId(patients.getId()); |
| 60 | 59 | try { |
| 61 | - if(null!=patients.getBirth()){ | |
| 60 | + if (null != patients.getBirth()) { | |
| 62 | 61 | setAge(DateUtil.getAge(patients.getBirth())); |
| 63 | 62 | } |
| 64 | - }catch (Exception e){ | |
| 63 | + } catch (Exception e) { | |
| 65 | 64 | } |
| 66 | - if(null!=patients.getLastMenses()){ | |
| 65 | + if (null != patients.getLastMenses()) { | |
| 67 | 66 | setLastMenses(DateUtil.getyyyy_MM_dd(patients.getLastMenses())); |
| 68 | 67 | } |
| 69 | - if(null!=patients.getDueDate()){ | |
| 68 | + if (null != patients.getDueDate()) { | |
| 70 | 69 | setyChanQi(DateUtil.getyyyy_MM_dd(patients.getDueDate())); |
| 71 | 70 | } |
| 72 | 71 | setName(patients.getUsername()); |
| 73 | 72 | setPhone(patients.getPhone()); |
| 74 | 73 | setRemarks(patients.getMremark()); |
| 75 | 74 | setRiskScore("60"); |
| 76 | - int days= DateUtil.daysBetween(patients.getLastMenses(),new Date()); | |
| 77 | - String week= (days/7)+""; | |
| 78 | - int day = (days%7); | |
| 79 | - this.dueWeek="孕"+week+"周" +(day>0?"+"+day+"天":""); | |
| 80 | - if(CollectionUtils.isNotEmpty(destList)){ | |
| 81 | - List<MatDeliverExt> list = new ArrayList<>(); | |
| 82 | - for(MaternalDeliverModel model:destList){ | |
| 83 | - list.add(new MatDeliverExt(model)); | |
| 75 | + int days = DateUtil.daysBetween(patients.getLastMenses(), new Date()); | |
| 76 | + String week = (days / 7) + ""; | |
| 77 | + int day = (days % 7); | |
| 78 | + this.dueWeek = "孕" + week + "周" + (day > 0 ? "+" + day + "天" : ""); | |
| 79 | + if (CollectionUtils.isNotEmpty(destList)) { | |
| 80 | + List<MatDeliverExt> list = new ArrayList<>(); | |
| 81 | + for (MaternalDeliverModel model : destList) { | |
| 82 | + list.add(new MatDeliverExt(model,patients.getCreated())); | |
| 84 | 83 | } |
| 85 | 84 | setData(list); |
| 86 | 85 | } |
| 87 | 86 | |
| 88 | 87 | |
| 89 | 88 | |
| ... | ... | @@ -172,17 +171,30 @@ |
| 172 | 171 | this.yChanQi = yChanQi; |
| 173 | 172 | } |
| 174 | 173 | |
| 175 | - private class MatDeliverExt{ | |
| 174 | + private class MatDeliverExt { | |
| 176 | 175 | private String hospitalName; |
| 177 | 176 | private String hospitalId; |
| 178 | 177 | private String id; |
| 179 | 178 | private String checkTime; |
| 179 | + private String enableEdit = "0"; | |
| 180 | 180 | |
| 181 | - public MatDeliverExt(MaternalDeliverModel deliverModel){ | |
| 181 | + public MatDeliverExt(MaternalDeliverModel deliverModel, Date lastCreatedTime) { | |
| 182 | 182 | setCheckTime(deliverModel.getDueDate()); |
| 183 | 183 | setId(deliverModel.getId()); |
| 184 | 184 | setHospitalId(deliverModel.getHospitalId()); |
| 185 | 185 | setHospitalName(deliverModel.getFmHospital()); |
| 186 | + if (null != deliverModel.getDueDate()) { | |
| 187 | + Date date = DateUtil.parseYMD(deliverModel.getDueDate()); | |
| 188 | + setEnableEdit(date.after(lastCreatedTime) ? "1" : "0"); | |
| 189 | + } | |
| 190 | + } | |
| 191 | + | |
| 192 | + public String getEnableEdit() { | |
| 193 | + return enableEdit; | |
| 194 | + } | |
| 195 | + | |
| 196 | + public void setEnableEdit(String enableEdit) { | |
| 197 | + this.enableEdit = enableEdit; | |
| 186 | 198 | } |
| 187 | 199 | |
| 188 | 200 | public String getHospitalId() { |