Commit e8e13135e7be6d80dd0e68916ae43caa3840f371
1 parent
ee593da019
Exists in
master
and in
6 other branches
开通VIP增值服务
Showing 1 changed file with 7 additions and 57 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceFacade.java
View file @
e8e1313
... | ... | @@ -19,11 +19,7 @@ |
19 | 19 | import com.lyms.platform.permission.service.OrganizationService; |
20 | 20 | import com.lyms.platform.permission.service.PatientServiceService; |
21 | 21 | import com.lyms.platform.permission.service.UsersService; |
22 | -import com.lyms.platform.pojo.AntExChuModel; | |
23 | -import com.lyms.platform.pojo.AntExRecordModel; | |
24 | -import com.lyms.platform.pojo.AntenatalExaminationModel; | |
25 | 22 | import com.lyms.platform.pojo.Patients; |
26 | -import com.lyms.platform.query.AntExRecordQuery; | |
27 | 23 | import com.lyms.platform.query.PatientsQuery; |
28 | 24 | import org.apache.commons.collections.CollectionUtils; |
29 | 25 | import org.springframework.beans.factory.annotation.Autowired; |
... | ... | @@ -78,7 +74,7 @@ |
78 | 74 | PatientServiceQuery patientQuery = new PatientServiceQuery(); |
79 | 75 | patientQuery.setHospitalId(hospitalId); |
80 | 76 | patientQuery.setParentid(pid); |
81 | - | |
77 | + patientQuery.setSort("create_date desc"); | |
82 | 78 | List<PatientService> patientServices = patientServiceService.queryPatientService(patientQuery); |
83 | 79 | |
84 | 80 | List<PatientSerResult> patientSerResults = new ArrayList<>(); |
85 | 81 | |
... | ... | @@ -211,15 +207,12 @@ |
211 | 207 | } |
212 | 208 | result.setAge(DateUtil.getAge(patients.getBirth()) + "岁"); |
213 | 209 | result.setName(patients.getUsername()); |
210 | + result.setDueDate(DateUtil.getyyyy_MM_dd(patients.getDueDate())); | |
211 | + //高危因素 | |
212 | + result.setRiskFactor(commonService.resloveFactor(patients.getRiskFactorId())); | |
213 | + //高危等级颜色 | |
214 | + result.setrLevel(commonService.findRiskLevel(patients.getRiskLevelId())); | |
214 | 215 | } |
215 | - AntExRecordQuery antExRecordQuery = new AntExRecordQuery(); | |
216 | - antExRecordQuery.setParentId(ps.getParentid()); | |
217 | - List<AntExRecordModel> antExRecordModelList = recordService.queryAntExRecords(antExRecordQuery); | |
218 | - if(CollectionUtils.isNotEmpty(antExRecordModelList)){ | |
219 | - AntExRecordModel antExRecordModel = antExRecordModelList.get(0); | |
220 | - handleRisk(antExRecordModel,result); | |
221 | - result.setDueDate(DateUtil.getyyyy_MM_dd(antExRecordModel.getDueDate())); | |
222 | - } | |
223 | 216 | |
224 | 217 | result.setParentid(ps.getParentid()); |
225 | 218 | result.setCreateDate(DateUtil.getyyyy_MM_dd(ps.getCreateDate())); |
... | ... | @@ -256,49 +249,6 @@ |
256 | 249 | } |
257 | 250 | |
258 | 251 | /** |
259 | - * 处理高危 | |
260 | - * | |
261 | - * @param e | |
262 | - * @param patientSerResult | |
263 | - */ | |
264 | - private void handleRisk(AntExRecordModel e, PatientSerResult patientSerResult) { | |
265 | - if (StringUtils.isNotEmpty(e.getfId())) { | |
266 | - String risk = null; | |
267 | - if (e.getType() == 2) { | |
268 | - AntExChuModel model = antenatalExaminationService.findOne(e.getfId()); | |
269 | - if (null != model) { | |
270 | - risk = model.getOtherHighRisk(); | |
271 | - } | |
272 | - } else if (e.getType() == 1) { | |
273 | - AntenatalExaminationModel model = antenatalExaminationService.findOneById(e.getfId()); | |
274 | - if (null != model) { | |
275 | - risk = model.getOtherRisk(); | |
276 | - } | |
277 | - } | |
278 | - Map result = commonService.resolveOtherRisk(risk); | |
279 | - String name = null, level = null, score = null; | |
280 | - if (!result.isEmpty()) { | |
281 | - //高危因素名字 | |
282 | - name = result.get("name").toString(); | |
283 | - level = result.get("levelId").toString(); | |
284 | - score = result.get("score").toString(); | |
285 | - | |
286 | - if (org.apache.commons.lang.StringUtils.isNotEmpty(level) && !"null".equals(level)) { | |
287 | - e.gethLevel().add(level); | |
288 | - } | |
289 | - } | |
290 | - //高危因素 | |
291 | - patientSerResult.setrLevel(commonService.findRiskLevel(e.gethLevel())); | |
292 | - String ri = commonService.resloveFactor(e.gethRisk()); | |
293 | - if (ri.isEmpty()) { | |
294 | - ri = name; | |
295 | - } else if (StringUtils.isNotEmpty(name)) { | |
296 | - ri += "," + name; | |
297 | - } | |
298 | - patientSerResult.setRiskFactor(ri); | |
299 | - } | |
300 | - } | |
301 | - /** | |
302 | 252 | * 根据条件查询开通服务记录 |
303 | 253 | * |
304 | 254 | * @param serType 服务类型(1-高危精准指导、2-体重、3-血糖、4-血压、5-专家咨询) |
... | ... | @@ -319,7 +269,7 @@ |
319 | 269 | patientQuery.setCreateStartDate(createStartDate); |
320 | 270 | patientQuery.setCreateEndDate(createEndDate); |
321 | 271 | patientQuery.setSerStatus(serStatus); |
322 | - patientQuery.setSort("create_date"); | |
272 | + patientQuery.setSort("create_date desc"); | |
323 | 273 | patientQuery.setNeed("y"); |
324 | 274 | patientQuery.setOffset((pageInfo.getPage() - 1) * pageInfo.getLimit()); |
325 | 275 | patientQuery.setLimit(pageInfo.getLimit()); |