Commit 01f69ecb8314e5cc88f5f24170c44b51a146bdfb
1 parent
b768e5898d
Exists in
master
and in
1 other branch
自动生成追访信息
Showing 1 changed file with 19 additions and 2 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/TrackDownServiceImpl.java
View file @
01f69ec
| ... | ... | @@ -149,6 +149,7 @@ |
| 149 | 149 | //孕检次数 |
| 150 | 150 | temp.put("yjcount", mongoTemplate.count(Query.query(Criteria.where("parentId").is(patients.getId()).and("hospitalId").and("yn").is(1)), AntenatalExaminationModel.class) + mongoTemplate.count(Query.query(Criteria.where("parentId").is(patients.getId()).and("yn").is(1)), AntExChuModel.class)); |
| 151 | 151 | if (patients.getType() == 3) { |
| 152 | + | |
| 152 | 153 | //产后复查 |
| 153 | 154 | PostReviewQuery postReviewQuery = new PostReviewQuery(); |
| 154 | 155 | postReviewQuery.setParentId(patients.getId()); |
| 155 | 156 | |
| ... | ... | @@ -156,8 +157,16 @@ |
| 156 | 157 | Integer postInt = postReviewService.count(postReviewQuery); |
| 157 | 158 | if (postInt > 0) {//大于0 |
| 158 | 159 | temp.put("chfc", 1); |
| 160 | + temp.put("chfcCount", postInt); // 复查次数 | |
| 161 | + }else{ | |
| 162 | + if(patients.getDueStatus()==1){//终止妊娠 | |
| 163 | + //当前孕妇是孕28周后,进入产后复查追访,否则结束流程 | |
| 164 | + int dueWeek = DateUtil.getWeek2(patients.getLastMenses(), patients.getFmDate()); | |
| 165 | + if (dueWeek < 28) {//进入产后复查 | |
| 166 | + temp.put("chfc", 2); | |
| 167 | + } | |
| 168 | + } | |
| 159 | 169 | } |
| 160 | - temp.put("chfcCount", postInt); // 复查次数 | |
| 161 | 170 | } |
| 162 | 171 | |
| 163 | 172 | SieveResultQuery sieveResultQuery = new SieveResultQuery(); |
| 164 | 173 | |
| ... | ... | @@ -235,8 +244,16 @@ |
| 235 | 244 | Integer postInt = postReviewService.count(postReviewQuery); |
| 236 | 245 | if (postInt > 0) {//大于0 |
| 237 | 246 | temp.put("chfc", 1); |
| 247 | + temp.put("chfcCount", postInt); // 复查次数 | |
| 248 | + }else{ | |
| 249 | + if(patient.getDueStatus()==1){//终止妊娠 | |
| 250 | + //当前孕妇是孕28周后,进入产后复查追访,否则结束流程 | |
| 251 | + int dueWeek = DateUtil.getWeek2(patient.getLastMenses(), patient.getFmDate()); | |
| 252 | + if (dueWeek < 28) {//进入产后复查 | |
| 253 | + temp.put("chfc", 2); | |
| 254 | + } | |
| 255 | + } | |
| 238 | 256 | } |
| 239 | - temp.put("chfcCount", postInt); // 复查次数 | |
| 240 | 257 | } |
| 241 | 258 | |
| 242 | 259 | SieveResultQuery sieveResultQuery = new SieveResultQuery(); |