Commit 1a55433e262d908e649ec4522e959669d6d41de1

Authored by jiangjiazhi

Merge remote-tracking branch 'origin/master'

Showing 8 changed files

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/DischargeAbstractMotherDao.java View file @ 1a55433
... ... @@ -16,5 +16,7 @@
16 16 List<DischargeAbstractMotherModel> query(MongoQuery mongoQuery);
17 17  
18 18 void update(DischargeAbstractMotherModel dischargeAbstractMotherModel);
  19 +
  20 + DischargeAbstractMotherModel findOneById(String id);
19 21 }
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/DischargeAbstractMotherDaoImpl.java View file @ 1a55433
... ... @@ -27,5 +27,10 @@
27 27 public void update(DischargeAbstractMotherModel dischargeAbstractMotherModel) {
28 28 super.update(new MongoQuery(new MongoCondition("id", dischargeAbstractMotherModel.getId(), MongoOper.IS)).convertToMongoQuery(), dischargeAbstractMotherModel);
29 29 }
  30 +
  31 + @Override
  32 + public DischargeAbstractMotherModel findOneById(String id) {
  33 + return findById(id);
  34 + }
30 35 }
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/DischargeAbstractMotherService.java View file @ 1a55433
... ... @@ -29,5 +29,10 @@
29 29 public void update(DischargeAbstractMotherModel dischargeAbstractMotherModel) {
30 30 dischargeAbstractMotherDao.update(dischargeAbstractMotherModel);
31 31 }
  32 +
  33 + public DischargeAbstractMotherModel findOneById(String id){
  34 + return dischargeAbstractMotherDao.findOneById(id);
  35 + }
  36 +
32 37 }
platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyFmService.java View file @ 1a55433
... ... @@ -111,7 +111,6 @@
111 111 " and (SFFZRSTDT = ' 是 ' or SFSTDT = ' 是 '))";
112 112 List<FmItem> list = queryRunner.query(conn, sql, new BeanListHandler<FmItem>(FmItem.class));
113 113 ExceptionUtils.catchException("size====" + list.size());
114   - ExceptionUtils.catchException("sql===" + sql);
115 114 if (CollectionUtils.isNotEmpty(list)) {
116 115 for (FmItem item : list) {
117 116 try {
... ... @@ -215,7 +214,7 @@
215 214 babies.add(baby);
216 215 deliverAddRequest.setFmHospital("216"); //设置为秦皇岛分娩医院
217 216 ExceptionUtils.catchException("deliverAddRequest===" + deliverAddRequest);
218   -// matDeliverFacade.addOrUpdateMatDeliver(deliverAddRequest, users.get(0).getId());
  217 + matDeliverFacade.addOrUpdateMatDeliver(deliverAddRequest, users.get(0).getId());
219 218 }
220 219  
221 220 }
... ... @@ -390,7 +389,7 @@
390 389 }
391 390 deliverAddRequest.setFmHospital("216");
392 391 ExceptionUtils.catchException("double deliverAddRequest===" + deliverAddRequest);
393   -// matDeliverFacade.addOrUpdateMatDeliver(deliverAddRequest, users.get(0).getId());
  392 + matDeliverFacade.addOrUpdateMatDeliver(deliverAddRequest, users.get(0).getId());
394 393 }
395 394  
396 395 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ViewController.java View file @ 1a55433
... ... @@ -82,7 +82,7 @@
82 82 }
83 83  
84 84 /**
85   - * 查看复查接口
  85 + * 查看产后复查
86 86 * @param id
87 87 * @return
88 88 */
... ... @@ -93,8 +93,17 @@
93 93 return viewFacade.findPostReviewData(id);
94 94 }
95 95  
96   - //查看出院小结接口
97   -
  96 + /**
  97 + * 查看出院小结
  98 + * @param id
  99 + * @return
  100 + */
  101 + @RequestMapping(value = "/findDischargeAbstractData", method = RequestMethod.GET)
  102 + @ResponseBody
  103 +// @TokenRequired
  104 + public BaseObjectResponse findDischargeAbstractData(@RequestParam("id")String id){
  105 + return viewFacade.findDischargeAbstractData(id);
  106 + }
98 107  
99 108  
100 109 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java View file @ 1a55433
... ... @@ -14,6 +14,7 @@
14 14 import com.lyms.platform.permission.service.OrganizationService;
15 15 import com.lyms.platform.permission.service.UsersService;
16 16 import com.lyms.platform.pojo.*;
  17 +import com.lyms.platform.query.DischargeAbstractBabyQuery;
