Commit f91988ed884e53ff070096c8e0f9bc76725b59fc

Authored by yangfei
1 parent 591b0528e6

初诊、复诊增加筛查结果,冗余筛查结果到patient表

Showing 9 changed files with 207 additions and 80 deletions

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/AntenatalExaminationService.java View file @ f91988e
... ... @@ -14,13 +14,10 @@
14 14 import com.lyms.platform.query.AntExChuQuery;
15 15 import com.lyms.platform.query.AntExRecordQuery;
16 16 import com.lyms.platform.query.PatientsQuery;
17   -import com.lyms.platform.query.VisitQuery;
18 17 import org.apache.commons.collections.CollectionUtils;
19 18 import org.apache.commons.lang.StringUtils;
20 19 import org.springframework.beans.factory.annotation.Autowired;
21   -import org.springframework.beans.factory.annotation.Qualifier;
22 20 import org.springframework.data.domain.Sort;
23   -import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
24 21 import org.springframework.stereotype.Service;
25 22 import org.springframework.util.Assert;
26 23  
27 24  
... ... @@ -89,9 +86,9 @@
89 86 }
90 87  
91 88 /**
92   - * 增加一条新生儿访视记录
  89 + * 增加复诊记录
93 90 *
94   - * @param babyVisitModel 新生儿访视记录模型
  91 + * @param babyVisitModel 增加复诊记录
95 92 * @return
96 93 */
97 94 public AntenatalExaminationModel addOneBabyAnt(AntenatalExaminationModel babyVisitModel) {
platform-dal/src/main/java/com/lyms/platform/pojo/AntExChuModel.java View file @ f91988e
... ... @@ -37,7 +37,10 @@
37 37 private String quicken;
38 38 /** 胎动备注 */
39 39 private String quickenRemark;
40   -
  40 + //筛查结果
  41 + private List<String> screenResult;
  42 + //结果补充
  43 + private String resultSupple;
41 44 //条码
42 45 private String barCode;
43 46 private String id;
... ... @@ -341,6 +344,21 @@
341 344 //操作人
342 345 private Integer operator;
343 346  
  347 + public List<String> getScreenResult() {
  348 + return screenResult;
  349 + }
  350 +
  351 + public void setScreenResult(List<String> screenResult) {
  352 + this.screenResult = screenResult;
  353 + }
  354 +
  355 + public String getResultSupple() {
  356 + return resultSupple;
  357 + }
  358 +
  359 + public void setResultSupple(String resultSupple) {
  360 + this.resultSupple = resultSupple;
  361 + }
344 362  
345 363 public Integer getFirst() {
346 364 return first;
platform-dal/src/main/java/com/lyms/platform/pojo/AntenatalExaminationModel.java View file @ f91988e
... ... @@ -10,7 +10,7 @@
10 10  
11 11 /**
12 12 * 产前检查(复诊)
13   - *
  13 + * <p>
14 14 * Created by Administrator on 2016/6/16 0016.
15 15 */
16 16 @Document(collection = "lyms_antex")
... ... @@ -40,7 +40,9 @@
40 40 this.genRemark = genRemark;
41 41 }
42 42  
43   - /** 是否打印过 1=已打印 有这个字段就算打印 */
  43 + /**
  44 + * 是否打印过 1=已打印 有这个字段就算打印
  45 + */
44 46 private Integer isPrient;
45 47  
46 48 public Integer getIsPrient() {
47 49  
48 50  
... ... @@ -62,12 +64,18 @@
62 64 this.mHighRiskReason = mHighRiskReason;
63 65 }
64 66  
65   - /** 处理意见 */
  67 + /**
  68 + * 处理意见
  69 + */
66 70 private Map<String, List<String>> treatmentOpinion2;
67 71 private List<String> treatmentOpinion2Types;
68   - /** 胎动 */
  72 + /**
  73 + * 胎动
  74 + */
69 75 private String quicken;
70   - /** 胎动备注 */
  76 + /**
  77 + * 胎动备注
  78 + */
71 79 private String quickenRemark;
72 80  
73 81 public String getQuicken() {
74 82  
75 83  
... ... @@ -110,28 +118,32 @@
110 118 this.randomBloodSugar = randomBloodSugar;
111 119 }
112 120  
  121 + //筛查结果
  122 + private List<String> screenResult;
  123 + //结果补充
  124 + private String resultSupple;
113 125 private String id;
114 126 private String barCode;
115 127 private String pid;
116   - private String parentId;
  128 + private String parentId;
117 129 //末次月经
118 130 private Date lastMenses;
119   - /* //名字
120   - private String name;
121   - //年龄
122   - private String age;
123   - //孕周
124   - private String dueWeek;
125   - //预产期
126   - private String yChanQi;
127   - //手机号
128   - private String phone;
129   - //高危因素
130   - private String riskFactor;
131   - //高危评分
132   - private String riskScore;
133   - //备注
134   - private String remarks;*/
  131 + /* //名字
  132 + private String name;
  133 + //年龄
  134 + private String age;
  135 + //孕周
  136 + private String dueWeek;
  137 + //预产期
  138 + private String yChanQi;
  139 + //手机号
  140 + private String phone;
  141 + //高危因素
  142 + private String riskFactor;
  143 + //高危评分
  144 + private String riskScore;
  145 + //备注
  146 + private String remarks;*/
135 147 //<!---------基本信息----------->
136 148 //检查报告列表
137 149 // private List reportList;
138 150  
139 151  
... ... @@ -170,11 +182,11 @@
170 182 //血糖
171 183 private String bloodSugar;
172 184 // 血糖2
173   - private String bloodSugar2;
  185 + private String bloodSugar2;
174 186 // 血糖3
175   - private String bloodSugar3;
  187 + private String bloodSugar3;
176 188 // 血糖4
177   - private String bloodSugar4;
  189 + private String bloodSugar4;
178 190 //高危因素
179 191 private String riskFactor;
180 192 // 高危评分
... ... @@ -235,7 +247,7 @@
235 247 //游离甲状腺素(FT4)
236 248 public String freeThy;
237 249 //促甲状腺激素(TSH)
238   - public Map<String,Object> thyStim;
  250 + public Map<String, Object> thyStim;
239 251 //抗甲状腺球蛋白抗体(TGA)
240 252 public String antGlan;
241 253 //抗甲状腺微粒体抗体(TMA)
242 254  
... ... @@ -275,7 +287,23 @@
275 287 //心电图
276 288 public String electr;
277 289  
  290 + public List<String> getScreenResult() {
  291 + return screenResult;
  292 + }
278 293  
  294 +
  295 + public void setScreenResult(List<String> screenResult) {
  296 + this.screenResult = screenResult;
  297 + }
  298 +
  299 + public String getResultSupple() {
  300 + return resultSupple;
  301 + }
  302 +
  303 + public void setResultSupple(String resultSupple) {
  304 + this.resultSupple = resultSupple;
  305 + }
  306 +
279 307 public String getTtita() {
280 308 return ttita;
281 309 }
... ... @@ -463,7 +491,6 @@
463 491 /***新增辅助检查项***/
464 492  
465 493  
466   -
467 494 public String getHighriskDesc() {
468 495 return highriskDesc;
469 496 }
... ... @@ -671,8 +698,6 @@
671 698 public void setBp(String bp) {
672 699 this.bp = bp;
673 700 }
674   -
675   -
676 701  
677 702 public String getCheckDoctor() {
678 703 return checkDoctor;
platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java View file @ f91988e
... ... @@ -26,7 +26,8 @@
26 26 public void setShortCode(String shortCode) {
27 27 this.shortCode = shortCode;
28 28 }
29   -
  29 + //筛查结果
  30 + private List<String> screenResult;
30 31 // 纠正末次月经 (和末次月经反起存)
31 32 private Date fuckLastMens;
32 33 // 末次月经纠正依据
... ... @@ -427,6 +428,14 @@
427 428  
428 429 public void setFmType(String fmType) {
429 430 this.fmType = fmType;
  431 + }
  432 +
  433 + public List<String> getScreenResult() {
  434 + return screenResult;
  435 + }
  436 +
  437 + public void setScreenResult(List<String> screenResult) {
  438 + this.screenResult = screenResult;
430 439 }
431 440  
432 441 public String getSource() {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PremaritalCheckupController.java View file @ f91988e
... ... @@ -44,6 +44,7 @@
44 44 // 获取当前登录用户ID
45 45 LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
46 46  
  47 +
47 48 return premaritalCheckupFacade.addPremaritalCheckup(addRequest , loginState.getId());
48 49 }
49 50  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/UsersController.java View file @ f91988e
... ... @@ -3,6 +3,7 @@
3 3  
4 4 import com.lyms.hospitalapi.whfy.VirtualCallService;
5 5 import com.lyms.platform.biz.service.BasicConfigService;
  6 +import com.lyms.platform.biz.service.ModularFunctionConfigService;
6 7 import com.lyms.platform.biz.service.OrganizationGroupsService;
7 8 import com.lyms.platform.common.annotation.TokenRequired;
8 9 import com.lyms.platform.common.base.BaseController;
9 10  
... ... @@ -23,7 +24,9 @@
23 24 import com.lyms.platform.permission.service.*;
24 25 import com.lyms.platform.pojo.BasicConfig;
25 26 import com.lyms.platform.pojo.DataPermissionsModel;
  27 +import com.lyms.platform.pojo.ModularFunctionConfigModel;
26 28 import com.lyms.platform.pojo.OrganizationGroups;
  29 +import com.lyms.platform.query.ModularFunctionConfigQuery;
27 30 import org.apache.commons.collections.CollectionUtils;
28 31 import org.apache.commons.lang.StringUtils;
29 32 import org.apache.commons.lang.math.NumberUtils;
30 33  
... ... @@ -83,8 +86,9 @@
83 86 private BasicConfigService basicConfigService;
84 87 @Autowired
85 88 private CouponService couponService;
86   -
87 89 @Autowired
  90 + private ModularFunctionConfigService modularFunctionConfigServcie;
  91 + @Autowired
88 92 private OperateLogFacade operateLogFacade;
89 93  
90 94 private static final String LYMS = "龙源美生";
... ... @@ -489,6 +493,8 @@
489 493 users = usersService.getUsers(loginContext.getId());
490 494 }
491 495  
  496 + String hospitalId = autoMatchFacade.getHospitalId(users.getId());
  497 +
492 498 List<Permissions2> permissions = null;
493 499 List<Roles> roles = new ArrayList<>();
494 500 //超级管理员拥有所有角色和权限
... ... @@ -612,7 +618,15 @@
612 618 map.put("roles", roles);
613 619 map.put("permissions", permissions);
614 620 map.put("types", types);
615   -
  621 + ModularFunctionConfigQuery diagnoseConfigQuery = new ModularFunctionConfigQuery();
  622 + diagnoseConfigQuery.setHospitalId(hospitalId);
  623 + //医院配置
  624 + List<ModularFunctionConfigModel> configModels = modularFunctionConfigServcie.queryDiagnoseConfigs(diagnoseConfigQuery);
  625 + if (CollectionUtils.isNotEmpty(configModels))
  626 + {
  627 + ModularFunctionConfigModel configModel = configModels.get(0);
  628 + map.put("modularFunction", configModel.getConfigs());
  629 + }
616 630 ResultUtils.buildSuccessResultAndWrite(response, map);
617 631 }
618 632  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java View file @ f91988e
... ... @@ -24,6 +24,7 @@
24 24 import com.lyms.platform.query.*;
25 25 import org.apache.commons.collections.CollectionUtils;
26 26 import org.apache.commons.collections.MapUtils;
  27 +import org.apache.commons.collections.map.HashedMap;
