Commit 25ba5b1514268c52b9d65540ceadc50736d837cb

Authored by hujiaqi

Merge remote-tracking branch 'origin/master'

Showing 9 changed files

platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyFmService.java View file @ 25ba5b1
... ... @@ -44,11 +44,10 @@
44 44 @Autowired
45 45 private UsersService usersService;
46 46  
47   - public void fmTimerWork()
48   - {
  47 + public void fmTimerWork() {
49 48 SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm");
50 49 Date end = new Date();
51   - Date start = new Date(end.getTime()-1000*60*5);
  50 + Date start = new Date(end.getTime()-1000*60*60*24*6);
52 51 String startStr = fmt.format(start);
53 52 String endStr = fmt.format(end);
54 53 System.out.println("start="+startStr+"end="+endStr);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java View file @ 25ba5b1
... ... @@ -28,7 +28,8 @@
28 28 public class Test {
29 29  
30 30 public static void main(String[] args) {
31   -
  31 + String id="1";
  32 + System.out.print(String.format("%07d", id));
32 33 }
33 34 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java View file @ 25ba5b1
... ... @@ -461,13 +461,13 @@
461 461 BaseListResponse listRep = (BaseListResponse) findList(antExManagerQueryRequest, id, b, null);
462 462 List<Map<String, Object>> datas = new ArrayList<>();
463 463 try {
464   - Map<String, Object> data = new HashMap<>();
465 464 if (listRep != null) {
466 465 List<AntExManagerResult> list = listRep.getData();
467 466 if (CollectionUtils.isNotEmpty(list)) {
468 467 for (AntExManagerResult aer : list) {
  468 + Map<String, Object> data = new HashMap<>();
469 469 data.put("checkTime", aer.getCheckTime());
470   - data.put("barCode", aer.getBarCode());
  470 +// data.put("barCode", aer.getBarCode());
471 471 data.put("name", aer.getName());
472 472 data.put("age", aer.getAge());
473 473 data.put("cDueWeek", aer.getcDueWeek());
... ... @@ -481,6 +481,7 @@
481 481 data.put("checkDoctor", aer.getCheckDoctor());
482 482 data.put("lName", aer.getlName());
483 483 data.put("phone", aer.getPhone());
  484 + datas.add(data);
484 485 }
485 486 }
486 487  
... ... @@ -489,7 +490,7 @@
489 490 OutputStream out = httpServletResponse.getOutputStream();
490 491 Map<String, String> cnames = new LinkedHashMap<>();
491 492 cnames.put("checkTime", "产检日期");
492   - cnames.put("barCode", "条形码");
  493 +// cnames.put("barCode", "条形码");
493 494 cnames.put("name", "姓名");
494 495 cnames.put("age", "年龄");
495 496 cnames.put("cDueWeek", "产检孕周");
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java View file @ 25ba5b1
... ... @@ -408,7 +408,7 @@
408 408 //修改患者风险等级
409 409 // updatePatientRiskLevel(antExChuModel, patients);
410 410 patientsService.updatePatient(patients);
411   - patientsService.updateNextCheckTime(patients.getId(), excAddRequest.getNextCheckTime());
  411 + patientsService.updateNextCheckTime(excAddRequest.getNextCheckTime(),patients.getId());
412 412  
413 413 //修改本系统最后的高危
414 414 updateLastRisk(patients.getId());
415 415  
... ... @@ -417,13 +417,9 @@
417 417  
418 418 setLashCTimes(antExChuModel.getParentId());
419 419  
420   - //初诊,修改产检管理
421   -// antenatalExaminationService.updateAntExRecord(antExChuModel.getId(), 1);
422   - /* if (StringUtils.isNotEmpty(antExChuModel.getPid())) {
423   - recordService.handExRecord(antExChuModel.getPid());
424   - }*/
425 420 antenatalExaminationService.updateAntExRecord(antExChuModel.getId(), 1);
426   -
  421 + //修改数据
  422 + syncMaster(excAddRequest.getParentId());
427 423 } else {
428 424 AntExChuQuery antExChuQuery1 = new AntExChuQuery();
429 425 antExChuQuery1.setParentId(excAddRequest.getParentId());
... ... @@ -475,7 +471,7 @@
475 471 patients.setLastCheckEmployeeId(excAddRequest.getProdDoctor());
476 472  
477 473 patientsService.updatePatient(patients);
478   - patientsService.updateNextCheckTime(patients.getId(), excAddRequest.getNextCheckTime());
  474 + patientsService.updateNextCheckTime(excAddRequest.getNextCheckTime(),patients.getId());
479 475 updateLastRisk(patients.getId());
480 476  
481 477 //修改本院最后一次定义高危
... ... @@ -483,6 +479,7 @@
483 479 setLashCTimes(antExChuModel.getParentId());
484 480  
485 481 antenatalExaminationService.updateAntExRecord(antExChuModel.getId(), 1);
  482 + syncMaster(excAddRequest.getParentId());
486 483 if (null != patients.getBuildType() && patients.getBuildType() == 3) {
487 484 Patients patients1 = new Patients();
488 485 patients1.setEnable("1");
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyStatisticsManagerFacade.java View file @ 25ba5b1
... ... @@ -93,8 +93,10 @@
93 93 }
94 94 if (i1 > i2) {
95 95 return -1;
96   - } else {
  96 + } else if (i1 < i2) {
97 97 return 1;
  98 + } else {
  99 + return 0;
98 100 }
99 101 }
100 102 });
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PostReviewFacade.java View file @ 25ba5b1
... ... @@ -122,7 +122,7 @@
122 122 patients2.setId(patients1.getId());
123 123 patientsService.updatePatient(patients2);
124 124 }
125   - patientsService.updateNextCheckTime(patients.getId(), postReviewRequest.getNextCheckTime());
  125 + patientsService.updateNextCheckTime(postReviewRequest.getNextCheckTime(),patients.getId());
126 126  
127 127 handlApplyOrder(patients, hospital, postReviewRequest);
128 128 syncMaster(patients.getId());
... ... @@ -137,7 +137,7 @@
137 137 }
138 138 patients.setLastCheckEmployeeId(postReviewModel.getProdDoctor());
139 139 patientsService.updatePatient(patients);
140   - patientsService.updateNextCheckTime(patients.getId(), postReviewRequest.getNextCheckTime());
  140 + patientsService.updateNextCheckTime(postReviewRequest.getNextCheckTime(),patients.getId());
