Commit 306a02e8498cff5529287f31f805bedc8dc85506

Authored by yangfei
1 parent f818818939

听力诊断模块

Showing 4 changed files with 58 additions and 44 deletions

platform-dal/src/main/java/com/lyms/platform/pojo/BabyModel.java View file @ 306a02e
... ... @@ -22,14 +22,6 @@
22 22 //来源id
23 23 private String source;
24 24  
25   - public String getSource() {
26   - return source;
27   - }
28   -
29   - public void setSource(String source) {
30   - this.source = source;
31   - }
32   -
33 25 // 编号
34 26 private String sNumber;
35 27  
36 28  
37 29  
38 30  
39 31  
40 32  
41 33  
... ... @@ -45,31 +37,23 @@
45 37 * 社区id
46 38 */
47 39 private String communityId;
48   -
49   -
50 40 /**
51 41 * 生日
52 42 */
53 43 private Date birth;
54   -
55 44 private String address;
56   -
57 45 private String provinceId;
58 46 private String cityId;
59 47 private String areaId;
60 48 private String streetId;
61 49 // 父亲信息
62 50 private String fname;
63   -
64 51 private String fjob;
65   -
66 52 private String fphone;
67   -
68 53 private Date fbirth;
69 54  
70 55 //职业类别
71 56 private String fproTypeId;
72   -
73 57 //证件号
74 58 private String fcertNo;
75 59 //证件类型ID
76 60  
77 61  
78 62  
79 63  
80 64  
81 65  
82 66  
... ... @@ -80,30 +64,22 @@
80 64  
81 65 // 母亲信息
82 66 private String mname;
83   -
84 67 private String mjob;
85   -
86 68 private String mphone;
87   -
88 69 private Date mbirth;
89   -
90 70 //职业类别
91 71 private String mproTypeId;
92   -
93 72 //证件号
94 73 private String mcertNo;
95 74 //证件类型ID
96 75 private String mcertTypeId;
97   -
98 76 //文化程度ID
99 77 private String mLevelId;
100 78  
101 79 // 助产结构名称
102 80 private String org;
103 81 private String week;
104   -
105 82 private String cardNo;
106   -
107 83 private String hospitalId;
108 84 //建档类型 1、儿童直接建档 2 产妇分娩建档 3 为转诊自动建档
109 85 private Integer buildType;
... ... @@ -111,7 +87,6 @@
111 87 * 性别
112 88 */
113 89 private Integer sex;
114   -
115 90 /**
116 91 * 访视状态
117 92 */
118 93  
... ... @@ -120,9 +95,7 @@
120 95 * 小孩名称
121 96 */
122 97 private String name;
123   -
124 98 private Integer yn;
125   -
126 99 //预产期
127 100 private Date dueDate;
128 101 //分娩方式
... ... @@ -234,6 +207,14 @@
234 207  
235 208 //病历号(住院号)
236 209 private String blNo;
  210 +
  211 + public String getSource() {
  212 + return source;
  213 + }
  214 +
  215 + public void setSource(String source) {
  216 + this.source = source;
  217 + }
