Commit ea5c19a58ececfe57d34f4ac2cffee56c11b7b8a
1 parent
cb8ff1d3af
Exists in
master
and in
6 other branches
区域管理中增加听力筛查列表 听力筛查
Showing 7 changed files with 189 additions and 15 deletions
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarScreen.java
- platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyEarController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/EarScreenListRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/MatDeliverAddRequest.java
platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarScreen.java
View file @
ea5c19a
... | ... | @@ -13,6 +13,7 @@ |
13 | 13 | |
14 | 14 | private String babyId; |
15 | 15 | |
16 | + private String[] babyIds; | |
16 | 17 | /** |
17 | 18 | * 筛查类型 1=初筛 2=复筛 |
18 | 19 | */ |
... | ... | @@ -149,6 +150,13 @@ |
149 | 150 | //0-正常 1-删除 |
150 | 151 | private Integer status; |
151 | 152 | |
153 | + public String[] getBabyIds() { | |
154 | + return babyIds; | |
155 | + } | |
156 | + | |
157 | + public void setBabyIds(String[] babyIds) { | |
158 | + this.babyIds = babyIds; | |
159 | + } | |
152 | 160 | |
153 | 161 | public Integer getMotherGjb2Del35() { |
154 | 162 | return motherGjb2Del35; |
platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java
View file @
ea5c19a
... | ... | @@ -220,6 +220,9 @@ |
220 | 220 | private String cityId; |
221 | 221 | private String streetId; |
222 | 222 | |
223 | + //详细地址 | |
224 | + private String address; | |
225 | + | |
223 | 226 | private String source; |
224 | 227 | |
225 | 228 | /** |
... | ... | @@ -233,6 +236,14 @@ |
233 | 236 | private Date endAge; |
234 | 237 | |
235 | 238 | |
239 | + public String getAddress() { | |
240 | + return address; | |
241 | + } | |
242 | + | |
243 | + public void setAddress(String address) { | |
244 | + this.address = address; | |
245 | + } | |
246 | + | |
236 | 247 | public Date getStartAge() { |
237 | 248 | return startAge; |
238 | 249 | } |
... | ... | @@ -904,7 +915,9 @@ |
904 | 915 | if (null != streetId) { |
905 | 916 | condition = condition.and("streetId", streetId, MongoOper.IS); |
906 | 917 | } |
907 | - | |
918 | + if (null != address) { | |
919 | + condition = condition.and("address", address, MongoOper.IS); | |
920 | + } | |
908 | 921 | if (null != enable) { |
909 | 922 | condition = condition.and("enable", enable, MongoOper.IS); |
910 | 923 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyEarController.java
View file @
ea5c19a
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
View file @
ea5c19a
... | ... | @@ -91,6 +91,8 @@ |
91 | 91 | recordService.syncAntRecordToList(hospitalId); |
92 | 92 | } |
93 | 93 | |
94 | + @Autowired | |
95 | + private GuidelinesService guidelinesService; | |
94 | 96 | |
95 | 97 | /** |
96 | 98 | * 组合查询请求 |
... | ... | @@ -935,13 +937,6 @@ |
935 | 937 | antExAddRequest.setCheckDoctor(doctorId); |
936 | 938 | antExAddRequest.setDiagnosisOther(DateUtil.getWeekDesc(patients.getLastMenses(), new Date()));// diagnosisOther: "29+4周妊娠 " |
937 | 939 | antExAddRequest.setCurrentDueDate(DateUtil.getWeekDesc(patients.getLastMenses(), new Date()));//currentDueDate: "孕29周+4天" |
938 | - antExAddRequest.setGuide("个人卫生 受激素影响怀孕后肤质与孕前不一样,保养皮肤请做好日常清洁并避免使用刺激性的护肤品与保养品。" + | |
939 | - "心理调节 心理状态不佳更需家人陪伴与支持,可与丈夫一起上孕妇学校课程、或与丈夫携手散步、又或让丈夫给您进行甜蜜按摩。" + | |
940 | - "营养 虽然孕期体重增加过多会增加你的高血压和怀上巨大儿的可能性。但是也不要进入饮食的误区,靠节食来减缓体重增长的速度。" + | |
941 | - "正确的方法是,请医生给你一些均衡饮食的建议,使你能够达到孕期的标准体重。" + | |
942 | - "运动 骨盆底肌肉练习:从现在起,你可以开始做骨盆底肌肉练习了,这个运动可以帮助你分娩的更快、更容易。" + | |
943 | - "骨盆底肌肉练习的步骤是:收缩肛门、阴道,再放松。重复这个动作30次。" + | |
944 | - "其他 当宝贝活动较多的时候,可跟老公一起给宝贝读些优美的诗歌,享受一家人的幸福时光。"); | |
945 | 940 | antExAddRequest.setParentId(patients.getId()); |
946 | 941 | antExAddRequest.setPid(pid); |
947 | 942 | antExAddRequest.setRiskFactor(patients.getRiskFactorId()); |
948 | 943 | |
... | ... | @@ -954,9 +949,24 @@ |
954 | 949 | MatDeliverAddRequest.Placenta placenta = new MatDeliverAddRequest.Placenta(); |
955 | 950 | placenta.setHeartRate(Double.parseDouble(l)); |
956 | 951 | placentaList.add(placenta); |
952 | + | |
957 | 953 | } |
958 | 954 | antExAddRequest.setTireData(placentaList); |
959 | 955 | antExAddRequest.setTireNumber(list.size() + ""); |
956 | + GuidelinesQuery guidelinesQuery = new GuidelinesQuery(); | |
957 | + guidelinesQuery.setType(1); | |
958 | + guidelinesQuery.setMaxStart(DateUtil.getWeek(patients.getLastMenses(), new Date())); | |
959 | + guidelinesQuery.setMinEnd(DateUtil.getWeek(patients.getLastMenses(), new Date())); | |
960 | + System.out.println("指导意见查询条件:" + guidelinesQuery.convertToQuery().convertToMongoQuery()); | |
961 | + List<Guidelines> lists = guidelinesService.queryGuidelines(guidelinesQuery); | |
962 | + StringBuilder stringBuilder = new StringBuilder(128); | |
963 | + if (CollectionUtils.isNotEmpty(lists)) { | |
964 | + for (Guidelines guidelines : lists) { | |
965 | + stringBuilder.append(guidelines.getCategory()).append(" ").append(guidelines.getContent()).append("\r\n"); | |
966 | + } | |
967 | + } | |
968 | + antExAddRequest.setGuide(stringBuilder.toString()); | |
969 | + | |
960 | 970 | } |
961 | 971 | antenatalExaminationFacade.addOneAntEx(antExAddRequest, Integer.parseInt(doctorId)); |
962 | 972 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java
View file @
ea5c19a
... | ... | @@ -1958,6 +1958,7 @@ |
1958 | 1958 | screenQuery.setStatus(0); |
1959 | 1959 | screenQuery.setSort("screen_date"); |
1960 | 1960 | screenQuery.setNeed("y"); |
1961 | + | |
1961 | 1962 | screenQuery.setPage(earScreenListRequest.getPage()); |
1962 | 1963 | screenQuery.setOffset((earScreenListRequest.getPage() - 1) * earScreenListRequest.getLimit()); |
1963 | 1964 | screenQuery.setLimit(earScreenListRequest.getLimit()); |
1964 | 1965 | |
... | ... | @@ -2107,11 +2108,21 @@ |
2107 | 2108 | * @param userId |
2108 | 2109 | * @return |
2109 | 2110 | */ |
2111 | + | |
2112 | + @Autowired | |
2113 | + private AreaCountFacade areaCountFacade; | |
2114 | + | |
2110 | 2115 | public BaseResponse babyearListRegion(EarScreenListRequest earScreenListRequest, Integer userId) { |
2111 | 2116 | //获取当前用户能看到的那些医院 |
2112 | - List<String> hospital = groupsFacade.findGroupHospital(userId, false); | |
2113 | - String[] hospitalIdArray = new String[hospital.size()]; | |
2114 | - | |
2117 | + List<String> hospitalIds = new ArrayList<>(); | |
2118 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(earScreenListRequest.getHospitalId())) { | |
2119 | + hospitalIds.add(earScreenListRequest.getHospitalId()); | |
2120 | + } else { | |
2121 | + //获取用户拥有的权限医院和条件筛选的医院交集 | |
2122 | + hospitalIds = areaCountFacade.getCurrentUserHospPermissions(userId, earScreenListRequest.getOrgProvinceId(), earScreenListRequest.getOrgCityId(), earScreenListRequest.getAreaId()); | |
2123 | + } | |
2124 | + // List<String> hospital = groupsFacade.findGroupHospital(userId, false); | |
2125 | + String[] hospitalIdArray = new String[hospitalIds.size()]; | |
2115 | 2126 | BabyPatientExtendEarScreenQuery screenQuery = new BabyPatientExtendEarScreenQuery(); |
2116 | 2127 | screenQuery.setSrcStartTime(earScreenListRequest.getSrcStartTime()); |
2117 | 2128 | screenQuery.setSrcEndTime(earScreenListRequest.getSrcEndTime()); |
... | ... | @@ -2124,7 +2135,7 @@ |
2124 | 2135 | screenQuery.setNextEndTime(earScreenListRequest.getNextEndTime()); |
2125 | 2136 | //当前登录人医院Id |
2126 | 2137 | |
2127 | - screenQuery.setCheckHospitalIds(hospital.toArray(hospitalIdArray)); | |
2138 | + screenQuery.setCheckHospitalIds(hospitalIds.toArray(hospitalIdArray)); | |
2128 | 2139 | screenQuery.setStatus(0); |
2129 | 2140 | screenQuery.setSort("screen_date"); |
2130 | 2141 | screenQuery.setNeed("y"); |
2131 | 2142 | |
... | ... | @@ -2132,11 +2143,26 @@ |
2132 | 2143 | screenQuery.setOffset((earScreenListRequest.getPage() - 1) * earScreenListRequest.getLimit()); |
2133 | 2144 | screenQuery.setLimit(earScreenListRequest.getLimit()); |
2134 | 2145 | |
2146 | + BabyModelQuery modelQuery = new BabyModelQuery(); | |
2147 | + modelQuery.setProvinceId(earScreenListRequest.getProvinceId()); | |
2148 | + modelQuery.setCityId(earScreenListRequest.getCityId()); | |
2149 | + modelQuery.setAreaId(earScreenListRequest.getAreaId()); | |
2150 | + modelQuery.setStreetId(earScreenListRequest.getStreetId()); | |
2151 | + modelQuery.setAreaId(earScreenListRequest.getAreaId()); | |
2152 | + List<BabyModel> babyModels = babyService.queryBabyWithQuery(modelQuery); | |
2153 | + List<String> list = new ArrayList<>(); | |
2154 | + if (CollectionUtils.isNotEmpty(babyModels)) { | |
2155 | + for (BabyModel babyModel : babyModels) { | |
2156 | + list.add(babyModel.getId()); | |
2157 | + } | |
2158 | + } | |
2159 | + String[] babyIdArray = new String[list.size()]; | |
2160 | + screenQuery.setBabyIds(list.toArray(babyIdArray)); | |
2135 | 2161 | //如果查询号不为空,根据查询号查询儿童档案表,获取儿童档案Id |
2136 | 2162 | if (StringUtils.isNotEmpty(earScreenListRequest.getKeyWord()) || earScreenListRequest.getBirthStartTime() != null || earScreenListRequest.getBirthEndTime() != null) {//关键字:姓名、联系方式、就诊卡 查询babyId |
2137 | 2163 | BabyPatientExtendEarBabyQuery babyQuery = new BabyPatientExtendEarBabyQuery(); |
2138 | 2164 | babyQuery.setQueryNo(earScreenListRequest.getKeyWord()); |
2139 | - babyQuery.setHospitalIds(hospital.toArray(hospitalIdArray)); | |
2165 | + babyQuery.setHospitalIds(hospitalIds.toArray(hospitalIdArray)); | |
2140 | 2166 | babyQuery.setBirthStart(earScreenListRequest.getBirthStartTime()); |
2141 | 2167 | babyQuery.setBirthEnd(earScreenListRequest.getBirthEndTime()); |
2142 | 2168 | List<BabyPatientExtendEarBaby> models = earBabyService.queryBabyPatientExtendEarBaby(babyQuery); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/EarScreenListRequest.java
View file @
ea5c19a
... | ... | @@ -7,7 +7,7 @@ |
7 | 7 | * @createTime 2017年08月11日 14时51分 |
8 | 8 | * @discription |
9 | 9 | */ |
10 | -public class EarScreenListRequest extends BasePageQueryRequest{ | |
10 | +public class EarScreenListRequest extends BasePageQueryRequest { | |
11 | 11 | //筛查开始日期 |
12 | 12 | private String srcStartTime; |
13 | 13 | //筛查结束日期 |
... | ... | @@ -36,6 +36,97 @@ |
36 | 36 | private Integer leftRight; |
37 | 37 | //筛查技术 1-AOE 2-AABR |
38 | 38 | private Integer srcSkill; |
39 | + //省 | |
40 | + private String provinceId; | |
41 | + //城市id | |
42 | + private String cityId; | |
43 | + //县id | |
44 | + private String areaId; | |
45 | + //镇id | |
46 | + private String streetId; | |
47 | + //详细地址 | |
48 | + private String address; | |
49 | + | |
50 | + //省市区查询机构 | |
51 | + private String orgProvinceId; | |
52 | + //城市id | |
53 | + private String orgCityId; | |
54 | + //县id | |
55 | + private String orgAreaId; | |
56 | + //医院id | |
57 | + private String hospitalId; | |
58 | + | |
59 | + public String getOrgProvinceId() { | |
60 | + return orgProvinceId; | |
61 | + } | |
62 | + | |
63 | + public void setOrgProvinceId(String orgProvinceId) { | |
64 | + this.orgProvinceId = orgProvinceId; | |
65 | + } | |
66 | + | |
67 | + public String getOrgCityId() { | |
68 | + return orgCityId; | |
69 | + } | |
70 | + | |
71 | + public void setOrgCityId(String orgCityId) { | |
72 | + this.orgCityId = orgCityId; | |
73 | + } | |
74 | + | |
75 | + public String getOrgAreaId() { | |
76 | + return orgAreaId; | |
77 | + } | |
78 | + | |
79 | + public void setOrgAreaId(String orgAreaId) { | |
80 | + this.orgAreaId = orgAreaId; | |
81 | + } | |
82 | + | |
83 | + public String getHospitalId() { | |
84 | + return hospitalId; | |
85 | + } | |
86 | + | |
87 | + public void setHospitalId(String hospitalId) { | |
88 | + this.hospitalId = hospitalId; | |
89 | + } | |
90 | + | |
91 | + public String getProvinceId() { | |
92 | + return provinceId; | |
93 | + } | |
94 | + | |
95 | + public void setProvinceId(String provinceId) { | |
96 | + this.provinceId = provinceId; | |
97 | + } | |
98 | + | |
99 | + public String getCityId() { | |
100 | + return cityId; | |
101 | + } | |
102 | + | |
103 | + public void setCityId(String cityId) { | |
104 | + this.cityId = cityId; | |
105 | + } | |
106 | + | |
107 | + public String getAreaId() { | |
108 | + return areaId; | |
109 | + } | |
110 | + | |
111 | + public void setAreaId(String areaId) { | |
112 | + this.areaId = areaId; | |
113 | + } | |
114 | + | |
115 | + public String getStreetId() { | |
116 | + return streetId; | |
117 | + } | |
118 | + | |
119 | + public void setStreetId(String streetId) { | |
120 | + this.streetId = streetId; | |
121 | + } | |
122 | + | |
123 | + public String getAddress() { | |
124 | + return address; | |
125 | + } | |
126 | + | |
127 | + public void setAddress(String address) { | |
128 | + this.address = address; | |
129 | + } | |
39 | 130 | |
40 | 131 | public Integer getSrcSkill() { |
41 | 132 | return srcSkill; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/MatDeliverAddRequest.java
View file @
ea5c19a
... | ... | @@ -7,6 +7,14 @@ |
7 | 7 | import com.lyms.platform.common.utils.JsonUtil; |
8 | 8 | import com.lyms.platform.pojo.MaternalDeliverModel; |
9 | 9 | import org.apache.commons.lang.StringUtils; |
10 | +import org.springframework.beans.factory.annotation.Autowired; | |
11 | +import org.springframework.context.annotation.Bean; | |
12 | +import org.springframework.data.mongodb.MongoDbFactory; | |
13 | +import org.springframework.data.mongodb.core.convert.DbRefResolver; | |
14 | +import org.springframework.data.mongodb.core.convert.DefaultDbRefResolver; | |
15 | +import org.springframework.data.mongodb.core.convert.DefaultMongoTypeMapper; | |
16 | +import org.springframework.data.mongodb.core.convert.MappingMongoConverter; | |
17 | +import org.springframework.data.mongodb.core.mapping.MongoMappingContext; | |
10 | 18 | |
11 | 19 | import java.io.Serializable; |
12 | 20 | import java.util.Date; |
... | ... | @@ -19,6 +27,8 @@ |
19 | 27 | */ |
20 | 28 | @Form |
21 | 29 | public class MatDeliverAddRequest implements IBasicRequestConvert<MaternalDeliverModel> { |
30 | + | |
31 | + | |
22 | 32 | private String id; |
23 | 33 | |
24 | 34 | /** |
... | ... | @@ -950,6 +960,12 @@ |
950 | 960 | } |
951 | 961 | |
952 | 962 | public static class Placenta implements Serializable { |
963 | + @Autowired | |
964 | + private MongoDbFactory mongoDbFactory; | |
965 | + | |
966 | + @Autowired | |
967 | + private MongoMappingContext mongoMappingContext; | |
968 | + | |
953 | 969 | private static final long serialVersionUID = SerialIdEnum.Placenta.getCid(); |
954 | 970 | //心率 |
955 | 971 | private Double heartRate; |
... | ... | @@ -1129,7 +1145,14 @@ |
1129 | 1145 | this.yszs = yszs; |
1130 | 1146 | } |
1131 | 1147 | |
1132 | - | |
1148 | + @Bean | |
1149 | + public MappingMongoConverter mappingMongoConverter() { | |
1150 | + DbRefResolver dbRefResolver = new DefaultDbRefResolver(mongoDbFactory); | |
1151 | + MappingMongoConverter converter = new MappingMongoConverter(dbRefResolver, mongoMappingContext); | |
1152 | + //此处是去除插入数据库的 _class 字段 | |
1153 | + converter.setTypeMapper(new DefaultMongoTypeMapper("_class")); | |
1154 | + return converter; | |
1155 | + } | |
1133 | 1156 | } |
1134 | 1157 | |
1135 | 1158 | public static class Baby implements IBasicRequestConvert<MaternalDeliverModel.Baby> { |
... | ... | @@ -2377,5 +2400,7 @@ |
2377 | 2400 | ", deliverDoctor='" + deliverDoctor + '\'' + |
2378 | 2401 | '}'; |
2379 | 2402 | } |
2403 | + | |
2404 | + | |
2380 | 2405 | } |