27 28 import org.apache.commons.lang.StringUtils;
28 29 import org.apache.commons.lang.math.NumberUtils;
29 30 import org.slf4j.Logger;
... ... @@ -285,7 +286,6 @@
285 286 patientsService.validata(p);
286 287 }
287 288  
288   -
289 289 if (StringUtils.isNotEmpty(antExAddRequest.getId())) {
290 290 model.setHospitalId(hospitalId);
291 291 model.setOperator(userId);
292 292  
293 293  
294 294  
295 295  
... ... @@ -300,18 +300,20 @@
300 300 patientsService.updateNextCheckTime(antExAddRequest.getNextCheckTime(), antExAddRequest.getParentId());
301 301  
302 302 Patients patients = patientsService.findOnePatientById(antExAddRequest.getParentId());
  303 + //最后一次产检医生
303 304 patients.setLastCheckEmployeeId(antExAddRequest.getCheckDoctor());
  305 +
304 306 patientsService.updatePatient(patients);
305 307  
306 308 //修改孕妇高危等级
307 309 updateLastRisk(antExAddRequest.getParentId());
308 310  
309   - //修改本院最后一次定义高危
  311 + //修改本院最后一次定义高危时间
310 312 updateLastRhTime(patients.getId(), hospitalId);
  313 +
311 314 //修改最后一次检查时间
312 315 setLashCTimes(antExAddRequest.getParentId());
313 316  
314   -
315 317 //修改数据
316 318 syncMaster(antExAddRequest.getParentId(), antExAddRequest.getNextCheckTime());
317 319  
... ... @@ -337,7 +339,6 @@
337 339 return new BaseResponse().setErrorcode(ErrorCodeConstants.DATA_EXIST).setErrormsg("同一天只能建一次复诊");
338 340 }
339 341  
340   -
341 342 //修改申请单状态
342 343 updateApplyOrder(model, antExAddRequest.getParentId());
343 344  
344 345  
... ... @@ -367,9 +368,9 @@
367 368  
368 369 Patients patients1 = new Patients();
369 370 patients1.setId(patients.getId());
  371 + //最后一次产检医生
