Commit c27b10a39abb55fb8d385228dd7a4f5242697cb0
1 parent
7ce3711c88
Exists in
master
and in
6 other branches
分娩直接创建儿童档案
Showing 8 changed files with 169 additions and 72 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/BasicConfigServiceTest.java
- platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyHisService.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/MatDeliverFacade.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/service/impl/BabyEvaluationCriterionServiceImpl.java
- platform-operate-api/src/main/resources/config.properties
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/BasicConfigServiceTest.java
View file @
c27b10a
... | ... | @@ -7108,7 +7108,35 @@ |
7108 | 7108 | } |
7109 | 7109 | } |
7110 | 7110 | |
7111 | + public static void dic() | |
7112 | + { | |
7113 | + ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:/spring/applicationContext_biz_patient1.xml"); | |
7114 | + MongoTemplate mongoTemplate | |
7115 | + = (MongoTemplate) applicationContext.getBean("mongoTemplate"); | |
7116 | + mongoTemplate.getDb().authenticate("platform", "platform123".toCharArray()); | |
7117 | + | |
7118 | + | |
7119 | + try { | |
7120 | + List<String> sets = FileUtils.readLines(new File("E:\\mycelipse_workspace\\Test\\lib\\IKAnalyzer2012_u6\\IKAnalyzer2012_u6\\org\\wltea\\analyzer\\dic\\main2012.dic"),"utf-8"); | |
7121 | + List<BasicConfig> list = mongoTemplate.find(Query.query(Criteria.where("typeId").is("b7ea005c-dfac-4c2a-bdae-25239b3f44fd")), BasicConfig.class); | |
7122 | + for (BasicConfig basicConfig : list) | |
7123 | + { | |
7124 | + if (!sets.contains(basicConfig.getName())) | |
7125 | + { | |
7126 | + System.out.println(basicConfig.getName()); | |
7127 | + } | |
7128 | + } | |
7129 | + } catch (IOException e) { | |
7130 | + e.printStackTrace(); | |
7131 | + } | |
7132 | + | |
7133 | + | |
7134 | + | |
7135 | + } | |
7136 | + | |
7137 | + | |
7111 | 7138 | public static void main(String[] args) { |
7139 | + dic(); | |
7112 | 7140 | // handle(); |
7113 | 7141 | // getData(); |
7114 | 7142 | //weightWeek("F:\\体重与营养管理\\体重与营养管理第三版(北方)改标红“、冰淇淋”-晓萌.xls"); |
7115 | 7143 | |
7116 | 7144 | |
... | ... | @@ -7165,9 +7193,14 @@ |
7165 | 7193 | // saveDdb1("F:\\体重与营养管理\\低蛋白.xls"); |
7166 | 7194 | |
7167 | 7195 | // saveBabyHeartStandardModel("C:\\Users\\Administrator\\Desktop\\儿心量表打印添加内容.xls");//儿心量表标准 |
7168 | - saveHightWeightInfo("F:\体重与营养管理\定制高危糖尿病一周食谱(1)(1).xls");//定制高危糖尿病一周食谱 | |
7196 | + //saveHightWeightInfo("F:\体重与营养管理\定制高危糖尿病一周食谱(1)(1).xls");//定制高危糖尿病一周食谱 | |
7169 | 7197 | |
7198 | + | |
7199 | + | |
7200 | + | |
7170 | 7201 | } |
7202 | + | |
7203 | + | |
7171 | 7204 | |
7172 | 7205 | |
7173 | 7206 | } |
platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyHisService.java
View file @
c27b10a
... | ... | @@ -993,54 +993,54 @@ |
993 | 993 | public Map<String, Object> queryHisBabyDiagnosis2(String blNo) { |
994 | 994 | |
995 | 995 | Map<String, Object> map = new HashMap<>(); |
996 | - StringBuffer sb = new StringBuffer(); | |
997 | - if (StringUtils.isNotBlank(blNo)) { | |
998 | - Connection conn = com.lyms.hospitalapi.qhdfy.ConnTools.makeHisConnection(); | |
999 | - QueryRunner queryRunner = new QueryRunner(); | |
1000 | - String sql = "select syxh from VW_LYMS_XSE_BRSYK where blh = '" + blNo + "' and cyrq is not null and ksdm ='2545' and bqdm = '206' "; | |
1001 | - try { | |
1002 | - List<BabyDischargeDiagnosisModel> list = queryRunner.query(conn,sql , new BeanListHandler<BabyDischargeDiagnosisModel>(BabyDischargeDiagnosisModel.class)); | |
1003 | - if (CollectionUtils.isNotEmpty(list)) { | |
1004 | - for (BabyDischargeDiagnosisModel info : list) { | |
1005 | - if(info == null && StringUtils.isEmpty(info.getSyxh())){ | |
1006 | - continue; | |
1007 | - } | |
1008 | - String sqlstr = "select ZDMC as cyzdmc from jhemr.V_DIAGNOSIS_LYMS where syxh='"+info.getSyxh()+"' ORDER BY ZDRQ desc "; | |
1009 | - Connection conn2 = null; | |
1010 | - try { | |
1011 | - conn2 = ConnTools.qhdzdConnection(); | |
1012 | - QueryRunner queryRunner2 = new QueryRunner(); | |
1013 | - List<BabyDischargeDiagnosisModel> listxq = queryRunner2.query(conn2, sqlstr, new BeanListHandler<BabyDischargeDiagnosisModel>(BabyDischargeDiagnosisModel.class)); | |
1014 | - String cyzdxq = ""; | |
1015 | - for (int j = 0; j < listxq.size(); j++) { | |
1016 | - BabyDischargeDiagnosisModel babyDischargeDiagnosisModel1 = listxq.get(j); | |
1017 | - if(babyDischargeDiagnosisModel1 !=null && StringUtils.isNotEmpty(babyDischargeDiagnosisModel1.getCyzdmc())){ | |
1018 | - if((listxq.size()-1) != j){ | |
1019 | - cyzdxq += babyDischargeDiagnosisModel1.getCyzdmc()+","; | |
1020 | - }else { | |
1021 | - cyzdxq += babyDischargeDiagnosisModel1.getCyzdmc()+" "; | |
1022 | - } | |
1023 | - } | |
1024 | - } | |
1025 | - if(StringUtils.isNotEmpty(cyzdxq)){ | |
1026 | - map.put("diagnosisItem", cyzdxq); | |
1027 | - } | |
1028 | - } catch (SQLException e) { | |
1029 | - e.printStackTrace(); | |
1030 | - }finally { | |
1031 | - DbUtils.closeQuietly(conn2); | |
1032 | - } | |
1033 | - | |
1034 | - } | |
1035 | - | |
1036 | - | |
1037 | - } | |
1038 | - DbUtils.closeQuietly(conn); | |
1039 | - } catch (SQLException e) { | |
1040 | - DbUtils.closeQuietly(conn); | |
1041 | - e.printStackTrace(); | |
1042 | - } | |
1043 | - } | |
996 | +// StringBuffer sb = new StringBuffer(); | |
997 | +// if (StringUtils.isNotBlank(blNo)) { | |
998 | +// Connection conn = com.lyms.hospitalapi.qhdfy.ConnTools.makeHisConnection(); | |
999 | +// QueryRunner queryRunner = new QueryRunner(); | |
1000 | +// String sql = "select syxh from VW_LYMS_XSE_BRSYK where blh = '" + blNo + "' and cyrq is not null and ksdm ='2545' and bqdm = '206' "; | |
1001 | +// try { | |
1002 | +// List<BabyDischargeDiagnosisModel> list = queryRunner.query(conn,sql , new BeanListHandler<BabyDischargeDiagnosisModel>(BabyDischargeDiagnosisModel.class)); | |
1003 | +// if (CollectionUtils.isNotEmpty(list)) { | |
1004 | +// for (BabyDischargeDiagnosisModel info : list) { | |
1005 | +// if(info == null && StringUtils.isEmpty(info.getSyxh())){ | |
1006 | +// continue; | |
1007 | +// } | |
1008 | +// String sqlstr = "select ZDMC as cyzdmc from jhemr.V_DIAGNOSIS_LYMS where syxh='"+info.getSyxh()+"' ORDER BY ZDRQ desc "; | |
1009 | +// Connection conn2 = null; | |
1010 | +// try { | |
1011 | +// conn2 = ConnTools.qhdzdConnection(); | |
1012 | +// QueryRunner queryRunner2 = new QueryRunner(); | |
1013 | +// List<BabyDischargeDiagnosisModel> listxq = queryRunner2.query(conn2, sqlstr, new BeanListHandler<BabyDischargeDiagnosisModel>(BabyDischargeDiagnosisModel.class)); | |
1014 | +// String cyzdxq = ""; | |
1015 | +// for (int j = 0; j < listxq.size(); j++) { | |
1016 | +// BabyDischargeDiagnosisModel babyDischargeDiagnosisModel1 = listxq.get(j); | |
1017 | +// if(babyDischargeDiagnosisModel1 !=null && StringUtils.isNotEmpty(babyDischargeDiagnosisModel1.getCyzdmc())){ | |
1018 | +// if((listxq.size()-1) != j){ | |
1019 | +// cyzdxq += babyDischargeDiagnosisModel1.getCyzdmc()+","; | |
1020 | +// }else { | |
1021 | +// cyzdxq += babyDischargeDiagnosisModel1.getCyzdmc()+" "; | |
1022 | +// } | |
1023 | +// } | |
1024 | +// } | |
1025 | +// if(StringUtils.isNotEmpty(cyzdxq)){ | |
1026 | +// map.put("diagnosisItem", cyzdxq); | |
1027 | +// } | |
1028 | +// } catch (SQLException e) { | |
1029 | +// e.printStackTrace(); | |
1030 | +// }finally { | |
1031 | +// DbUtils.closeQuietly(conn2); | |
1032 | +// } | |
1033 | +// | |
1034 | +// } | |
1035 | +// | |
1036 | +// | |
1037 | +// } | |
1038 | +// DbUtils.closeQuietly(conn); | |
1039 | +// } catch (SQLException e) { | |
1040 | +// DbUtils.closeQuietly(conn); | |
1041 | +// e.printStackTrace(); | |
1042 | +// } | |
1043 | +// } | |
1044 | 1044 | return map; |
1045 | 1045 | } |
1046 | 1046 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java
View file @
c27b10a
... | ... | @@ -59,10 +59,7 @@ |
59 | 59 | private QhdfyHisService qhdfyHisService; |
60 | 60 | @Autowired |
61 | 61 | private DzfyHisService dzfyHisService; |
62 | - @Autowired | |
63 | - private DzfyFmService dzfyFmService; | |
64 | - @Autowired | |
65 | - private LlfyFmService llfyFmService; | |
62 | + | |
66 | 63 | @Autowired |
67 | 64 | private ZcfyFmService zcfyFmService; |
68 | 65 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ViewController.java
View file @
c27b10a
... | ... | @@ -134,7 +134,7 @@ |
134 | 134 | @RequestParam("parentId") String parentId) { |
135 | 135 | System.out.println("------------------------------------------------------"); |
136 | 136 | System.out.println("---startDate----"+startDate +"------endDate----"+endDate+"------parentId----"+parentId ); |
137 | - BaseObjectResponse br = antenatalExaminationFacade.AntExChuFuZSyncXtlc(startDate, endDate,parentId); | |
137 | + BaseObjectResponse br = antenatalExaminationFacade.AntExChuFuZSyncXtlc(startDate, endDate, parentId); | |
138 | 138 | return br; |
139 | 139 | } |
140 | 140 | |
... | ... | @@ -986,7 +986,7 @@ |
986 | 986 | @RequestMapping(value = "/getBabyCheckMessage", method = RequestMethod.GET) |
987 | 987 | @ResponseBody |
988 | 988 | public BaseObjectResponse getBabyCheckMessage(@RequestParam String buildId,@RequestParam String checkDate) { |
989 | - return viewFacade.getBabyCheckMessage(buildId,checkDate); | |
989 | + return viewFacade.getBabyCheckMessage(buildId, checkDate); | |
990 | 990 | } |
991 | 991 | |
992 | 992 | /** |
... | ... | @@ -1154,7 +1154,21 @@ |
1154 | 1154 | @TokenRequired |
1155 | 1155 | public BaseResponse checkReport(@RequestParam(required = false) List<String> antex, @RequestParam(required = false) String antexc,HttpServletRequest request) { |
1156 | 1156 | |
1157 | - return viewFacade.checkReport(antex, antexc,getUserId(request)); | |
1157 | + return viewFacade.checkReport(antex, antexc, getUserId(request)); | |
1158 | + | |
1159 | + } | |
1160 | + | |
1161 | + | |
1162 | + /** | |
1163 | + * 秦皇岛妇幼通过身份证查询当天是否有体重记录 | |
1164 | + * @param cardNo | |
1165 | + * @return | |
1166 | + */ | |
1167 | + @RequestMapping(value = "/getCurrentWeight", method = RequestMethod.GET) | |
1168 | + @ResponseBody | |
1169 | + public String getCurrentWeight(@RequestParam(required = true) String cardNo) { | |
1170 | + | |
1171 | + return viewFacade.getCurrentWeight(cardNo); | |
1158 | 1172 | |
1159 | 1173 | } |
1160 | 1174 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
c27b10a
... | ... | @@ -943,11 +943,12 @@ |
943 | 943 | } |
944 | 944 | } |
945 | 945 | } |
946 | - } else { | |
947 | - if (CollectionUtils.isNotEmpty(updateBaby) && updateBaby.get(0).getDataStatus() == null) { | |
948 | - babyModel1.setDataStatus(1); | |
949 | - } | |
950 | 946 | } |
947 | +// else { | |
948 | +// if (CollectionUtils.isNotEmpty(updateBaby) && updateBaby.get(0).getDataStatus() == null) { | |
949 | +// babyModel1.setDataStatus(1); | |
950 | +// } | |
951 | +// } | |
951 | 952 | } else { |
952 | 953 | babyModel1.setYn(YnEnums.NO.getId()); |
953 | 954 | if (CollectionUtils.isNotEmpty(updateBaby)) { |
... | ... | @@ -1194,7 +1195,6 @@ |
1194 | 1195 | babyModel.setDeliverOrg(deliverAddRequest.getFmHospital()); |
1195 | 1196 | baby.setId(baby1.getId()); |
1196 | 1197 | babyModel.setBirth(DateUtil.parseYMDHM(baby.getDueTime())); |
1197 | - babyModel.setYn(YnEnums.YES.getId()); | |
1198 | 1198 | babyModel.setDueType(fmfs); |
1199 | 1199 | babyModel.setVisitstatus(VisitStatusEnums.UNVISIT.getId()); |
1200 | 1200 | babyModel.setAsphyxiaM(baby1.getAsphyxiaM()); |
... | ... | @@ -1218,7 +1218,7 @@ |
1218 | 1218 | if (CollectionUtils.isNotEmpty(babyName)) { |
1219 | 1219 | babyModel.setName(userName + babyName.get(i)); |
1220 | 1220 | } |
1221 | - babyModel.setYn(YnEnums.NO.getId()); | |
1221 | + //babyModel.setYn(YnEnums.NO.getId()); | |
1222 | 1222 | |
1223 | 1223 | if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(babyModel.getMcertNo())) { |
1224 | 1224 | |
... | ... | @@ -1306,9 +1306,9 @@ |
1306 | 1306 | //babyModel.setYn(YnEnums.YES.getId()); |
1307 | 1307 | |
1308 | 1308 | |
1309 | - //改成这种是因为需求要求 分娩自动流转儿童信息,建档时间为空,医生确认建档 | |
1310 | - babyModel.setYn(YnEnums.NO.getId()); | |
1311 | - babyModel.setDataStatus(1); | |
1309 | + //改成这种是因为需求要求 分娩自动流转儿童信息,建档时间为空,医生确认建档 20211014 秦皇岛又改会来直接建档 | |
1310 | + babyModel.setYn(YnEnums.YES.getId()); | |
1311 | + babyModel.setDataStatus(0); | |
1312 | 1312 | |
1313 | 1313 | // PersonModel personModel = new PersonModel(); |
1314 | 1314 | // personModel.setType(2); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
c27b10a
... | ... | @@ -3151,11 +3151,21 @@ |
3151 | 3151 | // 血压 |
3152 | 3152 | String ssy = ""; |
3153 | 3153 | String szy = ""; |
3154 | - Map <String, String> chBpMap = JsonUtil.getMap(data.getBp()); | |
3155 | - if (MapUtils.isNotEmpty(chBpMap)) { | |
3156 | - ssy = chBpMap.get("ssy"); | |
3157 | - szy = chBpMap.get("szy"); | |
3154 | + try { | |
3155 | + Map <String, String> chBpMap = JsonUtil.getMap(data.getBp()); | |
3156 | + if (MapUtils.isNotEmpty(chBpMap)) { | |
3157 | + ssy = chBpMap.get("ssy"); | |
3158 | + szy = chBpMap.get("szy"); | |
3159 | + } | |
3160 | + }catch (Exception e) { | |
3161 | + List<Map> list = JsonUtil.jsonToList(data.getBp(),Map.class); | |
3162 | + if (list != null && MapUtils.isNotEmpty(list.get(0))) { | |
3163 | + ssy = String.valueOf(list.get(0).get("ssy")); | |
3164 | + szy = String.valueOf(list.get(0).get("szy")); | |
3165 | + } | |
3166 | + ExceptionUtils.catchException(e,"getBp error."); | |
3158 | 3167 | } |
3168 | + | |
3159 | 3169 | map.put("bp", UnitUtils.unitSplice(ssy + "/" + szy, UnitConstants.MMHG)); |
3160 | 3170 | |
3161 | 3171 | String gongGao = ""; |
... | ... | @@ -8662,6 +8672,49 @@ |
8662 | 8672 | } |
8663 | 8673 | |
8664 | 8674 | return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(results); |
8675 | + } | |
8676 | + | |
8677 | + public String getCurrentWeight(String cardNo) { | |
8678 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
8679 | + patientsQuery.setYn(YnEnums.YES.getId()); | |
8680 | + patientsQuery.setExtEnable(false); | |
8681 | + patientsQuery.setBuildTypeNot(1); | |
8682 | + patientsQuery.setHospitalId("216"); | |
8683 | + patientsQuery.setCardNo(cardNo); | |
8684 | + patientsQuery.setType(1); | |
8685 | + List<Patients> patientses = patientsService.queryPatient1(patientsQuery, "created"); | |
8686 | + if (CollectionUtils.isNotEmpty(patientses)) | |
8687 | + { | |
8688 | + Patients pat = patientses.get(0); | |
8689 | + String pid = pat.getPid(); | |
8690 | + | |
8691 | + List<AntenatalExaminationModel> antenatalExaminationModels = mongoTemplate.find(Query.query(Criteria.where("pid").is(pid).and("yn"). | |
8692 | + is(YnEnums.YES.getId()).and("hospitalId").is("216")), AntenatalExaminationModel.class); | |
8693 | + if (CollectionUtils.isNotEmpty(antenatalExaminationModels)) | |
8694 | + { | |
8695 | + for (AntenatalExaminationModel antenatalExaminationModel : antenatalExaminationModels) | |
8696 | + { | |
8697 | + if (antenatalExaminationModel != null && | |
8698 | + DateUtil.getyyyy_MM_dd(new Date()).equals(DateUtil.getyyyy_MM_dd(antenatalExaminationModel.getCheckDate())) && antenatalExaminationModel.getWeight() != null) | |
8699 | + { | |
8700 | + return "1"; | |
8701 | + } | |
8702 | + } | |
8703 | + } | |
8704 | + else | |
8705 | + { | |
8706 | + AntExChuModel antExChuModel = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(pid).and("yn"). | |
8707 | + is(YnEnums.YES.getId()).and("hospitalId").is("216")), AntExChuModel.class); | |
8708 | + | |
8709 | + if (antExChuModel != null && DateUtil.getyyyy_MM_dd(new Date()).equals(DateUtil.getyyyy_MM_dd(antExChuModel.getCheckTime())) | |
8710 | + && StringUtils.isNotEmpty(antExChuModel.getWeight())) | |
8711 | + { | |
8712 | + return "1"; | |
8713 | + } | |
8714 | + } | |
8715 | + | |
8716 | + } | |
8717 | + return "0"; | |
8665 | 8718 | } |
8666 | 8719 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEvaluationCriterionServiceImpl.java
View file @
c27b10a
... | ... | @@ -396,7 +396,7 @@ |
396 | 396 | LinkedList<Object> objects1 = new LinkedList<>(); |
397 | 397 | String s1z = ""; |
398 | 398 | if (double1Z != 0.00 && checkMonth != 0) { |
399 | - double1Dq = (int) (double1Z / checkMonth * 100); | |
399 | + double1Dq = (int) (double1Z / checkMonth * 100); //checkMonth 计算出小数的值 | |
400 | 400 | s1z = double1Z.toString(); |
401 | 401 | } |
402 | 402 | objects1.add(s1z); |
... | ... | @@ -824,7 +824,7 @@ |
824 | 824 | BabyEvaluationCriterionModel evaluationCriterionModel = mongoTemplate.findOne(Query.query(Criteria.where("_id").is(configId)), BabyEvaluationCriterionModel.class); |
825 | 825 | val += evaluationCriterionModel.getProjectVal(); |
826 | 826 | } |
827 | - paramModel.setDevelopmentQuotient((int)(val/5/monthDay*100)); | |
827 | + paramModel.setDevelopmentQuotient((int)(val/5/monthDay*100)); //单项智龄(月)总的和 | |
828 | 828 | |
829 | 829 | Integer month = DateUtil.getBabyMonthAge1(paramModel.getBirth(), new Date()); |
830 | 830 | int [] months = null; |
platform-operate-api/src/main/resources/config.properties
View file @
c27b10a
... | ... | @@ -52,7 +52,7 @@ |
52 | 52 | area_url=http://localhost:8082 |
53 | 53 | |
54 | 54 | #隆化妇幼同步his的地址 |
55 | -lhfy_his_url=http://10.0.32.141:8087/Default.asmx/HosRegister | |
55 | +lhfy_his_url=http://lhhis-chengde-api.healthbaby.com.cn:8090/Default.asmx/HosRegister | |
56 | 56 | #隆化妇幼获取lis的url |
57 | 57 | lhfy_lis_url=https://lhfy-chengde-api.healthbaby.com.cn:12356/lis/getLhLisById |