Commit edb6fddffc3f625aa4ba39dfe6b95b2051534f13
1 parent
8074389e4a
Exists in
master
and in
6 other branches
高危等级修改
Showing 5 changed files with 153 additions and 128 deletions
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ViewController.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/ViewFacade.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java
View file @
edb6fdd
| ... | ... | @@ -161,6 +161,26 @@ |
| 161 | 161 | // double tzzs = Double.parseDouble("47.36") / db; |
| 162 | 162 | // System.out.println(tzzs); |
| 163 | 163 | // System.out.println(df.format(tzzs)); |
| 164 | + | |
| 165 | + | |
| 166 | + double kulStart = 1611; | |
| 167 | + int k1 = ((int)kulStart/100)*100; | |
| 168 | + double k2 = kulStart - k1; | |
| 169 | + if (k2 > 50) | |
| 170 | + { | |
| 171 | + k1+=100; | |
| 172 | + } | |
| 173 | + | |
| 174 | + if (k1 < 1500) | |
| 175 | + { | |
| 176 | + k1 = 1500; | |
| 177 | + } | |
| 178 | + else if (k1 > 2800) | |
| 179 | + { | |
| 180 | + k1 = 2800; | |
| 181 | + } | |
| 182 | + System.out.print(k1); | |
| 183 | + | |
| 164 | 184 | } |
| 165 | 185 | |
| 166 | 186 | public static void configData(BasicConfig bs, List<BasicConfig> basicConfigList,Map<String, List<BasicConfig>> slaveBasicConfigMap) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java
View file @
edb6fdd
| ... | ... | @@ -421,24 +421,6 @@ |
| 421 | 421 | } |
| 422 | 422 | |
| 423 | 423 | |
| 424 | - /** | |
| 425 | - * 滦平获取高危信息 | |
| 426 | - * 定制需求开发 | |
| 427 | - * @param cardNo | |
| 428 | - * @param vcCardNo | |
| 429 | - * @param response | |
| 430 | - * @return | |
| 431 | - */ | |
| 432 | - @RequestMapping(method = RequestMethod.GET, value = "/getPatientRiskInfo",produces = "text/xml;charset=utf-8") | |
| 433 | - @ResponseBody | |
| 434 | - public String getPatientRiskInfo(@RequestParam(required = false)String cardNo,@RequestParam(required = false)String vcCardNo, | |
| 435 | - HttpServletResponse response) { | |
| 436 | - //response.setHeader("Content-type", "text/xml;charset=utf-8"); | |
| 437 | - //response.setCharacterEncoding("UTF-8"); | |
| 438 | - return antenatalExaminationFacade.getPatientRiskInfo(cardNo, vcCardNo); | |
| 439 | - } | |
| 440 | - | |
| 441 | - | |
| 442 | 424 | |
| 443 | 425 | |
| 444 | 426 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ViewController.java
View file @
edb6fdd
| ... | ... | @@ -811,8 +811,25 @@ |
| 811 | 811 | @ResponseBody |
| 812 | 812 | public Object getMatDeliverData(@RequestParam(required = true) String id, |
| 813 | 813 | @RequestParam(required = false) String hospital) { |
| 814 | - return viewFacade.getMatDeliverData(id,hospital); | |
| 814 | + return viewFacade.getMatDeliverData(id, hospital); | |
| 815 | 815 | } |
| 816 | + | |
| 817 | + | |
| 818 | + /** | |
| 819 | + * 滦平获取高危信息 | |
| 820 | + * 定制需求开发 | |
| 821 | + * @param cardNo | |
| 822 | + * @param vcCardNo | |
| 823 | + * @param response | |
| 824 | + * @return | |
| 825 | + */ | |
| 826 | + @RequestMapping(method = RequestMethod.GET, value = "/getPatientRiskInfo",produces = "text/xml;charset=utf-8") | |
| 827 | + @ResponseBody | |
| 828 | + public String getPatientRiskInfo(@RequestParam(required = false)String cardNo,@RequestParam(required = false)String vcCardNo, | |
| 829 | + HttpServletResponse response) { | |
| 830 | + return viewFacade.getPatientRiskInfo(cardNo, vcCardNo); | |
| 831 | + } | |
| 832 | + | |
| 816 | 833 | |
| 817 | 834 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
edb6fdd
| ... | ... | @@ -4538,114 +4538,5 @@ |
| 4538 | 4538 | } |
| 4539 | 4539 | |
| 4540 | 4540 | |
| 4541 | - public String getPatientRiskInfo(String cardNo, String vcCardNo) { | |
| 4542 | - Document document = DocumentHelper.createDocument();// 建立document对象,用来操作xml文件 | |
| 4543 | - document.setXMLEncoding("utf-8"); | |
| 4544 | - try { | |
| 4545 | - | |
| 4546 | - Element riskElement = document.addElement("patient");// 建立根节点 | |
| 4547 | - | |
| 4548 | - if (StringUtils.isEmpty(cardNo) && StringUtils.isEmpty(vcCardNo) ) | |
| 4549 | - { | |
| 4550 | - String xml = document.asXML().toString(); | |
| 4551 | - return xml; | |
| 4552 | - } | |
| 4553 | - | |
| 4554 | - PatientsQuery patientsQuery = new PatientsQuery(); | |
| 4555 | - if (StringUtils.isNotEmpty(cardNo)) | |
| 4556 | - { | |
| 4557 | - patientsQuery.setCardNo(cardNo); | |
| 4558 | - } | |
| 4559 | - else if (StringUtils.isNotEmpty(vcCardNo)) | |
| 4560 | - { | |
| 4561 | - patientsQuery.setVcCardNo(vcCardNo); | |
| 4562 | - } | |
| 4563 | - patientsQuery.setYn(YnEnums.YES.getId()); | |
| 4564 | - | |
| 4565 | - List<Patients> list = patientsService.queryPatient(patientsQuery); | |
| 4566 | - if (CollectionUtils.isNotEmpty(list)) { | |
| 4567 | - Patients patients = list.get(0); | |
| 4568 | - | |
| 4569 | - HighScoreResult highScoreResult = findLastRisk(patients.getPid(), false); | |
| 4570 | - AntExQuery antExQuery = new AntExQuery(); | |
| 4571 | - antExQuery.setYn(YnEnums.YES.getId()); | |
| 4572 | - antExQuery.setPid(patients.getPid()); | |
| 4573 | - antExQuery.setStart(DateUtil.addMonth(new Date(), -12)); | |
| 4574 | - // 姓名: VARCHAR2 | |
| 4575 | - // 证件号: VARCHAR2 | |
| 4576 | - // 就诊卡号:VARCHAR2 | |
| 4577 | - // 高危因素:VARCHAR2 | |
| 4578 | - // 产检医生:VARCHAR2 | |
| 4579 | - // 产检孕周:VARCHAR2 | |
| 4580 | - | |
| 4581 | - Element nameElement = riskElement.addElement("username"); | |
| 4582 | - nameElement.addText(patients.getUsername()); | |
| 4583 | - | |
| 4584 | - Element cardNoElement = riskElement.addElement("cardNo"); | |
| 4585 | - cardNoElement.addText(patients.getCardNo()); | |
| 4586 | - | |
| 4587 | - Element vcCardNoElement = riskElement.addElement("vcCardNo"); | |
| 4588 | - vcCardNoElement.addText(patients.getVcCardNo()); | |
| 4589 | - | |
| 4590 | - String checkDoctor = ""; | |
| 4591 | - if (StringUtils.isNotEmpty(patients.getLastCheckEmployeeId()) && FunvCommonUtil.isNumeric(patients.getLastCheckEmployeeId())) { | |
| 4592 | - Users users = usersService.getUsers(Integer.parseInt(patients.getLastCheckEmployeeId())); | |
| 4593 | - if (users != null && users.getYn() == YnEnums.YES.getId()) { | |
| 4594 | - checkDoctor = users.getName(); | |
| 4595 | - } | |
| 4596 | - } | |
| 4597 | - | |
| 4598 | - Element checkDoctorElement = riskElement.addElement("checkDoctor"); | |
| 4599 | - checkDoctorElement.addText(checkDoctor); | |
| 4600 | - | |
| 4601 | - | |
| 4602 | - Element checkWeekElement = riskElement.addElement("checkWeek"); | |
| 4603 | - checkWeekElement.addText(patients.getLastCTime() == null ? "" : DateUtil.getWeekDesc(patients.getLastMenses(), patients.getLastCTime())); | |
| 4604 | - | |
| 4605 | - | |
| 4606 | - List riskList = highScoreResult.getHighRisk(); | |
| 4607 | - if (CollectionUtils.isNotEmpty(riskList)) | |
| 4608 | - { | |
| 4609 | - for (int i = 0 ;i < riskList.size() ; i++) | |
| 4610 | - { | |
| 4611 | - Map<String, String> rmap = (Map<String, String>) riskList.get(i); | |
| 4612 | - String color = rmap.get("color"); | |
| 4613 | - if ("risk_green".equals(color)) | |
| 4614 | - { | |
| 4615 | - color = "绿色"; | |
| 4616 | - } | |
| 4617 | - else if ("risk_orange".equals(color)) | |
| 4618 | - { | |
| 4619 | - color = "橙色"; | |
| 4620 | - } | |
| 4621 | - else if ("risk_yellow".equals(color)) | |
| 4622 | - { | |
| 4623 | - color = "黄色"; | |
| 4624 | - } | |
| 4625 | - else if ("risk_red".equals(color)) | |
| 4626 | - { | |
| 4627 | - color = "红色"; | |
| 4628 | - } | |
| 4629 | - else if ("risk_purple".equals(color)) | |
| 4630 | - { | |
| 4631 | - color = "紫色"; | |
| 4632 | - } | |
| 4633 | - Element riskFactorElement = riskElement.addElement("riskFactor"); | |
| 4634 | - | |
| 4635 | - String name = rmap.get("name"); | |
| 4636 | - Element nElement = riskFactorElement.addElement("riskName"); | |
| 4637 | - nElement.addText(name); | |
| 4638 | - | |
| 4639 | - Element colorElement = riskFactorElement.addElement("color"); | |
| 4640 | - colorElement.addText(color); | |
| 4641 | - } | |
| 4642 | - } | |
| 4643 | - } | |
| 4644 | - return document.asXML(); | |
| 4645 | - } catch (Exception e) { | |
| 4646 | - return document.asXML(); | |
| 4647 | - } | |
| 4648 | - | |
| 4649 | - } | |
| 4650 | 4541 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
edb6fdd
| ... | ... | @@ -29,6 +29,9 @@ |
| 29 | 29 | import org.apache.commons.collections.map.HashedMap; |
| 30 | 30 | import org.apache.commons.lang.StringUtils; |
| 31 | 31 | import org.apache.commons.lang.math.NumberUtils; |
| 32 | +import org.dom4j.Document; | |
| 33 | +import org.dom4j.DocumentHelper; | |
| 34 | +import org.dom4j.Element; | |
| 32 | 35 | import org.springframework.beans.factory.annotation.Autowired; |
| 33 | 36 | import org.springframework.data.domain.Sort; |
| 34 | 37 | import org.springframework.data.mongodb.core.MongoTemplate; |
| ... | ... | @@ -4833,6 +4836,118 @@ |
| 4833 | 4836 | } |
| 4834 | 4837 | |
| 4835 | 4838 | return deliverMap; |
| 4839 | + } | |
| 4840 | + | |
| 4841 | + | |
| 4842 | + | |
| 4843 | + public String getPatientRiskInfo(String cardNo, String vcCardNo) { | |
| 4844 | + Document document = DocumentHelper.createDocument();// 建立document对象,用来操作xml文件 | |
| 4845 | + document.setXMLEncoding("utf-8"); | |
| 4846 | + try { | |
| 4847 | + | |
| 4848 | + Element riskElement = document.addElement("patient");// 建立根节点 | |
| 4849 | + | |
| 4850 | + if (StringUtils.isEmpty(cardNo) && StringUtils.isEmpty(vcCardNo) ) | |
| 4851 | + { | |
| 4852 | + String xml = document.asXML().toString(); | |
| 4853 | + return xml; | |
| 4854 | + } | |
| 4855 | + | |
| 4856 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
| 4857 | + if (StringUtils.isNotEmpty(cardNo)) | |
| 4858 | + { | |
| 4859 | + patientsQuery.setCardNo(cardNo); | |
| 4860 | + } | |
| 4861 | + else if (StringUtils.isNotEmpty(vcCardNo)) | |
| 4862 | + { | |
| 4863 | + patientsQuery.setVcCardNo(vcCardNo); | |
| 4864 | + } | |
| 4865 | + patientsQuery.setYn(YnEnums.YES.getId()); | |
| 4866 | + | |
| 4867 | + List<Patients> list = patientsService.queryPatient(patientsQuery); | |
| 4868 | + if (CollectionUtils.isNotEmpty(list)) { | |
| 4869 | + Patients patients = list.get(0); | |
| 4870 | + | |
| 4871 | + HighScoreResult highScoreResult = antenatalExaminationFacade.findLastRisk(patients.getPid(), false); | |
| 4872 | + AntExQuery antExQuery = new AntExQuery(); | |
| 4873 | + antExQuery.setYn(YnEnums.YES.getId()); | |
| 4874 | + antExQuery.setPid(patients.getPid()); | |
| 4875 | + antExQuery.setStart(DateUtil.addMonth(new Date(), -12)); | |
| 4876 | + // 姓名: VARCHAR2 | |
| 4877 | + // 证件号: VARCHAR2 | |
| 4878 | + // 就诊卡号:VARCHAR2 | |
| 4879 | + // 高危因素:VARCHAR2 | |
| 4880 | + // 产检医生:VARCHAR2 | |
| 4881 | + // 产检孕周:VARCHAR2 | |
| 4882 | + | |
| 4883 | + Element nameElement = riskElement.addElement("username"); | |
| 4884 | + nameElement.addText(patients.getUsername()); | |
| 4885 | + | |
| 4886 | + Element cardNoElement = riskElement.addElement("cardNo"); | |
| 4887 | + cardNoElement.addText(patients.getCardNo()); | |
| 4888 | + | |
| 4889 | + Element vcCardNoElement = riskElement.addElement("vcCardNo"); | |
| 4890 | + vcCardNoElement.addText(patients.getVcCardNo()); | |
| 4891 | + | |
| 4892 | + String checkDoctor = ""; | |
| 4893 | + if (StringUtils.isNotEmpty(patients.getLastCheckEmployeeId()) && FunvCommonUtil.isNumeric(patients.getLastCheckEmployeeId())) { | |
| 4894 | + Users users = usersService.getUsers(Integer.parseInt(patients.getLastCheckEmployeeId())); | |
| 4895 | + if (users != null && users.getYn() == YnEnums.YES.getId()) { | |
| 4896 | + checkDoctor = users.getName(); | |
| 4897 | + } | |
| 4898 | + } | |
| 4899 | + | |
| 4900 | + Element checkDoctorElement = riskElement.addElement("checkDoctor"); | |
| 4901 | + checkDoctorElement.addText(checkDoctor); | |
| 4902 | + | |
| 4903 | + | |
| 4904 | + Element checkWeekElement = riskElement.addElement("checkWeek"); | |
| 4905 | + checkWeekElement.addText(patients.getLastCTime() == null ? "" : DateUtil.getWeekDesc(patients.getLastMenses(), patients.getLastCTime())); | |
| 4906 | + | |
| 4907 | + | |
| 4908 | + List riskList = highScoreResult.getHighRisk(); | |
| 4909 | + if (CollectionUtils.isNotEmpty(riskList)) | |
| 4910 | + { | |
| 4911 | + for (int i = 0 ;i < riskList.size() ; i++) | |
| 4912 | + { | |
| 4913 | + Map<String, String> rmap = (Map<String, String>) riskList.get(i); | |
| 4914 | + String color = rmap.get("color"); | |
| 4915 | + if ("risk_green".equals(color)) | |
| 4916 | + { | |
| 4917 | + color = "绿色"; | |
| 4918 | + } | |
| 4919 | + else if ("risk_orange".equals(color)) | |
| 4920 | + { | |
| 4921 | + color = "橙色"; | |
| 4922 | + } | |
| 4923 | + else if ("risk_yellow".equals(color)) | |
| 4924 | + { | |
| 4925 | + color = "黄色"; | |
| 4926 | + } | |
| 4927 | + else if ("risk_red".equals(color)) | |
| 4928 | + { | |
| 4929 | + color = "红色"; | |
| 4930 | + } | |
| 4931 | + else if ("risk_purple".equals(color)) | |
| 4932 | + { | |
| 4933 | + color = "紫色"; | |
| 4934 | + } | |
| 4935 | + Element riskFactorElement = riskElement.addElement("riskFactor"); | |
| 4936 | + | |
| 4937 | + String name = rmap.get("name"); | |
| 4938 | + Element nElement = riskFactorElement.addElement("riskName"); | |
| 4939 | + nElement.addText(name); | |
| 4940 | + | |
| 4941 | + Element colorElement = riskFactorElement.addElement("color"); | |
| 4942 | + colorElement.addText(color); | |
| 4943 | + } | |
| 4944 | + } | |
| 4945 | + } | |
| 4946 | + return document.asXML(); | |
| 4947 | + } catch (Exception e) { | |
| 4948 | + return document.asXML(); | |
| 4949 | + } | |
| 4950 | + | |
| 4836 | 4951 | } |
| 4837 | 4952 | } |