Commit ea39a01664a80a8abba5f5582db51bc90ec99940
Exists in
master
and in
6 other branches
Merge remote-tracking branch 'origin/master'
Showing 10 changed files
- platform-dal/src/main/java/com/lyms/platform/pojo/BabyModel.java
- 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/hospitalapi/Cdfy/CdfyHisService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PregnantBuildController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LisFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyBookbuildingAddRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyPageResult.java
platform-dal/src/main/java/com/lyms/platform/pojo/BabyModel.java
View file @
ea39a01
| ... | ... | @@ -226,6 +226,18 @@ |
| 226 | 226 | //病历号(住院号) |
| 227 | 227 | private String blNo; |
| 228 | 228 | |
| 229 | + | |
| 230 | + //档案编号 滦平需求 | |
| 231 | + private String fileCode; | |
| 232 | + | |
| 233 | + public String getFileCode() { | |
| 234 | + return fileCode; | |
| 235 | + } | |
| 236 | + | |
| 237 | + public void setFileCode(String fileCode) { | |
| 238 | + this.fileCode = fileCode; | |
| 239 | + } | |
| 240 | + | |
| 229 | 241 | public String getSource() { |
| 230 | 242 | return source; |
| 231 | 243 | } |
platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java
View file @
ea39a01
| ... | ... | @@ -338,6 +338,17 @@ |
| 338 | 338 | //建档天数 |
| 339 | 339 | private Integer buildDays; |
| 340 | 340 | |
| 341 | + //承德 病人id | |
| 342 | + private String blNum; | |
| 343 | + | |
| 344 | + public String getBlNum() { | |
| 345 | + return blNum; | |
| 346 | + } | |
| 347 | + | |
| 348 | + public void setBlNum(String blNum) { | |
| 349 | + this.blNum = blNum; | |
| 350 | + } | |
| 351 | + | |
| 341 | 352 | public Integer getBuildDays() { |
| 342 | 353 | return buildDays; |
| 343 | 354 | } |
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
ea39a01
| ... | ... | @@ -535,6 +535,17 @@ |
| 535 | 535 | //孕妇证件类型 |
| 536 | 536 | private String pcerteTypeId; |
| 537 | 537 | |
| 538 | + | |
| 539 | + private String blNum; | |
| 540 | + | |
| 541 | + public String getBlNum() { | |
| 542 | + return blNum; | |
| 543 | + } | |
| 544 | + | |
| 545 | + public void setBlNum(String blNum) { | |
| 546 | + this.blNum = blNum; | |
| 547 | + } | |
| 548 | + | |
| 538 | 549 | public boolean isNullrFactor() { |
| 539 | 550 | return isNullrFactor; |
| 540 | 551 | } |
| ... | ... | @@ -1207,6 +1218,11 @@ |
| 1207 | 1218 | if (null != pIds) { |
| 1208 | 1219 | condition = condition.and("pid", pIds, MongoOper.IN); |
| 1209 | 1220 | } |
| 1221 | + | |
| 1222 | + if (null != blNum) { | |
| 1223 | + condition = condition.and("blNum", blNum, MongoOper.IS); | |
| 1224 | + } | |
| 1225 | + | |
| 1210 | 1226 | Criteria c1 = null; |
| 1211 | 1227 | |
| 1212 | 1228 | if (null != queryNo) { |
| ... | ... | @@ -1234,7 +1250,6 @@ |
| 1234 | 1250 | c1 = c.orCondition(new MongoCondition[]{con1, con3, con5}).getCriteria(); |
| 1235 | 1251 | } |
| 1236 | 1252 | } |
| 1237 | - | |
| 1238 | 1253 | if (null != phoneOrCert) { |
| 1239 | 1254 | MongoCondition c = MongoCondition.newInstance(); |
| 1240 | 1255 | MongoCondition con1 = MongoCondition.newInstance("phone", phoneOrCert, MongoOper.IS); |
platform-operate-api/src/main/java/com/lyms/hospitalapi/Cdfy/CdfyHisService.java
View file @
ea39a01
| ... | ... | @@ -82,12 +82,10 @@ |
| 82 | 82 | String url = "http://10.0.200.2:9090/his/getCdFyIdByVcCardNo?vcCardNo="+vcCardNo; |
| 83 | 83 | DefaultHttpClient client = new DefaultHttpClient(new PoolingClientConnectionManager()); |
| 84 | 84 | try { |
| 85 | - | |
| 86 | 85 | HttpPost httpPost = new HttpPost(url); |
| 87 | 86 | /*StringEntity se = new StringEntity(vcCardNo,"UTF-8"); |
| 88 | 87 | se.setContentType("text/json"); |
| 89 | 88 | httpPost.setEntity(se);*/ |
| 90 | - | |
| 91 | 89 | //执行post请求 |
| 92 | 90 | HttpResponse respon = client.execute(httpPost); |
| 93 | 91 | if(respon != null && respon.getStatusLine().getStatusCode() == 200){ |
| 94 | 92 | |
| 95 | 93 | |
| 96 | 94 | |
| 97 | 95 | |
| 98 | 96 | |
| ... | ... | @@ -98,21 +96,19 @@ |
| 98 | 96 | if(obj!=null){ |
| 99 | 97 | id = obj.getString("id"); |
| 100 | 98 | } |
| 101 | - | |
| 102 | - return id; | |
| 99 | + return id == null ? vcCardNo : id; | |
| 103 | 100 | }else{ |
| 104 | 101 | System.out.println("传输失败!"); |
| 105 | 102 | } |
| 106 | - | |
| 107 | - | |
| 108 | 103 | }catch (Exception e){ |
| 109 | - e.printStackTrace(); | |
| 104 | + ExceptionUtils.catchException(e,"承德就诊卡号获取病人id异常"); | |
| 105 | + return vcCardNo; | |
| 110 | 106 | } |
| 107 | + finally { | |
| 108 | + client.close(); | |
| 109 | + } | |
| 111 | 110 | |
| 112 | - | |
| 113 | 111 | return vcCardNo; |
| 114 | - | |
| 115 | - | |
| 116 | 112 | } |
| 117 | 113 | |
| 118 | 114 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PregnantBuildController.java
View file @
ea39a01
| ... | ... | @@ -39,23 +39,12 @@ |
| 39 | 39 | @Controller |
| 40 | 40 | public class PregnantBuildController extends BaseController{ |
| 41 | 41 | |
| 42 | - @Autowired | |
| 43 | - private YunBookbuildingService yunBookbuildingService; | |
| 44 | 42 | |
| 45 | 43 | @Autowired |
| 46 | 44 | private BookbuildingFacade bookbuildingFacade; |
| 47 | 45 | |
| 48 | 46 | @Autowired |
| 49 | 47 | private AntenatalExaminationFacade antenatalExaminationFacade; |
| 50 | - | |
| 51 | - @Autowired | |
| 52 | - private CouponService couponService; | |
| 53 | - | |
| 54 | - @Autowired | |
| 55 | - private MongoTemplate mongoTemplate; | |
| 56 | - | |
| 57 | - @Autowired | |
| 58 | - private AutoMatchFacade autoMatchFacade; | |
| 59 | 48 | |
| 60 | 49 | |
| 61 | 50 | /** |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
ea39a01
| ... | ... | @@ -1028,6 +1028,7 @@ |
| 1028 | 1028 | private BabyModel getBabyModel(BabyBookbuildingAddRequest b,boolean isAdd) { |
| 1029 | 1029 | // hujiaqi添加了一个字段,判断是插入还是更新,如果是更新,就不更新birth字段 |
| 1030 | 1030 | BabyModel bm = new BabyModel(); |
| 1031 | + bm.setFileCode(b.getFileCode()); | |
| 1031 | 1032 | bm.setBabyHighRiskReason(b.getBabyHighRiskReason()); |
| 1032 | 1033 | bm.setmHighRiskReason(b.getmHighRiskReason()); |
| 1033 | 1034 | bm.setYn(YnEnums.YES.getId()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
ea39a01
| 1 | 1 | package com.lyms.platform.operate.web.facade; |
| 2 | 2 | |
| 3 | +import com.lyms.hospitalapi.Cdfy.CdfyHisService; | |
| 3 | 4 | import com.lyms.hospitalapi.dzfy.DzfyHisService; |
| 4 | 5 | import com.lyms.hospitalapi.fnfy.FnfyHisService; |
| 5 | 6 | import com.lyms.hospitalapi.qhdfy.QhdfyHisService; |
| ... | ... | @@ -53,6 +54,7 @@ |
| 53 | 54 | public class BookbuildingFacade { |
| 54 | 55 | |
| 55 | 56 | private Logger logger = LoggerFactory.getLogger(BookbuildingFacade.class); |
| 57 | + | |
| 56 | 58 | public static final String HIS_VERSION = PropertiesUtils.getPropertyValue("his_version"); |
| 57 | 59 | |
| 58 | 60 | @Autowired |
| 59 | 61 | |
| ... | ... | @@ -114,9 +116,8 @@ |
| 114 | 116 | private DeleteProcessHandler deleteProcessHandler; |
| 115 | 117 | |
| 116 | 118 | @Autowired |
| 117 | - private SyncDataService syncDataService; | |
| 118 | - @Autowired | |
| 119 | 119 | private SieveService sieveService; |
| 120 | + | |
| 120 | 121 | @Autowired |
| 121 | 122 | private OrganizationGroupsFacade groupsFacade; |
| 122 | 123 | |
| 123 | 124 | |
| ... | ... | @@ -149,8 +150,10 @@ |
| 149 | 150 | private TrackDownRecordService trackDownRecordService; |
| 150 | 151 | |
| 151 | 152 | @Autowired |
| 152 | - private ResidentsArchiveService residentsArchiveService; | |
| 153 | + private CdfyHisService cdfyHisService; | |
| 153 | 154 | |
| 155 | + | |
| 156 | + | |
| 154 | 157 | /** |
| 155 | 158 | * 根据患者的建档ID,查询还未使用的免费产检查券 |
| 156 | 159 | * |
| ... | ... | @@ -258,6 +261,13 @@ |
| 258 | 261 | |
| 259 | 262 | Patients patient = getPatientsData(yunRequest); |
| 260 | 263 | |
| 264 | + | |
| 265 | + //承德市妇幼通过就诊卡号查询到病人id保存下来 | |
| 266 | + if ("2100001291".equals(patient.getHospitalId()) && StringUtils.isNotEmpty(yunRequest.getVcCardNo())) | |
| 267 | + { | |
| 268 | + patient.setBlNum(cdfyHisService.getIdByVcCardNo(yunRequest.getVcCardNo())); | |
| 269 | + } | |
| 270 | + | |
| 261 | 271 | patient.setBuildDays(DateUtil.getDays(DateUtil.parseYMD(yunRequest.getLastMenstrualPeriod()), new Date())); |
| 262 | 272 | |
| 263 | 273 | patient.setDueStatus(0); |
| 264 | 274 | |
| ... | ... | @@ -911,13 +921,33 @@ |
| 911 | 921 | //德州市妇幼保健院医院通过(就诊卡号、银行卡号,社保卡号) 查询出对应的用过的卡号 add lqy |
| 912 | 922 | if ("1000000114".equals(hospitalId)) { |
| 913 | 923 | patientsQuery.setVcCardNos(dzfyHisService.getDzVcCardNos(bookbuildingQueryRequest.getVcCardNo())); |
| 914 | - } else { | |
| 924 | + } | |
| 925 | + //承德通过就诊卡号查询查询到病人id 然后用病人id和就诊卡号查询建档记录 | |
| 926 | + else if ("2100001291".equals(hospitalId)) | |
| 927 | + { | |
| 928 | + String blNum = cdfyHisService.getIdByVcCardNo(bookbuildingQueryRequest.getVcCardNo()); | |
| 929 | + patientsQuery.setBlNum(blNum); | |
| 930 | + } | |
| 931 | + else | |
| 932 | + { | |
| 915 | 933 | patientsQuery.setVcCardNo(bookbuildingQueryRequest.getVcCardNo()); |
| 916 | 934 | } |
| 917 | 935 | |
| 918 | 936 | patientsQuery.setHospitalId(hospitalId); |
| 919 | 937 | //优先查询本院通过就诊卡 |
| 920 | 938 | List<Patients> localPatients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery); |
| 939 | + | |
| 940 | + if ("2100001291".equals(hospitalId)) | |
| 941 | + { | |
| 942 | + patientsQuery.setBlNum(null); | |
| 943 | + if (CollectionUtils.isEmpty(localPatients)) | |
| 944 | + { | |
| 945 | + patientsQuery.setVcCardNo(bookbuildingQueryRequest.getVcCardNo()); | |
| 946 | + localPatients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery); | |
| 947 | + } | |
| 948 | + } | |
| 949 | + | |
| 950 | + | |
| 921 | 951 | patientsQuery.setHospitalId(null); |
| 922 | 952 | if (CollectionUtils.isNotEmpty(localPatients)) { |
| 923 | 953 | patients = localPatients; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LisFacade.java
View file @
ea39a01
| ... | ... | @@ -386,7 +386,7 @@ |
| 386 | 386 | model.setVcCardNos(dzfyHisService.getDzVcCardNos(vcCardNo)); |
| 387 | 387 | } |
| 388 | 388 | //承德查询lis |
| 389 | - else if ("16".equals(HIS_VERSION)) | |
| 389 | + else if ("2100001291".equals(model.getHospitalId())) | |
| 390 | 390 | { |
| 391 | 391 | //model.setVcCardNo(vcCardNo); |
| 392 | 392 | model.setVcCardNo(cdfyHisService.getIdByVcCardNo(vcCardNo)); |
| ... | ... | @@ -549,7 +549,7 @@ |
| 549 | 549 | vcCardNos.addAll(dzfyHisService.getDzVcCardNos(pat.getVcCardNo())); |
| 550 | 550 | } |
| 551 | 551 | //承德查询lis |
| 552 | - else if ("16".equals(HIS_VERSION)) | |
| 552 | + else if ("2100001291".equals(pat.getHospitalId())) | |
| 553 | 553 | { |
| 554 | 554 | // vcCardNos.add(pat.getVcCardNo()); |
| 555 | 555 | vcCardNos.add(cdfyHisService.getIdByVcCardNo(pat.getVcCardNo())); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyBookbuildingAddRequest.java
View file @
ea39a01
| ... | ... | @@ -216,6 +216,18 @@ |
| 216 | 216 | |
| 217 | 217 | private Integer couponType; |
| 218 | 218 | |
| 219 | + | |
| 220 | + //档案编号 滦平需求 | |
| 221 | + private String fileCode; | |
| 222 | + | |
| 223 | + public String getFileCode() { | |
| 224 | + return fileCode; | |
| 225 | + } | |
| 226 | + | |
| 227 | + public void setFileCode(String fileCode) { | |
| 228 | + this.fileCode = fileCode; | |
| 229 | + } | |
| 230 | + | |
| 219 | 231 | public String getCouponCode() { |
| 220 | 232 | return couponCode; |
| 221 | 233 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyPageResult.java
View file @
ea39a01
| ... | ... | @@ -181,7 +181,17 @@ |
| 181 | 181 | |
| 182 | 182 | private String couponCode; |
| 183 | 183 | |
| 184 | + //档案编号 滦平需求 | |
| 185 | + private String fileCode; | |
| 184 | 186 | |
| 187 | + public String getFileCode() { | |
| 188 | + return fileCode; | |
| 189 | + } | |
| 190 | + | |
| 191 | + public void setFileCode(String fileCode) { | |
| 192 | + this.fileCode = fileCode; | |
| 193 | + } | |
| 194 | + | |
| 185 | 195 | public List<PatientSerResult> getPatientSerResults() { |
| 186 | 196 | return patientSerResults; |
| 187 | 197 | } |
| ... | ... | @@ -601,7 +611,7 @@ |
| 601 | 611 | setRemark(destModel.getMremark()); |
| 602 | 612 | setServiceStatus(ServiceStatusEnums.getNameById(destModel.getServiceStatus())); |
| 603 | 613 | setServiceType(ServiceTypeEnums.getTitleById(destModel.getServiceType())); |
| 604 | - | |
| 614 | + setFileCode(destModel.getFileCode()); | |
| 605 | 615 | return this; |
| 606 | 616 | } |
| 607 | 617 |