237 218  
238 219 public String getBlNo() {
239 220 return blNo;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/EarController.java View file @ 306a02e
... ... @@ -65,12 +65,6 @@
65 65 @ResponseBody
66 66 @TokenRequired
67 67 public BaseResponse checkBabyFollowUp(String babyId) {
68   - // //开发--跳过验证
69   - // if(StringUtils.isNotEmpty(babyId)){
70   - // //根据条件查询基础配置信息表
71   - // InitFollowUp aa = new InitFollowUp();
72   - // return aa.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功");
73   - // }
74 68  
75 69 if (StringUtils.isEmpty(babyId)) {//传入儿童档案id
76 70 return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入儿童档案id");
... ... @@ -135,6 +129,34 @@
135 129 initScreen.setDeafEnumsResult(EnumUtil.toJson(DeafEnums.class));
136 130 return initScreen.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功");
137 131 }
  132 +
  133 + /**
  134 + * 检测儿童是否能够随访
  135 + *
  136 + * @param babyId 儿童档案id
  137 + * @return
  138 + */
  139 + @RequestMapping(method = RequestMethod.GET, value = "/checkBabySrccen")
  140 + @ResponseBody
  141 + @TokenRequired
  142 + public BaseResponse checkBabySrccen(String babyId) {
  143 +
  144 + if (StringUtils.isEmpty(babyId)) {//传入儿童档案id
  145 + return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入儿童档案id");
  146 + }
  147 + //查询儿童听力基础信息
  148 + //根据babyId查询是否存
  149 + BabyPatientExtendEarQuery earQuery = new BabyPatientExtendEarQuery();
  150 + earQuery.setBabyPatientId(babyId);
  151 + List<BabyPatientExtendEar> babyPatientExtendEars = babyPatientExtendEarService.queryBabyPatientExtendEar(earQuery);
  152 + //是否听力建档
  153 + if(CollectionUtils.isEmpty(babyPatientExtendEars)){
  154 + return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_POWER).setErrormsg("当前儿童还未听力建档,不能进行听筛");
  155 + }
  156 +
  157 + return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功");
  158 + }
  159 +
138 160 /**
139 161 * 进入新增随访记录页面前,验证及初始化数据
140 162 *
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java View file @ 306a02e
... ... @@ -27,6 +27,7 @@
27 27 import com.lyms.platform.query.PersonModelQuery;
28 28 import org.apache.commons.collections.CollectionUtils;
29 29 import org.apache.commons.lang.StringUtils;
  30 +import org.apache.commons.lang.math.NumberUtils;
30 31 import org.slf4j.Logger;
31 32 import org.slf4j.LoggerFactory;
32 33 import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -473,8 +474,6 @@
473 474 babyEarBaseView.setmHighRiskFactorList(list);
474 475 }
475 476  
476   - babyEarResult.setBase(babyEarBaseView);
477   -
478 477 //查詢母親的信息
479 478 BabyPatientExtendEarMotherQuery babyPatientExtendEarMotherQuery = new BabyPatientExtendEarMotherQuery();
480 479 babyPatientExtendEarMotherQuery.setBabyPatientId(babyId);
481 480  
... ... @@ -504,11 +503,12 @@
504 503 BabyEarBirthView babyEarBirthView = convertToBabyEarBirthView(babyPatientExtendEarBirths.get(0));
505 504 babyEarResult.setBabyBirth(babyEarBirthView);
506 505 }
507   - objectResponse.setData(babyEarResult);
508   - objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
509   - } else {
510   - objectResponse.setErrorcode(ErrorCodeConstants.BUSINESS_ERROR).setErrormsg("没有对应的儿童");
511 506 }
  507 + babyEarResult.setBase(babyEarBaseView);
  508 + objectResponse.setData(babyEarResult);
  509 + objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
  510 + }else {
  511 + objectResponse.setErrorcode(ErrorCodeConstants.BUSINESS_ERROR).setErrormsg("没有对应的儿童");
512 512 }
513 513 return objectResponse;
514 514 }
515 515  
... ... @@ -1015,10 +1015,17 @@
1015 1015 if (babyEarBase.getNation() != null) {
1016 1016 babyEarBaseView.setNation(mongoUtil.findName(babyEarBase.getNation()));
1017 1017 }
  1018 +
1018 1019 String docotorId = babyEarBase.getCreateUserId();
1019   - Users users = usersService.getUsers(Integer.parseInt(docotorId == null ? "0" : docotorId));
1020   - if (users != null) {
1021   - babyEarBaseView.setCreateUser(users.getName() == null ? "-" : users.getName());
  1020 + if (NumberUtils.isNumber(docotorId)) {
  1021 + Users users = usersService.getUsers(Integer.parseInt(docotorId == null ? "0" : docotorId));
  1022 + if (users != null) {
  1023 + babyEarBaseView.setCreateUser(users.getName() == null ? "-" : users.getName());
  1024 + }else{
  1025 + babyEarBaseView.setCreateUser(docotorId);
  1026 + }
  1027 + } else {
  1028 + babyEarBaseView.setCreateUser(docotorId);
1022 1029 }
1023 1030  
1024 1031 babyEarBaseView.setBirth(babyEarBase.getBirth());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyEarBase.java View file @ 306a02e
... ... @@ -149,8 +149,12 @@
149 149 setMcertNo(babyModel.getMcertNo());
150 150 setMcertTypeId(babyModel.getMcertTypeId());
151 151 setmLevelId(babyModel.getmLevelId());
152   - setmAge(DateUtil.getAge(babyModel.getMbirth(),babyModel.getBuildDate())+"");
153   - setfAge(DateUtil.getAge(babyModel.getFbirth(),babyModel.getBuildDate())+"");
  152 + if(babyModel.getMbirth()!=null){
  153 + setmAge(DateUtil.getAge(babyModel.getMbirth(),babyModel.getBuildDate())+"");
  154 + }
  155 + if(babyModel.getFbirth()!=null){
  156 + setfAge(DateUtil.getAge(babyModel.getFbirth(),babyModel.getBuildDate())+"");
  157 + }
154 158 setCreateTime(DateUtil.getyyyy_MM_dd(babyModel.getBuildDate()));
155 159 setPostCode("");
156 160 setSex(babyModel.getSex());