Commit b0aaec212a929d3747d26267946c896ee1efeba5
1 parent
4a6392e3ac
Exists in
master
and in
1 other branch
1
Showing 5 changed files with 420 additions and 27 deletions
- platform-dal/src/main/java/com/lyms/platform/pojo/PostReviewModel.java
- platform-dal/src/main/java/com/lyms/platform/query/PostReviewQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ApplyOrderController.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/ApplyOrderInResult.java
platform-dal/src/main/java/com/lyms/platform/pojo/PostReviewModel.java
View file @
b0aaec2
1 | +package com.lyms.platform.pojo; | |
2 | + | |
3 | +import com.lyms.platform.common.result.BaseModel; | |
4 | +import org.springframework.data.mongodb.core.mapping.Document; | |
5 | + | |
6 | +import java.util.Date; | |
7 | + | |
8 | +/** | |
9 | + * | |
10 | + * 产后复查模型 | |
11 | + * | |
12 | + * Created by Administrator on 2016/6/28 0028. | |
13 | + */ | |
14 | +@Document(collection = "lyms_postreview") | |
15 | +public class PostReviewModel extends BaseModel { | |
16 | + private String id; | |
17 | + //产妇id | |
18 | + private String parentId; | |
19 | + | |
20 | + //分娩天数 | |
21 | + private String day; | |
22 | + //健康情况 | |
23 | + private String healthStatus; | |
24 | + //心理状态 | |
25 | + private String psychology; | |
26 | + //体重 | |
27 | + private double weight; | |
28 | + //血压 | |
29 | + private String bp; | |
30 | + /** | |
31 | + * 乳房 | |
32 | + */ | |
33 | + private String breast; | |
34 | + /** | |
35 | + * 恶露 | |
36 | + */ | |
37 | + private String lochia; | |
38 | + /** | |
39 | + * 外阴 | |
40 | + */ | |
41 | + private String vulva; | |
42 | + /** | |
43 | + * 阴道 | |
44 | + */ | |
45 | + private String vagina; | |
46 | + //宫颈 | |
47 | + private String cervixUteri; | |
48 | + /** | |
49 | + * 子宫 | |
50 | + */ | |
51 | + private String matrix; | |
52 | + | |
53 | + /** | |
54 | + * 伤口 | |
55 | + */ | |
56 | + private String wound; | |
57 | + /** | |
58 | + * 其他 | |
59 | + */ | |
60 | + private String other; | |
61 | + //附件 | |
62 | + private String fujian; | |
63 | + | |
64 | + //-----------------辅助检查--------------------- | |
65 | + //盆地检查 | |
66 | + private String basin; | |
67 | + //微量元素检查 | |
68 | + private String traceElement; | |
69 | + //骨密度检查 | |
70 | + private String boneDensity; | |
71 | + //超声检查 | |
72 | + private String ultrasonicExamination; | |
73 | + // 诊断 | |
74 | + private String diagnosis; | |
75 | + //处理意见 | |
76 | + private String treatOpinion; | |
77 | + | |
78 | + //指导意见 | |
79 | + private String dirOpinion; | |
80 | + //产检 医生 | |
81 | + private String prodDoctor; | |
82 | + //产检日期 | |
83 | + private String checkTime; | |
84 | + //下次产检时间 | |
85 | + private String nextCheckTime; | |
86 | + | |
87 | + private Integer yn; | |
88 | + private Date created; | |
89 | + private Date modified; | |
90 | + | |
91 | + public String getBasin() { | |
92 | + return basin; | |
93 | + } | |
94 | + | |
95 | + public void setBasin(String basin) { | |
96 | + this.basin = basin; | |
97 | + } | |
98 | + | |
99 | + public String getBoneDensity() { | |
100 | + return boneDensity; | |
101 | + } | |
102 | + | |
103 | + public void setBoneDensity(String boneDensity) { | |
104 | + this.boneDensity = boneDensity; | |
105 | + } | |
106 | + | |
107 | + public String getCheckTime() { | |
108 | + return checkTime; | |
109 | + } | |
110 | + | |
111 | + public void setCheckTime(String checkTime) { | |
112 | + this.checkTime = checkTime; | |
113 | + } | |
114 | + | |
115 | + public String getDiagnosis() { | |
116 | + return diagnosis; | |
117 | + } | |
118 | + | |
119 | + public void setDiagnosis(String diagnosis) { | |
120 | + this.diagnosis = diagnosis; | |
121 | + } | |
122 | + | |
123 | + public String getDirOpinion() { | |
124 | + return dirOpinion; | |
125 | + } | |
126 | + | |
127 | + public void setDirOpinion(String dirOpinion) { | |
128 | + this.dirOpinion = dirOpinion; | |
129 | + } | |
130 | + | |
131 | + public String getNextCheckTime() { | |
132 | + return nextCheckTime; | |
133 | + } | |
134 | + | |
135 | + public void setNextCheckTime(String nextCheckTime) { | |
136 | + this.nextCheckTime = nextCheckTime; | |
137 | + } | |
138 | + | |
139 | + public String getProdDoctor() { | |
140 | + return prodDoctor; | |
141 | + } | |
142 | + | |
143 | + public void setProdDoctor(String prodDoctor) { | |
144 | + this.prodDoctor = prodDoctor; | |
145 | + } | |
146 | + | |
147 | + public String getTraceElement() { | |
148 | + return traceElement; | |
149 | + } | |
150 | + | |
151 | + public void setTraceElement(String traceElement) { | |
152 | + this.traceElement = traceElement; | |
153 | + } | |
154 | + | |
155 | + public String getTreatOpinion() { | |
156 | + return treatOpinion; | |
157 | + } | |
158 | + | |
159 | + public void setTreatOpinion(String treatOpinion) { | |
160 | + this.treatOpinion = treatOpinion; | |
161 | + } | |
162 | + | |
163 | + public String getUltrasonicExamination() { | |
164 | + return ultrasonicExamination; | |
165 | + } | |
166 | + | |
167 | + public void setUltrasonicExamination(String ultrasonicExamination) { | |
168 | + this.ultrasonicExamination = ultrasonicExamination; | |
169 | + } | |
170 | + | |
171 | + public Date getModified() { | |
172 | + return modified; | |
173 | + } | |
174 | + | |
175 | + public void setModified(Date modified) { | |
176 | + this.modified = modified; | |
177 | + } | |
178 | + | |
179 | + public Date getCreated() { | |
180 | + return created; | |
181 | + } | |
182 | + | |
183 | + public void setCreated(Date created) { | |
184 | + this.created = created; | |
185 | + } | |
186 | + | |
187 | + public Integer getYn() { | |
188 | + return yn; | |
189 | + } | |
190 | + | |
191 | + public void setYn(Integer yn) { | |
192 | + this.yn = yn; | |
193 | + } | |
194 | + | |
195 | + public String getBp() { | |
196 | + return bp; | |
197 | + } | |
198 | + | |
199 | + public void setBp(String bp) { | |
200 | + this.bp = bp; | |
201 | + } | |
202 | + | |
203 | + public String getBreast() { | |
204 | + return breast; | |
205 | + } | |
206 | + | |
207 | + public void setBreast(String breast) { | |
208 | + this.breast = breast; | |
209 | + } | |
210 | + | |
211 | + public String getCervixUteri() { | |
212 | + return cervixUteri; | |
213 | + } | |
214 | + | |
215 | + public void setCervixUteri(String cervixUteri) { | |
216 | + this.cervixUteri = cervixUteri; | |
217 | + } | |
218 | + | |
219 | + public String getDay() { | |
220 | + return day; | |
221 | + } | |
222 | + | |
223 | + public void setDay(String day) { | |
224 | + this.day = day; | |
225 | + } | |
226 | + | |
227 | + public String getFujian() { | |
228 | + return fujian; | |
229 | + } | |
230 | + | |
231 | + public void setFujian(String fujian) { | |
232 | + this.fujian = fujian; | |
233 | + } | |
234 | + | |
235 | + public String getHealthStatus() { | |
236 | + return healthStatus; | |
237 | + } | |
238 | + | |
239 | + public void setHealthStatus(String healthStatus) { | |
240 | + this.healthStatus = healthStatus; | |
241 | + } | |
242 | + | |
243 | + public String getId() { | |
244 | + return id; | |
245 | + } | |
246 | + | |
247 | + public void setId(String id) { | |
248 | + this.id = id; | |
249 | + } | |
250 | + | |
251 | + public String getLochia() { | |
252 | + return lochia; | |
253 | + } | |
254 | + | |
255 | + public void setLochia(String lochia) { | |
256 | + this.lochia = lochia; | |
257 | + } | |
258 | + | |
259 | + public String getMatrix() { | |
260 | + return matrix; | |
261 | + } | |
262 | + | |
263 | + public void setMatrix(String matrix) { | |
264 | + this.matrix = matrix; | |
265 | + } | |
266 | + | |
267 | + public String getOther() { | |
268 | + return other; | |
269 | + } | |
270 | + | |
271 | + public void setOther(String other) { | |
272 | + this.other = other; | |
273 | + } | |
274 | + | |
275 | + public String getParentId() { | |
276 | + return parentId; | |
277 | + } | |
278 | + | |
279 | + public void setParentId(String parentId) { | |
280 | + this.parentId = parentId; | |
281 | + } | |
282 | + | |
283 | + public String getPsychology() { | |
284 | + return psychology; | |
285 | + } | |
286 | + | |
287 | + public void setPsychology(String psychology) { | |
288 | + this.psychology = psychology; | |
289 | + } | |
290 | + | |
291 | + public String getVagina() { | |
292 | + return vagina; | |
293 | + } | |
294 | + | |
295 | + public void setVagina(String vagina) { | |
296 | + this.vagina = vagina; | |
297 | + } | |
298 | + | |
299 | + public String getVulva() { | |
300 | + return vulva; | |
301 | + } | |
302 | + | |
303 | + public void setVulva(String vulva) { | |
304 | + this.vulva = vulva; | |
305 | + } | |
306 | + | |
307 | + public double getWeight() { | |
308 | + return weight; | |
309 | + } | |
310 | + | |
311 | + public void setWeight(double weight) { | |
312 | + this.weight = weight; | |
313 | + } | |
314 | + | |
315 | + public String getWound() { | |
316 | + return wound; | |
317 | + } | |
318 | + | |
319 | + public void setWound(String wound) { | |
320 | + this.wound = wound; | |
321 | + } | |
322 | +} |
platform-dal/src/main/java/com/lyms/platform/query/PostReviewQuery.java
View file @
b0aaec2
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 | +/** | |
10 | + * Created by Administrator on 2016/6/28 0028. | |
11 | + */ | |
12 | +public class PostReviewQuery extends BaseQuery implements IConvertToNativeQuery { | |
13 | + private String id; | |
14 | + private String parentId; | |
15 | + private Integer yn; | |
16 | + | |
17 | + public String getId() { | |
18 | + return id; | |
19 | + } | |
20 | + | |
21 | + public void setId(String id) { | |
22 | + this.id = id; | |
23 | + } | |
24 | + | |
25 | + public String getParentId() { | |
26 | + return parentId; | |
27 | + } | |
28 | + | |
29 | + public void setParentId(String parentId) { | |
30 | + this.parentId = parentId; | |
31 | + } | |
32 | + | |
33 | + public Integer getYn() { | |
34 | + return yn; | |
35 | + } | |
36 | + | |
37 | + public void setYn(Integer yn) { | |
38 | + this.yn = yn; | |
39 | + } | |
40 | + | |
41 | + @Override | |
42 | + public MongoQuery convertToQuery() { | |
43 | + MongoCondition mongoCondition=MongoCondition.newInstance(); | |
44 | + if(null!=yn){ | |
45 | + mongoCondition= mongoCondition.and("yn",yn, MongoOper.IS); | |
46 | + } | |
47 | + if(null!=id){ | |
48 | + mongoCondition= mongoCondition.and("id",id, MongoOper.IS); | |
49 | + } | |
50 | + if(null!=parentId){ | |
51 | + mongoCondition= mongoCondition.and("parentId",parentId, MongoOper.IS); | |
52 | + } | |
53 | + return mongoCondition.toMongoQuery(); | |
54 | + } | |
55 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ApplyOrderController.java
View file @
b0aaec2
... | ... | @@ -48,7 +48,7 @@ |
48 | 48 | @TokenRequired |
49 | 49 | public BaseResponse addReferralApplyOrder(@Valid @RequestBody ReferralApplyOrderAddRequest applyOrderAddRequest,HttpServletRequest request) { |
50 | 50 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
51 | - return applyOrderFacade.addOneReferralApplyOrder(applyOrderAddRequest,loginState.getId()); | |
51 | + return applyOrderFacade.addOneReferralApplyOrder(applyOrderAddRequest, loginState.getId()); | |
52 | 52 | } |
53 | 53 | |
54 | 54 | @RequestMapping(method = RequestMethod.POST,value = "/sieveapply") |
... | ... | @@ -78,7 +78,13 @@ |
78 | 78 | @TokenRequired |
79 | 79 | public BaseResponse queryApplyOrder(@Valid ApplyOrderQueryRequest orderQueryRequest,HttpServletRequest request){ |
80 | 80 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
81 | - return applyOrderFacade.queryApplyOrder(orderQueryRequest,loginState.getId()); | |
81 | + return applyOrderFacade.queryApplyOrder(orderQueryRequest, loginState.getId()); | |
82 | + } | |
83 | + | |
84 | + @RequestMapping(method = RequestMethod.GET,value = "/applyorderEnums") | |
85 | + @ResponseBody | |
86 | + public BaseResponse getEnums(){ | |
87 | + return applyOrderFacade.getEnums(); | |
82 | 88 | } |
83 | 89 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java
View file @
b0aaec2
... | ... | @@ -3,15 +3,14 @@ |
3 | 3 | import com.lyms.platform.biz.service.ApplyOrderService; |
4 | 4 | import com.lyms.platform.biz.service.PatientsService; |
5 | 5 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
6 | -import com.lyms.platform.common.enums.YnEnums; | |
7 | 6 | import com.lyms.platform.common.result.BaseListResponse; |
7 | +import com.lyms.platform.common.result.BaseObjectResponse; | |
8 | 8 | import com.lyms.platform.common.result.BaseResponse; |
9 | +import com.lyms.platform.common.utils.SystemConfig; | |
9 | 10 | import com.lyms.platform.operate.web.request.ApplyOrderQueryRequest; |
10 | 11 | import com.lyms.platform.operate.web.request.ReferralApplyOrderAddRequest; |
11 | 12 | import com.lyms.platform.operate.web.request.SieveApplyOrderAddRequest; |
12 | 13 | import com.lyms.platform.operate.web.result.ApplyOrderOutResult; |
13 | -import com.lyms.platform.permission.model.Organization; | |
14 | -import com.lyms.platform.permission.service.OrganizationService; | |
15 | 14 | import com.lyms.platform.pojo.Patients; |
16 | 15 | import com.lyms.platform.pojo.ReferralApplyOrderModel; |
17 | 16 | import com.lyms.platform.pojo.SieveApplyOrderModel; |
... | ... | @@ -22,9 +21,7 @@ |
22 | 21 | import org.springframework.beans.factory.annotation.Autowired; |
23 | 22 | import org.springframework.stereotype.Component; |
24 | 23 | |
25 | -import java.util.ArrayList; | |
26 | -import java.util.Date; | |
27 | -import java.util.List; | |
24 | +import java.util.*; | |
28 | 25 | |
29 | 26 | /** |
30 | 27 | * Created by Administrator on 2016/6/15 0015. |
... | ... | @@ -37,6 +34,8 @@ |
37 | 34 | private PatientsService patientsService; |
38 | 35 | @Autowired |
39 | 36 | private AutoMatchFacade autoMatchFacade; |
37 | + @Autowired | |
38 | + private BasicConfigFacade basicConfigFacade; | |
40 | 39 | |
41 | 40 | /** |
42 | 41 | * 增加转诊申请 |
43 | 42 | |
44 | 43 | |
45 | 44 | |
... | ... | @@ -44,20 +43,20 @@ |
44 | 43 | * @param referralApplyOrderAddRequest |
45 | 44 | * @return |
46 | 45 | */ |
47 | - public BaseResponse addOneReferralApplyOrder(ReferralApplyOrderAddRequest referralApplyOrderAddRequest,Integer userId) { | |
46 | + public BaseResponse addOneReferralApplyOrder(ReferralApplyOrderAddRequest referralApplyOrderAddRequest, Integer userId) { | |
48 | 47 | ReferralApplyOrderModel referralApplyOrderModel = referralApplyOrderAddRequest.convertToDataModel(); |
49 | 48 | referralApplyOrderModel.setCreated(new Date()); |
50 | 49 | referralApplyOrderModel.setStatus(0); |
51 | - PatientsQuery patientsQuery=new PatientsQuery(); | |
50 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
52 | 51 | patientsQuery.setId(referralApplyOrderModel.getParentId()); |
53 | 52 | //查询产妇信息 |
54 | 53 | List<Patients> patientses = patientsService.queryPatient(patientsQuery); |
55 | - Patients patients=null; | |
56 | - if(CollectionUtils.isNotEmpty(patientses)){ | |
57 | - patients= patientses.get(0); | |
54 | + Patients patients = null; | |
55 | + if (CollectionUtils.isNotEmpty(patientses)) { | |
56 | + patients = patientses.get(0); | |
58 | 57 | } |
59 | 58 | |
60 | - if(null!=patients){ | |
59 | + if (null != patients) { | |
61 | 60 | referralApplyOrderModel.setCardNo(patients.getCardNo()); |
62 | 61 | referralApplyOrderModel.setAge(patients.getAge()); |
63 | 62 | referralApplyOrderModel.setDueDate(patients.getDueDate()); |
... | ... | @@ -65,7 +64,7 @@ |
65 | 64 | } |
66 | 65 | |
67 | 66 | List<Integer> areaId = autoMatchFacade.matchOrgId(userId); |
68 | - referralApplyOrderModel.setOutHospitalId(areaId.get(0)+""); | |
67 | + referralApplyOrderModel.setOutHospitalId(areaId.get(0) + ""); | |
69 | 68 | applyOrderService.addOneReferralApplyOrder(referralApplyOrderModel); |
70 | 69 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
71 | 70 | } |
... | ... | @@ -104,8 +103,8 @@ |
104 | 103 | * @return |
105 | 104 | */ |
106 | 105 | public BaseListResponse querySieveApplyOrder(String id) { |
107 | - SieveApplyOrderQuery sieveApplyOrderQuery =new SieveApplyOrderQuery(); | |
108 | - List<SieveApplyOrderModel> list = applyOrderService.querySieveApplyOrderWithQuery(sieveApplyOrderQuery); | |
106 | + SieveApplyOrderQuery sieveApplyOrderQuery = new SieveApplyOrderQuery(); | |
107 | + List<SieveApplyOrderModel> list = applyOrderService.querySieveApplyOrderWithQuery(sieveApplyOrderQuery); | |
109 | 108 | return new BaseListResponse().setData(list).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
110 | 109 | } |
111 | 110 | |
... | ... | @@ -115,8 +114,8 @@ |
115 | 114 | * @param applyOrderQueryRequest |
116 | 115 | * @return |
117 | 116 | */ |
118 | - public BaseListResponse queryApplyOrder(ApplyOrderQueryRequest applyOrderQueryRequest,Integer userId){ | |
119 | - ReferralApplyOrderQuery referralApplyOrderQuery=new ReferralApplyOrderQuery(); | |
117 | + public BaseListResponse queryApplyOrder(ApplyOrderQueryRequest applyOrderQueryRequest, Integer userId) { | |
118 | + ReferralApplyOrderQuery referralApplyOrderQuery = new ReferralApplyOrderQuery(); | |
120 | 119 | referralApplyOrderQuery.setName(applyOrderQueryRequest.getName()); |
121 | 120 | referralApplyOrderQuery.setAge(applyOrderQueryRequest.getAge()); |
122 | 121 | referralApplyOrderQuery.setDueWeek(applyOrderQueryRequest.getDueWeek()); |
123 | 122 | |
124 | 123 | |
125 | 124 | |
... | ... | @@ -127,19 +126,19 @@ |
127 | 126 | referralApplyOrderQuery.setPage(applyOrderQueryRequest.getPage()); |
128 | 127 | referralApplyOrderQuery.setLimit(applyOrderQueryRequest.getLimit()); |
129 | 128 | //1 转入 0转出 |
130 | - if("1".equals(applyOrderQueryRequest.getType())){ | |
129 | + if ("1".equals(applyOrderQueryRequest.getType())) { | |
131 | 130 | List data = autoMatchFacade.matchOrgId(userId); |
132 | - referralApplyOrderQuery.setTransferredHospital(data.get(0)+""); | |
133 | - }else if("0".equals(applyOrderQueryRequest.getType())){ | |
131 | + referralApplyOrderQuery.setTransferredHospital(data.get(0) + ""); | |
132 | + } else if ("0".equals(applyOrderQueryRequest.getType())) { | |
134 | 133 | List data = autoMatchFacade.matchOrgId(userId); |
135 | - referralApplyOrderQuery.setOutHospitalId(data.get(0)+""); | |
134 | + referralApplyOrderQuery.setOutHospitalId(data.get(0) + ""); | |
136 | 135 | } |
137 | 136 | List<ReferralApplyOrderModel> orderModels = applyOrderService.queryReferralApplyOrderWithQuery(referralApplyOrderQuery); |
138 | 137 | |
139 | 138 | List data = new ArrayList(); |
140 | - if(CollectionUtils.isNotEmpty(orderModels)){ | |
141 | - for(ReferralApplyOrderModel orderModel:orderModels){ | |
142 | - ApplyOrderOutResult applyOrderResult=new ApplyOrderOutResult(); | |
139 | + if (CollectionUtils.isNotEmpty(orderModels)) { | |
140 | + for (ReferralApplyOrderModel orderModel : orderModels) { | |
141 | + ApplyOrderOutResult applyOrderResult = new ApplyOrderOutResult(); | |
143 | 142 | applyOrderResult.convertToResult(orderModel); |
144 | 143 | data.add(applyOrderResult); |
145 | 144 | } |
... | ... | @@ -147,5 +146,16 @@ |
147 | 146 | return new BaseListResponse().setData(data).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
148 | 147 | } |
149 | 148 | |
149 | + public BaseResponse getEnums() { | |
150 | + Map<String, Object> map = new HashMap<>(); | |
151 | + map.put("gwfz", basicConfigFacade.getBaseicConfigByParentId(SystemConfig.GWFZ)); | |
152 | + List list = new ArrayList(); | |
153 | + list.add(5); | |
154 | + list.add(10); | |
155 | + list.add(15); | |
156 | + list.add(20); | |
157 | + map.put("score", list); | |
158 | + return new BaseObjectResponse().setData(map).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
159 | + } | |
150 | 160 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ApplyOrderInResult.java
View file @
b0aaec2