Commit 9998cff25c0efa3d9c037f95e8bc7388d3b876b0
1 parent
fd0930f06f
Exists in
master
and in
6 other branches
筛查
Showing 10 changed files with 459 additions and 12 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-common/src/main/java/com/lyms/platform/common/utils/ExcelUtil.java
- platform-dal/src/main/java/com/lyms/platform/query/DiagnosisQuery.java
- platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.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/service/impl/NewbornServiceImpl.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/ISieveDao.java
View file @
9998cff
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/SieveDaoImpl.java
View file @
9998cff
| ... | ... | @@ -96,6 +96,11 @@ |
| 96 | 96 | mongoTemplate.updateMulti(new MongoQuery(new MongoCondition("id", model.getId(), MongoOper.IS)).convertToMongoQuery(), update, SieveResultModel.class); |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | + @Override | |
| 100 | + public int queryListSieveResultCount(MongoQuery mongoQuery) { | |
| 101 | + return (int)count(mongoQuery.convertToMongoQuery()); | |
| 102 | + } | |
| 103 | + | |
| 99 | 104 | /** |
| 100 | 105 | * 查询产筛列表 |
| 101 | 106 | * |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/SieveService.java
View file @
9998cff
| ... | ... | @@ -49,6 +49,10 @@ |
| 49 | 49 | return iSieveDao.queryListSieveResult(sieveResultQuery.convertToQuery()); |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | + public int queryListSieveResultCount(SieveResultQuery sieveResultQuery) { | |
| 53 | + return iSieveDao.queryListSieveResultCount(sieveResultQuery.convertToQuery()); | |
| 54 | + } | |
| 55 | + | |
| 52 | 56 | public void updateSieveRsult(SieveResultModel model) { |
| 53 | 57 | iSieveDao.updateSieveResult(model); |
| 54 | 58 | } |
platform-common/src/main/java/com/lyms/platform/common/utils/ExcelUtil.java
View file @
9998cff
| ... | ... | @@ -286,6 +286,140 @@ |
| 286 | 286 | } |
| 287 | 287 | } |
| 288 | 288 | |
| 289 | + | |
| 290 | + public static void writeWhSieveExclFile(String filePath,OutputStream out,List<Map<String,String>> values,String date) { | |
| 291 | + File file = new File(filePath); | |
| 292 | + InputStream in = null; | |
| 293 | + Workbook wb = null; | |
| 294 | + try { | |
| 295 | + in = new FileInputStream(file); | |
| 296 | + wb = Workbook.getWorkbook(in); | |
| 297 | + | |
| 298 | + WritableWorkbook book = wb.createWorkbook(out,wb); | |
| 299 | + WritableSheet ws = book.getSheet(0); | |
| 300 | + | |
| 301 | + WritableFont contentFont = new WritableFont(WritableFont.ARIAL, 12, WritableFont.NO_BOLD, false, UnderlineStyle.NO_UNDERLINE, Colour.BLACK); | |
| 302 | + WritableCellFormat contentFormt = new WritableCellFormat(contentFont); | |
| 303 | + contentFormt.setAlignment(jxl.format.Alignment.CENTRE); | |
| 304 | + contentFormt.setBorder(jxl.format.Border.ALL, jxl.format.BorderLineStyle.THIN); | |
| 305 | + contentFormt.setVerticalAlignment(VerticalAlignment.CENTRE); | |
| 306 | + | |
| 307 | + | |
| 308 | + Label label = new Label(0, 0, "ssss",contentFormt); | |
| 309 | + ws.addCell(label); | |
| 310 | + | |
| 311 | + int arrayIndex = 0; | |
| 312 | + for (int i = 3, len = values.size()+3; i < len; i++, arrayIndex++) | |
| 313 | + { | |
| 314 | + | |
| 315 | + Set<String> sets = values.get(arrayIndex).keySet(); | |
| 316 | + int j = 0; | |
| 317 | + for (String key : sets) | |
| 318 | + { | |
| 319 | + String value = values.get(arrayIndex).get(key)+""; | |
| 320 | + if (StringUtils.isNotEmpty(value) && StringUtils.isNum(value)) | |
| 321 | + { | |
| 322 | + WritableCellFormat wcfN = new WritableCellFormat(contentFont); | |
| 323 | + wcfN.setBorder(jxl.format.Border.ALL, jxl.format.BorderLineStyle.THIN); | |
| 324 | + wcfN.setAlignment(jxl.format.Alignment.CENTRE); | |
| 325 | + wcfN.setVerticalAlignment(VerticalAlignment.CENTRE); | |
| 326 | + Number labelNF = new Number(j, i,Integer.parseInt(value), wcfN); | |
| 327 | + ws.addCell(labelNF); | |
| 328 | + } | |
| 329 | + else | |
| 330 | + { | |
| 331 | + ws.addCell(new Label(j, i,value, contentFormt)); | |
| 332 | + } | |
| 333 | + j++; | |
| 334 | + } | |
| 335 | + } | |
| 336 | + | |
| 337 | + book.write(); | |
| 338 | + book.close(); | |
| 339 | + wb.close(); | |
| 340 | + }catch (Exception e) | |
| 341 | + { | |
| 342 | + e.printStackTrace(); | |
| 343 | + } | |
| 344 | + } | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + public static void writeWhDiagnosisExclFile(String filePath,OutputStream out,List<Map<String,String>> values,String titleName,String h1) | |
| 349 | + { | |
| 350 | + | |
| 351 | + File file = new File(filePath); | |
| 352 | + InputStream in = null; | |
| 353 | + Workbook wb = null; | |
| 354 | + try { | |
| 355 | + in = new FileInputStream(file); | |
| 356 | + wb = Workbook.getWorkbook(in); | |
| 357 | + | |
| 358 | + WritableWorkbook book = wb.createWorkbook(out,wb); | |
| 359 | + WritableSheet ws = book.getSheet(0); | |
| 360 | + | |
| 361 | + WritableFont contentFont = new WritableFont(WritableFont.ARIAL, 12, WritableFont.NO_BOLD, false, UnderlineStyle.NO_UNDERLINE, Colour.BLACK); | |
| 362 | + WritableCellFormat contentFormt = new WritableCellFormat(contentFont); | |
| 363 | + contentFormt.setAlignment(jxl.format.Alignment.CENTRE); | |
| 364 | + contentFormt.setBorder(jxl.format.Border.ALL, jxl.format.BorderLineStyle.THIN); | |
| 365 | + contentFormt.setVerticalAlignment(VerticalAlignment.CENTRE); | |
| 366 | + | |
| 367 | + WritableFont leftFont = new WritableFont(WritableFont.ARIAL, 12, WritableFont.NO_BOLD, false, UnderlineStyle.NO_UNDERLINE, Colour.BLACK); | |
| 368 | + WritableCellFormat leftFormt = new WritableCellFormat(leftFont); | |
| 369 | + leftFormt.setBorder(jxl.format.Border.ALL,jxl.format.BorderLineStyle.THIN); | |
| 370 | + leftFormt.setAlignment(Alignment.LEFT); | |
| 371 | + leftFormt.setVerticalAlignment(VerticalAlignment.CENTRE); | |
| 372 | + | |
| 373 | + | |
| 374 | + WritableFont title = new WritableFont(WritableFont.ARIAL, 18, WritableFont.BOLD, false, UnderlineStyle.NO_UNDERLINE, Colour.BLACK); | |
| 375 | + WritableCellFormat titleFormt = new WritableCellFormat(title); | |
| 376 | + titleFormt.setBorder(jxl.format.Border.ALL, jxl.format.BorderLineStyle.THIN); | |
| 377 | + titleFormt.setAlignment(jxl.format.Alignment.CENTRE); | |
| 378 | + titleFormt.setVerticalAlignment(VerticalAlignment.CENTRE); | |
| 379 | + | |
| 380 | + Label label = new Label(0, 0, titleName,titleFormt); | |
| 381 | + ws.addCell(label); | |
| 382 | + | |
| 383 | + Label label1 = new Label(1, 1, titleName,titleFormt); | |
| 384 | + ws.addCell(label1); | |
| 385 | + | |
| 386 | + int arrayIndex = 0; | |
| 387 | + for (int i = 6, len = values.size()+6; i < len; i++, arrayIndex++) | |
| 388 | + { | |
| 389 | + | |
| 390 | + Set<String> sets = values.get(arrayIndex).keySet(); | |
| 391 | + int j = 0; | |
| 392 | + for (String key : sets) | |
| 393 | + { | |
| 394 | + String value = values.get(arrayIndex).get(key); | |
| 395 | + if (StringUtils.isNotEmpty(value) && StringUtils.isNum(value)) | |
| 396 | + { | |
| 397 | + WritableCellFormat wcfN = new WritableCellFormat(contentFont); | |
| 398 | + wcfN.setBorder(jxl.format.Border.ALL, jxl.format.BorderLineStyle.THIN); | |
| 399 | + wcfN.setAlignment(jxl.format.Alignment.CENTRE); | |
| 400 | + wcfN.setVerticalAlignment(VerticalAlignment.CENTRE); | |
| 401 | + Number labelNF = new Number(j, i,Integer.parseInt(value), wcfN); | |
| 402 | + ws.addCell(labelNF); | |
| 403 | + } | |
| 404 | + else | |
| 405 | + { | |
| 406 | + ws.addCell(new Label(j, i,value, contentFormt)); | |
| 407 | + } | |
| 408 | + j++; | |
| 409 | + } | |
| 410 | + | |
| 411 | + } | |
| 412 | + | |
| 413 | + book.write(); | |
| 414 | + book.close(); | |
| 415 | + wb.close(); | |
| 416 | + }catch (Exception e) | |
| 417 | + { | |
| 418 | + e.printStackTrace(); | |
| 419 | + } | |
| 420 | + | |
| 421 | + } | |
| 422 | + | |
| 289 | 423 | public static void writeExclFile(String filePath,OutputStream out,List<String> areaNams,String titleName,String area,String time,List<Map<String,String>> values) |
| 290 | 424 | { |
| 291 | 425 |
platform-dal/src/main/java/com/lyms/platform/query/DiagnosisQuery.java
View file @
9998cff
| ... | ... | @@ -41,7 +41,16 @@ |
| 41 | 41 | private String specimenNo;//标本号 |
| 42 | 42 | private String collectHospitalId;//申请医院 |
| 43 | 43 | private List<String> parentIdList;//孕妇ID集合 |
| 44 | + private String diaProject; | |
| 44 | 45 | |
| 46 | + public String getDiaProject() { | |
| 47 | + return diaProject; | |
| 48 | + } | |
| 49 | + | |
| 50 | + public void setDiaProject(String diaProject) { | |
| 51 | + this.diaProject = diaProject; | |
| 52 | + } | |
| 53 | + | |
| 45 | 54 | public List<String> getHospitalIds() { |
| 46 | 55 | return hospitalIds; |
| 47 | 56 | } |
| ... | ... | @@ -250,6 +259,9 @@ |
| 250 | 259 | } |
| 251 | 260 | if(null != diaResult){ |
| 252 | 261 | condition = condition.and("diaResult",diaResult,MongoOper.IS); |
| 262 | + } | |
| 263 | + if(null != diaProject){ | |
| 264 | + condition = condition.and("diaProject",diaProject,MongoOper.IS); | |
| 253 | 265 | } |
| 254 | 266 | if(null != rsResult){ |
| 255 | 267 | condition = condition.and("rsResult", rsResult, MongoOper.IS); |
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
9998cff
| ... | ... | @@ -468,7 +468,7 @@ |
| 468 | 468 | condition = condition.and("areaPostRestId", areaPostRestId, MongoOper.IS); |
| 469 | 469 | } |
| 470 | 470 | if (StringUtils.isNotEmpty(streetPostRestId)) { |
| 471 | - condition = condition.and("streetRegisterId", streetPostRestId, MongoOper.IS); | |
| 471 | + condition = condition.and("streetPostRestId", streetPostRestId, MongoOper.IS); | |
| 472 | 472 | } |
| 473 | 473 | |
| 474 | 474 | // 分娩信息 |
platform-dal/src/main/java/com/lyms/platform/query/SieveResultQuery.java
View file @
9998cff
| ... | ... | @@ -8,6 +8,7 @@ |
| 8 | 8 | import org.springframework.data.mongodb.core.query.Criteria; |
| 9 | 9 | |
| 10 | 10 | import java.util.Date; |
| 11 | +import java.util.List; | |
| 11 | 12 | |
| 12 | 13 | /** |
| 13 | 14 | * |
| ... | ... | @@ -20,6 +21,7 @@ |
| 20 | 21 | private String id; |
| 21 | 22 | //患者id |
| 22 | 23 | private String parentId; |
| 24 | + private List<String> parentIds; | |
| 23 | 25 | //姓名 |
| 24 | 26 | private String name; |
| 25 | 27 | //胎数 |
| ... | ... | @@ -53,6 +55,61 @@ |
| 53 | 55 | private Date modifiedStart; |
| 54 | 56 | private Date modifiedEnd; |
| 55 | 57 | |
| 58 | + private String tszhz;// 唐氏综合症 | |
| 59 | + private String sjgjx;// 神经管畸形 | |
| 60 | + private String sbst;// 18-三体 | |
| 61 | + private String dzhpx;// 地中海贫血 | |
| 62 | + private String cspj;// 产筛评价 | |
| 63 | + private String stzhz13; //13-三体 | |
| 64 | + | |
| 65 | + public String getTszhz() { | |
| 66 | + return tszhz; | |
| 67 | + } | |
| 68 | + | |
| 69 | + public void setTszhz(String tszhz) { | |
| 70 | + this.tszhz = tszhz; | |
| 71 | + } | |
| 72 | + | |
| 73 | + public String getStzhz13() { | |
| 74 | + return stzhz13; | |
| 75 | + } | |
| 76 | + | |
| 77 | + public void setStzhz13(String stzhz13) { | |
| 78 | + this.stzhz13 = stzhz13; | |
| 79 | + } | |
| 80 | + | |
| 81 | + public String getCspj() { | |
| 82 | + return cspj; | |
| 83 | + } | |
| 84 | + | |
| 85 | + public void setCspj(String cspj) { | |
| 86 | + this.cspj = cspj; | |
| 87 | + } | |
| 88 | + | |
| 89 | + public String getDzhpx() { | |
| 90 | + return dzhpx; | |
| 91 | + } | |
| 92 | + | |
| 93 | + public void setDzhpx(String dzhpx) { | |
| 94 | + this.dzhpx = dzhpx; | |
| 95 | + } | |
| 96 | + | |
| 97 | + public String getSbst() { | |
| 98 | + return sbst; | |
| 99 | + } | |
| 100 | + | |
| 101 | + public void setSbst(String sbst) { | |
| 102 | + this.sbst = sbst; | |
| 103 | + } | |
| 104 | + | |
| 105 | + public String getSjgjx() { | |
| 106 | + return sjgjx; | |
| 107 | + } | |
| 108 | + | |
| 109 | + public void setSjgjx(String sjgjx) { | |
| 110 | + this.sjgjx = sjgjx; | |
| 111 | + } | |
| 112 | + | |
| 56 | 113 | public Integer getIsNotify() { |
| 57 | 114 | return isNotify; |
| 58 | 115 | } |
| ... | ... | @@ -99,6 +156,29 @@ |
| 99 | 156 | if (null != id) { |
| 100 | 157 | condition = condition.and("id", id, MongoOper.IS); |
| 101 | 158 | } |
| 159 | + | |
| 160 | + if (null != tszhz) { | |
| 161 | + condition = condition.and("tszhz", tszhz, MongoOper.IS); | |
| 162 | + } | |
| 163 | + if (null != sjgjx) { | |
| 164 | + condition = condition.and("sjgjx",sjgjx , MongoOper.IS); | |
| 165 | + } | |
| 166 | + if (null != sbst) { | |
| 167 | + condition = condition.and("sbst",sbst , MongoOper.IS); | |
| 168 | + } | |
| 169 | + | |
| 170 | + if (null != dzhpx) { | |
| 171 | + condition = condition.and("dzhpx", dzhpx, MongoOper.IS); | |
| 172 | + } | |
| 173 | + | |
| 174 | + if (null != stzhz13) { | |
| 175 | + condition = condition.and("stzhz13", stzhz13, MongoOper.IS); | |
| 176 | + } | |
| 177 | + | |
| 178 | + if (null != parentIds && parentIds.size()>0) { | |
| 179 | + condition = condition.and("parentId", parentIds, MongoOper.IN); | |
| 180 | + } | |
| 181 | + | |
| 102 | 182 | if (null != parentId) { |
| 103 | 183 | condition = condition.and("parentId", parentId, MongoOper.IS); |
| 104 | 184 | } |
| ... | ... | @@ -140,6 +220,15 @@ |
| 140 | 220 | } |
| 141 | 221 | |
| 142 | 222 | return condition.toMongoQuery(); |
| 223 | + } | |
| 224 | + | |
| 225 | + | |
| 226 | + public List<String> getParentIds() { | |
| 227 | + return parentIds; | |
| 228 | + } | |
| 229 | + | |
| 230 | + public void setParentIds(List<String> parentIds) { | |
| 231 | + this.parentIds = parentIds; | |
| 143 | 232 | } |
| 144 | 233 | |
| 145 | 234 | public Date getModifiedStart() { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/SieveController.java
View file @
9998cff
| ... | ... | @@ -311,5 +311,19 @@ |
| 311 | 311 | |
| 312 | 312 | } |
| 313 | 313 | |
| 314 | + /** | |
| 315 | + * 导出产前诊断及新生儿疾病筛查工作情况表 | |
| 316 | + * @param cqSieveQueryRequest | |
| 317 | + * @param request | |
| 318 | + * @param response | |
| 319 | + */ | |
| 320 | + @TokenRequired | |
| 321 | + @RequestMapping(value = "exportDiagnosisReportExcl", method = RequestMethod.POST) | |
| 322 | + public void exportDiagnosisReportExcl(@Valid CqSieveQueryRequest cqSieveQueryRequest,HttpServletRequest request,HttpServletResponse response) { | |
| 323 | + | |
| 324 | + sieveFacade.exportDiagnosisReportExcl(cqSieveQueryRequest, getUserId(request), response); | |
| 325 | + | |
| 326 | + } | |
| 327 | + | |
| 314 | 328 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java
View file @
9998cff
| ... | ... | @@ -17,6 +17,7 @@ |
| 17 | 17 | import com.lyms.platform.operate.web.result.*; |
| 18 | 18 | import com.lyms.platform.operate.web.service.ITrackDownService; |
| 19 | 19 | import com.lyms.platform.operate.web.utils.CommonsHelper; |
| 20 | +import com.lyms.platform.operate.web.worker.DueOrgCountWorker; | |
| 20 | 21 | import com.lyms.platform.operate.web.worker.SieveWorker; |
| 21 | 22 | import com.lyms.platform.permission.model.Organization; |
| 22 | 23 | import com.lyms.platform.permission.model.OrganizationQuery; |
| ... | ... | @@ -37,6 +38,7 @@ |
| 37 | 38 | import javax.servlet.http.HttpServletResponse; |
| 38 | 39 | import java.io.OutputStream; |
| 39 | 40 | import java.util.*; |
| 41 | +import java.util.concurrent.Callable; | |
| 40 | 42 | import java.util.concurrent.Future; |
| 41 | 43 | import java.util.concurrent.TimeUnit; |
| 42 | 44 | |
| 43 | 45 | |
| ... | ... | @@ -1328,18 +1330,203 @@ |
| 1328 | 1330 | @Autowired |
| 1329 | 1331 | private AreaCountFacade areaCountFacade; |
| 1330 | 1332 | |
| 1333 | + | |
| 1334 | + private List<Map<String,String>> getSieveDatas(List<String> hospitalIds,String[] dates,String cityId) | |
| 1335 | + { | |
| 1336 | + List<Map<String,String>> list = new ArrayList<>(); | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + BasicConfigQuery basicQuery = new BasicConfigQuery(); | |
| 1340 | + basicQuery.setYn(YnEnums.YES.getId()); | |
| 1341 | + basicQuery.setTypeId("b7ea005c-dfac-4c2a-bdae-25239b3f44fd"); | |
| 1342 | + basicQuery.setParentId(cityId); | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + int ySieveCount = 0; | |
| 1346 | + int sSieveCount = 0; | |
| 1347 | + //获取地址列表 | |
| 1348 | + List<BasicConfig> configList = basicConfigService.queryBasicConfig(basicQuery); | |
| 1349 | + for (BasicConfig bc : configList) | |
| 1350 | + { | |
| 1351 | + Map<String,String> mapData = new HashMap<>(); | |
| 1352 | + mapData.put("areaName", bc.getName());//县市区 | |
| 1353 | + | |
| 1354 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
| 1355 | + patientsQuery.setHospitalList(hospitalIds); | |
| 1356 | + patientsQuery.setYn(YnEnums.YES.getId()); | |
| 1357 | + patientsQuery.setCityRegisterId(cityId); | |
| 1358 | + List<Patients> patientses = patientsService.queryPatient(patientsQuery); | |
| 1359 | + List<String> patientIds = new ArrayList<>(); | |
| 1360 | + if (CollectionUtils.isNotEmpty(patientses)) | |
| 1361 | + { | |
| 1362 | + for (Patients pat : patientses) | |
| 1363 | + { | |
| 1364 | + patientIds.add(pat.getId()); | |
| 1365 | + } | |
| 1366 | + SieveQuery ySieveQuery = new SieveQuery(); | |
| 1367 | + ySieveQuery.setParentIds(patientIds); | |
| 1368 | + ySieveQuery.setHospitalIds(hospitalIds); | |
| 1369 | + if (dates != null) { | |
| 1370 | + ySieveQuery.setCreatedStart(DateUtil.parseYMD(dates[0])); | |
| 1371 | + if (dates.length == 2) { | |
| 1372 | + ySieveQuery.setCreatedEnd(DateUtil.parseYMDHMS(dates[1])); | |
| 1373 | + } | |
| 1374 | + } | |
| 1375 | + ySieveCount = sieveService.queryListCount(ySieveQuery); | |
| 1376 | + | |
| 1377 | + ySieveQuery.setStatus(3); | |
| 1378 | + sSieveCount = sieveService.queryListCount(ySieveQuery); | |
| 1379 | + } | |
| 1380 | + | |
| 1381 | + mapData.put("ysiveCount", String.valueOf(ySieveCount));//应筛查户籍人数 | |
| 1382 | + mapData.put("sSieveCount", String.valueOf(sSieveCount));//实筛查户籍人数 | |
| 1383 | + | |
| 1384 | +// private String tszhz;// 唐氏综合症 | |
| 1385 | +// private String sjgjx;// 神经管畸形 | |
| 1386 | +// private String sbst;// 18-三体 | |
| 1387 | +// private String dzhpx;// 地中海贫血 | |
| 1388 | +// private String cspj;// 产筛评价 | |
| 1389 | +// private String stzhz13; //13-三体 | |
| 1390 | + int st21Count = 0; | |
| 1391 | + int st1813Count = 0; | |
| 1392 | + int sjqxCount = 0; | |
| 1393 | + | |
| 1394 | + int sieveCount=0; | |
| 1395 | + | |
| 1396 | + int disCount = 0; | |
| 1397 | + int disExcCount = 0; | |
| 1398 | + int sjDisCount = 0; | |
| 1399 | + int sjDisExcCount = 0; | |
| 1400 | + //孕妇无创DNA检测 | |
| 1401 | + int dnaSieveCount = 0; | |
| 1402 | + int dnaSieveLowCount = 0; | |
| 1403 | + int dnaSieveHighCount = 0; | |
| 1404 | + | |
| 1405 | + if (CollectionUtils.isNotEmpty(patientIds)) | |
| 1406 | + { | |
| 1407 | + SieveResultQuery sieveResultQuery = new SieveResultQuery(); | |
| 1408 | + sieveResultQuery.setParentIds(patientIds); | |
| 1409 | + sieveResultQuery.setYn(YnEnums.YES.getId()); | |
| 1410 | + sieveResultQuery.setTszhz("2"); | |
| 1411 | + st21Count = sieveService.queryListSieveResultCount(sieveResultQuery); | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + sieveResultQuery = new SieveResultQuery(); | |
| 1415 | + sieveResultQuery.setParentIds(patientIds); | |
| 1416 | + sieveResultQuery.setYn(YnEnums.YES.getId()); | |
| 1417 | + sieveResultQuery.setSbst("2"); | |
| 1418 | + int temp1 = sieveService.queryListSieveResultCount(sieveResultQuery); | |
| 1419 | + | |
| 1420 | + sieveResultQuery = new SieveResultQuery(); | |
| 1421 | + sieveResultQuery.setParentIds(patientIds); | |
| 1422 | + sieveResultQuery.setYn(YnEnums.YES.getId()); | |
| 1423 | + sieveResultQuery.setStzhz13("2"); | |
| 1424 | + int temp2 = sieveService.queryListSieveResultCount(sieveResultQuery); | |
| 1425 | + st1813Count = temp1 + temp2; | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + sieveResultQuery = new SieveResultQuery(); | |
| 1429 | + sieveResultQuery.setParentIds(patientIds); | |
| 1430 | + sieveResultQuery.setYn(YnEnums.YES.getId()); | |
| 1431 | + sieveResultQuery.setSjgjx("2"); | |
| 1432 | + sjqxCount = sieveService.queryListSieveResultCount(sieveResultQuery); | |
| 1433 | + | |
| 1434 | + sieveCount=st21Count+st1813Count+sjqxCount; | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + //羊水穿刺产前诊断 诊断项目(1,羊水穿刺;2,绒毛穿刺;3,脐带血检测) | |
| 1438 | + DiagnosisQuery diagnosisQuery1 = new DiagnosisQuery(); | |
| 1439 | + diagnosisQuery1.setHospitalIds(hospitalIds); | |
| 1440 | + diagnosisQuery1.setDiaProject("1"); | |
| 1441 | + diagnosisQuery1.setDiaStatus("3");//(0,未申请;1,已申请;2,已接收;3,已诊断) | |
| 1442 | + if (dates != null) { | |
| 1443 | + diagnosisQuery1.setResultDateStart(DateUtil.parseYMD(dates[0])); | |
| 1444 | + if (dates.length == 2) { | |
| 1445 | + diagnosisQuery1.setResultDateEnd(DateUtil.parseYMDHMS(dates[1])); | |
| 1446 | + } | |
| 1447 | + } | |
| 1448 | + disCount = diagnosisService.queryDiagnosisCount(diagnosisQuery1); | |
| 1449 | + | |
| 1450 | + diagnosisQuery1 = new DiagnosisQuery(); | |
| 1451 | + diagnosisQuery1.setHospitalIds(hospitalIds); | |
| 1452 | + diagnosisQuery1.setDiaProject("1"); | |
| 1453 | + diagnosisQuery1.setDiaResult("1");//诊断结果(0,阴性;1,阳性) | |
| 1454 | + diagnosisQuery1.setDiaStatus("3");//(0,未申请;1,已申请;2,已接收;3,已诊断) | |
| 1455 | + if (dates != null) { | |
| 1456 | + diagnosisQuery1.setResultDateStart(DateUtil.parseYMD(dates[0])); | |
| 1457 | + if (dates.length == 2) { | |
| 1458 | + diagnosisQuery1.setResultDateEnd(DateUtil.parseYMDHMS(dates[1])); | |
| 1459 | + } | |
| 1460 | + } | |
| 1461 | + disExcCount = diagnosisService.queryDiagnosisCount(diagnosisQuery1); | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + } | |
| 1466 | + | |
| 1467 | + mapData.put("st21Count", String.valueOf(st21Count));//21-三体 | |
| 1468 | + | |
| 1469 | + mapData.put("st1813Count",String.valueOf(st1813Count));//18、13三体 | |
| 1470 | + | |
| 1471 | + mapData.put("sjqxCount",String.valueOf(sjqxCount));//神经管缺陷 | |
| 1472 | + | |
| 1473 | + mapData.put("sieveCount",String.valueOf(sieveCount));//合计 | |
| 1474 | + | |
| 1475 | + mapData.put("disCount",String.valueOf(disCount));//诊断数 | |
| 1476 | + | |
| 1477 | + mapData.put("disExcCount",String.valueOf(disExcCount));//异常数 | |
| 1478 | + | |
| 1479 | + mapData.put("sjDisCount",String.valueOf(sjDisCount));//诊断数 | |
| 1480 | + | |
| 1481 | + mapData.put("sjDisExcCount",String.valueOf(sjDisExcCount));//异常数 | |
| 1482 | + | |
| 1483 | + mapData.put("dnaSieveCount",String.valueOf(dnaSieveCount));//筛查数 | |
| 1484 | + | |
| 1485 | + mapData.put("dnaSieveLowCount",String.valueOf(dnaSieveLowCount));//低风险人数 | |
| 1486 | + | |
| 1487 | + mapData.put("dnaSieveHighCount",String.valueOf(dnaSieveHighCount));//高风险人数 | |
| 1488 | + | |
| 1489 | + list.add(mapData); | |
| 1490 | + } | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + //sum(list, basicConfigs); | |
| 1494 | + | |
| 1495 | + return list; | |
| 1496 | + } | |
| 1497 | + | |
| 1331 | 1498 | public void exportSieveReportExcl(CqSieveQueryRequest cqSieveQueryRequest, Integer userId,HttpServletResponse response) { |
| 1332 | 1499 | |
| 1333 | -// try { | |
| 1334 | -// | |
| 1335 | -// response.setContentType("application/force-download"); | |
| 1336 | -// response.setHeader("Content-Disposition", "attachment;filename=" + new String(("威海市孕妇产前筛查和诊断情况月报表.xls").getBytes("UTF-8"), "ISO-8859-1")); | |
| 1337 | -// String path = this.getClass().getResource("/").getPath()+ "whfy_sieve.xls"; | |
| 1338 | -// ExcelUtil.writeWhExclFile(path, response.getOutputStream(), list); | |
| 1339 | -// | |
| 1340 | -// } catch (Exception e) { | |
| 1341 | -// ExceptionUtils.catchException(e, "fmRecordExportExcl异常"); | |
| 1342 | -// } | |
| 1500 | + try { | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + List<Map<String,String>> list = new ArrayList<>(); | |
| 1505 | + response.setContentType("application/force-download"); | |
| 1506 | + response.setHeader("Content-Disposition", "attachment;filename=" + new String(("孕妇产前筛查和诊断情况月报表.xls").getBytes("UTF-8"), "ISO-8859-1")); | |
| 1507 | + String path = this.getClass().getResource("/").getPath()+ "whfy_sieve.xls"; | |
| 1508 | + ExcelUtil.writeWhSieveExclFile(path, response.getOutputStream(), list,cqSieveQueryRequest.getTime()); | |
| 1509 | + | |
| 1510 | + } catch (Exception e) { | |
| 1511 | + ExceptionUtils.catchException(e, "exportSieveReportExcl error"); | |
| 1512 | + } | |
| 1513 | + } | |
| 1514 | + | |
| 1515 | + public void exportDiagnosisReportExcl(CqSieveQueryRequest cqSieveQueryRequest, Integer userId, HttpServletResponse response) { | |
| 1516 | + try { | |
| 1517 | + | |
| 1518 | + String titleName = "山东省产前诊断及新生儿疾病筛查工作情况表"; | |
| 1519 | + String h1 = "填报单位(签章):威海市妇幼保健院 XXX年X季度"; | |
| 1520 | + | |
| 1521 | + List<Map<String,String>> list = new ArrayList<>(); | |
| 1522 | + response.setContentType("application/force-download"); | |
| 1523 | + response.setHeader("Content-Disposition", "attachment;filename=" + new String(("产前诊断及新生儿疾病筛查工作情况表.xls").getBytes("UTF-8"), "ISO-8859-1")); | |
| 1524 | + String path = this.getClass().getResource("/").getPath()+ "whfy_diagnosis.xls"; | |
| 1525 | + ExcelUtil.writeWhDiagnosisExclFile(path, response.getOutputStream(), list,titleName,h1); | |
| 1526 | + | |
| 1527 | + } catch (Exception e) { | |
| 1528 | + ExceptionUtils.catchException(e, "exportDiagnosisReportExcl error"); | |
| 1529 | + } | |
| 1343 | 1530 | } |
| 1344 | 1531 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/NewbornServiceImpl.java
View file @
9998cff
| ... | ... | @@ -540,7 +540,7 @@ |
| 540 | 540 | { |
| 541 | 541 | map.put("monthName", patients.getUsername()); |
| 542 | 542 | map.put("phone", patients.getPhone()); |
| 543 | - map.put("fmDays", patients.getFmWeek()); | |
| 543 | + map.put("fmDays", DateUtil.getDays(patients.getFmDate(),new Date())); | |
| 544 | 544 | map.put("fmHospitalName", CommonsHelper.getHospitalName(babyModel.getHospitalId(), organizationService)); |
| 545 | 545 | map.put("postAddress", CommonsHelper.getResidence(patients.getProvincePostRestId(), patients.getCityPostRestId(), |
| 546 | 546 | patients.getAreaPostRestId(), patients.getStreetPostRestId(), patients.getAddressPostRest(), basicConfigService)); |