Commit ec0eb7c61b97255a2041f0090b9080e7c5cc22f9

Authored by wtt
1 parent 8efc316b1d

产筛导入

Showing 5 changed files with 482 additions and 150 deletions

platform-dal/src/main/java/com/lyms/platform/pojo/SieveApplyOrderModel.java View file @ ec0eb7c
... ... @@ -260,44 +260,44 @@
260 260 //胎数
261 261 private Integer noOfFetuses;
262 262 //孕妇编号 30个字符以内,只能包含字母,数字,下划线和短杠
263   - private String PatientID;
  263 + private String patientID;
264 264 //申请单号
265   - private String ApplicationNo;
  265 + private String applicationNo;
266 266 //吸烟 0:不吸烟;-1或空字符串:未知;1:吸烟;3:妊娠期间终止;2:妊娠前终止
267   - private Integer Smoking;
  267 + private Integer smoking;
268 268 //I-型糖尿病 <空>:未知;0:无;1:有
269   - private Integer Insulin;
270   - private Integer HC;
  269 + private Integer insulin;
  270 + private Integer hC;
271 271 //B超孕天 如果7W2D,此处应填5
272   - private Integer MannualEntry;
  272 + private Integer mannualEntry;
273 273 //如果有NT,则必须有
274   - private Integer NT;
  274 + private Integer nT;
275 275 //送检单位编号 30个字符以内,只能包含字母,数字,下划线和短杠
276   - private String ResponsibleCode;
  276 + private String responsibleCode;
277 277 //既往T21 <空>:未知;0:无;1:有
278   - private Integer T21;
  278 + private Integer t21;
279 279 //既往T18 <空>:未知;0:无;1:有
280   - private Integer T18;
  280 + private Integer t18;
281 281 //既往NTD <空>:未知;0:无;1:有
282   - private Integer NTD;
  282 + private Integer nTD;
283 283 //辅助生殖方法 <空>:未知;
284 284 //3:克罗米芬治疗;//1:配子输卵管内移植;
285 285 //4:捐赠卵子; //6:卵细胞浆内单精子注射;
286 286 //5:捐赠受精;//0:体外受精;
287 287 //7:其他;//2:合子输卵管内移植
288   - private Integer ARMethod;
  288 + private Integer aRMethod;
289 289 //辅助生殖之提取日期 若输入了ARMethod,此项必填
290   - private Date ExtractionDate;
  290 + private Date extractionDate;
291 291 // 辅助生殖之移植日期 若输入了ARMethod,此项必填
292   - private Date TransferDate;
  292 + private Date transferDate;
293 293 //辅助生殖之捐赠者生日 若输入了ARMethod,此项必填
294   - private Date DonorBirthDate;
  294 + private Date donorBirthDate;
295 295 //鼻骨 <空>:未知;1:未显;2:显示
296   - private Integer NasalBone;
  296 + private Integer nasalBone;
297 297 //单卵 0:否;1:是
298   - private Integer Monozygous;
  298 + private Integer monozygous;
299 299 //孕妇筛查类型 0:一般;1:早中联合筛查孕妇
300   - private Integer PatientType;
  300 + private Integer patientType;