141 141 postReviewService.updatePostById(postReviewModel, postReviewRequest.getId());
142 142 syncMaster(patients.getId());
143 143 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java View file @ 25ba5b1
... ... @@ -69,10 +69,12 @@
69 69 map.put("username", data.getUsername());
70 70 map.put("pcerteType", getBasicConfig(data.getPcerteTypeId()));
71 71 map.put("cardNo", data.getCardNo());
  72 + map.put("phone", data.getPhone());
  73 + map.put("pworkUnit", data.getPworkUnit());
72 74 map.put("pcountry", getBasicConfig(data.getPcountryId()));
73 75 map.put("pnation", getBasicConfig(data.getPnationId()));
74 76 map.put("birth", DateUtil.getyyyy_MM_dd(data.getBirth()));
75   - map.put("age", DateUtil.getAge(data.getBirth()));
  77 + map.put("age", UnitUtils.unitSplice(DateUtil.getAge(data.getBirth()),UnitConstants.SUI));
76 78 map.put("pcensusType", getBasicConfig(data.getPcensusTypeId()));
77 79 map.put("pliveType", getBasicConfig(data.getPliveTypeId()));
78 80 map.put("pprofessionType", getBasicConfig(data.getPprofessionTypeId()));
... ... @@ -84,8 +86,8 @@
84 86 data.getAreaId(), data.getStreetId(), data.getAddress(), basicConfigService));
85 87 map.put("register", CommonsHelper.getResidence(data.getProvinceRegisterId(), data.getCityRegisterId(),
86 88 data.getAreaRegisterId(), data.getStreetRegisterId(), data.getAddressRegister(), basicConfigService));
87   - map.put("postRest", CommonsHelper.getResidence(data.getProvinceId(), data.getCityId(),
88   - data.getAreaId(), data.getStreetId(), data.getAddress(), basicConfigService));
  89 + map.put("postRest", CommonsHelper.getResidence(data.getProvincePostRestId(), data.getCityPostRestId(),
  90 + data.getAreaPostRestId(), data.getStreetPostRestId(), data.getAddressPostRest(), basicConfigService));