17 18 import org.apache.commons.collections.CollectionUtils;
18 19 import org.apache.commons.collections.MapUtils;
19 20 import org.apache.commons.lang.StringUtils;
... ... @@ -46,6 +47,10 @@
46 47 private MatDeliverService matDeliverService;
47 48 @Autowired
48 49 private PostReviewService postReviewService;
  50 + @Autowired
  51 + private DischargeAbstractMotherService dischargeAbstractMotherService;
  52 + @Autowired
  53 + private DischargeAbstractBabyService dischargeAbstractBabyService;
49 54  
50 55  
51 56 public BaseObjectResponse findPatientData(String id) {
... ... @@ -80,7 +85,7 @@
80 85 map.put("pliveType", getBasicConfig(data.getPliveTypeId()));
81 86 map.put("pprofessionType", getBasicConfig(data.getPprofessionTypeId()));
82 87 map.put("plevelType", getBasicConfig(data.getPlevelTypeId()));
83   - //TODO 家庭人均收入(暂时去掉)
  88 + //家庭人均收入(暂时去掉)
84 89  
85 90 /* 孕妇联系方式 */
86 91 map.put("residence", CommonsHelper.getResidence(data.getProvinceId(), data.getCityId(),
... ... @@ -109,7 +114,7 @@
109 114 map.put("correctionLastMenses", DateUtil.getyyyy_MM_dd(data.getLastMenses()));
110 115 map.put("dueDate", DateUtil.getyyyy_MM_dd(data.getDueDate()));
111 116 map.put("vcCardNo", data.getVcCardNo());
112   - //TODO 条码(暂时去掉)
  117 + //条码(暂时去掉)
113 118 //档案编号
114 119 map.put("fileCode", data.getFileCode());
115 120 map.put("mremark", data.getMremark());
... ... @@ -665,7 +670,8 @@
665 670 highScoreResult = ResolveUtils.queryRisk(patients.getRiskFactorId(),true,basicConfigService);
666 671 }
667 672  
668   - map.put("riskFactorId", highScoreResult);
  673 + map.put("riskFactor", highScoreResult);
  674 + map.put("riskScore", UnitUtils.unitSplice(patients.getRiskScore(),UnitConstants.FEN));
669 675  
670 676 map.put("deliveryDate", data.getDueDate());
671 677 map.put("dueWeek", data.getDueWeek());
672 678  
... ... @@ -1006,12 +1012,17 @@
1006 1012 map.put("fmWeek",patients.getFmWeek());
1007 1013 map.put("dueDate",DateUtil.getyyyy_MM_dd(patients.getDueDate()));
1008 1014 map.put("mremark",patients.getMremark());
1009   - map.put("oRiskFactor",patients.getoRiskFactor());
1010   - map.put("riskScore",patients.getRiskScore());
  1015 + //高危因素
  1016 + HighScoreResult highScoreResult = null;
  1017 + if (CollectionUtils.isNotEmpty(patients.getRiskFactorId())){
  1018 + highScoreResult = ResolveUtils.queryRisk(patients.getRiskFactorId(),true,basicConfigService);
  1019 + }
  1020 +
  1021 + map.put("riskFactor", highScoreResult);
  1022 + map.put("riskScore",UnitUtils.unitSplice(patients.getRiskScore(),UnitConstants.FEN));
1011 1023 /* 复查信息 */
1012 1024 map.put("checkTime",DateUtil.getyyyy_MM_dd(data.getCheckTime()));
1013 1025 map.put("day",data.getDay());
1014   - map.put("day",data.getDay());
1015 1026 String prodDoctor = "";
1016 1027  
1017 1028 if (org.apache.commons.lang.StringUtils.isNotEmpty(data.getProdDoctor())){
... ... @@ -1091,6 +1102,101 @@
1091 1102 return br;
1092 1103 }
1093 1104  
  1105 + public BaseObjectResponse findDischargeAbstractData(String id){
  1106 + BaseObjectResponse br = new BaseObjectResponse();
  1107 + if (org.apache.commons.lang.StringUtils.isEmpty(id)){
  1108 + br.setErrorcode(ErrorCodeConstants.PARAMETER_ERROR);
  1109 + br.setErrormsg("id为空");
  1110 + return br;
  1111 + }
  1112 +
  1113 +
  1114 + DischargeAbstractMotherModel data = dischargeAbstractMotherService.findOneById(id);
  1115 + if (data==null){
  1116 + br.setErrorcode(ErrorCodeConstants.NO_DATA);
  1117 + br.setErrormsg("没有查询到数据");
  1118 + return br;
  1119 + }
  1120 +
  1121 + /* 基本信息 */
  1122 + if (StringUtils.isEmpty(data.getPatientId())){
  1123 + br.setErrorcode(ErrorCodeConstants.PARAMETER_ERROR);
  1124 + br.setErrormsg("数据异常");
  1125 + return br;
  1126 + }
  1127 +
  1128 + Patients patients = patientsService.findOnePatientById(data.getPatientId());
  1129 + if (patients==null){
  1130 + br.setErrorcode(ErrorCodeConstants.PARAMETER_ERROR);
  1131 + br.setErrormsg("数据异常");
  1132 + return br;
  1133 + }
  1134 + Map<String,Object> map= new HashMap<>();
  1135 + /* 基础信息 */
  1136 + map.put("id",data.getId());
  1137 + map.put("username",patients.getUsername());
  1138 + map.put("birth",DateUtil.getyyyy_MM_dd(patients.getBirth()));
  1139 + map.put("age",UnitUtils.unitSplice(DateUtil.getAge(patients.getBirth()),UnitConstants.SUI));
  1140 + map.put("phone",patients.getPhone());
  1141 + map.put("fmWeek",patients.getFmWeek());
  1142 + map.put("dueDate",DateUtil.getyyyy_MM_dd(patients.getDueDate()));
  1143 + map.put("mremark",patients.getMremark());
  1144 + //高危因素
  1145 + HighScoreResult highScoreResult = null;
  1146 + if (CollectionUtils.isNotEmpty(patients.getRiskFactorId())){
  1147 + highScoreResult = ResolveUtils.queryRisk(patients.getRiskFactorId(),true,basicConfigService);
  1148 + }
  1149 + map.put("riskFactor",highScoreResult);
  1150 + map.put("riskScore",UnitUtils.unitSplice(patients.getRiskScore(),UnitConstants.FEN));
  1151 + map.put("leaveHospitalDate", DateUtil.getyyyy_MM_dd(data.getLeaveHospitalDate()));
  1152 + map.put("afterMakeBabyDays", data.getAfterMakeBabyDays()==null?"":"产后"+data.getAfterMakeBabyDays()+"天");
  1153 + map.put("inputMan",data.getInputMan());
  1154 + /* 出院信息 */
  1155 + map.put("description",data.getDescription());
  1156 +
  1157 + List<Map> babys = new ArrayList<>();
  1158 +
  1159 + DischargeAbstractBabyQuery babyQuery = new DischargeAbstractBabyQuery();
  1160 + babyQuery.setMotherId(data.getId());
  1161 + List<DischargeAbstractBabyModel> babyModelList = dischargeAbstractBabyService.query(babyQuery);
  1162 + if (CollectionUtils.isNotEmpty(babyModelList)){
  1163 + for (DischargeAbstractBabyModel temp : babyModelList){
  1164 + Map<String,Object> babyMap = new HashMap<>();
  1165 + babyMap.put("description",temp.getDescription());
  1166 + babyMap.put("birthCertificateId",temp.getBirthCertificateId());
  1167 + babyMap.put("isBCG",FunvCommonUtil.checkIsInoculation(temp.getIsBCG()));
  1168 + babyMap.put("isHBV",FunvCommonUtil.checkIsInoculation(temp.getIsHBV()));
  1169 + babyMap.put("bCGAndHBVVaccinationDosage",temp.getbCGAndHBVVaccinationDosage());
  1170 + babyMap.put("bCGAndHBVVaccinationDate",DateUtil.getyyyy_MM_dd(temp.getbCGAndHBVVaccinationDate()));
  1171 + babyMap.put("bCGAndHBVVaccinationInjectUserName",temp.getbCGAndHBVVaccinationInjectUserName());
  1172 + babyMap.put("isHBIG",FunvCommonUtil.checkIsInoculation(temp.getIsHBIG()));
  1173 + babyMap.put("hBIGInjectDosage",temp.gethBIGInjectDosage());
  1174 + babyMap.put("hBIGInjectDate",DateUtil.getyyyy_MM_dd(temp.gethBIGInjectDate()));
  1175 + babyMap.put("hBIGInjectUserName",temp.gethBIGInjectUserName());
  1176 +
  1177 + babyMap.put("isPKU",FunvCommonUtil.checkIsScreening(temp.getIsPKU()));
  1178 + babyMap.put("isCH",FunvCommonUtil.checkIsScreening(temp.getIsCH()));
  1179 + babyMap.put("isUNHS",FunvCommonUtil.checkIsScreening(temp.getIsUNHS()));
  1180 +
  1181 + String isOtherScreen = "";
  1182 + if (temp.getIsOtherScreen()!=null){
  1183 + if (temp.getIsOtherScreen()==1){
  1184 + isOtherScreen = temp.getOrderScreenDescription();
  1185 + }else if (temp.getIsOtherScreen()==0){
  1186 + isOtherScreen = "否";
  1187 + }
  1188 + }
  1189 + babyMap.put("isOtherScreen",isOtherScreen);
  1190 + babys.add(babyMap);
  1191 + }
  1192 + }
  1193 + map.put("babys",babys);
  1194 +
  1195 + br.setErrorcode(ErrorCodeConstants.SUCCESS);
  1196 + br.setErrormsg("成功");
  1197 + br.setData(map);
  1198 + return br;
  1199 + }
1094 1200  
1095 1201  
1096 1202  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/MatDeliverAddRequest.java View file @ 1a55433
... ... @@ -593,6 +593,25 @@
593 593 public void setPregnancyOut(String pregnancyOut) {
594 594 this.pregnancyOut = pregnancyOut;
595 595 }
  596 +
  597 + @Override
  598 + public String toString() {
  599 + return "Baby{" +
  600 + "id='" + id + '\'' +
  601 + ", babyGender='" + babyGender + '\'' +
  602 + ", babyWeight='" + babyWeight + '\'' +
  603 + ", babyHeight='" + babyHeight + '\'' +
  604 + ", deformity=" + deformity +
  605 + ", apgarScore=" + apgarScore +
  606 + ", asphyxiaM='" + asphyxiaM + '\'' +
  607 + ", pregnancyOut='" + pregnancyOut + '\'' +
  608 + ", babyHealthy='" + babyHealthy + '\'' +
  609 + ", contactStartM='" + contactStartM + '\'' +
  610 + ", contactM='" + contactM + '\'' +
  611 + ", earlySuck='" + earlySuck + '\'' +
  612 + ", dueTime='" + dueTime + '\'' +
  613 + '}';
  614 + }
596 615 }
597 616 /* public static void main(String[] args){
598 617 MatDeliverAddRequest matDeliverAddRequest = new MatDeliverAddRequest();
... ... @@ -601,5 +620,43 @@
601 620 matDeliverAddRequest.setBabies(babies);
602 621 System.out.print(JsonUtil.obj2JsonString(matDeliverAddRequest));
603 622 }*/
  623 +
  624 + @Override
  625 + public String toString() {
  626 + return "MatDeliverAddRequest{" +
  627 + "id='" + id + '\'' +
  628 + ", pid='" + pid + '\'' +
  629 + ", parentId='" + parentId + '\'' +
  630 + ", dueDate='" + dueDate + '\'' +
  631 + ", dueWeek='" + dueWeek + '\'' +
  632 + ", tireNumber=" + tireNumber +
  633 + ", placenta='" + placenta + '\'' +
  634 + ", placentas=" + placentas +
  635 + ", extPlacentas=" + extPlacentas +
  636 + ", deliveryMode=" + deliveryMode +
  637 + ", operationCause='" + operationCause + '\'' +
  638 + ", prodprocess=" + prodprocess +
  639 + ", totalprocess=" + totalprocess +
  640 + ", perinealCondition='" + perinealCondition + '\'' +
  641 + ", siLielevel=" + siLielevel +
  642 + ", needleNum=" + needleNum +
  643 + ", maternalInfo='" + maternalInfo + '\'' +
  644 + ", deathCause='" + deathCause + '\'' +
  645 + ", deathCauseText='" + deathCauseText + '\'' +
  646 + ", chBp=" + chBp +
  647 + ", ch2Bp=" + ch2Bp +
  648 + ", breath='" + breath + '\'' +
  649 + ", pulse='" + pulse + '\'' +
  650 + ", oHloseBloodL=" + oHloseBloodL +
  651 + ", tHloseBloodL=" + tHloseBloodL +
  652 + ", rHloseBloodL=" + rHloseBloodL +
  653 + ", sHloseBloodL=" + sHloseBloodL +
  654 + ", loseBloodCause=" + loseBloodCause +
  655 + ", ocs=" + ocs +
  656 + ", babies=" + babies.toString() +
  657 + ", fmHospital='" + fmHospital + '\'' +
  658 + ", deliverDoctor='" + deliverDoctor + '\'' +
  659 + '}';
  660 + }
604 661 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/FunvCommonUtil.java View file @ 1a55433
... ... @@ -358,6 +358,42 @@
358 358 return "";
359 359 }
360 360  
  361 + /**
  362 + * 验证是否接种
  363 + * @param isInoculation
  364 + * @return
  365 + */
  366 + public static String checkIsInoculation(Integer isInoculation){
  367 + if (isInoculation==null){
  368 + return "";
  369 + }
  370 +
  371 + if (isInoculation==1){
  372 + return "已接种";
  373 + }else if (isInoculation==0){
  374 + return "未接种";
  375 + }
  376 + return "";
  377 + }
  378 +
  379 + /**
  380 + * 验证是否筛查
  381 + * @param isScreening
  382 + * @return
  383 + */
  384 + public static String checkIsScreening(Integer isScreening){
  385 + if (isScreening==null){
  386 + return "";
  387 + }
  388 +
  389 + if (isScreening==1){
  390 + return "已筛查";
  391 + }else if (isScreening==0){
  392 + return "未筛查";
  393 + }
  394 + return "";
  395 + }
  396 +
361 397  
362 398 }