Commit 88239efc8f5d93166febad91221a07aa29f8f075

Authored by [wangbo]
1 parent df8683037e

孕妇追访流程调整

Showing 3 changed files with 54 additions and 9 deletions

platform-dal/src/main/java/com/lyms/platform/query/SieveQuery.java View file @ 88239ef
... ... @@ -6,6 +6,7 @@
6 6 import com.lyms.platform.common.dao.operator.MongoOper;
7 7 import com.lyms.platform.common.dao.operator.MongoQuery;
8 8 import com.lyms.platform.common.utils.StringUtils;
  9 +import org.apache.commons.collections.CollectionUtils;
9 10 import org.springframework.data.mongodb.core.query.Criteria;
10 11  
11 12 import java.util.Date;
... ... @@ -23,6 +24,8 @@
23 24 private List<String> hospitalIds;
24 25 //患者id
25 26 private String parentId;
  27 +
  28 +
26 29 //姓名
27 30 private String name;
28 31 //胎数
... ... @@ -41,6 +44,9 @@
41 44 private Integer renShenResult;
42 45 //状态
43 46 private Integer status;
  47 +
  48 + private Integer nStatus;
  49 +
44 50 private String cardNo;
45 51 private String from;
46 52 private Integer yn;
47 53  
... ... @@ -86,10 +92,20 @@
86 92  
87 93 //申请医院
88 94 private String applyHospitalId;
  95 +
89 96 private List<String> parentIds;
90 97  
91 98 private List<Integer> statuses;
92 99  
  100 +
  101 + public Integer getnStatus() {
  102 + return nStatus;
  103 + }
  104 +
  105 + public void setnStatus(Integer nStatus) {
  106 + this.nStatus = nStatus;
  107 + }
  108 +
93 109 public List<Integer> getStatuses() {
94 110 return statuses;
95 111 }
... ... @@ -300,6 +316,7 @@
300 316 condition = condition.and("hospitalId", hospitalIds, MongoOper.IN);
301 317 }
302 318  
  319 +
303 320 if (null != sieveHospitalId) {
304 321 condition = condition.and("sieveHospitalId", sieveHospitalId, MongoOper.IS);
305 322 }
... ... @@ -346,6 +363,9 @@
346 363 condition = condition.and("status", statuses, MongoOper.IN);
347 364 }
348 365  
  366 + if (null != nStatus) {
  367 + condition = condition.and("status", nStatus, MongoOper.NIN);
  368 + }
349 369 if (null != renShenResult) {
350 370 condition = condition.and("renShenResult", renShenResult, MongoOper.IS);
351 371 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/TrackDownFacade.java View file @ 88239ef
... ... @@ -13,11 +13,9 @@
13 13 import com.lyms.platform.operate.web.result.HighScoreResult;
14 14 import com.lyms.platform.operate.web.utils.CommonsHelper;
15 15 import com.lyms.platform.operate.web.utils.ResponseUtil;
  16 +import com.lyms.platform.permission.model.ServiceListQuery;
16 17 import com.lyms.platform.pojo.*;
17   -import com.lyms.platform.query.MatDeliverQuery;
18   -import com.lyms.platform.query.PatientsQuery;
19   -import com.lyms.platform.query.PostReviewQuery;
20   -import com.lyms.platform.query.TrackDownRecordQuery;
  18 +import com.lyms.platform.query.*;
21 19 import org.apache.commons.collections.CollectionUtils;
22 20 import org.slf4j.Logger;
23 21 import org.slf4j.LoggerFactory;
... ... @@ -222,6 +220,9 @@
222 220 private TrackDownService trackDownService;
223 221  
224 222 @Autowired
  223 + private SieveService sieveService;
  224 +
  225 + @Autowired
225 226 private BasicConfigService basicConfigService;
226 227  
227 228 private Map<Integer, TrackDownTypeHandler> trackDownTypeHandlerMap;
228 229  
... ... @@ -286,7 +287,17 @@
286 287 boolean isPatient = false;
287 288 String hospitalId = autoMatchFacade.getHospitalId(userId);
288 289  
  290 +
289 291 PatientsQuery patientsQuery = new PatientsQuery();
  292 + //孕14周-孕20周+6天、未进行产前筛查
  293 + if (downQueryRequest.getTrackType() == 4) {
  294 + Date start = DateUtil.getWeekStart(21);
  295 + patientsQuery.setLastMensesStart(start);
  296 + Date end = DateUtil.getWeekEnd(14);
  297 + patientsQuery.setLastMensesEnd(end);
  298 + isPatient = true;
  299 + }
  300 +
290 301 if (downQueryRequest.getStartDueDate() != null) {//预产期开始日期
291 302 patientsQuery.setDueDateStart(downQueryRequest.getStartDueDate());
292 303 isPatient = true;
... ... @@ -393,7 +404,7 @@
393 404 TrackDownRecordQuery downRecordQuery = new TrackDownRecordQuery();
394 405 if (isPatient) {//加入了高危因数查询条件
395 406 patientsQuery.setHospitalId(hospitalId);
396   - patientsQuery.setType(3);
  407 + //patientsQuery.setType(3);
397 408 patientsQuery.setQueryNo(downQueryRequest.getKey());
398 409 System.out.println("过滤条件:" + patientsQuery.convertToQuery().convertToMongoQuery());
399 410 List<Patients> patientses = patientsService.queryPatient(patientsQuery);
... ... @@ -405,7 +416,23 @@
405 416 pids.add(ps.getId());
406 417 System.out.println(ps.getId());
407 418 }
408   - downRecordQuery.setParentIds(pids);
  419 + if (downQueryRequest.getTrackType() == 4) {
  420 + List<String> sievePatients = new ArrayList<>();
  421 + SieveQuery sieveQuery = new SieveQuery();
  422 + sieveQuery.setParentIds(pids);
  423 + sieveQuery.setYn(YnEnums.YES.getId());
  424 + sieveQuery.setnStatus(1);
  425 + List<SieveModel> sieveModels = sieveService.queryList(sieveQuery);
  426 + for (SieveModel sieveModel : sieveModels) {
  427 + sievePatients.add(sieveModel.getParentId());
  428 + System.out.println("未产筛的ParentIds" + sieveModel.getParentId());
  429 + }
  430 + //去掉做个产筛的人
  431 + pids.removeAll(sievePatients);
  432 + downRecordQuery.setParentIds(pids);
  433 + } else {
  434 + downRecordQuery.setParentIds(pids);
  435 + }
409 436 }
410 437  
411 438 downRecordQuery.setAreaId(downQueryRequest.getAreaId());
... ... @@ -473,7 +500,6 @@
473 500 // downRecordQuery.setSort("modified desc");
474 501 downRecordQuery.setHospitalId(hospitalId);
475 502  
476   -
477 503 return downRecordQuery;
478 504 }
479 505  
... ... @@ -1042,6 +1068,7 @@
1042 1068  
1043 1069  
1044 1070 }
  1071 +
1045 1072  
1046 1073 }
platform-operate-api/src/main/resources/spring/applicationContext-quartz.xml View file @ 88239ef
... ... @@ -127,8 +127,6 @@
127 127 <!-- 是否并发,false表示 如果发生错误也不影响下一次的调用 -->
128 128 <property name="concurrent" value="false"></property>
129 129 </bean>
130   -
131   -
132 130 <!-- 秦皇岛医院分娩接口-->
133 131 <bean id="qhdFmHistoryTimerWork" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
134 132 <!-- 要调用的bean -->