89 91  
90 92 /* 丈夫信息 */
91 93 map.put("husbandName", data.getHusbandName());
92 94  
93 95  
... ... @@ -102,13 +104,24 @@
102 104  
103 105 /* 院内信息 */
104 106 map.put("lastMenses", DateUtil.getyyyy_MM_dd(data.getLastMenses()));
105   - //TODO 纠正末次月经
  107 + //纠正末次月经,取末次月经数据
  108 + map.put("correctionLastMenses", DateUtil.getyyyy_MM_dd(data.getLastMenses()));
106 109 map.put("dueDate", DateUtil.getyyyy_MM_dd(data.getDueDate()));
107 110 map.put("vcCardNo", data.getVcCardNo());
108 111 //TODO 条码
109   - //TODO 档案编号
  112 + //档案编号
  113 + map.put("fileCode", data.getFileCode());
110 114 map.put("mremark", data.getMremark());
111   - //TODO 服务类型
  115 + //服务类型
  116 + String serviceType = "";
  117 + if (data.getServiceType()!=null){
  118 + for (ServiceTypeEnums serviceTypeEnums:ServiceTypeEnums.values()){
  119 + if (data.getServiceType().equals(serviceTypeEnums.getId())){
  120 + serviceType = serviceTypeEnums.getName();
  121 + }
  122 + }
  123 + }
  124 + map.put("serviceType",serviceType );
112 125 map.put("serviceStatus", ServiceStatusEnums.getNameById(data.getServiceStatus()));
113 126  
114 127 br.setData(map);
... ... @@ -167,7 +180,7 @@
167 180 map.put("id",data.getId());
168 181 map.put("username",patients.getUsername());
169 182 map.put("birth", DateUtil.getyyyy_MM_dd(patients.getBirth()));
170   - map.put("age",DateUtil.getAge(patients.getBirth()));
  183 + map.put("age",UnitUtils.unitSplice(DateUtil.getAge(patients.getBirth()),UnitConstants.SUI));
171 184 map.put("phone",patients.getPhone());
172 185 map.put("fmWeek",patients.getFmWeek());
173 186 map.put("dueDate",DateUtil.getyyyy_MM_dd(patients.getDueDate()));
... ... @@ -986,7 +999,7 @@
986 999 map.put("id",data.getId());
987 1000 map.put("username",patients.getUsername());
988 1001 map.put("birth",DateUtil.getyyyy_MM_dd(patients.getBirth()));
989   - map.put("age",DateUtil.getAge(patients.getBirth()));
  1002 + map.put("age",UnitUtils.unitSplice(DateUtil.getAge(patients.getBirth()),UnitConstants.SUI));
990 1003 map.put("phone",patients.getPhone());
991 1004 map.put("fmWeek",patients.getFmWeek());
992 1005 map.put("dueDate",DateUtil.getyyyy_MM_dd(patients.getDueDate()));
993 1006  
994 1007  
995 1008  
996 1009  
... ... @@ -1016,12 +1029,68 @@
1016 1029 }
1017 1030  
1018 1031 map.put("hospitalId", hospitalId);
  1032 + map.put("nextCheckTime", DateUtil.getyyyy_MM_dd(data.getNextCheckTime()));
  1033 + map.put("healthStatus", data.getHealthStatus());
  1034 + map.put("psychology", data.getPsychology());
1019 1035  
1020   - String deliverDoctor = "";
  1036 + map.put("weight", UnitUtils.unitSplice(data.getWeight(),UnitConstants.KG));
  1037 + String ssy = "";
  1038 + String szy = "";
  1039 + Map<String, String> chBpMap = JsonUtil.getMap(data.getBp());
  1040 + if (MapUtils.isNotEmpty(chBpMap)) {
  1041 + ssy = chBpMap.get("ssy");
  1042 + szy = chBpMap.get("szy");
  1043 + }
  1044 + map.put("bp", UnitUtils.unitSplice(ssy + "/" + szy,UnitConstants.MMHG));
