Commit ebe3134249067fd00db929063a335d4f4b4fc4ee
1 parent
87708e057e
Exists in
master
and in
6 other branches
update
Showing 8 changed files with 213 additions and 5 deletions
- platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java
- platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/RiskPatientsQueryRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/QuanPatientsResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanPatientWorker.java
platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java
View file @
ebe3134
| ... | ... | @@ -400,6 +400,28 @@ |
| 400 | 400 | //丈夫证件人工核验人员名称 |
| 401 | 401 | private String husVerifName; |
| 402 | 402 | |
| 403 | + | |
| 404 | + //初诊医生id | |
| 405 | + private String firstCheckId; | |
| 406 | + //初诊时间 | |
| 407 | + private Date firstCheckTime; | |
| 408 | + | |
| 409 | + public String getFirstCheckId() { | |
| 410 | + return firstCheckId; | |
| 411 | + } | |
| 412 | + | |
| 413 | + public void setFirstCheckId(String firstCheckId) { | |
| 414 | + this.firstCheckId = firstCheckId; | |
| 415 | + } | |
| 416 | + | |
| 417 | + public Date getFirstCheckTime() { | |
| 418 | + return firstCheckTime; | |
| 419 | + } | |
| 420 | + | |
| 421 | + public void setFirstCheckTime(Date firstCheckTime) { | |
| 422 | + this.firstCheckTime = firstCheckTime; | |
| 423 | + } | |
| 424 | + | |
| 403 | 425 | public String getPatientVerifType() { |
| 404 | 426 | return patientVerifType; |
| 405 | 427 | } |
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
ebe3134
| ... | ... | @@ -385,6 +385,37 @@ |
| 385 | 385 | //空或者1为正常 2为补录 |
| 386 | 386 | private String normal; |
| 387 | 387 | |
| 388 | + //初诊医生id | |
| 389 | + private String firstCheckId; | |
| 390 | + //初诊时间 | |
| 391 | + private Date firstCheckTimeStart; | |
| 392 | + private Date firstCheckTimeEnd; | |
| 393 | + | |
| 394 | + | |
| 395 | + public String getFirstCheckId() { | |
| 396 | + return firstCheckId; | |
| 397 | + } | |
| 398 | + | |
| 399 | + public void setFirstCheckId(String firstCheckId) { | |
| 400 | + this.firstCheckId = firstCheckId; | |
| 401 | + } | |
| 402 | + | |
| 403 | + public Date getFirstCheckTimeStart() { | |
| 404 | + return firstCheckTimeStart; | |
| 405 | + } | |
| 406 | + | |
| 407 | + public void setFirstCheckTimeStart(Date firstCheckTimeStart) { | |
| 408 | + this.firstCheckTimeStart = firstCheckTimeStart; | |
| 409 | + } | |
| 410 | + | |
| 411 | + public Date getFirstCheckTimeEnd() { | |
| 412 | + return firstCheckTimeEnd; | |
| 413 | + } | |
| 414 | + | |
| 415 | + public void setFirstCheckTimeEnd(Date firstCheckTimeEnd) { | |
| 416 | + this.firstCheckTimeEnd = firstCheckTimeEnd; | |
| 417 | + } | |
| 418 | + | |
| 388 | 419 | public String getNormal() { |
| 389 | 420 | return normal; |
| 390 | 421 | } |
| 391 | 422 | |
| ... | ... | @@ -746,7 +777,11 @@ |
| 746 | 777 | if (null != blNum) { |
| 747 | 778 | condition = condition.and("blNum", blNum, MongoOper.IS); |
| 748 | 779 | } |
| 780 | + if (null != firstCheckId) { | |
| 781 | + condition = condition.and("firstCheckId", firstCheckId, MongoOper.IS); | |
| 782 | + } | |
| 749 | 783 | |
| 784 | + | |
| 750 | 785 | Criteria c1 = null; |
| 751 | 786 | |
| 752 | 787 | |
| ... | ... | @@ -1021,6 +1056,23 @@ |
| 1021 | 1056 | } |
| 1022 | 1057 | } |
| 1023 | 1058 | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + if (null != firstCheckTimeStart) { | |
| 1062 | + if (null != c1) { | |
| 1063 | + c1 = c1.and("firstCheckTime").gte(firstCheckTimeStart); | |
| 1064 | + } else { | |
| 1065 | + c1 = Criteria.where("firstCheckTime").gte(firstCheckTimeStart); | |
| 1066 | + } | |
| 1067 | + } | |
| 1068 | + | |
| 1069 | + if (null != firstCheckTimeEnd) { | |
| 1070 | + if (null != c1) { | |
| 1071 | + c1 = c1.lte(firstCheckTimeEnd); | |
| 1072 | + } else { | |
| 1073 | + c1 = Criteria.where("firstCheckTime").lte(firstCheckTimeEnd); | |
| 1074 | + } | |
| 1075 | + } | |
| 1024 | 1076 | |
| 1025 | 1077 | if (null != buildDaysStart) { |
| 1026 | 1078 | if (null != c1) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
ebe3134
| ... | ... | @@ -935,6 +935,11 @@ |
| 935 | 935 | return "syncPatNextTime finish"; |
| 936 | 936 | } |
| 937 | 937 | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 938 | 943 | /** |
| 939 | 944 | * @auther HuJiaqi |
| 940 | 945 | * @createTime 2016年12月21日 15时56分 |
| 941 | 946 | |
| 942 | 947 | |
| 943 | 948 | |
| 944 | 949 | |
| 945 | 950 | |
| ... | ... | @@ -4092,36 +4097,90 @@ |
| 4092 | 4097 | @ResponseBody |
| 4093 | 4098 | @RequestMapping(value = "/syncAntexc", method = RequestMethod.GET) |
| 4094 | 4099 | public String syncAntexc(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate) { |
| 4095 | - patientSyncMysqlFacade.syncAntexc(startDate,endDate); | |
| 4100 | + patientSyncMysqlFacade.syncAntexc(startDate, endDate); | |
| 4096 | 4101 | return "success"; |
| 4097 | 4102 | } |
| 4098 | 4103 | |
| 4099 | 4104 | @ResponseBody |
| 4100 | 4105 | @RequestMapping(value = "/syncAntex", method = RequestMethod.GET) |
| 4101 | 4106 | public String syncAntex(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate) { |
| 4102 | - patientSyncMysqlFacade.syncAntex(startDate,endDate); | |
| 4107 | + patientSyncMysqlFacade.syncAntex(startDate, endDate); | |
| 4103 | 4108 | return "success"; |
| 4104 | 4109 | } |
| 4105 | 4110 | |
| 4106 | 4111 | @ResponseBody |
| 4107 | 4112 | @RequestMapping(value = "/syncMatdeliver", method = RequestMethod.GET) |
| 4108 | 4113 | public String syncMatdeliver(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate) { |
| 4109 | - patientSyncMysqlFacade.syncMatdeliver(startDate,endDate); | |
| 4114 | + patientSyncMysqlFacade.syncMatdeliver(startDate, endDate); | |
| 4110 | 4115 | return "success"; |
| 4111 | 4116 | } |
| 4112 | 4117 | |
| 4113 | 4118 | @ResponseBody |
| 4114 | 4119 | @RequestMapping(value = "/syncBaby", method = RequestMethod.GET) |
| 4115 | 4120 | public String syncBaby(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate) { |
| 4116 | - patientSyncMysqlFacade.syncBaby(startDate,endDate); | |
| 4121 | + patientSyncMysqlFacade.syncBaby(startDate, endDate); | |
| 4117 | 4122 | return "success"; |
| 4118 | 4123 | } |
| 4119 | 4124 | |
| 4120 | 4125 | @ResponseBody |
| 4121 | 4126 | @RequestMapping(value = "/syncBabyCheck", method = RequestMethod.GET) |
| 4122 | 4127 | public String syncBabyCheck(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate) { |
| 4123 | - patientSyncMysqlFacade.syncBabyCheck(startDate,endDate); | |
| 4128 | + patientSyncMysqlFacade.syncBabyCheck(startDate, endDate); | |
| 4124 | 4129 | return "syncBabyCheck"; |
| 4130 | + } | |
| 4131 | + | |
| 4132 | + | |
| 4133 | + /** | |
| 4134 | + * 修改初诊时间冗余到patients | |
| 4135 | + * | |
| 4136 | + * @param hid | |
| 4137 | + * @return | |
| 4138 | + */ | |
| 4139 | + @RequestMapping(value = "/syncPatFirstTime", method = RequestMethod.GET) | |
| 4140 | + @ResponseBody | |
| 4141 | + public String syncPatFirstTime(@RequestParam(required = true) String hid) { | |
| 4142 | + PatientsQuery patientQuery = new PatientsQuery(); | |
| 4143 | + patientQuery.setYn(YnEnums.YES.getId()); | |
| 4144 | + patientQuery.setHospitalId(hid); | |
| 4145 | + patientQuery.setType(1); | |
| 4146 | + List<Patients> patientses = patientsService.queryPatient(patientQuery); | |
| 4147 | + int batchSize = 1000; | |
| 4148 | + int end = 0; | |
| 4149 | + for (int i = 0; i < patientses.size(); i += batchSize) { | |
| 4150 | + end = (end + batchSize); | |
| 4151 | + if (end > patientses.size()) { | |
| 4152 | + end = patientses.size(); | |
| 4153 | + } | |
| 4154 | + System.out.println("start:" + i + ",end:" + end); | |
| 4155 | + final List<Patients> tempList = patientses.subList(i, end); | |
| 4156 | + new Thread(new Runnable() { | |
| 4157 | + @Override | |
| 4158 | + public void run() { | |
| 4159 | + if (CollectionUtils.isNotEmpty(tempList)) { | |
| 4160 | + for (Patients pat : tempList) { | |
| 4161 | + AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
| 4162 | + antExChuQuery.setYn(YnEnums.YES.getId()); | |
| 4163 | + antExChuQuery.setHospitalId(pat.getHospitalId()); | |
| 4164 | + antExChuQuery.setParentId(pat.getId()); | |
| 4165 | + List<AntExChuModel> chus = antenatalExaminationService.queryAntExChu(antExChuQuery); | |
| 4166 | + if (CollectionUtils.isNotEmpty(chus)) { | |
| 4167 | + AntExChuModel chu = chus.get(0); | |
| 4168 | + if (chu != null) { | |
| 4169 | + Date firstCheckTime = chu.getCheckTime(); | |
| 4170 | + String checkDoctor = chu.getProdDoctor(); | |
| 4171 | + pat.setFirstCheckTime(firstCheckTime); | |
| 4172 | + pat.setFirstCheckId(checkDoctor); | |
| 4173 | + patientsService.updatePatient(pat); | |
| 4174 | + } | |
| 4175 | + | |
| 4176 | + } | |
| 4177 | + } | |
| 4178 | + } | |
| 4179 | + } | |
| 4180 | + }).start(); | |
| 4181 | + } | |
| 4182 | + | |
| 4183 | + return "syncPatFirstTime finish"; | |
| 4125 | 4184 | } |
| 4126 | 4185 | |
| 4127 | 4186 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
ebe3134
| ... | ... | @@ -1153,6 +1153,8 @@ |
| 1153 | 1153 | if (excAddRequest.getIsSendMsg()) { |
| 1154 | 1154 | patients.setSendMsgTime(new Date()); |
| 1155 | 1155 | } |
| 1156 | + patients.setFirstCheckId(antExChuModel.getProdDoctor()); | |
| 1157 | + patients.setFirstCheckTime(antExChuModel.getCheckTime()); | |
| 1156 | 1158 | //本院就诊卡号 |
| 1157 | 1159 | patients.setVcCardNo(excAddRequest.getVcCardNo()); |
| 1158 | 1160 | patients.setLastCheckEmployeeId(excAddRequest.getProdDoctor()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
ebe3134
| ... | ... | @@ -252,6 +252,7 @@ |
| 252 | 252 | patientsQuery.setNotEnable(riskPatientsQueryRequest.getNotEnable()); |
| 253 | 253 | patientsQuery.setNormal(riskPatientsQueryRequest.getNormal()); |
| 254 | 254 | patientsQuery.setLiveType(riskPatientsQueryRequest.getLiveType()); |
| 255 | + patientsQuery.setFirstCheckId(riskPatientsQueryRequest.getFirstCheckId()); | |
| 255 | 256 | //乡镇卫生院查询条件 |
| 256 | 257 | if (StringUtils.isNotEmpty(riskPatientsQueryRequest.getTownOrgId())) { |
| 257 | 258 | patientsQuery.setTownOrgId(riskPatientsQueryRequest.getTownOrgId()); |
| ... | ... | @@ -314,6 +315,17 @@ |
| 314 | 315 | patientsQuery.setLastCTimeEnd(DateUtil.parseYMD(dates[1])); |
| 315 | 316 | } |
| 316 | 317 | } |
| 318 | + | |
| 319 | + //初诊时间 | |
| 320 | + if (StringUtils.isNotEmpty(riskPatientsQueryRequest.getFirstCheckTime())) { | |
| 321 | + String firstCheckTime = riskPatientsQueryRequest.getFirstCheckTime(); | |
| 322 | + String[] dates = firstCheckTime.split(" - "); | |
| 323 | + patientsQuery.setFirstCheckTimeStart(DateUtil.parseYMD(dates[0])); | |
| 324 | + if (dates.length == 2) { | |
| 325 | + patientsQuery.setFirstCheckTimeEnd(DateUtil.parseYMD(dates[1])); | |
| 326 | + } | |
| 327 | + } | |
| 328 | + | |
| 317 | 329 | //预产期 |
| 318 | 330 | if (StringUtils.isNotEmpty(riskPatientsQueryRequest.getDueDate())) { |
| 319 | 331 | String nextDateStr = riskPatientsQueryRequest.getDueDate(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/RiskPatientsQueryRequest.java
View file @
ebe3134
| ... | ... | @@ -177,6 +177,27 @@ |
| 177 | 177 | //空或者1为正常 2为补录 |
| 178 | 178 | private String normal; |
| 179 | 179 | |
| 180 | + //初诊医生id | |
| 181 | + private String firstCheckId; | |
| 182 | + //初诊时间 | |
| 183 | + private String firstCheckTime; | |
| 184 | + | |
| 185 | + public String getFirstCheckId() { | |
| 186 | + return firstCheckId; | |
| 187 | + } | |
| 188 | + | |
| 189 | + public void setFirstCheckId(String firstCheckId) { | |
| 190 | + this.firstCheckId = firstCheckId; | |
| 191 | + } | |
| 192 | + | |
| 193 | + public String getFirstCheckTime() { | |
| 194 | + return firstCheckTime; | |
| 195 | + } | |
| 196 | + | |
| 197 | + public void setFirstCheckTime(String firstCheckTime) { | |
| 198 | + this.firstCheckTime = firstCheckTime; | |
| 199 | + } | |
| 200 | + | |
| 180 | 201 | public String getNormal() { |
| 181 | 202 | return normal; |
| 182 | 203 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/QuanPatientsResult.java
View file @
ebe3134
| ... | ... | @@ -83,6 +83,27 @@ |
| 83 | 83 | private String si; |
| 84 | 84 | private String wu; |
| 85 | 85 | |
| 86 | + //初诊医生 | |
| 87 | + private String firstCheckDoctor; | |
| 88 | + //初诊时间 | |
| 89 | + private String firstCheckTime; | |
| 90 | + | |
| 91 | + public String getFirstCheckDoctor() { | |
| 92 | + return firstCheckDoctor; | |
| 93 | + } | |
| 94 | + | |
| 95 | + public void setFirstCheckDoctor(String firstCheckDoctor) { | |
| 96 | + this.firstCheckDoctor = firstCheckDoctor; | |
| 97 | + } | |
| 98 | + | |
| 99 | + public String getFirstCheckTime() { | |
| 100 | + return firstCheckTime; | |
| 101 | + } | |
| 102 | + | |
| 103 | + public void setFirstCheckTime(String firstCheckTime) { | |
| 104 | + this.firstCheckTime = firstCheckTime; | |
| 105 | + } | |
| 106 | + | |
| 86 | 107 | public String getCreatedWeek() { |
| 87 | 108 | return createdWeek; |
| 88 | 109 | } |
| ... | ... | @@ -409,6 +430,10 @@ |
| 409 | 430 | } |
| 410 | 431 | if (null != destModel.getDueDate()) { |
| 411 | 432 | setDueDate(DateUtil.getyyyy_MM_dd(destModel.getDueDate())); |
| 433 | + } | |
| 434 | + | |
| 435 | + if (null != destModel.getFirstCheckTime()) { | |
| 436 | + setFirstCheckTime(DateUtil.getyyyy_MM_dd(destModel.getFirstCheckTime())); | |
| 412 | 437 | } |
| 413 | 438 | setFileCode(destModel.getFileCode()); |
| 414 | 439 | setPid(destModel.getPid()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanPatientWorker.java
View file @
ebe3134
| ... | ... | @@ -96,6 +96,21 @@ |
| 96 | 96 | quanPatientsResult.setlName(patients.getBookbuildingDoctor()); |
| 97 | 97 | } |
| 98 | 98 | } |
| 99 | + | |
| 100 | + if (StringUtils.isNotEmpty(patients.getFirstCheckId())) { | |
| 101 | + if (NumberUtils.isNumber(patients.getFirstCheckId())) { | |
| 102 | + Users users = usersService.getUsers(NumberUtils.toInt(patients.getFirstCheckId())); | |
| 103 | + if (users != null) | |
| 104 | + { | |
| 105 | + quanPatientsResult.setFirstCheckDoctor(users.getName()); | |
| 106 | + } | |
| 107 | + } | |
| 108 | + } | |
| 109 | + else | |
| 110 | + { | |
| 111 | + quanPatientsResult.setFirstCheckDoctor(""); | |
| 112 | + } | |
| 113 | + | |
| 99 | 114 | //筛查结果 |
| 100 | 115 | String screenStr = basicConfigService.getScreenResult(patients.getScreenResult()); |
| 101 | 116 | quanPatientsResult.setScreenResult(screenStr); |