Commit ac7f4f3c3919aa4812b08178fbf49af01a40e7b2
1 parent
aad6dd49de
Exists in
master
and in
6 other branches
大同初诊打印
Showing 6 changed files with 182 additions and 13 deletions
- platform-dal/src/main/java/com/lyms/platform/pojo/AntExChuModel.java
- platform-msg-generate/src/main/java/com/lyms/platform/msg/utils/HelperUtils.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/ViewFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AntExcAddRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntexChuResult.java
platform-dal/src/main/java/com/lyms/platform/pojo/AntExChuModel.java
View file @
ac7f4f3
| ... | ... | @@ -465,6 +465,17 @@ |
| 465 | 465 | */ |
| 466 | 466 | private String ndbSelectOtherVal; |
| 467 | 467 | |
| 468 | + //检查结果 大同 | |
| 469 | + private String checkResult; | |
| 470 | + | |
| 471 | + public String getCheckResult() { | |
| 472 | + return checkResult; | |
| 473 | + } | |
| 474 | + | |
| 475 | + public void setCheckResult(String checkResult) { | |
| 476 | + this.checkResult = checkResult; | |
| 477 | + } | |
| 478 | + | |
| 468 | 479 | public String getBgValue() { |
| 469 | 480 | return bgValue; |
| 470 | 481 | } |
platform-msg-generate/src/main/java/com/lyms/platform/msg/utils/HelperUtils.java
View file @
ac7f4f3
| ... | ... | @@ -350,6 +350,10 @@ |
| 350 | 350 | * 发送生成的消息到消息中心中心 |
| 351 | 351 | * @param list |
| 352 | 352 | */ |
| 353 | + /** | |
| 354 | + * 发送生成的消息到消息中心中心 | |
| 355 | + * @param list | |
| 356 | + */ | |
| 353 | 357 | public static void sendMsg(MsgListRequest list) |
| 354 | 358 | { |
| 355 | 359 | if (list != null && CollectionUtils.isNotEmpty(list.getMessages())) |
| ... | ... | @@ -366,16 +370,17 @@ |
| 366 | 370 | if (end > msgs.size()) { |
| 367 | 371 | end = msgs.size(); |
| 368 | 372 | } |
| 369 | - try { | |
| 370 | - Thread.sleep(5000); | |
| 371 | - } catch (InterruptedException e) { | |
| 372 | - e.printStackTrace(); | |
| 373 | - } | |
| 374 | - List<MsgRequest> tempList = msgs.subList(i, end); | |
| 375 | - MsgListRequest sentList = new MsgListRequest(); | |
| 376 | - sentList.setMessages(tempList); | |
| 377 | - sentList.setTypeId(ProjectTypeEnums.YNXT.getId()); | |
| 378 | - SaveMessageService.saveMsgCenter(sentList); | |
| 373 | + | |
| 374 | + final List<MsgRequest> tempList = msgs.subList(i, end); | |
| 375 | + pool.execute(new Runnable() { | |
| 376 | + @Override | |
| 377 | + public void run() { | |
| 378 | + MsgListRequest sentList = new MsgListRequest(); | |
| 379 | + sentList.setMessages(tempList); | |
| 380 | + sentList.setTypeId(ProjectTypeEnums.YNXT.getId()); | |
| 381 | + SaveMessageService.saveMsgCenter(sentList); | |
| 382 | + } | |
| 383 | + }); | |
| 379 | 384 | } |
| 380 | 385 | } |
| 381 | 386 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ViewController.java
View file @
ac7f4f3
| ... | ... | @@ -82,6 +82,22 @@ |
| 82 | 82 | return br; |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | + | |
| 86 | + /** | |
| 87 | + * 大同打印高危孕妇专案卡 | |
| 88 | + * @param id | |
| 89 | + * @param request | |
| 90 | + * @return | |
| 91 | + */ | |
| 92 | + @RequestMapping(value = "/findDtAntExChuData", method = RequestMethod.GET) | |
| 93 | + @ResponseBody | |
| 94 | + @TokenRequired | |
| 95 | + public BaseObjectResponse findDtAntExChuData(@RequestParam("id") String id, | |
| 96 | + HttpServletRequest request) { | |
| 97 | + BaseObjectResponse br = viewFacade.findDtAntExChuData(id); | |
| 98 | + return br; | |
| 99 | + } | |
| 100 | + | |
| 85 | 101 | @RequestMapping(value = "/findAntExChuInfo", method = RequestMethod.GET) |
| 86 | 102 | @ResponseBody |
| 87 | 103 | public BaseObjectResponse findAntExChuInfo(@RequestParam("cardNo") String cardNo, |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
ac7f4f3
| ... | ... | @@ -18,12 +18,14 @@ |
| 18 | 18 | import java.util.Set; |
| 19 | 19 | |
| 20 | 20 | import com.lyms.hospitalapi.qhdfy.QhdfyHisService; |
| 21 | +import com.lyms.platform.common.constants.*; | |
| 21 | 22 | import com.lyms.platform.common.enums.*; |
| 22 | 23 | import com.lyms.platform.common.utils.*; |
| 23 | 24 | import com.lyms.platform.common.utils.HttpClientUtil; |
| 24 | 25 | import com.lyms.platform.operate.web.request.MessagesResult; |
| 25 | 26 | import com.lyms.platform.operate.web.result.*; |
| 26 | 27 | import com.lyms.platform.operate.web.utils.*; |
| 28 | +import com.lyms.platform.operate.web.utils.UnitConstants; | |
| 27 | 29 | import com.lyms.platform.permission.model.CheckItem; |
| 28 | 30 | import com.lyms.platform.permission.service.CheckItemService; |
| 29 | 31 | import net.sf.json.JSONArray; |
| ... | ... | @@ -62,7 +64,6 @@ |
| 62 | 64 | import com.lyms.platform.biz.service.ResidentsArchiveService; |
| 63 | 65 | import com.lyms.platform.biz.service.StopPregnancyService; |
| 64 | 66 | import com.lyms.platform.biz.service.YunBookbuildingService; |
| 65 | -import com.lyms.platform.common.constants.ErrorCodeConstants; | |
| 66 | 67 | import com.lyms.platform.common.dao.operator.MongoQuery; |
| 67 | 68 | import com.lyms.platform.common.result.BaseObjectResponse; |
| 68 | 69 | import com.lyms.platform.common.result.BaseResponse; |
| 69 | 70 | |
| ... | ... | @@ -2452,8 +2453,8 @@ |
| 2452 | 2453 | } |
| 2453 | 2454 | } |
| 2454 | 2455 | map.put("nextCheckItem",nextCheckItem); |
| 2456 | + map.put("checkResult",data.getCheckResult()); | |
| 2455 | 2457 | |
| 2456 | - | |
| 2457 | 2458 | getSelect(data, map); |
| 2458 | 2459 | br.setErrorcode(ErrorCodeConstants.SUCCESS); |
| 2459 | 2460 | br.setErrormsg("成功"); |
| ... | ... | @@ -7789,6 +7790,120 @@ |
| 7789 | 7790 | return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.DATA_EXIST).setErrormsg("孕产婴系统没有找到对应的产妇"); |
| 7790 | 7791 | } |
| 7791 | 7792 | return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(data); |
| 7793 | + } | |
| 7794 | + | |
| 7795 | + public BaseObjectResponse findDtAntExChuData(String id) { | |
| 7796 | + | |
| 7797 | + BaseObjectResponse br = new BaseObjectResponse(); | |
| 7798 | + | |
| 7799 | + | |
| 7800 | + | |
| 7801 | + AntExChuModel data = antExService.findOne(id); | |
| 7802 | + if (data == null || data.getYn() == YnEnums.NO.getId()) { | |
| 7803 | + br.setErrorcode(ErrorCodeConstants.NO_DATA); | |
| 7804 | + br.setErrormsg("没有查询到数据"); | |
| 7805 | + return br; | |
| 7806 | + } | |
| 7807 | + | |
| 7808 | + | |
| 7809 | + Patients patients = patientsService.findOnePatientById(data.getParentId()); | |
| 7810 | + if (patients == null || patients.getYn() == YnEnums.NO.getId()) { | |
| 7811 | + br.setErrorcode(ErrorCodeConstants.PARAMETER_ERROR); | |
| 7812 | + br.setErrormsg("孕妇信息不存在"); | |
| 7813 | + return br; | |
| 7814 | + } | |
| 7815 | + | |
| 7816 | + Map<String, Object> map = new HashMap<>(); | |
| 7817 | + | |
| 7818 | + map.put("id", data.getId()); | |
| 7819 | + /* 孕妇基础数据 */ | |
| 7820 | + map.put("username", patients.getUsername()); | |
| 7821 | + | |
| 7822 | + map.put("age", DateUtil.getAge(patients.getBirth())); | |
| 7823 | + map.put("levelType",getBasicConfig(patients.getLevelTypeId())); | |
| 7824 | + map.put("pprofessionType", getBasicConfig(patients.getPprofessionTypeId())); | |
| 7825 | + getRisk(data.getHighrisk(), data.getOtherHighRisk(), map); //处理高危因素+高危评分 | |
| 7826 | + | |
| 7827 | + //map.put("xy", ""); | |
| 7828 | + map.put("lastMenses", DateUtil.getyyyy_MM_dd(patients.getLastMenses())); | |
| 7829 | + map.put("dueDate", DateUtil.getyyyy_MM_dd(patients.getDueDate())); | |
| 7830 | + map.put("liveAddress", CommonsHelper.getResidence(patients.getProvinceRegisterId(), patients.getCityRegisterId(), | |
| 7831 | + null, null, null, basicConfigService)); | |
| 7832 | + | |
| 7833 | + map.put("buildDate", DateUtil.getyyyy_MM_dd(patients.getBookbuildingDate())); | |
| 7834 | + map.put("phone", patients.getPhone() == null ? "" : patients.getPhone()); | |
| 7835 | + map.put("husbandName", patients.getHusbandName() == null ? "" : patients.getHusbandName()); | |
| 7836 | + map.put("hlevelType", getBasicConfig(patients.getHlevelTypeId())); | |
| 7837 | + map.put("hphone", patients.getHusbandPhone() == null ? "" : patients.getHusbandPhone()); | |
| 7838 | + map.put("remark", patients.getMremark() == null ? "" : patients.getMremark()); | |
| 7839 | + | |
| 7840 | + | |
| 7841 | + //产检基本信息 | |
| 7842 | + map.put("checkDate", DateUtil.getyyyy_MM_dd(data.getCheckTime())); | |
| 7843 | + String cDueWeek = ResolveUtils.getPregnancyWeek(patients.getLastMenses(), data.getCheckTime()); | |
| 7844 | + //产检孕周 | |
| 7845 | + map.put("week", cDueWeek); | |
| 7846 | + map.put("height", data.getHeight()); | |
| 7847 | + map.put("beforeWeight", data.getYqWeight()); | |
| 7848 | + map.put("weight", data.getWeight()); | |
| 7849 | + int week = DateUtil.getWeek2(patients.getLastMenses(), data.getCheckTime()); | |
| 7850 | + if (week >= 20) { | |
| 7851 | + map.put("gongGaoText", data.getGonggao()); | |
| 7852 | + } else if (week < 20) { | |
| 7853 | + if (StringUtils.isNotEmpty(data.getGonggaoSelect())) { | |
| 7854 | + if (StringUtils.isNotEmpty(data.getGonggaoType())) { | |
| 7855 | + map.put("gongGaoText", GongJingEnums.getGongGaoNameById(data.getGonggaoSelect()) + "," + GongJingEnums.getHengZhiNameById(data.getGonggaoType())); | |
| 7856 | + } else { | |
| 7857 | + map.put("gongGaoText", GongJingEnums.getGongGaoNameById(data.getGonggaoSelect())); | |
| 7858 | + } | |
| 7859 | + } | |
| 7860 | + } | |
| 7861 | + map.put("fuwei",data.getFuwei());//腹围 | |
| 7862 | + | |
| 7863 | + String ssy = ""; | |
| 7864 | + String szy = ""; | |
| 7865 | + Map<String, String> chBpMap = JsonUtil.getMap(data.getBp()); | |
| 7866 | + if (MapUtils.isNotEmpty(chBpMap)) { | |
| 7867 | + ssy = chBpMap.get("ssy"); | |
| 7868 | + szy = chBpMap.get("szy"); | |
| 7869 | + } | |
| 7870 | + map.put("bp",ssy + "/" + szy); // 血压 | |
| 7871 | + String fetalPosition = ""; | |
| 7872 | + String heartRate = ""; | |
| 7873 | + if (CollectionUtils.isNotEmpty(data.getPlacentas())) { | |
| 7874 | + List<MatDeliverAddRequest.Placenta> placentas = data.getPlacentas(); | |
| 7875 | + if (CollectionUtils.isNotEmpty(placentas)) { | |
| 7876 | + for (Object obj : placentas) { | |
| 7877 | + if ("com.lyms.platform.operate.web.request.MatDeliverAddRequest$Placenta".equals(obj.getClass().getName())) { | |
| 7878 | + //转换类型 | |
| 7879 | + MatDeliverAddRequest.Placenta placenta = (MatDeliverAddRequest.Placenta) obj; | |
| 7880 | + //胎方位 | |
| 7881 | + if (StringUtils.isNotEmpty(placenta.getFetalPosition())) { | |
| 7882 | + for (FetalPositionEnums fetalPositionEnums : FetalPositionEnums.values()) { | |
| 7883 | + if (fetalPositionEnums.getId().equals(placenta.getFetalPosition())) { | |
| 7884 | + fetalPosition += fetalPositionEnums.getName() +" "; | |
| 7885 | + break; | |
| 7886 | + } | |
| 7887 | + } | |
| 7888 | + } | |
| 7889 | + //胎心率 | |
| 7890 | + heartRate += placenta.getHeartRate() == null ? "" : placenta.getHeartRate().toString() +" "; | |
| 7891 | + } | |
| 7892 | + } | |
| 7893 | + } | |
| 7894 | + } | |
| 7895 | + map.put("heartRate", heartRate); | |
| 7896 | + map.put("fetalPosition",fetalPosition); | |
| 7897 | + map.put("xhdb", data.getXhdb()); | |
| 7898 | + map.put("ndb", data.getNdb()); | |
| 7899 | + map.put("quickenRemark", data.getQuickenRemark()); | |
| 7900 | + | |
| 7901 | + | |
| 7902 | + map.put("zs", data.getDiagnosisOther()); | |
| 7903 | + map.put("checkResult", data.getCheckResult()); | |
| 7904 | + map.put("diagnosis",data.getSecondaryDiagnosis()); | |
| 7905 | + | |
| 7906 | + return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(map); | |
| 7792 | 7907 | } |
| 7793 | 7908 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AntExcAddRequest.java
View file @
ac7f4f3
| ... | ... | @@ -459,6 +459,17 @@ |
| 459 | 459 | */ |
| 460 | 460 | private Integer screeningState; |
| 461 | 461 | |
| 462 | + //检查结果 大同 | |
| 463 | + private String checkResult; | |
| 464 | + | |
| 465 | + public String getCheckResult() { | |
| 466 | + return checkResult; | |
| 467 | + } | |
| 468 | + | |
| 469 | + public void setCheckResult(String checkResult) { | |
| 470 | + this.checkResult = checkResult; | |
| 471 | + } | |
| 472 | + | |
| 462 | 473 | public String getBgValue() { |
| 463 | 474 | return bgValue; |
| 464 | 475 | } |
| ... | ... | @@ -2321,6 +2332,8 @@ |
| 2321 | 2332 | if (StringUtils.isNotEmpty(bgValue)) { |
| 2322 | 2333 | antExChuModel.setBgValue(bgValue); |
| 2323 | 2334 | } |
| 2335 | + | |
| 2336 | + antExChuModel.setCheckResult(checkResult); | |
| 2324 | 2337 | return antExChuModel; |
| 2325 | 2338 | } |
| 2326 | 2339 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntexChuResult.java
View file @
ac7f4f3
| ... | ... | @@ -1921,7 +1921,16 @@ |
| 1921 | 1921 | public void setAntExcAddOthers(List<AntExcAddOther> antExcAddOthers) { |
| 1922 | 1922 | this.antExcAddOthers = antExcAddOthers; |
| 1923 | 1923 | } |
| 1924 | + //检查结果 大同 | |
| 1925 | + private String checkResult; | |
| 1924 | 1926 | |
| 1927 | + public String getCheckResult() { | |
| 1928 | + return checkResult; | |
| 1929 | + } | |
| 1930 | + | |
| 1931 | + public void setCheckResult(String checkResult) { | |
| 1932 | + this.checkResult = checkResult; | |
| 1933 | + } | |
| 1925 | 1934 | public AntexChuResult convertToResult(AntExChuModel antExChuModel) { |
| 1926 | 1935 | if (null != antExChuModel) { |
| 1927 | 1936 | |
| ... | ... | @@ -2180,7 +2189,7 @@ |
| 2180 | 2189 | setPregnancyMethod(antExChuModel.getPregnancyMethod()); |
| 2181 | 2190 | setPregnancyExcpetion(antExChuModel.getPregnancyExcpetion()); |
| 2182 | 2191 | setMonthCompliance(antExChuModel.getMonthCompliance()); |
| 2183 | - | |
| 2192 | + setCheckResult(antExChuModel.getCheckResult()); | |
| 2184 | 2193 | |
| 2185 | 2194 | } |
| 2186 | 2195 | return this; |