Commit a1a69fde7b663133f92c5c64ee771796134241b8
1 parent
9a19bcb621
Exists in
master
and in
6 other branches
update
Showing 5 changed files with 157 additions and 24 deletions
- platform-operate-api/src/main/java/com/lyms/hospitalapi/lhxfy/LhxfyService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/SmnController.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/PatientSyncMysqlFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SmnFacade.java
platform-operate-api/src/main/java/com/lyms/hospitalapi/lhxfy/LhxfyService.java
View file @
a1a69fd
... | ... | @@ -904,24 +904,24 @@ |
904 | 904 | } |
905 | 905 | } |
906 | 906 | break; |
907 | - case "PH02": | |
908 | - if (StringUtils.isNotEmpty(result)) | |
909 | - { | |
910 | - try { | |
911 | - Double ph = Double.parseDouble(result); | |
912 | - premaritalCheckup.setPh( ph < 4 ? "1" : "2"); | |
913 | - }catch (Exception e){} | |
914 | - } | |
915 | - break; | |
916 | - case "PH02_G": | |
917 | - if (StringUtils.isNotEmpty(result) && !StringUtils.isNotEmpty(premaritalCheckup.getPh())) | |
918 | - { | |
919 | - try { | |
920 | - Double ph = Double.parseDouble(result); | |
921 | - premaritalCheckup.setPh( ph < 4 ? "1" : "2"); | |
922 | - }catch (Exception e){} | |
923 | - } | |
924 | - break; | |
907 | +// case "PH02": | |
908 | +// if (StringUtils.isNotEmpty(result)) | |
909 | +// { | |
910 | +// try { | |
911 | +// Double ph = Double.parseDouble(result); | |
912 | +// premaritalCheckup.setPh( ph < 4 ? "1" : "2"); | |
913 | +// }catch (Exception e){} | |
914 | +// } | |
915 | +// break; | |
916 | +// case "PH02_G": | |
917 | +// if (StringUtils.isNotEmpty(result) && !StringUtils.isNotEmpty(premaritalCheckup.getPh())) | |
918 | +// { | |
919 | +// try { | |
920 | +// Double ph = Double.parseDouble(result); | |
921 | +// premaritalCheckup.setPh( ph < 4 ? "1" : "2"); | |
922 | +// }catch (Exception e){} | |
923 | +// } | |
924 | +// break; | |
925 | 925 | case "NZJ": |
926 | 926 | if(StringUtils.isEmpty(premaritalCheckup.getNzj())) { |
927 | 927 | if(result.contains("阳性")) { |
928 | 928 | |
... | ... | @@ -973,15 +973,18 @@ |
973 | 973 | premaritalCheckup.setLhHiv("2"); |
974 | 974 | } |
975 | 975 | |
976 | - /***乙肝表面抗原***/ | |
977 | - if (StringUtils.isEmpty(premaritalCheckup.getHbsag())) { | |
978 | - premaritalCheckup.setHbsag("2"); | |
979 | - } | |
976 | +// /***乙肝表面抗原***/ | |
977 | +// if (StringUtils.isEmpty(premaritalCheckup.getHbsag())) { | |
978 | +// premaritalCheckup.setHbsag("2"); | |
979 | +// } | |
980 | 980 | |
981 | 981 | //尿常规 |
982 | 982 | if (StringUtils.isEmpty(premaritalCheckup.getGlu())) { |
983 | 983 | premaritalCheckup.setGlu("阴性"); |
984 | 984 | } |
985 | + | |
986 | + //PH | |
987 | + premaritalCheckup.setPh("1"); | |
985 | 988 | |
986 | 989 | //检查结果更新到个人档案 |
987 | 990 | Query query2 = Query.query(Criteria.where("id").is(premaritalCheckup.getId())); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/SmnController.java
View file @
a1a69fd
... | ... | @@ -205,5 +205,19 @@ |
205 | 205 | } |
206 | 206 | |
207 | 207 | |
208 | + /** | |
209 | + * 撤销申请 | |
210 | + * @param id | |
211 | + * @param request | |
212 | + * @return | |
213 | + */ | |
214 | + @RequestMapping(method = RequestMethod.GET, value = "/cacnelApply/{id}") | |
215 | + @ResponseBody | |
216 | + @TokenRequired | |
217 | + public BaseResponse cacnelApply(@PathVariable String id, HttpServletRequest request) { | |
218 | + return smnFacade.cacnelApply(id, getUserId(request)); | |
219 | + } | |
220 | + | |
221 | + | |
208 | 222 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
a1a69fd
... | ... | @@ -23,6 +23,7 @@ |
23 | 23 | import com.lyms.platform.operate.web.request.AntExListQueryRequest; |
24 | 24 | import com.lyms.platform.operate.web.result.HighScoreResult; |
25 | 25 | import com.lyms.platform.operate.web.result.MaternalDeliverResult; |
26 | +import com.lyms.platform.operate.web.result.SmnResult; | |
26 | 27 | import com.lyms.platform.operate.web.service.*; |
27 | 28 | import com.lyms.platform.operate.web.service.impl.CervicalCancerServiceImpl; |
28 | 29 | import com.lyms.platform.operate.web.worker.AntexOtherHighRiskWorker; |
... | ... | @@ -5270,6 +5271,8 @@ |
5270 | 5271 | } |
5271 | 5272 | return "success"; |
5272 | 5273 | } |
5274 | + | |
5275 | + | |
5273 | 5276 | @RequestMapping(value = "/handleFmData", method = RequestMethod.GET) |
5274 | 5277 | @ResponseBody |
5275 | 5278 | public String handleFmData(String start,String end) |
... | ... | @@ -5279,8 +5282,8 @@ |
5279 | 5282 | matDeliverQuery.setYn(YnEnums.YES.getId()); |
5280 | 5283 | Date startDate1 = DateUtil.parseYMD(start); |
5281 | 5284 | Date endDate1 = DateUtil.getDayLastSecond(DateUtil.parseYMD(end)); |
5282 | - matDeliverQuery.setCreatedTimeStart(startDate1); | |
5283 | - matDeliverQuery.setCreatedTimeEnd(endDate1); | |
5285 | + matDeliverQuery.setCreatedStart(startDate1); | |
5286 | + matDeliverQuery.setEndStart(endDate1); | |
5284 | 5287 | List<MaternalDeliverModel> maternalDeliverModels = matDeliverService.query(matDeliverQuery); |
5285 | 5288 | if (CollectionUtils.isNotEmpty(maternalDeliverModels)) |
5286 | 5289 | { |
... | ... | @@ -5295,6 +5298,61 @@ |
5295 | 5298 | } |
5296 | 5299 | } |
5297 | 5300 | return sb.toString(); |
5301 | + } | |
5302 | + | |
5303 | + | |
5304 | + @RequestMapping(value = "/exportHandleFmData", method = RequestMethod.GET) | |
5305 | + @ResponseBody | |
5306 | + public void exportHandleFmData(HttpServletResponse response,String start,String end) | |
5307 | + { | |
5308 | + StringBuffer sb = new StringBuffer(); | |
5309 | + MatDeliverQuery matDeliverQuery = new MatDeliverQuery(); | |
5310 | + matDeliverQuery.setYn(YnEnums.YES.getId()); | |
5311 | + Date startDate1 = DateUtil.parseYMD(start); | |
5312 | + Date endDate1 = DateUtil.getDayLastSecond(DateUtil.parseYMD(end)); | |
5313 | + matDeliverQuery.setCreatedStart(startDate1); | |
5314 | + matDeliverQuery.setEndStart(endDate1); | |
5315 | + List<Map<String, Object>> datas = new ArrayList<>(); | |
5316 | + List<MaternalDeliverModel> maternalDeliverModels = matDeliverService.query(matDeliverQuery); | |
5317 | + if (CollectionUtils.isNotEmpty(maternalDeliverModels)) | |
5318 | + { | |
5319 | + for (MaternalDeliverModel maternalDeliverModel : maternalDeliverModels) | |
5320 | + { | |
5321 | + Map<String, Object> data = new HashMap<>(); | |
5322 | + Patients patients = patientsService.findOnePatientById(maternalDeliverModel.getParentId()); | |
5323 | + if (patients == null) | |
5324 | + { | |
5325 | + continue; | |
5326 | + } | |
5327 | + if(StringUtils.isNotEmpty(patients.getSource())) | |
5328 | + { | |
5329 | + patients = patientsService.findOnePatientById(patients.getSource()); | |
5330 | + } | |
5331 | + data.put("name",patients.getUsername()); | |
5332 | + data.put("cardNo",patients.getCardNo()); | |
5333 | + data.put("fmDate",maternalDeliverModel.getDueDate()); | |
5334 | + data.put("buildDate",DateUtil.getyyyy_MM_dd(patients.getBookbuildingDate())); | |
5335 | + data.put("buildHospital",organizationService.getOrganization(Integer.parseInt(patients.getHospitalId())).getName()); | |
5336 | + datas.add(data); | |
5337 | + } | |
5338 | + } | |
5339 | + | |
5340 | + OutputStream out = null; | |
5341 | + try { | |
5342 | + out = response.getOutputStream(); | |
5343 | + Map <String, String> cnames = new LinkedHashMap <>(); | |
5344 | + cnames.put("name", "姓名"); | |
5345 | + cnames.put("cardNo", "身份证号"); | |
5346 | + cnames.put("fmDate", "分娩时间"); | |
5347 | + cnames.put("buildDate", "建档时间"); | |
5348 | + cnames.put("buildHospital", "建档机构"); | |
5349 | + response.setContentType("application/octet-stream"); | |
5350 | + response.setCharacterEncoding("UTF-8"); | |
5351 | + response.setHeader("Content-Disposition", "attachment;fileName=" + "分娩.xls"); | |
5352 | + ExcelUtil.toExcel(out, datas, cnames); | |
5353 | + } catch (IOException e) { | |
5354 | + e.printStackTrace(); | |
5355 | + } | |
5298 | 5356 | } |
5299 | 5357 | |
5300 | 5358 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientSyncMysqlFacade.java
View file @
a1a69fd
... | ... | @@ -3436,6 +3436,48 @@ |
3436 | 3436 | hospitalDate.put("data21",data19); |
3437 | 3437 | //孕产妇系统管理率% |
3438 | 3438 | hospitalDate.put("data22",data19_data2+"%"); |
3439 | + | |
3440 | + Date currentDate = new Date(); | |
3441 | + Date start = DateUtil.addMonth(currentDate, 0); | |
3442 | + Date end = DateUtil.addDay(DateUtil.addMonth(currentDate, -37), 1); | |
3443 | + //年度内儿童接收儿童中医指导的人数 | |
3444 | + int data23=0; | |
3445 | + AggregationOperation match23 = Aggregation.match(Criteria.where("hospitalId").is(hospitalId) | |
3446 | + .and("articleTypes").in(Arrays.asList(1,2,3,4,5)).and("yn") | |
3447 | + .is(YnEnums.YES.getId()).and("birth").gte(end).lte(start)); | |
3448 | + AggregationOperation group23 = Aggregation.group("buildId"); | |
3449 | + Aggregation aggregation23= Aggregation.newAggregation(match23, group23); | |
3450 | + AggregationResults<HashMap> result23 = mongoTemplate.aggregate(aggregation23,"lyms_babycheck", HashMap.class); | |
3451 | + data23=result23.getMappedResults().size(); | |
3452 | + int lastDate23= null==hospitalDate.get("data23")?0:Integer.parseInt(hospitalDate.get("data23").toString()); | |
3453 | + hospitalDate.put("data23",data23+lastDate23); | |
3454 | + | |
3455 | + | |
3456 | + //年度内儿童接收儿童中医指导的人数 | |
3457 | + int data24=0; | |
3458 | + AggregationOperation match24 = Aggregation.match(Criteria.where("hospitalId").is(hospitalId) | |
3459 | + .and("yn") | |
3460 | + .is(YnEnums.YES.getId()).and("birth").gte(end).lte(start)); | |
3461 | + AggregationOperation group24 = Aggregation.group("buildId"); | |
3462 | + Aggregation aggregation24= Aggregation.newAggregation(match24, group24); | |
3463 | + AggregationResults<HashMap> result24 = mongoTemplate.aggregate(aggregation24,"lyms_babycheck", HashMap.class); | |
3464 | + data24=result24.getMappedResults().size(); | |
3465 | + int lastDate24= null==hospitalDate.get("data24")?0:Integer.parseInt(hospitalDate.get("data24").toString()); | |
3466 | + hospitalDate.put("data24",data24+lastDate24); | |
3467 | + | |
3468 | + | |
3469 | + //儿童中医指导率% | |
3470 | + String data23_data24="0.00"; | |
3471 | + if(Integer.parseInt(hospitalDate.get("data24").toString())!=0){ | |
3472 | + float v = (float) Integer.parseInt(hospitalDate.get("data23").toString()) / Integer.parseInt(hospitalDate.get("data24").toString()); | |
3473 | + if(v>=1){ | |
3474 | + data23_data24="100.00"; | |
3475 | + }else { | |
3476 | + data23_data24 = df.format(v * 100); | |
3477 | + } | |
3478 | + } | |
3479 | + hospitalDate.put("data25",data23_data24+"%"); | |
3480 | + | |
3439 | 3481 | } |
3440 | 3482 | |
3441 | 3483 | public void getPublicHygieneServiceCountExport(String provinceId, String cityId, String areaId, String streetId, Date dateTime, HttpServletResponse response) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SmnFacade.java
View file @
a1a69fd
... | ... | @@ -677,5 +677,21 @@ |
677 | 677 | } |
678 | 678 | |
679 | 679 | } |
680 | + | |
681 | + public BaseResponse cacnelApply(String id, Integer userId) { | |
682 | + Query query = Query.query(Criteria.where("id").is(id)); | |
683 | + SmnModel smnModel = mongoTemplate.findOne(query, SmnModel.class); | |
684 | + mongoTemplate.remove(query, SmnModel.class); | |
685 | + smnModel.setStatus(1); | |
686 | + smnModel.setSendDate(null); | |
687 | + smnModel.setSendDoctor(null); | |
688 | + smnModel.setSendHospitalId(null); | |
689 | + smnModel.setMarriage(null); | |
690 | + smnModel.setYbNum(null); | |
691 | + smnModel.setYbType(null); | |
692 | + smnModel.setDiagnose(null); | |
693 | + mongoTemplate.save(smnModel); | |
694 | + return new BaseResponse(); | |
695 | + } | |
680 | 696 | } |