Commit 3057d3d64c2adc72673cdc8994b8dc536dfeecd3
1 parent
07b5db93b0
Exists in
master
and in
6 other branches
体重报告权限添加
Showing 2 changed files with 67 additions and 61 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
3057d3d
| ... | ... | @@ -44,6 +44,7 @@ |
| 44 | 44 | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
| 45 | 45 | import org.springframework.stereotype.Component; |
| 46 | 46 | import org.springframework.util.StopWatch; |
| 47 | +import scala.util.parsing.combinator.testing.Str; | |
| 47 | 48 | |
| 48 | 49 | import javax.servlet.http.HttpServletResponse; |
| 49 | 50 | import java.io.OutputStream; |
| ... | ... | @@ -396,8 +397,7 @@ |
| 396 | 397 | |
| 397 | 398 | //徐倩说的额改成只查询分娩医院记录 不管是否隐藏建档 20180703 10:01 |
| 398 | 399 | //http://jira.healthbaby.com.cn/browse/WEB-2711 |
| 399 | - if (type != 3) | |
| 400 | - { | |
| 400 | + if (type != 3) { | |
| 401 | 401 | patientsQuery.setExtEnable(false); |
| 402 | 402 | } |
| 403 | 403 | |
| 404 | 404 | |
| ... | ... | @@ -479,12 +479,9 @@ |
| 479 | 479 | } else { |
| 480 | 480 | fmHospitalList.retainAll(orgId); |
| 481 | 481 | } |
| 482 | - } | |
| 483 | - else | |
| 484 | - { | |
| 482 | + } else { | |
| 485 | 483 | //没有选择分娩医院 并且未产妇查询的时候 就只查询主档案 |
| 486 | - if (type == 3) | |
| 487 | - { | |
| 484 | + if (type == 3) { | |
| 488 | 485 | patientsQuery.setExtSource(false); |
| 489 | 486 | } |
| 490 | 487 | } |
| 491 | 488 | |
| ... | ... | @@ -653,11 +650,10 @@ |
| 653 | 650 | data = convertToQuanCPatient(patientses, userId, hospital); |
| 654 | 651 | } |
| 655 | 652 | } |
| 656 | - if (StringUtils.isNotEmpty(hospital)) | |
| 657 | - { | |
| 653 | + if (StringUtils.isNotEmpty(hospital)) { | |
| 658 | 654 | Organization og = organizationService.getOrganization(Integer.valueOf(hospital)); |
| 659 | 655 | |
| 660 | - if(og!=null&&"2".equals(og.getCityId())&&riskPatientsQueryRequest.getShowDetail()==1) {//隐藏姓名、地址 | |
| 656 | + if (og != null && "2".equals(og.getCityId()) && riskPatientsQueryRequest.getShowDetail() == 1) {//隐藏姓名、地址 | |
| 661 | 657 | for (Object result : data) { |
| 662 | 658 | if (result instanceof RiskPatientsResult) { |
| 663 | 659 | RiskPatientsResult riskResult = (RiskPatientsResult) result; |
| ... | ... | @@ -712,7 +708,6 @@ |
| 712 | 708 | Patients patients = antenatalExaminationFacade.findOnePatient(patientQueryRequest.getCardNo(), patientQueryRequest.getVcCardNo(), patientQueryRequest.getId(), groupsFacade.findGroupHospital(userId, false), -1, true, patientQueryRequest.getPid(), false); |
| 713 | 709 | |
| 714 | 710 | |
| 715 | - | |
| 716 | 711 | PatientBaseResult patientBaseResult = new PatientBaseResult(); |
| 717 | 712 | if (null != patients) { |
| 718 | 713 | patientBaseResult.convert(patients); |
| ... | ... | @@ -746,7 +741,7 @@ |
| 746 | 741 | if (end > patientses.size()) { |
| 747 | 742 | end = patientses.size(); |
| 748 | 743 | } |
| 749 | - listFuture.add(commonThreadPool.submit(new QuanChanPatientWorker(patientses.subList(i, end), hospital, usersService, postReviewService, matDeliverService, patientsService, organizationService, basicConfigService,antExService,dischargeAbstractMotherService,matDeliverFollowService))); | |
| 744 | + listFuture.add(commonThreadPool.submit(new QuanChanPatientWorker(patientses.subList(i, end), hospital, usersService, postReviewService, matDeliverService, patientsService, organizationService, basicConfigService, antExService, dischargeAbstractMotherService, matDeliverFollowService))); | |
| 750 | 745 | } |
| 751 | 746 | for (Future f : listFuture) { |
| 752 | 747 | try { |
| 753 | 748 | |
| 754 | 749 | |
| 755 | 750 | |
| 756 | 751 | |
| 757 | 752 | |
| 758 | 753 | |
| 759 | 754 | |
| 760 | 755 | |
| 761 | 756 | |
| ... | ... | @@ -1041,59 +1036,57 @@ |
| 1041 | 1036 | |
| 1042 | 1037 | |
| 1043 | 1038 | /** |
| 1044 | - * | |
| 1045 | - *唐山(滦县)需求导出孕产妇健康管理登记表 | |
| 1046 | - * | |
| 1039 | + * 唐山(滦县)需求导出孕产妇健康管理登记表 | |
| 1047 | 1040 | */ |
| 1048 | 1041 | public void tsLxExport(RiskPatientsQueryRequest patientsQueryRequest, Integer userId, |
| 1049 | - HttpServletResponse response){ | |
| 1042 | + HttpServletResponse response) { | |
| 1050 | 1043 | response.setContentType("application/octet-stream"); |
| 1051 | 1044 | response.setHeader("Content-Disposition", "attachment;fileName=" + "datas.xls"); |
| 1052 | - try{ | |
| 1045 | + try { | |
| 1053 | 1046 | BaseListResponse listResponse = null; |
| 1054 | 1047 | List<Map<String, Object>> datas = new ArrayList<>(); |
| 1055 | 1048 | if (patientsQueryRequest.getQueryType() == 1) { |
| 1056 | 1049 | //全部孕妇 |
| 1057 | 1050 | listResponse = (BaseListResponse) queryHighRisk(patientsQueryRequest, null, 1, userId, null, Boolean.FALSE); |
| 1058 | 1051 | List list = listResponse.getData(); |
| 1059 | - if(list != null && list.size()>0){ | |
| 1060 | - for(Object obj : list){ | |
| 1052 | + if (list != null && list.size() > 0) { | |
| 1053 | + for (Object obj : list) { | |
| 1061 | 1054 | Map<String, Object> data = new HashMap<>(); |
| 1062 | 1055 | QuanPatientsResult rp = (QuanPatientsResult) obj; |
| 1063 | 1056 | data.put("name", rp.getName()); |
| 1064 | - data.put("address",rp.getAddr()); | |
| 1065 | - data.put("phone",rp.getPhone()); | |
| 1057 | + data.put("address", rp.getAddr()); | |
| 1058 | + data.put("phone", rp.getPhone()); | |
| 1066 | 1059 | data.put("lastMenses", rp.getLastMenses()); |
| 1067 | - data.put("yi",rp.getYi()); | |
| 1068 | - data.put("er",rp.getEr()); | |
| 1069 | - data.put("san",rp.getSan()); | |
| 1070 | - data.put("si",rp.getSi()); | |
| 1071 | - data.put("wu",rp.getWu()); | |
| 1072 | - data.put("total",rp.getcTimes()); | |
| 1060 | + data.put("yi", rp.getYi()); | |
| 1061 | + data.put("er", rp.getEr()); | |
| 1062 | + data.put("san", rp.getSan()); | |
| 1063 | + data.put("si", rp.getSi()); | |
| 1064 | + data.put("wu", rp.getWu()); | |
| 1065 | + data.put("total", rp.getcTimes()); | |
| 1073 | 1066 | datas.add(data); |
| 1074 | 1067 | } |
| 1075 | 1068 | } |
| 1076 | 1069 | |
| 1077 | - }else if(patientsQueryRequest.getQueryType() == 2){ | |
| 1070 | + } else if (patientsQueryRequest.getQueryType() == 2) { | |
| 1078 | 1071 | //全部产妇 |
| 1079 | 1072 | listResponse = (BaseListResponse) queryHighRisk(patientsQueryRequest, null, 3, userId, null, Boolean.FALSE); |
| 1080 | 1073 | List list = listResponse.getData(); |
| 1081 | 1074 | for (Object obj : list) { |
| 1082 | 1075 | Map<String, Object> data = new HashMap<>(); |
| 1083 | 1076 | QuanChanResult rp = (QuanChanResult) obj; |
| 1084 | - data.put("name",rp.getName()); | |
| 1085 | - data.put("address",rp.getAddr()); | |
| 1086 | - data.put("phone",rp.getPhone()); | |
| 1077 | + data.put("name", rp.getName()); | |
| 1078 | + data.put("address", rp.getAddr()); | |
| 1079 | + data.put("phone", rp.getPhone()); | |
| 1087 | 1080 | data.put("lastMenses", rp.getLastMenses()); |
| 1088 | - data.put("yi",rp.getYi()); | |
| 1089 | - data.put("er",rp.getEr()); | |
| 1090 | - data.put("san",rp.getSan()); | |
| 1091 | - data.put("si",rp.getSi()); | |
| 1092 | - data.put("wu",rp.getWu()); | |
| 1081 | + data.put("yi", rp.getYi()); | |
| 1082 | + data.put("er", rp.getEr()); | |
| 1083 | + data.put("san", rp.getSan()); | |
| 1084 | + data.put("si", rp.getSi()); | |
| 1085 | + data.put("wu", rp.getWu()); | |
| 1093 | 1086 | data.put("total", rp.getCjTimes()); |
| 1094 | - data.put("cyxj",rp.getCyxj()); | |
| 1095 | - data.put("chfs",rp.getChfs()); | |
| 1096 | - data.put("chfc",rp.getChfc()); | |
| 1087 | + data.put("cyxj", rp.getCyxj()); | |
| 1088 | + data.put("chfs", rp.getChfs()); | |
| 1089 | + data.put("chfc", rp.getChfc()); | |
| 1097 | 1090 | |
| 1098 | 1091 | datas.add(data); |
| 1099 | 1092 | } |
| ... | ... | @@ -1101,7 +1094,7 @@ |
| 1101 | 1094 | } |
| 1102 | 1095 | OutputStream out = response.getOutputStream(); |
| 1103 | 1096 | ExcelUtil.WriteTsLxExport(out, datas); |
| 1104 | - }catch (Exception e){ | |
| 1097 | + } catch (Exception e) { | |
| 1105 | 1098 | ExceptionUtils.catchException(e, e.getMessage()); |
| 1106 | 1099 | } |
| 1107 | 1100 | |
| ... | ... | @@ -1109,8 +1102,6 @@ |
| 1109 | 1102 | } |
| 1110 | 1103 | |
| 1111 | 1104 | |
| 1112 | - | |
| 1113 | - | |
| 1114 | 1105 | private String getLevel(List<Map> levels) { |
| 1115 | 1106 | |
| 1116 | 1107 | String str = ""; |
| 1117 | 1108 | |
| ... | ... | @@ -1211,10 +1202,10 @@ |
| 1211 | 1202 | } catch (Exception e) { |
| 1212 | 1203 | // 什么都不干 |
| 1213 | 1204 | } |
| 1214 | - if("1000000114".equals(patients.getHospitalId())){ | |
| 1205 | + if ("1000000114".equals(patients.getHospitalId())) { | |
| 1215 | 1206 | patientManagerQueryModel.setPhone(patients.getPhone()); |
| 1216 | 1207 | patientManagerQueryModel.setCardNo(patients.getCardNo()); |
| 1217 | - }else{ | |
| 1208 | + } else { | |
| 1218 | 1209 | patientManagerQueryModel.setPhone(DefenceUtils.getPhone(patients.getPhone())); |
| 1219 | 1210 | patientManagerQueryModel.setCardNo(DefenceUtils.getCardNo(patients.getCardNo())); |
| 1220 | 1211 | } |
| 1221 | 1212 | |
| 1222 | 1213 | |
| ... | ... | @@ -1236,12 +1227,12 @@ |
| 1236 | 1227 | patientManagerQueryModel.setAddressRegister(CommonsHelper.getResidence(patients.getProvinceId(), patients.getCityId(), patients.getAreaId(), patients.getStreetId(), patients.getAddress(), basicConfigService)); |
| 1237 | 1228 | patientManagerQueryModel.setAddress(CommonsHelper.getResidence(patients.getProvinceRegisterId(), patients.getCityRegisterId(), patients.getAreaRegisterId(), patients.getStreetRegisterId(), patients.getAddressRegister(), basicConfigService)); |
| 1238 | 1229 | patientManagerQueryModel.setId(patients.getId()); |
| 1239 | - if(patients.getSendCareMan()!=null){ | |
| 1240 | - if("0".equals(patients.getSendCareMan())){ | |
| 1230 | + if (patients.getSendCareMan() != null) { | |
| 1231 | + if ("0".equals(patients.getSendCareMan())) { | |
| 1241 | 1232 | patientManagerQueryModel.setSendCareMan("未发放"); |
| 1242 | - }else if("1".equals(patients.getSendCareMan())){ | |
| 1233 | + } else if ("1".equals(patients.getSendCareMan())) { | |
| 1243 | 1234 | patientManagerQueryModel.setSendCareMan("首发"); |
| 1244 | - }else if("2".equals(patients.getSendCareMan())){ | |
| 1235 | + } else if ("2".equals(patients.getSendCareMan())) { | |
| 1245 | 1236 | patientManagerQueryModel.setSendCareMan("补发"); |
| 1246 | 1237 | } |
| 1247 | 1238 | } |
| 1248 | 1239 | |
| 1249 | 1240 | |
| ... | ... | @@ -1392,17 +1383,13 @@ |
| 1392 | 1383 | if (p != null) { |
| 1393 | 1384 | AntExChuModel chuModel = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(p.getPid()).and("yn").ne("0")).with(new Sort(Sort.Direction.DESC, "created")), AntExChuModel.class); |
| 1394 | 1385 | if (chuModel != null) { |
| 1395 | - if (StringUtils.isNotEmpty(chuModel.getHeight()) && StringUtils.isNotEmpty(chuModel.getWeight())) | |
| 1396 | - { | |
| 1386 | + if (StringUtils.isNotEmpty(chuModel.getHeight()) && StringUtils.isNotEmpty(chuModel.getWeight())) { | |
| 1397 | 1387 | patientBaseResult.setHeight(StringUtils.isNotEmpty(chuModel.getHeight()) ? chuModel.getHeight() : ""); |
| 1398 | 1388 | patientBaseResult.setWeight(StringUtils.isNotEmpty(chuModel.getWeight()) ? chuModel.getWeight() : ""); |
| 1399 | 1389 | patientBaseResult.setBeforWeight(StringUtils.isNotEmpty(chuModel.getYqWeight()) ? chuModel.getYqWeight() : ""); |
| 1400 | - } | |
| 1401 | - else | |
| 1402 | - { | |
| 1390 | + } else { | |
| 1403 | 1391 | PatientWeight patientWeight = mongoTemplate.findOne(Query.query(Criteria.where("patientId").is(p.getId())), PatientWeight.class); |
| 1404 | - if (patientWeight != null) | |
| 1405 | - { | |
| 1392 | + if (patientWeight != null) { | |
| 1406 | 1393 | patientBaseResult.setHeight(StringUtils.isNotEmpty(patientWeight.getBeforeHeight()) ? patientWeight.getBeforeHeight() : ""); |
| 1407 | 1394 | patientBaseResult.setWeight(StringUtils.isNotEmpty(patientWeight.getNowWeight()) ? patientWeight.getNowWeight() : ""); |
| 1408 | 1395 | patientBaseResult.setBeforWeight(StringUtils.isNotEmpty(patientWeight.getBeforeWeight()) ? patientWeight.getBeforeWeight() : ""); |
| ... | ... | @@ -1413,6 +1400,15 @@ |
| 1413 | 1400 | PatientWeight pw = mongoTemplate.findOne(Query.query(Criteria.where("patientId").is(patientBaseResult.getId())), PatientWeight.class); |
| 1414 | 1401 | if (pw != null) { |
| 1415 | 1402 | patientBaseResult.setPwId(pw.getId()); |
| 1403 | + } | |
| 1404 | + //高危报告权限判断 | |
| 1405 | + String HealthyId = "d42eec03-aa86-45b8-a4e0-78a0ff365fb6";//健康id// | |
| 1406 | + String bmiId = "a427da89-594a-46c2-b9f7-1b0d355ce54c";//28>BMI>25 | |
| 1407 | + String bmiIdStr = "5a40c6c5422b03d4ad2bf7bd";//BMI<18.5 | |
| 1408 | + if (null == patients.getRiskFactorId() || patients.getRiskFactorId().contains(HealthyId) || patients.getRiskFactorId().contains(bmiId) || patients.getRiskFactorId().contains(bmiIdStr)) { | |
| 1409 | + patientBaseResult.setFlag(false); | |
| 1410 | + } else { | |
| 1411 | + patientBaseResult.setFlag(true); | |
| 1416 | 1412 | } |
| 1417 | 1413 | return new BaseObjectResponse().setData(patientBaseResult).setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS); |
| 1418 | 1414 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientBaseResult.java
View file @
3057d3d
| ... | ... | @@ -47,18 +47,28 @@ |
| 47 | 47 | //筛查结果 |
| 48 | 48 | private List<Map<String, Object>> screenResult; |
| 49 | 49 | // 身高 |
| 50 | - private String height; | |
| 50 | + private String height; | |
| 51 | 51 | //体重 |
| 52 | - private String weight ; | |
| 53 | - private String beforWeight ; | |
| 52 | + private String weight; | |
| 53 | + private String beforWeight; | |
| 54 | 54 | |
| 55 | 55 | private String birth; |
| 56 | 56 | |
| 57 | 57 | private String sex; |
| 58 | 58 | |
| 59 | 59 | //新增产前诊断信息 |
| 60 | - private List<Map<String,String>> dia; | |
| 60 | + private List<Map<String, String>> dia; | |
| 61 | 61 | |
| 62 | + private boolean flag; | |
| 63 | + | |
| 64 | + public boolean isFlag() { | |
| 65 | + return flag; | |
| 66 | + } | |
| 67 | + | |
| 68 | + public void setFlag(boolean flag) { | |
| 69 | + this.flag = flag; | |
| 70 | + } | |
| 71 | + | |
| 62 | 72 | public String getBeforWeight() { |
| 63 | 73 | return beforWeight; |
| 64 | 74 | } |
| 65 | 75 | |
| ... | ... | @@ -230,10 +240,10 @@ |
| 230 | 240 | setPhone(patients.getPhone()); |
| 231 | 241 | setRemarks(patients.getMremark()); |
| 232 | 242 | |
| 233 | - if(null!=patients.getFmDate()){ | |
| 243 | + if (null != patients.getFmDate()) { | |
| 234 | 244 | //1 孕妇 0 产妇 |
| 235 | 245 | setIsGravida("0"); |
| 236 | - }else{ | |
| 246 | + } else { | |
| 237 | 247 | setIsGravida("1"); |
| 238 | 248 | } |
| 239 | 249 | setBirth(DateUtil.getyyyy_MM_dd(patients.getBirth())); |