370 372 patients1.setLastCheckEmployeeId(antExAddRequest.getCheckDoctor());
371 373  
372   -
373 374 if (StringUtils.isNotEmpty(patients.getEnable()) && "0".equals(patients.getEnable())) {
374 375 patients1.setEnable("1");
375 376 }
... ... @@ -913,6 +914,54 @@
913 914 }
914 915  
915 916 /**
  917 + * 查询当前产程孕妇诊断结果
  918 + *
  919 + * @param pid
  920 + * @return
  921 + */
  922 + public Map<String,Object> getPatLastScreenResult(String pid) {
  923 + AntExQuery antExQuery = new AntExQuery();
  924 + antExQuery.setParentId(pid);
  925 + antExQuery.setYn(YnEnums.YES.getId());
  926 + List<AntenatalExaminationModel> list = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.DESC, "checkDate"));
  927 + Map highScoreResult = new HashedMap();
  928 + boolean next = true;
  929 + if (CollectionUtils.isNotEmpty(list)) {
  930 + for (AntenatalExaminationModel model : list) {
  931 + if (!next) {
  932 + break;
  933 + }
  934 + highScoreResult.put("screenResult",model.getScreenResult());
  935 + next = false;
  936 + }
  937 + }
  938 +
  939 + //初诊
  940 + try {
  941 + if (next) {
  942 + AntExChuQuery antExChuQuery = new AntExChuQuery();
  943 + antExChuQuery.setParentId(pid);
  944 + antExChuQuery.setYn(YnEnums.YES.getId());
  945 + MongoQuery mongoQuery = antExChuQuery.convertToQuery();
  946 + mongoQuery.addOrder(Sort.Direction.DESC, "checkTime");
  947 + List<AntExChuModel> list1 = antenatalExaminationService.queryAntExChu(mongoQuery);
  948 + if (CollectionUtils.isNotEmpty(list1)) {
  949 + for (AntExChuModel antExChuModel : list1) {
  950 + if (!next) {
  951 + break;
  952 + }
  953 + highScoreResult.put("screenResult",antExChuModel.getScreenResult());
  954 + next = false;
  955 + }
  956 + }
  957 + }
  958 + } catch (Exception e) {
  959 + e.printStackTrace();
  960 + }
  961 + return highScoreResult;
  962 + }
  963 +
  964 + /**
916 965 * 电子病历方法
917 966 *
918 967 * @param exListQueryRequest
... ... @@ -1971,8 +2020,6 @@
1971 2020 }
1972 2021 }
1973 2022 }
1974   -
1975   -
1976 2023 return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
1977 2024 }
1978 2025  
... ... @@ -1999,6 +2046,12 @@
1999 2046 patients1.setRiskLevelId(JsonUtil.array2JsonString(list));
2000 2047 //设置其他的高危因素
2001 2048 patients1.setoRiskFactor(StringUtils.isNotEmpty(highScoreResult.getOtherRisk()) ? highScoreResult.getOtherRisk() : "");
  2049 +
  2050 + //查询最后一次产检筛查结果冗余到patient表
  2051 + Map<String,Object> map = getPatLastScreenResult(patients.getId());
  2052 + if(map!=null&&map.containsKey("screenResult")){
  2053 + patients1.setScreenResult((List<String>) map.get("screenResult"));
  2054 + }
2002 2055 patientsService.findAndModify(patientsQuery1, patients1);
2003 2056 }
2004 2057  
... ... @@ -2642,7 +2695,6 @@
2642 2695 m.put("textpjbc", text);
2643 2696 m.put("s75gdgtt", s75gdgtt);
2644 2697 m.put("jzxgn", jzxgn);
2645   -
2646 2698 break;
2647 2699 }
2648 2700 }
... ... @@ -2679,8 +2731,6 @@
2679 2731 }
2680 2732  
2681 2733 public BaseResponse getEnums(Integer userId) {
2682   - String hospitalId = autoMatchFacade.getHospitalId(userId);
2683   -
2684 2734 Map<String, Object> map = new HashMap<>();
2685 2735 // 胎动情况
2686 2736 map.put("quickenEnum", EnumUtil.toJson(QuickenEnums.class));
... ... @@ -2722,29 +2772,6 @@
2722 2772 map.put("gwfz", basicConfigFacade.getBaseicConfigByParentId(SystemConfig.GWFZ));
2723 2773 map.put("organizations", convert());
2724 2774 map.put("cTime", DateUtil.getyyyy_MM_dd(new Date()));
2725   - ModularFunctionConfigQuery diagnoseConfigQuery = new ModularFunctionConfigQuery();
2726   - diagnoseConfigQuery.setHospitalId(hospitalId);
2727   - //医院配置
2728   - List<ModularFunctionConfigModel> configModels = modularFunctionConfigServcie.queryDiagnoseConfigs(diagnoseConfigQuery);
2729   - if (CollectionUtils.isNotEmpty(configModels))
2730   - {
2731   - ModularFunctionConfigModel configModel = configModels.get(0);
2732   - map.put("modularFunction", configModel.getConfigs());
2733   - }
2734   -
2735   - if (CollectionUtils.isEmpty(mainBasicConfigList)) {
2736   - BasicConfigQuery basicConfigQuery = new BasicConfigQuery();
2737   - basicConfigQuery.setEnable(1);
2738   - basicConfigQuery.setTypeId("5b023e73422b03d4ad2bf8af");
2739   -
2740   - //所有数据
2741   - List<BasicConfig> basicConfigList = basicConfigService.queryBasicConfig(basicConfigQuery);
2742   - //主节点数据
2743   - basicConfigQuery.setTypeId(null);
2744   - basicConfigQuery.setParentId("5b023e73422b03d4ad2bf8af");
2745   - mainBasicConfigList = basicConfigService.queryBasicConfig(basicConfigQuery);
2746   - BasicConfigFacade.dispNewHighRisk(basicConfigList, mainBasicConfigList);
2747   - }
2748 2775 //筛查结果的基础数据
2749 2776 map.put("secrEnmum", mainBasicConfigList);
2750 2777 return new BaseObjectResponse().setData(map).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AntExAddRequest.java View file @ f91988e
... ... @@ -146,7 +146,11 @@
146 146 private String bloodSugar4;
147 147 //高危因素
148 148 private List<String> riskFactor;
149   - // 高危评分
  149 + //筛查结果
  150 + private List<String> screenResult;
  151 + //结果补充
  152 + private String resultSupple;
  153 + //高危评分
150 154 private String riskScore;
151 155 //其他高危
152 156 private List<Map> otherRisk;
... ... @@ -160,8 +164,6 @@
160 164 private String typeYc;
161 165 //处理意见
162 166 private String treatmentOpinion;
163   -
164   -
165 167 //指导
166 168 private String guide;
167 169 //产检医生
168 170  
... ... @@ -587,9 +589,27 @@
587 589 this.gongGaoType = gongGaoType;
588 590 }
589 591  
  592 + public List<String> getScreenResult() {
  593 + return screenResult;
  594 + }
  595 +
  596 + public void setScreenResult(List<String> screenResult) {
  597 + this.screenResult = screenResult;
  598 + }
  599 +
  600 + public String getResultSupple() {
  601 + return resultSupple;
  602 + }
  603 +
  604 + public void setResultSupple(String resultSupple) {
  605 + this.resultSupple = resultSupple;
  606 + }
  607 +
590 608 @Override
591 609 public AntenatalExaminationModel convertToDataModel() {
592 610 AntenatalExaminationModel examinationModel = new AntenatalExaminationModel();
  611 + examinationModel.setScreenResult(screenResult);
  612 + examinationModel.setResultSupple(resultSupple);
593 613 examinationModel.setTtita(ttita);
594 614 examinationModel.setTotalThy(totalThy);
595 615 examinationModel.setFtita(ftita);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AntExcAddRequest.java View file @ f91988e
... ... @@ -212,7 +212,10 @@
212 212 private Map cestationInfo;
213 213 //丈夫健康情况
214 214 private Map hHealthInfo;
215   -
  215 + //筛查结果
  216 + private List<String> secrFactor;
  217 + //结果补充
  218 + private String resultRepl;
216 219 //孕次
217 220 private Integer pregnancyTimes;
218 221 // 产次
... ... @@ -727,6 +730,22 @@
727 730 this.jzxgn = jzxgn;
728 731 }
729 732  
  733 + public List<String> getSecrFactor() {
  734 + return secrFactor;
  735 + }
  736 +
  737 + public void setSecrFactor(List<String> secrFactor) {
  738 + this.secrFactor = secrFactor;
  739 + }
  740 +
  741 + public String getResultRepl() {
  742 + return resultRepl;
  743 + }
  744 +
  745 + public void setResultRepl(String resultRepl) {
  746 + this.resultRepl = resultRepl;
  747 + }
  748 +
730 749 //自然流产
731 750 private Integer abortionZR;
732 751 //人工流产
... ... @@ -1585,6 +1604,8 @@
1585 1604 @Override
1586 1605 public AntExChuModel convertToDataModel() {
1587 1606 AntExChuModel antExChuModel = new AntExChuModel();
  1607 + antExChuModel.setScreenResult(secrFactor);
  1608 + antExChuModel.setResultSupple(resultRepl);
1588 1609 antExChuModel.setTtita(ttita);
1589 1610 antExChuModel.setTotalThy(totalThy);
1590 1611 antExChuModel.setFtita(ftita);
... ... @@ -1608,9 +1629,6 @@
1608 1629 antExChuModel.setApolipa(apolipa);
1609 1630 antExChuModel.setApolipb(apolipb);
1610 1631 antExChuModel.setElectr(electr);
1611   -
1612   -
1613   -
1614 1632 antExChuModel.setHighriskDesc(highriskDesc);
1615 1633 antExChuModel.setLisCheckItems(lisCheckItems);
1616 1634 antExChuModel.setGenRemark(genRemark);
1617 1635  
... ... @@ -1619,10 +1637,8 @@
1619 1637 antExChuModel.setTreatmentOpinion2Types(treatmentOpinion2Types);
1620 1638 antExChuModel.setQuicken(quicken);
1621 1639 antExChuModel.setQuickenRemark(quickenRemark);
1622   -
1623 1640 antExChuModel.setAntExcAddOthers(antExcAddOthers);
1624 1641 antExChuModel.setSurvFetus(survFetus);
1625   -
1626 1642 antExChuModel.setVulvaSele(vulvaSele);
1627 1643 antExChuModel.setVaginaSele(vaginaSele);
1628 1644 antExChuModel.setCervicalSele(cervicalSele);