Commit ad0c9872def6ae81569df052e6bcf43caa758473
1 parent
f70bbda3ef
Exists in
master
and in
1 other branch
增加是否通知
Showing 9 changed files with 854 additions and 11 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/ISieveDao.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/SieveDaoImpl.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/SieveService.java
- platform-dal/src/main/java/com/lyms/platform/query/SieveResultQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/SieveController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ReferralApplyOrderResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/SieveDetailResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/SieveResult.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/ISieveDao.java
View file @
ad0c987
... | ... | @@ -28,6 +28,14 @@ |
28 | 28 | SieveResultModel findById(String id); |
29 | 29 | |
30 | 30 | /** |
31 | + * 查询产筛列表 | |
32 | + * | |
33 | + * @param sieveQuery | |
34 | + * @return | |
35 | + */ | |
36 | + List<SieveResultModel> queryListSieveResult(MongoQuery sieveQuery); | |
37 | + | |
38 | + /** | |
31 | 39 | * 修改数据 |
32 | 40 | */ |
33 | 41 | void update(MongoQuery mongoQuery, SieveResultModel sieveResultModel); |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/SieveDaoImpl.java
View file @
ad0c987
... | ... | @@ -64,5 +64,14 @@ |
64 | 64 | Assert.notNull(sieveQuery, "execute find method query must not null."); |
65 | 65 | return mongoTemplate.find(sieveQuery.convertToMongoQuery(), SieveModel.class); |
66 | 66 | } |
67 | + /** | |
68 | + * 查询产筛列表 | |
69 | + * | |
70 | + * @param sieveQuery | |
71 | + * @return | |
72 | + */ | |
73 | + public List<SieveResultModel> queryListSieveResult(MongoQuery sieveQuery){ | |
74 | + return find(sieveQuery.convertToMongoQuery()); | |
75 | + } | |
67 | 76 | } |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/SieveService.java
View file @
ad0c987
... | ... | @@ -5,6 +5,7 @@ |
5 | 5 | import com.lyms.platform.pojo.SieveModel; |
6 | 6 | import com.lyms.platform.pojo.SieveResultModel; |
7 | 7 | import com.lyms.platform.query.SieveQuery; |
8 | +import com.lyms.platform.query.SieveResultQuery; | |
8 | 9 | import org.springframework.beans.factory.annotation.Autowired; |
9 | 10 | import org.springframework.data.domain.Sort; |
10 | 11 | import org.springframework.stereotype.Service; |
... | ... | @@ -31,7 +32,9 @@ |
31 | 32 | public SieveResultModel findById(String id) { |
32 | 33 | return iSieveDao.findById(id); |
33 | 34 | } |
34 | - | |
35 | + public List<SieveResultModel> queryListSieveResult(SieveResultQuery sieveResultQuery){ | |
36 | + return iSieveDao.queryListSieveResult(sieveResultQuery.convertToQuery()); | |
37 | + } | |
35 | 38 | |
36 | 39 | public void updateOneChanQianDiaSieve(SieveModel sieveModel) { |
37 | 40 | sieveModel.setModified(new Date()); |
platform-dal/src/main/java/com/lyms/platform/query/SieveResultQuery.java
View file @
ad0c987
1 | +package com.lyms.platform.query; | |
2 | + | |
3 | +import com.lyms.platform.common.base.IConvertToNativeQuery; | |
4 | +import com.lyms.platform.common.dao.BaseQuery; | |
5 | +import com.lyms.platform.common.dao.operator.MongoCondition; | |
6 | +import com.lyms.platform.common.dao.operator.MongoOper; | |
7 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
8 | + | |
9 | +import java.util.Date; | |
10 | + | |
11 | +/** | |
12 | + * | |
13 | + * 产前筛查 | |
14 | + * | |
15 | + * Created by Administrator on 2016/7/5 0005. | |
16 | + */ | |
17 | +public class SieveResultQuery extends BaseQuery implements IConvertToNativeQuery { | |
18 | + | |
19 | + private String id; | |
20 | + //患者id | |
21 | + private String parentId; | |
22 | + //姓名 | |
23 | + private String name; | |
24 | + //胎数 | |
25 | + private Integer tireNumber; | |
26 | + //整体风险 | |
27 | + private Integer ztfx; | |
28 | + //联系方式 | |
29 | + private String phone; | |
30 | + //申请孕周 | |
31 | + private String dueWeek; | |
32 | + //产前诊断 1 已检查 0 未检查 | |
33 | + private Integer cqStatus; | |
34 | + //产前诊断结果 | |
35 | + private Integer cqResult; | |
36 | + //妊娠结局 | |
37 | + private Integer renShenResult; | |
38 | + //状态 | |
39 | + private Integer status; | |
40 | + private String cardNo; | |
41 | + | |
42 | + private Integer yn; | |
43 | + | |
44 | + //孕周开始 | |
45 | + private Date dueWeekStart; | |
46 | + //孕周结束 | |
47 | + private Date dueWeekEnd; | |
48 | + | |
49 | + //是否通知 | |
50 | + private Integer isNotify; | |
51 | + | |
52 | + public Integer getIsNotify() { | |
53 | + return isNotify; | |
54 | + } | |
55 | + | |
56 | + public void setIsNotify(Integer isNotify) { | |
57 | + this.isNotify = isNotify; | |
58 | + } | |
59 | + | |
60 | + public Date getDueWeekEnd() { | |
61 | + return dueWeekEnd; | |
62 | + } | |
63 | + | |
64 | + public void setDueWeekEnd(Date dueWeekEnd) { | |
65 | + this.dueWeekEnd = dueWeekEnd; | |
66 | + } | |
67 | + | |
68 | + public Date getDueWeekStart() { | |
69 | + return dueWeekStart; | |
70 | + } | |
71 | + | |
72 | + public void setDueWeekStart(Date dueWeekStart) { | |
73 | + this.dueWeekStart = dueWeekStart; | |
74 | + } | |
75 | + | |
76 | + public Integer getStatus() { | |
77 | + return status; | |
78 | + } | |
79 | + | |
80 | + public String getCardNo() { | |
81 | + return cardNo; | |
82 | + } | |
83 | + | |
84 | + public void setCardNo(String cardNo) { | |
85 | + this.cardNo = cardNo; | |
86 | + } | |
87 | + | |
88 | + public void setStatus(Integer status) { | |
89 | + this.status = status; | |
90 | + } | |
91 | + | |
92 | + @Override | |
93 | + public MongoQuery convertToQuery() { | |
94 | + MongoCondition condition = MongoCondition.newInstance(); | |
95 | + if (null != id) { | |
96 | + condition = condition.and("id", id, MongoOper.IS); | |
97 | + } | |
98 | + if (null != parentId) { | |
99 | + condition = condition.and("parentId", parentId, MongoOper.IS); | |
100 | + } | |
101 | + if (null != name) { | |
102 | + condition = condition.and("name", name, MongoOper.IS); | |
103 | + } | |
104 | + if (null != tireNumber) { | |
105 | + condition = condition.and("tireNumber", tireNumber, MongoOper.IS); | |
106 | + } | |
107 | + if (null != ztfx) { | |
108 | + condition = condition.and("ztfx", ztfx, MongoOper.IS); | |
109 | + } | |
110 | + if (null != phone) { | |
111 | + condition = condition.and("phone", phone, MongoOper.IS); | |
112 | + } | |
113 | + if (null != dueWeek) { | |
114 | + condition = condition.and("dueWeek", dueWeek, MongoOper.IS); | |
115 | + } | |
116 | + if (null != cqStatus) { | |
117 | + condition = condition.and("cqStatus", cqStatus, MongoOper.IS); | |
118 | + } | |
119 | + | |
120 | + if (null != cqResult) { | |
121 | + condition = condition.and("cqResult", cqResult, MongoOper.IS); | |
122 | + } | |
123 | + if (null != renShenResult) { | |
124 | + condition = condition.and("renShenResult", renShenResult, MongoOper.IS); | |
125 | + } | |
126 | + return condition.toMongoQuery(); | |
127 | + } | |
128 | + | |
129 | + | |
130 | + public Integer getCqResult() { | |
131 | + return cqResult; | |
132 | + } | |
133 | + | |
134 | + public void setCqResult(Integer cqResult) { | |
135 | + this.cqResult = cqResult; | |
136 | + } | |
137 | + | |
138 | + public void setRenShenResult(Integer renShenResult) { | |
139 | + this.renShenResult = renShenResult; | |
140 | + } | |
141 | + | |
142 | + public Integer getCqStatus() { | |
143 | + return cqStatus; | |
144 | + } | |
145 | + | |
146 | + public void setCqStatus(Integer cqStatus) { | |
147 | + this.cqStatus = cqStatus; | |
148 | + } | |
149 | + | |
150 | + | |
151 | + public String getDueWeek() { | |
152 | + return dueWeek; | |
153 | + } | |
154 | + | |
155 | + public void setDueWeek(String dueWeek) { | |
156 | + this.dueWeek = dueWeek; | |
157 | + } | |
158 | + | |
159 | + public String getId() { | |
160 | + return id; | |
161 | + } | |
162 | + | |
163 | + public void setId(String id) { | |
164 | + this.id = id; | |
165 | + } | |
166 | + | |
167 | + public String getName() { | |
168 | + return name; | |
169 | + } | |
170 | + | |
171 | + public void setName(String name) { | |
172 | + this.name = name; | |
173 | + } | |
174 | + | |
175 | + public String getParentId() { | |
176 | + return parentId; | |
177 | + } | |
178 | + | |
179 | + public void setParentId(String parentId) { | |
180 | + this.parentId = parentId; | |
181 | + } | |
182 | + | |
183 | + public String getPhone() { | |
184 | + return phone; | |
185 | + } | |
186 | + | |
187 | + public void setPhone(String phone) { | |
188 | + this.phone = phone; | |
189 | + } | |
190 | + | |
191 | + | |
192 | + | |
193 | + public Integer getTireNumber() { | |
194 | + return tireNumber; | |
195 | + } | |
196 | + | |
197 | + public void setTireNumber(Integer tireNumber) { | |
198 | + this.tireNumber = tireNumber; | |
199 | + } | |
200 | + | |
201 | + public Integer getYn() { | |
202 | + return yn; | |
203 | + } | |
204 | + | |
205 | + public void setYn(Integer yn) { | |
206 | + this.yn = yn; | |
207 | + } | |
208 | + | |
209 | + public Integer getZtfx() { | |
210 | + return ztfx; | |
211 | + } | |
212 | + | |
213 | + public void setZtfx(Integer ztfx) { | |
214 | + this.ztfx = ztfx; | |
215 | + } | |
216 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/SieveController.java
View file @
ad0c987
... | ... | @@ -13,10 +13,7 @@ |
13 | 13 | import com.lyms.platform.operate.web.request.SieveAddRequest; |
14 | 14 | import org.springframework.beans.factory.annotation.Autowired; |
15 | 15 | import org.springframework.stereotype.Controller; |
16 | -import org.springframework.web.bind.annotation.RequestBody; | |
17 | -import org.springframework.web.bind.annotation.RequestMapping; | |
18 | -import org.springframework.web.bind.annotation.RequestMethod; | |
19 | -import org.springframework.web.bind.annotation.ResponseBody; | |
16 | +import org.springframework.web.bind.annotation.*; | |
20 | 17 | |
21 | 18 | import javax.validation.Valid; |
22 | 19 | import java.util.ArrayList; |
23 | 20 | |
... | ... | @@ -46,7 +43,19 @@ |
46 | 43 | return sieveFacade.addOneSieve(sieveAddRequest); |
47 | 44 | } |
48 | 45 | |
46 | + | |
49 | 47 | /** |
48 | + * 获取一条产筛结果记录 | |
49 | + * | |
50 | + * @param parentId | |
51 | + * @return | |
52 | + */ | |
53 | + @ResponseBody | |
54 | + @RequestMapping(value = "/sieves",method = RequestMethod.GET) | |
55 | + public BaseResponse getOneSieve(@RequestParam("parnteId")String parentId) { | |
56 | + return sieveFacade.getOneSieve(parentId); | |
57 | + } | |
58 | + /** | |
50 | 59 | * 产前诊断 |
51 | 60 | * |
52 | 61 | * @param chanQianDiaAddRequest |
... | ... | @@ -57,6 +66,18 @@ |
57 | 66 | public BaseResponse addOneChanQianDiaSieve(@RequestBody @Valid ChanQianDiaAddRequest chanQianDiaAddRequest) { |
58 | 67 | return sieveFacade.addOneChanQianDiaSieve(chanQianDiaAddRequest); |
59 | 68 | } |
69 | + | |
70 | + /** | |
71 | + * 产前诊断 | |
72 | + * | |
73 | + * @return | |
74 | + */ | |
75 | + @ResponseBody | |
76 | + @RequestMapping(value = "/cqsieve",method = RequestMethod.GET) | |
77 | + public BaseResponse getOneChanQianDiaSieve(@RequestParam("id")String id) { | |
78 | + return sieveFacade.getOneChanQianDiaSieve(id); | |
79 | + } | |
80 | + | |
60 | 81 | |
61 | 82 | @ResponseBody |
62 | 83 | @RequestMapping(value = "/cqsieve/enums",method = RequestMethod.GET) |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java
View file @
ad0c987
1 | 1 | package com.lyms.platform.operate.web.facade; |
2 | 2 | |
3 | +import com.lyms.platform.biz.service.PatientsService; | |
3 | 4 | import com.lyms.platform.biz.service.SieveService; |
4 | 5 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
5 | 6 | import com.lyms.platform.common.enums.YnEnums; |
6 | 7 | import com.lyms.platform.common.result.BaseListResponse; |
8 | +import com.lyms.platform.common.result.BaseObjectResponse; | |
7 | 9 | import com.lyms.platform.common.result.BaseResponse; |
8 | 10 | import com.lyms.platform.common.utils.DateUtil; |
9 | 11 | import com.lyms.platform.operate.web.request.ChanQianDiaAddRequest; |
10 | 12 | import com.lyms.platform.operate.web.request.CqSieveQueryRequest; |
11 | 13 | import com.lyms.platform.operate.web.request.SieveAddRequest; |
14 | +import com.lyms.platform.operate.web.result.SieveDetailResult; | |
12 | 15 | import com.lyms.platform.operate.web.result.SieveListResult; |
16 | +import com.lyms.platform.operate.web.result.SieveResult; | |
17 | +import com.lyms.platform.pojo.Patients; | |
13 | 18 | import com.lyms.platform.pojo.SieveModel; |
19 | +import com.lyms.platform.pojo.SieveResultModel; | |
14 | 20 | import com.lyms.platform.query.SieveQuery; |
21 | +import com.lyms.platform.query.SieveResultQuery; | |
15 | 22 | import org.apache.commons.collections.CollectionUtils; |
16 | 23 | import org.springframework.beans.factory.annotation.Autowired; |
17 | 24 | import org.springframework.stereotype.Component; |
... | ... | @@ -28,6 +35,8 @@ |
28 | 35 | public class SieveFacade { |
29 | 36 | @Autowired |
30 | 37 | private SieveService sieveService; |
38 | + @Autowired | |
39 | + private PatientsService patientsService; | |
31 | 40 | |
32 | 41 | /** |
33 | 42 | * 增加一条产筛结果记录 |
... | ... | @@ -38,6 +47,34 @@ |
38 | 47 | public BaseResponse addOneSieve(SieveAddRequest sieveAddRequest) { |
39 | 48 | sieveService.addSieve(sieveAddRequest.convertToDataModel()); |
40 | 49 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
50 | + } | |
51 | + //产筛结果 | |
52 | + public BaseResponse getOneSieve(String parentId){ | |
53 | + SieveResultQuery sieveResultQuery=new SieveResultQuery(); | |
54 | + sieveResultQuery.setParentId(parentId); | |
55 | + List<SieveResultModel> sb= sieveService.queryListSieveResult(sieveResultQuery); | |
56 | + SieveResult sieveResult=new SieveResult(); | |
57 | + if(CollectionUtils.isNotEmpty(sb)){ | |
58 | + SieveResultModel sieveResultModel=sb.get(0); | |
59 | + Patients patients= patientsService.findOnePatientById(sieveResultModel.getParentId()); | |
60 | + sieveResult.convert(sieveResultModel,patients); | |
61 | + } | |
62 | + return new BaseObjectResponse().setData(sieveResult).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
63 | + } | |
64 | + //产前诊断结果 | |
65 | + public BaseResponse getOneChanQianDiaSieve(String id){ | |
66 | + SieveQuery sieveQuery=new SieveQuery(); | |
67 | + sieveQuery.setYn(YnEnums.YES.getId()); | |
68 | + sieveQuery.setId(id); | |
69 | + List<SieveModel> sieveModels = sieveService.queryList(sieveQuery); | |
70 | + SieveDetailResult sieveDetailResult=new SieveDetailResult(); | |
71 | + | |
72 | + if(CollectionUtils.isNotEmpty(sieveModels)){ | |
73 | + SieveModel sieveModel= sieveModels.get(0); | |
74 | + sieveDetailResult.convert(); | |
75 | + | |
76 | + } | |
77 | + return new BaseObjectResponse().setData(sieveDetailResult).setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS); | |
41 | 78 | } |
42 | 79 | |
43 | 80 | /** |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ReferralApplyOrderResult.java
View file @
ad0c987
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; |
4 | +import com.lyms.platform.pojo.Patients; | |
5 | 5 | import com.lyms.platform.pojo.ReferralApplyOrderModel; |
6 | -import com.lyms.platform.pojo.SieveApplyOrderModel; | |
7 | 6 | |
8 | 7 | import java.util.Date; |
9 | 8 | import java.util.List; |
... | ... | @@ -11,8 +10,20 @@ |
11 | 10 | /** |
12 | 11 | * Created by Administrator on 2016/7/7 0007. |
13 | 12 | */ |
14 | -public class ReferralApplyOrderResult implements IBasicResultConvert<ReferralApplyOrderResult, ReferralApplyOrderModel> { | |
15 | - | |
13 | +public class ReferralApplyOrderResult { | |
14 | + //年龄 | |
15 | + //预产期 | |
16 | + private String yChanQi; | |
17 | + //手机号 | |
18 | + private String phone; | |
19 | + //高危因素 | |
20 | + private List riskFactor; | |
21 | + //高危评分 | |
22 | + private String riskScore; | |
23 | + //备注 | |
24 | + private String remarks; | |
25 | + //末次月经 | |
26 | + private String lastMenses; | |
16 | 27 | private String id; |
17 | 28 | //患者id |
18 | 29 | private String parentId; |
... | ... | @@ -194,8 +205,7 @@ |
194 | 205 | this.transferredHospital = transferredHospital; |
195 | 206 | } |
196 | 207 | |
197 | - @Override | |
198 | - public ReferralApplyOrderResult convertToResult(ReferralApplyOrderModel destModel) { | |
208 | + public ReferralApplyOrderResult convertToResult(ReferralApplyOrderModel destModel,Patients patients) { | |
199 | 209 | setId(destModel.getId()); |
200 | 210 | setParentId(destModel.getParentId()); |
201 | 211 | setName(destModel.getName()); |
202 | 212 | |
... | ... | @@ -210,7 +220,74 @@ |
210 | 220 | setPotentialRisk(destModel.getPotentialRisk()); |
211 | 221 | setTransferMode(destModel.getTransferMode()); |
212 | 222 | setApplyDoctor(destModel.getApplyDoctor()); |
223 | + | |
224 | + try { | |
225 | + if(null!=patients.getBirth()){ | |
226 | + setAge(DateUtil.getAge(patients.getBirth())); | |
227 | + } | |
228 | + }catch (Exception e){ | |
229 | + } | |
230 | + setName(patients.getUsername()); | |
231 | + setPhone(patients.getPhone()); | |
232 | + setRemarks(patients.getMremark()); | |
233 | + setRiskScore("60"); | |
234 | + | |
235 | + int days= DateUtil.daysBetween(patients.getLastMenses(),new Date()); | |
236 | + String week= (days/7)+""; | |
237 | + int day = (days%7); | |
238 | + this.dueWeek="孕"+week+"周" +(day>0?"+"+day+"天":""); | |
239 | + if(null!=patients.getLastMenses()){ | |
240 | + setLastMenses(DateUtil.getyyyy_MM_dd(patients.getLastMenses())); | |
241 | + } | |
213 | 242 | return this; |
243 | + } | |
244 | + | |
245 | + public String getLastMenses() { | |
246 | + return lastMenses; | |
247 | + } | |
248 | + | |
249 | + public void setLastMenses(String lastMenses) { | |
250 | + this.lastMenses = lastMenses; | |
251 | + } | |
252 | + | |
253 | + public String getPhone() { | |
254 | + return phone; | |
255 | + } | |
256 | + | |
257 | + public void setPhone(String phone) { | |
258 | + this.phone = phone; | |
259 | + } | |
260 | + | |
261 | + public String getRemarks() { | |
262 | + return remarks; | |
263 | + } | |
264 | + | |
265 | + public void setRemarks(String remarks) { | |
266 | + this.remarks = remarks; | |
267 | + } | |
268 | + | |
269 | + public List getRiskFactor() { | |
270 | + return riskFactor; | |
271 | + } | |
272 | + | |
273 | + public void setRiskFactor(List riskFactor) { | |
274 | + this.riskFactor = riskFactor; | |
275 | + } | |
276 | + | |
277 | + public String getRiskScore() { | |
278 | + return riskScore; | |
279 | + } | |
280 | + | |
281 | + public void setRiskScore(String riskScore) { | |
282 | + this.riskScore = riskScore; | |
283 | + } | |
284 | + | |
285 | + public String getyChanQi() { | |
286 | + return yChanQi; | |
287 | + } | |
288 | + | |
289 | + public void setyChanQi(String yChanQi) { | |
290 | + this.yChanQi = yChanQi; | |
214 | 291 | } |
215 | 292 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/SieveDetailResult.java
View file @
ad0c987
1 | +package com.lyms.platform.operate.web.result; | |
2 | + | |
3 | +import com.lyms.platform.common.enums.ChanQResultEnums; | |
4 | +import com.lyms.platform.common.enums.RenShenJieJuEnums; | |
5 | +import com.lyms.platform.common.utils.DateUtil; | |
6 | +import com.lyms.platform.pojo.Patients; | |
7 | +import com.lyms.platform.pojo.SieveModel; | |
8 | + | |
9 | +import java.util.Date; | |
10 | +import java.util.List; | |
11 | + | |
12 | +/** | |
13 | + *产前诊断结果 | |
14 | + * | |
15 | + * Created by Administrator on 2016/7/8 0008. | |
16 | + */ | |
17 | +public class SieveDetailResult { | |
18 | + private String id; | |
19 | + private String parentId; | |
20 | + //名字 | |
21 | + private String name; | |
22 | + //年龄 | |
23 | + private Integer age; | |
24 | + //孕周 | |
25 | + private String dueWeek; | |
26 | + //预产期 | |
27 | + private String yChanQi; | |
28 | + //手机号 | |
29 | + private String phone; | |
30 | + //高危因素 | |
31 | + private List riskFactor; | |
32 | + //高危评分 | |
33 | + private String riskScore; | |
34 | + //备注 | |
35 | + private String remarks; | |
36 | + //末次月经 | |
37 | + private String lastMenses; | |
38 | + //产前诊断结果 | |
39 | + private Integer cqResult; | |
40 | + | |
41 | + private String cqResultText; | |
42 | + //妊娠结局 | |
43 | + private Integer renShenResult; | |
44 | + | |
45 | + private String renShenResultText; | |
46 | + //1 待产筛 2 产筛中 3 完成产筛 4 完成产诊 | |
47 | + private Integer status; | |
48 | + | |
49 | + // 诊断时间 | |
50 | + private String diaTime; | |
51 | + //诊断单位 | |
52 | + private String diaUnit; | |
53 | + //录入人员 | |
54 | + private String publishName; | |
55 | + | |
56 | + public String getCqResultText() { | |
57 | + return cqResultText; | |
58 | + } | |
59 | + | |
60 | + public String getId() { | |
61 | + return id; | |
62 | + } | |
63 | + | |
64 | + public void setId(String id) { | |
65 | + this.id = id; | |
66 | + } | |
67 | + | |
68 | + public String getParentId() { | |
69 | + return parentId; | |
70 | + } | |
71 | + | |
72 | + public void setParentId(String parentId) { | |
73 | + this.parentId = parentId; | |
74 | + } | |
75 | + | |
76 | + public void setCqResultText(String cqResultText) { | |
77 | + this.cqResultText = cqResultText; | |
78 | + } | |
79 | + | |
80 | + public String getRenShenResultText() { | |
81 | + return renShenResultText; | |
82 | + } | |
83 | + | |
84 | + public void setRenShenResultText(String renShenResultText) { | |
85 | + this.renShenResultText = renShenResultText; | |
86 | + } | |
87 | + | |
88 | + public Integer getAge() { | |
89 | + return age; | |
90 | + } | |
91 | + | |
92 | + public void setAge(Integer age) { | |
93 | + this.age = age; | |
94 | + } | |
95 | + | |
96 | + public Integer getCqResult() { | |
97 | + return cqResult; | |
98 | + } | |
99 | + | |
100 | + public void setCqResult(Integer cqResult) { | |
101 | + this.cqResult = cqResult; | |
102 | + } | |
103 | + | |
104 | + public String getDiaTime() { | |
105 | + return diaTime; | |
106 | + } | |
107 | + | |
108 | + public void setDiaTime(String diaTime) { | |
109 | + this.diaTime = diaTime; | |
110 | + } | |
111 | + | |
112 | + public String getDiaUnit() { | |
113 | + return diaUnit; | |
114 | + } | |
115 | + | |
116 | + public void setDiaUnit(String diaUnit) { | |
117 | + this.diaUnit = diaUnit; | |
118 | + } | |
119 | + | |
120 | + public String getDueWeek() { | |
121 | + return dueWeek; | |
122 | + } | |
123 | + | |
124 | + public void setDueWeek(String dueWeek) { | |
125 | + this.dueWeek = dueWeek; | |
126 | + } | |
127 | + | |
128 | + public String getLastMenses() { | |
129 | + return lastMenses; | |
130 | + } | |
131 | + | |
132 | + public void setLastMenses(String lastMenses) { | |
133 | + this.lastMenses = lastMenses; | |
134 | + } | |
135 | + | |
136 | + public String getName() { | |
137 | + return name; | |
138 | + } | |
139 | + | |
140 | + public void setName(String name) { | |
141 | + this.name = name; | |
142 | + } | |
143 | + | |
144 | + public String getPhone() { | |
145 | + return phone; | |
146 | + } | |
147 | + | |
148 | + public void setPhone(String phone) { | |
149 | + this.phone = phone; | |
150 | + } | |
151 | + | |
152 | + public String getPublishName() { | |
153 | + return publishName; | |
154 | + } | |
155 | + | |
156 | + public void setPublishName(String publishName) { | |
157 | + this.publishName = publishName; | |
158 | + } | |
159 | + | |
160 | + public String getRemarks() { | |
161 | + return remarks; | |
162 | + } | |
163 | + | |
164 | + public void setRemarks(String remarks) { | |
165 | + this.remarks = remarks; | |
166 | + } | |
167 | + | |
168 | + public Integer getRenShenResult() { | |
169 | + return renShenResult; | |
170 | + } | |
171 | + | |
172 | + public void setRenShenResult(Integer renShenResult) { | |
173 | + this.renShenResult = renShenResult; | |
174 | + } | |
175 | + | |
176 | + public List getRiskFactor() { | |
177 | + return riskFactor; | |
178 | + } | |
179 | + | |
180 | + public void setRiskFactor(List riskFactor) { | |
181 | + this.riskFactor = riskFactor; | |
182 | + } | |
183 | + | |
184 | + public String getRiskScore() { | |
185 | + return riskScore; | |
186 | + } | |
187 | + | |
188 | + public void setRiskScore(String riskScore) { | |
189 | + this.riskScore = riskScore; | |
190 | + } | |
191 | + | |
192 | + public Integer getStatus() { | |
193 | + return status; | |
194 | + } | |
195 | + | |
196 | + public void setStatus(Integer status) { | |
197 | + this.status = status; | |
198 | + } | |
199 | + | |
200 | + public String getyChanQi() { | |
201 | + return yChanQi; | |
202 | + } | |
203 | + | |
204 | + public void setyChanQi(String yChanQi) { | |
205 | + this.yChanQi = yChanQi; | |
206 | + } | |
207 | + | |
208 | + public SieveDetailResult convert(SieveModel sieveModel,Patients patients) { | |
209 | + try { | |
210 | + if(null!=patients.getBirth()){ | |
211 | + setAge(DateUtil.getAge(patients.getBirth())); | |
212 | + } | |
213 | + }catch (Exception e){ | |
214 | + } | |
215 | + setName(patients.getUsername()); | |
216 | + setPhone(patients.getPhone()); | |
217 | + setRemarks(patients.getMremark()); | |
218 | + setRiskScore("60"); | |
219 | + | |
220 | + int days= DateUtil.daysBetween(patients.getLastMenses(),new Date()); | |
221 | + String week= (days/7)+""; | |
222 | + int day = (days%7); | |
223 | + this.dueWeek="孕"+week+"周" +(day>0?"+"+day+"天":""); | |
224 | + if(null!=patients.getLastMenses()){ | |
225 | + setLastMenses(DateUtil.getyyyy_MM_dd(patients.getLastMenses())); | |
226 | + } | |
227 | + /* //产前诊断结果 | |
228 | + private Integer cqResult; | |
229 | + //妊娠结局 | |
230 | + private Integer renShenResult; | |
231 | + //1 待产筛 2 产筛中 3 完成产筛 4 完成产诊 | |
232 | + private Integer status; | |
233 | + | |
234 | + // 诊断时间 | |
235 | + private String diaTime; | |
236 | + //诊断单位 | |
237 | + private String diaUnit; | |
238 | + //录入人员 | |
239 | + private String publishName;*/ | |
240 | + setId(sieveModel.getId()); | |
241 | + setParentId(sieveModel.getParentId()); | |
242 | + setCqResult(sieveModel.getCqResult()); | |
243 | + if(null!=sieveModel.getCqResult()){ | |
244 | + setCqResultText(ChanQResultEnums.getTitle(sieveModel.getCqResult())); | |
245 | + } | |
246 | + setRenShenResult(sieveModel.getRenShenResult()); | |
247 | + if(null!=sieveModel.getRenShenResult()){ | |
248 | + setRenShenResultText(RenShenJieJuEnums.getTitle(sieveModel.getRenShenResult())); | |
249 | + } | |
250 | + setStatus(sieveModel.getStatus()); | |
251 | + setDiaTime(sieveModel.getDiaTime()); | |
252 | + setDiaUnit(sieveModel.getDiaUnit()); | |
253 | + setPublishName(sieveModel.getPublishName()); | |
254 | + return this; | |
255 | + } | |
256 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/SieveResult.java
View file @
ad0c987
1 | +package com.lyms.platform.operate.web.result; | |
2 | + | |
3 | +import com.lyms.platform.common.utils.DateUtil; | |
4 | +import com.lyms.platform.pojo.Patients; | |
5 | +import com.lyms.platform.pojo.SieveResultModel; | |
6 | + | |
7 | +import java.util.Date; | |
8 | +import java.util.List; | |
9 | + | |
10 | +/** | |
11 | + * | |
12 | + * 产前诊断结果 | |
13 | + * | |
14 | + * Created by Administrator on 2016/7/8 0008. | |
15 | + */ | |
16 | +public class SieveResult { | |
17 | + | |
18 | + | |
19 | + | |
20 | + //名字 | |
21 | + private String name; | |
22 | + //年龄 | |
23 | + private Integer age; | |
24 | + //孕周 | |
25 | + private String dueWeek; | |
26 | + //预产期 | |
27 | + private String yChanQi; | |
28 | + //手机号 | |
29 | + private String phone; | |
30 | + //高危因素 | |
31 | + private List riskFactor; | |
32 | + //高危评分 | |
33 | + private String riskScore; | |
34 | + //备注 | |
35 | + private String remarks; | |
36 | + //末次月经 | |
37 | + private String lastMenses; | |
38 | + private String id; | |
39 | + private String parentId; | |
40 | + | |
41 | + private String tszhz;// 唐氏综合症 | |
42 | + private String sjgjx;// 神经管畸形 | |
43 | + private String sbst;// 18-三体 | |
44 | + private String dzhpx;// 地中海贫血 | |
45 | + private String cspj;// 产筛评价 | |
46 | + //录入人员 | |
47 | + private String publishName; | |
48 | + | |
49 | + public String getCspj() { | |
50 | + return cspj; | |
51 | + } | |
52 | + | |
53 | + public void setCspj(String cspj) { | |
54 | + this.cspj = cspj; | |
55 | + } | |
56 | + | |
57 | + public String getDzhpx() { | |
58 | + return dzhpx; | |
59 | + } | |
60 | + | |
61 | + public void setDzhpx(String dzhpx) { | |
62 | + this.dzhpx = dzhpx; | |
63 | + } | |
64 | + | |
65 | + public String getId() { | |
66 | + return id; | |
67 | + } | |
68 | + | |
69 | + public void setId(String id) { | |
70 | + this.id = id; | |
71 | + } | |
72 | + | |
73 | + public String getParentId() { | |
74 | + return parentId; | |
75 | + } | |
76 | + | |
77 | + public void setParentId(String parentId) { | |
78 | + this.parentId = parentId; | |
79 | + } | |
80 | + | |
81 | + public String getPublishName() { | |
82 | + return publishName; | |
83 | + } | |
84 | + | |
85 | + public void setPublishName(String publishName) { | |
86 | + this.publishName = publishName; | |
87 | + } | |
88 | + | |
89 | + public String getSbst() { | |
90 | + return sbst; | |
91 | + } | |
92 | + | |
93 | + public void setSbst(String sbst) { | |
94 | + this.sbst = sbst; | |
95 | + } | |
96 | + | |
97 | + public String getSjgjx() { | |
98 | + return sjgjx; | |
99 | + } | |
100 | + | |
101 | + public void setSjgjx(String sjgjx) { | |
102 | + this.sjgjx = sjgjx; | |
103 | + } | |
104 | + | |
105 | + public String getTszhz() { | |
106 | + return tszhz; | |
107 | + } | |
108 | + | |
109 | + public void setTszhz(String tszhz) { | |
110 | + this.tszhz = tszhz; | |
111 | + } | |
112 | + | |
113 | + public Integer getAge() { | |
114 | + return age; | |
115 | + } | |
116 | + | |
117 | + public void setAge(Integer age) { | |
118 | + this.age = age; | |
119 | + } | |
120 | + | |
121 | + public String getDueWeek() { | |
122 | + return dueWeek; | |
123 | + } | |
124 | + | |
125 | + public void setDueWeek(String dueWeek) { | |
126 | + this.dueWeek = dueWeek; | |
127 | + } | |
128 | + | |
129 | + public String getLastMenses() { | |
130 | + return lastMenses; | |
131 | + } | |
132 | + | |
133 | + public void setLastMenses(String lastMenses) { | |
134 | + this.lastMenses = lastMenses; | |
135 | + } | |
136 | + | |
137 | + public String getName() { | |
138 | + return name; | |
139 | + } | |
140 | + | |
141 | + public void setName(String name) { | |
142 | + this.name = name; | |
143 | + } | |
144 | + | |
145 | + public String getPhone() { | |
146 | + return phone; | |
147 | + } | |
148 | + | |
149 | + public void setPhone(String phone) { | |
150 | + this.phone = phone; | |
151 | + } | |
152 | + | |
153 | + public String getRemarks() { | |
154 | + return remarks; | |
155 | + } | |
156 | + | |
157 | + public void setRemarks(String remarks) { | |
158 | + this.remarks = remarks; | |
159 | + } | |
160 | + | |
161 | + public List getRiskFactor() { | |
162 | + return riskFactor; | |
163 | + } | |
164 | + | |
165 | + public void setRiskFactor(List riskFactor) { | |
166 | + this.riskFactor = riskFactor; | |
167 | + } | |
168 | + | |
169 | + public String getRiskScore() { | |
170 | + return riskScore; | |
171 | + } | |
172 | + | |
173 | + public void setRiskScore(String riskScore) { | |
174 | + this.riskScore = riskScore; | |
175 | + } | |
176 | + | |
177 | + public String getyChanQi() { | |
178 | + return yChanQi; | |
179 | + } | |
180 | + | |
181 | + public void setyChanQi(String yChanQi) { | |
182 | + this.yChanQi = yChanQi; | |
183 | + } | |
184 | + | |
185 | + public SieveResult convert(SieveResultModel sieveResultModel,Patients patients){ | |
186 | + try { | |
187 | + if(null!=patients.getBirth()){ | |
188 | + setAge(DateUtil.getAge(patients.getBirth())); | |
189 | + } | |
190 | + }catch (Exception e){ | |
191 | + } | |
192 | + setName(patients.getUsername()); | |
193 | + setPhone(patients.getPhone()); | |
194 | + setRemarks(patients.getMremark()); | |
195 | + setRiskScore("60"); | |
196 | + | |
197 | + int days= DateUtil.daysBetween(patients.getLastMenses(),new Date()); | |
198 | + String week= (days/7)+""; | |
199 | + int day = (days%7); | |
200 | + this.dueWeek="孕"+week+"周" +(day>0?"+"+day+"天":""); | |
201 | + if(null!=patients.getLastMenses()){ | |
202 | + setLastMenses(DateUtil.getyyyy_MM_dd(patients.getLastMenses())); | |
203 | + } | |
204 | + | |
205 | + | |
206 | + setParentId(sieveResultModel.getParentId()); | |
207 | + setId(sieveResultModel.getId()); | |
208 | + setCspj(sieveResultModel.getCspj()); | |
209 | + setDzhpx(sieveResultModel.getDzhpx()); | |
210 | + setPublishName(sieveResultModel.getPublishName()); | |
211 | + setSbst(sieveResultModel.getSbst()); | |
212 | + setSjgjx(sieveResultModel.getSjgjx()); | |
213 | + setTszhz(sieveResultModel.getTszhz()); | |
214 | + return this; | |
215 | + } | |
216 | +} |