301 301  
302 302 public Integer getNoOfFetuses() {
303 303 return noOfFetuses;
304 304  
305 305  
306 306  
307 307  
308 308  
309 309  
310 310  
311 311  
312 312  
313 313  
314 314  
315 315  
316 316  
317 317  
318 318  
319 319  
320 320  
321 321  
322 322  
323 323  
324 324  
325 325  
326 326  
327 327  
328 328  
329 329  
330 330  
331 331  
332 332  
333 333  
334 334  
335 335  
336 336  
337 337  
338 338  
339 339  
... ... @@ -312,147 +312,148 @@
312 312 }
313 313  
314 314 public String getPatientID() {
315   - return PatientID;
  315 + return patientID;
316 316 }
317 317  
318 318 public void setPatientID(String patientID) {
319   - PatientID = patientID;
  319 + this.patientID = patientID;
320 320 }
321 321  
322 322 public String getApplicationNo() {
323   - return ApplicationNo;
  323 + return applicationNo;
324 324 }
325 325  
326 326 public void setApplicationNo(String applicationNo) {
327   - ApplicationNo = applicationNo;
  327 + this.applicationNo = applicationNo;
328 328 }
329 329  
330 330 public Integer getSmoking() {
331   - return Smoking;
  331 + return smoking;
332 332 }
333 333  
334 334 public void setSmoking(Integer smoking) {
335   - Smoking = smoking;
  335 + this.smoking = smoking;
336 336 }
337 337  
338 338 public Integer getInsulin() {
339   - return Insulin;
  339 + return insulin;
340 340 }
341 341  
342 342 public void setInsulin(Integer insulin) {
343   - Insulin = insulin;
  343 + this.insulin = insulin;
344 344 }
345 345  
346   - public Integer getHC() {
347   - return HC;
  346 + public Integer gethC() {
  347 + return hC;
348 348 }
349 349  
350   - public void setHC(Integer HC) {
351   - this.HC = HC;
  350 + public void sethC(Integer hC) {
  351 + this.hC = hC;
352 352 }
353 353  
354 354 public Integer getMannualEntry() {
355   - return MannualEntry;
  355 + return mannualEntry;
356 356 }
357 357  
358 358 public void setMannualEntry(Integer mannualEntry) {
359   - MannualEntry = mannualEntry;
  359 + this.mannualEntry = mannualEntry;
360 360 }
361 361  
362   - public Integer getNT() {
363   - return NT;
  362 + public Integer getnT() {
  363 + return nT;
364 364 }
365 365  
366   - public void setNT(Integer NT) {
367   - this.NT = NT;
  366 + public void setnT(Integer nT) {
  367 + this.nT = nT;
368 368 }
369 369  
370 370 public String getResponsibleCode() {
371   - return ResponsibleCode;
  371 + return responsibleCode;
372 372 }
373 373  
374 374 public void setResponsibleCode(String responsibleCode) {
375   - ResponsibleCode = responsibleCode;
  375 + this.responsibleCode = responsibleCode;
376 376 }
377 377  
378 378 public Integer getT21() {
379   - return T21;
  379 + return t21;
380 380 }
381 381  
382 382 public void setT21(Integer t21) {
383   - T21 = t21;
  383 + this.t21 = t21;
384 384 }
385 385  
386 386 public Integer getT18() {
387   - return T18;
  387 + return t18;
388 388 }
389 389  
390 390 public void setT18(Integer t18) {
391   - T18 = t18;
  391 + this.t18 = t18;
392 392 }
393 393  
394   - public Integer getNTD() {
395   - return NTD;
  394 + public Integer getnTD() {
  395 + return nTD;
396 396 }
397 397  
398   - public void setNTD(Integer NTD) {
399   - this.NTD = NTD;
  398 + public void setnTD(Integer nTD) {
  399 + this.nTD = nTD;
400 400 }
401 401  
402   - public Integer getARMethod() {
403   - return ARMethod;
  402 + public Integer getaRMethod() {
  403 + return aRMethod;
404 404 }
405 405  
406   - public void setARMethod(Integer ARMethod) {
407   - this.ARMethod = ARMethod;
  406 + public void setaRMethod(Integer aRMethod) {
  407 + this.aRMethod = aRMethod;
408 408 }
409 409  
410 410 public Date getExtractionDate() {
411   - return ExtractionDate;
  411 + return extractionDate;
412 412 }
413 413  
414 414 public void setExtractionDate(Date extractionDate) {
415   - ExtractionDate = extractionDate;
  415 + this.extractionDate = extractionDate;
416 416 }
417 417  
418 418 public Date getTransferDate() {
419   - return TransferDate;
  419 + return transferDate;
420 420 }
421 421  
422 422 public void setTransferDate(Date transferDate) {
423   - TransferDate = transferDate;
  423 + this.transferDate = transferDate;
424 424 }
425 425  
426 426 public Date getDonorBirthDate() {
427   - return DonorBirthDate;
  427 + return donorBirthDate;
428 428 }
429 429  
430 430 public void setDonorBirthDate(Date donorBirthDate) {
431   - DonorBirthDate = donorBirthDate;
  431 + this.donorBirthDate = donorBirthDate;
432 432 }
433 433  
434 434 public Integer getNasalBone() {
435   - return NasalBone;
  435 + return nasalBone;
436 436 }
437 437  
438 438 public void setNasalBone(Integer nasalBone) {
439   - NasalBone = nasalBone;
  439 + this.nasalBone = nasalBone;
440 440 }
441 441  
442 442 public Integer getMonozygous() {
443   - return Monozygous;
  443 + return monozygous;
444 444 }
445 445  
446 446 public void setMonozygous(Integer monozygous) {
447   - Monozygous = monozygous;
  447 + this.monozygous = monozygous;
448 448 }
449 449  
  450 +
450 451 public Integer getPatientType() {
451   - return PatientType;
  452 + return patientType;
452 453 }
453 454  
454 455 public void setPatientType(Integer patientType) {
455   - PatientType = patientType;
  456 + this.patientType = patientType;
456 457 }
457 458  
458 459 public String getLymsSieveId() {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java View file @ ec0eb7c
... ... @@ -577,6 +577,7 @@
577 577 }
578 578 return new BaseListResponse().setData(data).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setPageInfo(sieveQuery.getPageInfo());
579 579 }
  580 +
580 581 public BaseResponse queryList2(CqSieveQueryRequest cqSieveQueryRequest, Integer userId, String needPage, boolean isSieveLagManage) {
581 582 List<SieveListResult2> data = new ArrayList<>();
582 583 SieveQuery sieveQuery = new SieveQuery();
... ... @@ -658,7 +659,7 @@
658 659 List<String> parentIds = new ArrayList<>();
659 660 SieveApplyOrderQuery sieveApplyOrderQuery = new SieveApplyOrderQuery();
660 661 sieveApplyOrderQuery.setSieveHospitalId(hospitalId);
661   - if(StringUtils.isNotEmpty(cqSieveQueryRequest.getNumber())){
  662 + if (StringUtils.isNotEmpty(cqSieveQueryRequest.getNumber())) {
662 663 sieveApplyOrderQuery.setNumber(cqSieveQueryRequest.getNumber());
663 664 }
664 665 sieveApplyOrderQuery.setYn(YnEnums.YES.getId());
665 666  
... ... @@ -666,14 +667,14 @@
666 667 if (CollectionUtils.isNotEmpty(sieveApplyOrderModels)) {
667 668 for (SieveApplyOrderModel model : sieveApplyOrderModels) {
668 669 parentIds.add(model.getParentId());
669   - if(StringUtils.isNotEmpty(model.getLymsSieveId())){
  670 + if (StringUtils.isNotEmpty(model.getLymsSieveId())) {
670 671 lymsSieveIds.add(model.getLymsSieveId());
671 672 }
672 673 }
673 674 }
674 675 if (CollectionUtils.isNotEmpty(lymsSieveIds)) {
675 676 sieveQuery.setLymsSieveIds(lymsSieveIds);//以前产筛表没有这个管理会漏掉,后面修改过就不会,这里有可能会有个问题
676   - }else if (CollectionUtils.isNotEmpty(parentIds)) {
  677 + } else if (CollectionUtils.isNotEmpty(parentIds)) {
677 678 sieveQuery.setParentIds(parentIds);
678 679 } else {
679 680 return new BaseListResponse().setData(data).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setPageInfo(sieveQuery.getPageInfo());
... ... @@ -932,7 +933,7 @@
932 933 return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(patientBaseResult);
933 934 }
934 935  
935   - public BaseResponse getSieveApplyInfo(String parentId,String lymsSieveId, Integer userId, Integer type) {
  936 + public BaseResponse getSieveApplyInfo(String parentId, String lymsSieveId, Integer userId, Integer type) {
936 937  
937 938 Map<String, Object> map = new HashMap<>();
938 939 //String hospitalId = autoMatchFacade.getHospitalId(userId);
... ... @@ -945,7 +946,7 @@
945 946  
946 947 SieveApplyOrderQuery sieveApplyOrderQuery1 = new SieveApplyOrderQuery();
947 948 sieveApplyOrderQuery1.setParentId(parentId);
948   - if(StringUtils.isNotEmpty(lymsSieveId)){
  949 + if (StringUtils.isNotEmpty(lymsSieveId)) {
949 950 sieveApplyOrderQuery1.setLymsSieveId(lymsSieveId);//20200609 wtt,使用产筛申请单id查询因为这里会有多个不是单个
950 951 }
951 952 sieveApplyOrderQuery1.setYn(YnEnums.YES.getId());
... ... @@ -969,7 +970,7 @@
969 970 SieveResultQuery sieveResultQuery = new SieveResultQuery();
970 971 sieveResultQuery.setParentId(parentId);
971 972 sieveResultQuery.setYn(YnEnums.YES.getId());
972   - if(StringUtils.isNotEmpty(lymsSieveId)){
  973 + if (StringUtils.isNotEmpty(lymsSieveId)) {
973 974 sieveResultQuery.setLymsSieveId(lymsSieveId);
974 975 }
975 976 List<SieveResultModel> list = sieveService.queryListSieveResult(sieveResultQuery);
976 977  
... ... @@ -1004,9 +1005,9 @@
1004 1005 } else {
1005 1006 //1.2.1 查看申请单
1006 1007 List<SieveApplyOrderModel> sieveApplyOrderModels = applyOrderService.querySieveApplyOrderWithQuery(sieveApplyOrderQuery1);
1007   - if(CollectionUtils.isEmpty(sieveApplyOrderModels)){
  1008 + if (CollectionUtils.isEmpty(sieveApplyOrderModels)) {
1008 1009 sieveApplyOrderQuery1.setLymsSieveId(null);
1009   - sieveApplyOrderModels = applyOrderService.querySieveApplyOrderWithQuery(sieveApplyOrderQuery1);
  1010 + sieveApplyOrderModels = applyOrderService.querySieveApplyOrderWithQuery(sieveApplyOrderQuery1);
1010 1011 }
1011 1012 if (CollectionUtils.isNotEmpty(sieveApplyOrderModels)) {
1012 1013 Map<String, Object> result = new HashMap<>();
1013 1014  
1014 1015  
1015 1016  
... ... @@ -1015,21 +1016,21 @@
1015 1016 SieveApplyOrderModel sieveApply = sieveApplyOrderModels.get(0);
1016 1017  
1017 1018 //iAssistantl数据传输格式说明,导出excel自动不足添加在此处
1018   - if(StringUtils.isNotEmpty(lymsSieveId)){
  1019 + if (StringUtils.isNotEmpty(lymsSieveId)) {
1019 1020 result.put("lymsSieveId", lymsSieveId);
1020 1021 }
1021 1022 result.put("patientID", sieveApply.getPatientID());
1022 1023 result.put("applicationNo", sieveApply.getApplicationNo());
1023 1024 result.put("smoking", sieveApply.getSmoking());
1024 1025 result.put("insulin", sieveApply.getInsulin());
1025   - result.put("hC", sieveApply.getHC());
  1026 + result.put("hC", sieveApply.gethC());
1026 1027 result.put("mannualEntry", sieveApply.getMannualEntry());
1027   - result.put("nT", sieveApply.getNT());
  1028 + result.put("nT", sieveApply.getnT());
1028 1029 result.put("responsibleCode", sieveApply.getResponsibleCode());
1029 1030 result.put("t21", sieveApply.getT21());
1030 1031 result.put("t18", sieveApply.getT18());
1031   - result.put("nTD", sieveApply.getNTD());
1032   - result.put("aRMethod", sieveApply.getARMethod());
  1032 + result.put("nTD", sieveApply.getnTD());
  1033 + result.put("aRMethod", sieveApply.getaRMethod());
1033 1034 result.put("extractionDate", DateUtil.getyyyy_MM_dd(sieveApply.getExtractionDate()));
1034 1035 result.put("transferDate", DateUtil.getyyyy_MM_dd(sieveApply.getTransferDate()));
1035 1036 result.put("donorBirthDate", DateUtil.getyyyy_MM_dd(sieveApply.getDonorBirthDate()));
... ... @@ -1148,7 +1149,7 @@
1148 1149 SieveResultQuery sieveResultQuery = new SieveResultQuery();
1149 1150 sieveResultQuery.setParentId(parentId);
1150 1151 sieveResultQuery.setYn(YnEnums.YES.getId());
1151   - if(StringUtils.isNotEmpty(lymsSieveId)){
  1152 + if (StringUtils.isNotEmpty(lymsSieveId)) {
1152 1153 sieveResultQuery.setLymsSieveId(lymsSieveId);
1153 1154 }
1154 1155 List<SieveResultModel> list = sieveService.queryListSieveResult(sieveResultQuery);
1155 1156  
... ... @@ -1422,8 +1423,10 @@
1422 1423 }
1423 1424 return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
1424 1425 }
  1426 +
1425 1427 /**
1426 1428 * 功能描述: 接收产筛申请,入参是档案id就使用以前方式
  1429 + *
1427 1430 * @author 武涛涛
1428 1431 * @date 2020/6/10
1429 1432 */
... ... @@ -2555,7 +2558,7 @@
2555 2558 data.put("ReceivedDate", sive.getSendTime());//送检日期
2556 2559 data.put("ScanDate", sive.getBcCheckDate());//B超日期(B超检查日期)
2557 2560 data.put("CRL", sive.getCrl());//B超信息 CRL
2558   - data.put("BPD", sive.getBpd());//B超信息 bpd
  2561 + data.put("BPD", sive.getBpd());//B超信息 bpd
2559 2562 data.put("HC", sive.gethC());
2560 2563 data.put("MannualEntry", sive.getMannualEntry());//B超孕天
2561 2564 data.put("NT", sive.getnT());
2562 2565  
... ... @@ -2624,16 +2627,12 @@
2624 2627 cnames.put("Monozygous", "Monozygous");//单卵*/
2625 2628 }
2626 2629  
2627   - /* public static void main(String[] args) {
2628   - SieveFacade sieveFacade = new SieveFacade();
2629   - sieveFacade.importSerologySieve("C:\\Users\\Administrator\\Desktop\\Example.xls");
2630   - }*/
  2630 +
2631 2631 public void importSerologySieve(MultipartFile file, Integer id, HttpServletResponse response) {
2632 2632 //把MultipartFile转化为File 第一种
2633   - CommonsMultipartFile cmf= (CommonsMultipartFile)file;
2634   - DiskFileItem dfi=(DiskFileItem) cmf.getFileItem();
2635   - File fo=dfi.getStoreLocation();
2636   -// File file = new File(fileName);
  2633 + CommonsMultipartFile cmf = (CommonsMultipartFile) file;
  2634 + DiskFileItem dfi = (DiskFileItem) cmf.getFileItem();
  2635 + File fo = dfi.getStoreLocation();
2637 2636 Workbook wb = null;
2638 2637 try {
2639 2638 wb = Workbook.getWorkbook(fo);
2640 2639  
2641 2640  
2642 2641  
2643 2642  
2644 2643  
2645 2644  
... ... @@ -2650,72 +2649,119 @@
2650 2649 //遍历每行中的每列
2651 2650 for (int j = 0; j < cells.length; j++) {
2652 2651 String str = cells[j].getContents().trim();
2653   - if(StringUtils.isEmpty(str)){
  2652 + if (StringUtils.isEmpty(str)) {
2654 2653 continue;
2655 2654 }
2656   - switch (j) {
2657   - case 0:
2658   - importResult.set样本编号(str);
2659   - continue;
2660   - case 1:
2661   - importResult.set姓名(str);
2662   - continue;
2663   - case 2:
2664   - importResult.set姓名2(str);
2665   - continue;
2666   - case 3:
2667   - importResult.set孕妇编号(str);
2668   - continue;
2669   - case 4:
2670   - importResult.set生日(str);
2671   - continue;
2672   - case 5:
2673   - importResult.set种族(str);
2674   - continue;
2675   - case 6:
2676   -
2677   - importResult.set地址(str);
2678   - continue;
2679   - case 7:
2680   - importResult.set电话(str);
2681   - continue;
2682   - case 8:
2683   - importResult.set申请单号(str);
2684   - continue;
2685   - case 9:
2686   - importResult.set采样日期(str);
2687   - continue;
2688   - case 10:
2689   - importResult.set送检日期(str);
2690   - continue;
2691   - case 11:
2692   - importResult.set风险计算时间(str);
2693   - continue;
2694   - case 12:
2695   - importResult.set风险评估时间(str);
2696   - continue;
2697   - case 13:
2698   - importResult.set风险计算基于项(str);
2699   - continue;
2700   - case 14:
2701   - importResult.set孕天(str);
2702   - continue;
2703   - //孕天 B超日期 CRL BPD HC CRL2 BPD2 HC2 B超孕天 体重 胎儿数 I型糖尿病 末次月经 预产年龄 吸烟 辅助生殖方法 提取日期 移植日期 捐赠者生日 既往T21 既往T18 既往NTD 送检单位 送检医生 报告状态 发布状态 发布时间 发布次数 PlGF浓度 DVPI浓度 NT值 NT2值 NB值 NB2值 NT校正MOM值 NT2校正MOM值 PAPP-A浓度 hCGb浓度 PA_DBS浓度 FB_DBS浓度 AFP浓度 AFP_DBS浓度 hCGb_DBS浓度 uE3UPDCN浓度 INHIB-A浓度 INHIBIN浓度 PlGF校正MOM值 DVPI校正MOM值 PAPP-A校正MOM值 hCGb校正MOM值 PA_DBS校正MOM值 FB_DBS校正MOM值 AFP校正MOM值 AFP_DBS校正MOM值 hCGb_DBS校正MOM值 uE3UPDCN校正MOM值 INHIB-A校正MOM值 INHIBIN校正MOM值 T21年龄风险 T21风险值 T21风险结果 T21双胞胎风险值 T21双胞胎风险结果 T18年龄风险 T18风险值 T18风险结果 T18双胞胎风险值 T18双胞胎风险结果 NTD风险值 NTD风险结果 联合筛查 DbPatientId DbCaseId DbSpecimenId
2704   -
2705   - }
  2655 + switchMth(importResult, j, str);
2706 2656 }
2707 2657  
2708 2658 }
2709   - //1 根据标本号更新数据
2710 2659 list.add(importResult);
  2660 + //1 根据标本号更新数据
  2661 + if (StringUtils.isEmpty(importResult.get样本编号()) ) {
  2662 + continue;
  2663 + }
  2664 + SieveApplyOrderQuery sieveApplyOrderQuery1 = new SieveApplyOrderQuery();
  2665 + sieveApplyOrderQuery1.setNumber(importResult.get样本编号());
  2666 + sieveApplyOrderQuery1.setYn(YnEnums.YES.getId());
  2667 + List<SieveApplyOrderModel> list1 = applyOrderService.querySieveApplyOrderWithQuery(sieveApplyOrderQuery1);
  2668 + if (CollectionUtils.isEmpty(list1) ) {
  2669 + continue;
  2670 + }
  2671 + SieveApplyOrderModel sieveApplyOrderModel1 = list1.get(0);
  2672 + //判断如果没有LymsSieveId就更新上
  2673 + if (StringUtils.isEmpty(sieveApplyOrderModel1.getLymsSieveId())) {
  2674 + SieveQuery sieveQuery = new SieveQuery();
  2675 + sieveQuery.setYn(YnEnums.YES.getId());
  2676 + sieveQuery.setParentId(sieveApplyOrderModel1.getParentId());
  2677 + List<SieveModel> modelList = sieveService.queryList(sieveQuery);
  2678 + if (CollectionUtils.isNotEmpty(modelList) && modelList.size() < 2) {
  2679 + SieveModel sieveModel = modelList.get(0);
  2680 + sieveApplyOrderModel1.setLymsSieveId(sieveModel.getId());
  2681 + applyOrderService.updateSieve(sieveApplyOrderModel1);
  2682 + }
  2683 + }
  2684 + //1.1 修改产筛申请内容,先暂时修改B超孕天
  2685 + //sieveApplyOrderModel1.setMannualEntry(importResult.getB超孕天() != null ? Integer.parseInt(importResult.getB超孕天()) : 0);
  2686 + //applyOrderService.updateSieve(sieveApplyOrderModel1);
  2687 + //1.2 添加产筛申请结果
  2688 + SieveAddRequest sieveAddRequest = new SieveAddRequest();
  2689 + sieveAddRequest.setPublishName(String.valueOf(id));//录入人员
  2690 + sieveAddRequest.setResultTime(DateUtil.getyyyy_MM_dd(new Date())); //结果录入时间
  2691 + if (StringUtils.isNotEmpty(importResult.getT21风险值())) {// 唐氏综合症 21-三体
  2692 + Map map = new HashMap();
  2693 + map.put("valueOne", "1");//郝总说固定值是1
  2694 + map.put("valueTwo", importResult.getT21风险值());
  2695 + sieveAddRequest.setTszhzValue(map);
  2696 + }
  2697 + if (StringUtils.isNotEmpty(importResult.getT21风险结果())) {
  2698 + if ("低风险".equals(importResult.getT21风险结果())) {
  2699 + sieveAddRequest.setTszhz("0");
  2700 + } else if ("高风险".equals(importResult.getT21风险结果())) {
  2701 + sieveAddRequest.setTszhz("2");
  2702 + }
  2703 + }
  2704 + if (StringUtils.isNotEmpty(importResult.getT18风险值())) {//18-三体 T18风险结果
  2705 + Map map = new HashMap();
  2706 + map.put("valueOne", "1");
  2707 + map.put("valueTwo", importResult.getT18风险值());
  2708 + sieveAddRequest.setSbstValue(map);
  2709 + }
  2710 + if (StringUtils.isNotEmpty(importResult.getT18风险结果())) {
  2711 + if ("低风险".equals(importResult.getT18风险结果())) {
  2712 + sieveAddRequest.setSbst("0");
  2713 + } else if ("高风险".equals(importResult.getT18风险结果())) {
  2714 + sieveAddRequest.setSbst("2");
  2715 + }
  2716 + }
  2717 + sieveAddRequest.setStzhz13Value(null); //13-三体 导入的excel表格中没有该字段
  2718 + sieveAddRequest.setStzhz13(null);
2711 2719  
  2720 + if (StringUtils.isNotEmpty(importResult.getNTD风险值())) {// 神经管畸形 NTD NTD风险值
  2721 + Map map = new HashMap();
  2722 + map.put("valueOne", "1");
  2723 + map.put("valueTwo", importResult.getNTD风险值());
  2724 + sieveAddRequest.setSjgjxValue(map);
  2725 + ;
  2726 + }
  2727 + if (StringUtils.isNotEmpty(importResult.getNTD风险结果())) {
  2728 + if ("低风险".equals(importResult.getNTD风险结果())) {
  2729 + sieveAddRequest.setSjgjx("0");
  2730 + } else if ("高风险".equals(importResult.getNTD风险结果())) {
  2731 + sieveAddRequest.setSjgjx("2");
  2732 + }
  2733 + }
  2734 + if (StringUtils.isNotEmpty(importResult.gethCGb浓度())) {//hCGb浓度
  2735 + sieveAddRequest.setHcg(importResult.gethCGb浓度());
  2736 + }
  2737 + if (StringUtils.isNotEmpty(importResult.getAFP校正MOM值())) {//AFP校正MOM值
  2738 + sieveAddRequest.setHafpMom(importResult.getAFP校正MOM值());
  2739 + }
  2740 + if (StringUtils.isNotEmpty(importResult.getAFP浓度())) {//AFP浓度
  2741 + sieveAddRequest.setHafp(importResult.getAFP浓度());
  2742 + }
  2743 + if (StringUtils.isNotEmpty(importResult.gethCGb校正MOM值())) {//hCGb校正MOM值
  2744 + sieveAddRequest.setHcgMom(importResult.gethCGb校正MOM值());
  2745 + }
  2746 + //sieveAddRequest.setCheckerId();
  2747 + //sieveAddRequest.setExamineId();
  2748 + sieveAddRequest.setParentId(sieveApplyOrderModel1.getParentId());
  2749 + sieveAddRequest.setLymsSieveId(sieveApplyOrderModel1.getLymsSieveId());
  2750 + //避免一个产筛申请出现多次结果
  2751 + SieveResultQuery sieveResultQuery = new SieveResultQuery();
  2752 + sieveResultQuery.setLymsSieveId(sieveApplyOrderModel1.getLymsSieveId());
  2753 + sieveResultQuery.setParentId(sieveApplyOrderModel1.getParentId());
  2754 + List<SieveResultModel> sieveResultModellist = sieveService.queryListSieveResult(sieveResultQuery);
  2755 + if(CollectionUtils.isNotEmpty(sieveResultModellist)){
  2756 + SieveResultModel sieveResultModel = sieveResultModellist.get(0);
  2757 + sieveAddRequest.setId(sieveResultModel.getId());
  2758 + addOneSieve(sieveAddRequest, id);
  2759 + }
  2760 + addOneSieve(sieveAddRequest, id);
2712 2761 }
2713 2762  
2714   - System.out.println(list);
2715   - for (int i = 0; i <list.size() ; i++) {
2716   - System.out.println(list.get(i).toString());
2717   - }
2718 2763  
  2764 +
2719 2765 }
2720 2766 } catch (IOException e) {
2721 2767 e.printStackTrace();
... ... @@ -2724,6 +2770,282 @@
2724 2770 }
2725 2771 }
2726 2772  
  2773 + private void switchMth(ImportResult importResult, int j, String str) {
  2774 + switch (j) {
  2775 + case 0:
  2776 + importResult.set样本编号(str);
  2777 + return;
  2778 + case 1:
  2779 + importResult.set姓名(str);
  2780 + return;
  2781 + case 2:
  2782 + importResult.set姓名2(str);
  2783 + return;
  2784 + case 3:
  2785 + importResult.set孕妇编号(str);
  2786 + return;
  2787 + case 4:
  2788 + importResult.set生日(str);
  2789 + return;
  2790 + case 5:
  2791 + importResult.set种族(str);
  2792 + return;
  2793 + case 6:
  2794 + importResult.set地址(str);
  2795 + return;
  2796 + case 7:
  2797 + importResult.set电话(str);
  2798 + return;
  2799 + case 8:
  2800 + importResult.set申请单号(str);
  2801 + return;
  2802 + case 9:
  2803 + importResult.set采样日期(str);
  2804 + return;
  2805 + case 10:
  2806 + importResult.set送检日期(str);
  2807 + return;
  2808 + //以上匹配都对
  2809 + case 11:
  2810 + importResult.set风险计算时间(str);
  2811 + return;
  2812 + case 12:
  2813 + importResult.set风险评估时间(str);
  2814 + return;
  2815 + case 13:
  2816 + importResult.set风险计算基于项(str);
  2817 + return;
  2818 + case 14:
  2819 + importResult.set孕天(str);
  2820 + return;
  2821 + case 15:
  2822 + importResult.setB超日期(str);
  2823 + return;
  2824 + case 16:
  2825 + importResult.setCRL(str);
  2826 + return;
  2827 + case 17:
  2828 + importResult.setBPD(str);
  2829 + return;
  2830 + case 18:
  2831 + importResult.setHC(str);
  2832 + return;
  2833 + case 19:
  2834 + importResult.setCRL2(str);
  2835 + return;
  2836 + case 20:
  2837 + importResult.setBPD2(str);
  2838 + return;
  2839 + //以上匹配都对
  2840 + case 21:
  2841 + importResult.setHC2(str);
  2842 + return;
  2843 + case 22:
  2844 + importResult.setB超孕天(str);
  2845 + return;
  2846 + case 23:
  2847 + importResult.set体重(str);
  2848 + return;
  2849 +
  2850 + case 24:
  2851 + importResult.set胎儿数(str);
  2852 + return;
  2853 + case 25:
  2854 + importResult.setI型糖尿病(str);
  2855 + return;
  2856 + case 26:
  2857 + importResult.set末次月经(str);
  2858 + return;
  2859 + case 27:
  2860 + importResult.set预产年龄(str);
  2861 + return;
  2862 + case 28:
  2863 + importResult.set吸烟(str);
  2864 + return;
  2865 + case 29:
  2866 + importResult.set辅助生殖方法(str);
  2867 + return;
  2868 + case 30:
  2869 + importResult.set提取日期(str);
  2870 + return;
  2871 + //以上匹配都对
  2872 + case 31:
  2873 + importResult.set移植日期(str);
  2874 + return;
  2875 + case 32:
  2876 + importResult.set捐赠者生日(str);
  2877 + return;
  2878 + case 33:
  2879 + importResult.set既往T21(str);
  2880 + return;
  2881 + case 34:
  2882 + importResult.set既往T18(str);
  2883 + return;
  2884 + case 35:
  2885 + importResult.set既往NTD(str);
  2886 + return;
  2887 + case 36:
  2888 + importResult.set送检单位(str);
  2889 + return;
  2890 + case 37:
  2891 + importResult.set送检医生(str);
  2892 + return;
  2893 + case 38:
  2894 + importResult.set报告状态(str);
  2895 + return;
  2896 + case 39:
  2897 + importResult.set发布状态(str);
  2898 + return;
  2899 + case 40:
  2900 + importResult.set发布时间(str);
  2901 + return;
  2902 + case 41:
  2903 + importResult.set发布次数(str);
  2904 + return;
  2905 + case 42:
  2906 + importResult.setPlGF浓度(str);
  2907 + return;
  2908 + case 43:
  2909 + importResult.setDVPI浓度(str);
  2910 + return;
  2911 + case 44:
  2912 + importResult.setNT值(str);
  2913 + return;
  2914 + case 45:
  2915 + importResult.setNT2值(str);
  2916 + return;
  2917 + case 46:
  2918 + importResult.setNB值(str);
  2919 + return;
  2920 + case 47:
  2921 + importResult.setNB2值(str);
  2922 + return;
  2923 + case 48:
  2924 + importResult.setNT校正MOM值(str);
  2925 + return;
  2926 + case 49:
  2927 + importResult.setNT2校正MOM值(str);
  2928 + return;
  2929 + case 50:
  2930 + importResult.setPAPP_A浓度(str);
  2931 + return;
  2932 + case 51:
  2933 + importResult.sethCGb浓度(str);
  2934 + return;
  2935 + case 52:
  2936 + importResult.setPA_DBS浓度(str);
  2937 + return;
  2938 + case 53:
  2939 + importResult.setFB_DBS浓度(str);
  2940 + return;
  2941 + case 54:
  2942 + importResult.setAFP浓度(str);
  2943 + return;
  2944 + case 55:
  2945 + importResult.setAFP_DBS浓度(str);
  2946 + return;
  2947 + case 56:
  2948 + importResult.sethCGb_DBS浓度(str);
  2949 + return;
  2950 + case 57:
  2951 + importResult.setuE3UPDCN浓度(str);
  2952 + return;
  2953 + case 58:
  2954 + importResult.setINHIB_A浓度(str);
  2955 + return;
  2956 + case 59:
  2957 + importResult.setINHIBIN浓度(str);
  2958 + return;
  2959 + case 60:
  2960 + importResult.setPlGF校正MOM值(str);
  2961 + return;
  2962 + case 61:
  2963 + importResult.setDVPI校正MOM值(str);
  2964 + return;
  2965 + case 62:
  2966 + importResult.setPAPP_A校正MOM值(str);
  2967 + return;
  2968 +
  2969 + case 63:
  2970 + importResult.sethCGb校正MOM值(str);
  2971 + return;
  2972 + case 64:
  2973 + importResult.setPA_DBS校正MOM值(str);
  2974 + return;
  2975 + case 65:
  2976 + importResult.setFB_DBS校正MOM值(str);
  2977 + return;
  2978 + case 66:
  2979 + importResult.setAFP校正MOM值(str);
  2980 + return;
  2981 + case 67:
  2982 + importResult.setAFP_DBS校正MOM值(str);
  2983 + return;
  2984 + case 68:
  2985 + importResult.sethCGb_DBS校正MOM值(str);
  2986 + return;
  2987 + case 69:
  2988 + importResult.setuE3UPDCN校正MOM值(str);
  2989 + return;
  2990 + case 70:
  2991 + importResult.setINHIB_A校正MOM值(str);
  2992 + return;
  2993 + case 71:
  2994 + importResult.setINHIBIN校正MOM值(str);
  2995 + return;
  2996 + case 72:
  2997 + importResult.setT21年龄风险(str);
  2998 + return;
  2999 + case 73:
  3000 + importResult.setT21风险值(str);
  3001 + return;
  3002 + case 74:
  3003 +
  3004 + importResult.setT21风险结果(str);
  3005 + return;
  3006 + case 75:
  3007 + importResult.setT21双胞胎风险值(str);
  3008 + return;
  3009 + case 76:
  3010 + importResult.setT21双胞胎风险结果(str);
  3011 + return;
  3012 + case 77:
  3013 +
  3014 + importResult.setT18年龄风险(str);
  3015 + return;
  3016 + case 78:
  3017 + importResult.setT18风险值(str);
  3018 + return;
  3019 + case 79:
  3020 + importResult.setT18风险结果(str);
  3021 + return;
  3022 + case 80:
  3023 + importResult.setT18双胞胎风险值(str);
  3024 + return;
  3025 + case 81:
  3026 + importResult.setT18双胞胎风险结果(str);
  3027 + return;
  3028 + case 82:
  3029 + importResult.setNTD风险值(str);
  3030 + return;
  3031 + case 83:
  3032 + importResult.setNTD风险结果(str);
  3033 + return;
  3034 + case 84:
  3035 + importResult.set联合筛查(str);
  3036 + return;
  3037 + case 85:
  3038 + importResult.setDbPatientId(str);
  3039 + return;
  3040 + case 86:
  3041 + importResult.setDbCaseId(str);
  3042 + return;
  3043 + case 87:
  3044 + importResult.setDbSpecimenId(str);
  3045 + return;
  3046 +
  3047 + }
  3048 + }
2727 3049  
2728 3050  
2729 3051 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/SieveApplyOrderAddRequest.java View file @ ec0eb7c
... ... @@ -479,14 +479,14 @@
479 479 sieveApplyOrderModel.setApplicationNo(applicationNo);
480 480 sieveApplyOrderModel.setSmoking(smoking);
481 481 sieveApplyOrderModel.setInsulin(insulin);
482   - sieveApplyOrderModel.setHC(hC);
  482 + sieveApplyOrderModel.sethC(hC);
483 483 sieveApplyOrderModel.setMannualEntry(mannualEntry);
484   - sieveApplyOrderModel.setNT(nT);
  484 + sieveApplyOrderModel.setnT(nT);
485 485 sieveApplyOrderModel.setResponsibleCode(responsibleCode);
486 486 sieveApplyOrderModel.setT21(t21);
487 487 sieveApplyOrderModel.setT18(t18);
488   - sieveApplyOrderModel.setNTD(nTD);
489   - sieveApplyOrderModel.setARMethod(aRMethod);
  488 + sieveApplyOrderModel.setnTD(nTD);
  489 + sieveApplyOrderModel.setaRMethod(aRMethod);
490 490 sieveApplyOrderModel.setExtractionDate(StringUtils.isNotEmpty(extractionDate) ? DateUtil.parseYMD(extractionDate) : null);
491 491 sieveApplyOrderModel.setTransferDate(StringUtils.isNotEmpty(transferDate) ? DateUtil.parseYMD(transferDate) : null);
492 492 sieveApplyOrderModel.setDonorBirthDate(StringUtils.isNotEmpty(donorBirthDate) ? DateUtil.parseYMD(donorBirthDate) : null);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ImportResult.java View file @ ec0eb7c
... ... @@ -80,6 +80,7 @@
80 80 private String FB_DBS校正MOM值;
81 81 private String AFP校正MOM值;
82 82 private String AFP_DBS校正MOM值;
  83 + private String hCGb_DBS校正MOM值;
83 84 private String uE3UPDCN校正MOM值;
84 85 private String INHIB_A校正MOM值;
85 86 private String INHIBIN校正MOM值;
... ... @@ -99,6 +100,14 @@
99 100 private String DbPatientId;
100 101 private String DbCaseId;
101 102 private String DbSpecimenId;
  103 +
  104 + public String gethCGb_DBS校正MOM值() {
  105 + return hCGb_DBS校正MOM值;
  106 + }
  107 +
  108 + public void sethCGb_DBS校正MOM值(String hCGb_DBS校正MOM值) {
  109 + this.hCGb_DBS校正MOM值 = hCGb_DBS校正MOM值;
  110 + }
102 111  
103 112 public String get样本编号() {
104 113 return 样本编号;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/SieveWorker2.java View file @ ec0eb7c
... ... @@ -122,7 +122,7 @@
122 122 sieveListResult.setSendTime(DateUtil.getyyyy_MM_dd(sieveApplyOrderModel.getSendTime()));
123 123 //B超检查日期
124 124 sieveListResult.setBcCheckDate(DateUtil.getyyyy_MM_dd(sieveApplyOrderModel.getBcCheckDate()));
125   - sieveListResult.sethC(sieveApplyOrderModel.getHC());
  125 + sieveListResult.sethC(sieveApplyOrderModel.gethC());
126 126 //B超孕天 如果7W2D,此处应填51
127 127 sieveListResult.setMannualEntry(sieveApplyOrderModel.getMannualEntry());
128 128 //I-型糖尿病 <空>:未知;0:无;1:有
... ... @@ -132,7 +132,7 @@
132 132 //孕妇编号 30个字符以内,只能包含字母,数字,下划线和短杠
133 133 sieveListResult.setPatientID(sieveApplyOrderModel.getPatientID());
134 134 //如果有NT,则必须有
135   - sieveListResult.setnT(sieveApplyOrderModel.getNT());
  135 + sieveListResult.setnT(sieveApplyOrderModel.getnT());
136 136 //送检单位编号 30个字符以内,只能包含字母,数字,下划线和短杠
137 137 sieveListResult.setResponsibleCode(sieveApplyOrderModel.getResponsibleCode());
138 138 //既往T21 <空>:未知;0:无;1:有
139 139  
... ... @@ -140,13 +140,13 @@
140 140 //既往T18 <空>:未知;0:无;1:有
141 141 sieveListResult.setT18(sieveApplyOrderModel.getT18());
142 142 //既往NTD <空>:未知;0:无;1:有
143   - sieveListResult.setnTD(sieveApplyOrderModel.getNTD());
  143 + sieveListResult.setnTD(sieveApplyOrderModel.getnTD());
144 144 //辅助生殖方法 <空>:未知;
145 145 //3:克罗米芬治疗;//1:配子输卵管内移植;
146 146 //4:捐赠卵子; //6:卵细胞浆内单精子注射;
147 147 //5:捐赠受精;//0:体外受精;
148 148 //7:其他;//2:合子输卵管内移植
149   - sieveListResult.setaRMethod(sieveApplyOrderModel.getARMethod());
  149 + sieveListResult.setaRMethod(sieveApplyOrderModel.getaRMethod());
150 150 //辅助生殖之提取日期 若输入了ARMethod,此项必填
151 151 sieveListResult.setExtractionDate( DateUtil.getyyyy_MM_dd(sieveApplyOrderModel.getExtractionDate()));
152 152 // 辅助生殖之移植日期 若输入了ARMethod,此项必填