1021 1045  
  1046 + map.put("breast", data.getBreast());
  1047 + map.put("lochia", data.getLochia());
  1048 + map.put("vulva", data.getVulva());
  1049 + map.put("vagina", data.getVagina());
  1050 + map.put("cervixUteri", data.getCervixUteri());
  1051 + map.put("matrix", data.getMatrix());
  1052 + map.put("fujian", data.getFujian());
  1053 + map.put("wound", data.getWound());
  1054 + map.put("other", data.getOther());
1022 1055  
  1056 + map.put("basin", data.getBasin());
  1057 + map.put("traceElement", data.getTraceElement());
  1058 + map.put("boneDensity", data.getBoneDensity());
  1059 + map.put("ultrasonicExamination", data.getUltrasonicExamination());
  1060 +
  1061 +
  1062 + /* 诊断指导 */
  1063 + String diagnosis = "";
  1064 + if (org.apache.commons.lang.StringUtils.isNotEmpty(data.getDiagnosis())){
  1065 + List<String> temp = JsonUtil.toList(data.getDiagnosis(), String.class);
  1066 + if (CollectionUtils.isNotEmpty(temp)){
  1067 +
  1068 + StringBuilder sb = new StringBuilder();
  1069 +
  1070 + for (String sId : temp){
  1071 + sb.append(FunvCommonUtil.getBaseicConfigByid(sId, basicConfigService)).append(",");
  1072 + }
  1073 + if (sb.toString().endsWith(",")) {
  1074 + diagnosis = sb.substring(0, sb.length() - 1);
  1075 + }else {
  1076 + diagnosis = sb.toString();
  1077 + }
  1078 + }
  1079 + }else {
  1080 + diagnosis = "-";
  1081 + }
  1082 + map.put("diagnosis",diagnosis);
  1083 + map.put("treatOpinion",data.getTreatOpinion());
  1084 + map.put("dirOpinion",data.getDirOpinion());
  1085 +
  1086 + br.setErrorcode(ErrorCodeConstants.SUCCESS);
  1087 + br.setErrormsg("成功");
  1088 + br.setData(map);
1023 1089 return br;
1024 1090 }
  1091 +
  1092 +
  1093 +
1025 1094  
1026 1095  
1027 1096  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/UnitConstants.java View file @ 25ba5b1
... ... @@ -24,6 +24,7 @@
24 24 public static final String FEN = " 分";
25 25 public static final String FZ = " 分钟";
26 26 public static final String GE = " 个";
  27 + public static final String SUI = " 岁";
27 28  
28 29  
29 30 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanChanPatientWorker.java View file @ 25ba5b1
... ... @@ -106,7 +106,6 @@
106 106 stopWatch.start("query matdeliver");
107 107 List<MaternalDeliverModel> maternalDeliverModels = matDeliverService.query(matDeliverQuery);
108 108 if (CollectionUtils.isNotEmpty(maternalDeliverModels)) {
109   -// chanResult.setDueWeek(maternalDeliverModels.get(0).getDueDate());
110 109 chanResult.setTireNumber(TaiShuEnums.getTitle(maternalDeliverModels.get(0).getTireNumber() + ""));
111 110 try {
112 111 chanResult.setfCh(organizationService.getOrganization(Integer.valueOf(maternalDeliverModels.get(0).getHospitalId())).getName());
113 112  
... ... @@ -121,10 +120,12 @@
121 120 postReviewQuery.setYn(YnEnums.YES.getId());
122 121 stopWatch.start("query postreview list");
123 122 List<PostReviewModel> withList = postReviewService.findWithList(postReviewQuery.convertToQuery().addOrder(Sort.Direction.DESC, "created"));
124   - if (StringUtils.isNotEmpty(patients.getLastCheckEmployeeId())) {
125   - Users users = usersService.getUsers(NumberUtils.toInt(patients.getLastCheckEmployeeId()));
  123 + if (CollectionUtils.isNotEmpty(withList)) {
  124 + Users users = usersService.getUsers(NumberUtils.toInt(withList.get(0).getProdDoctor()));
126 125 if (null != users) {
127 126 chanResult.setCheckDoctor(users.getName());
  127 + }else{
  128 + chanResult.setCheckDoctor(withList.get(0).getProdDoctor());
128 129 }
129 130 }
130 131 String nextCheckTime = "";