Commit 0b7de5331afe4b015510b61ab09496b5dbbc6630
1 parent
6d21897c9e
Exists in
master
and in
6 other branches
产检医生统计
Showing 5 changed files with 123 additions and 28 deletions
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarFollowUpQuery.java
- platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarFollowUp.xml
- platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntexDoctorStatistController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/EarController.java
platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarFollowUpQuery.java
View file @
0b7de53
... | ... | @@ -55,8 +55,19 @@ |
55 | 55 | * 人工耳蜗(0-左耳,2-右耳,3-全部) |
56 | 56 | */ |
57 | 57 | private Integer artifiCochlea; |
58 | - | |
59 | 58 | /** |
59 | + * 是否选择助听器 | |
60 | + */ | |
61 | + private Integer isAudiphone; | |
62 | + /** | |
63 | + * 是否选择手术(0-未选择,1-选择) | |
64 | + */ | |
65 | + private Integer isOperation; | |
66 | + /** | |
67 | + * 是否选择人工耳蜗(0-左耳,2-右耳,3-全部) | |
68 | + */ | |
69 | + private Integer isArtifiCochlea; | |
70 | + /** | |
60 | 71 | * 指导意见 |
61 | 72 | */ |
62 | 73 | private String guideOpinion; |
... | ... | @@ -77,7 +88,7 @@ |
77 | 88 | */ |
78 | 89 | private Integer ifdel; |
79 | 90 | /** |
80 | - * 是否结案 | |
91 | + * 是否结案 0-未结案,1-已结案 | |
81 | 92 | */ |
82 | 93 | private Integer ifclose; |
83 | 94 | /** |
... | ... | @@ -123,6 +134,30 @@ |
123 | 134 | private Date nextEndTime; |
124 | 135 | //获取sql语句 |
125 | 136 | private String sqlStr; |
137 | + | |
138 | + public Integer getIsAudiphone() { | |
139 | + return isAudiphone; | |
140 | + } | |
141 | + | |
142 | + public void setIsAudiphone(Integer isAudiphone) { | |
143 | + this.isAudiphone = isAudiphone; | |
144 | + } | |
145 | + | |
146 | + public Integer getIsOperation() { | |
147 | + return isOperation; | |
148 | + } | |
149 | + | |
150 | + public void setIsOperation(Integer isOperation) { | |
151 | + this.isOperation = isOperation; | |
152 | + } | |
153 | + | |
154 | + public Integer getIsArtifiCochlea() { | |
155 | + return isArtifiCochlea; | |
156 | + } | |
157 | + | |
158 | + public void setIsArtifiCochlea(Integer isArtifiCochlea) { | |
159 | + this.isArtifiCochlea = isArtifiCochlea; | |
160 | + } | |
126 | 161 | |
127 | 162 | public String getSqlStr() { |
128 | 163 | return sqlStr; |
platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarFollowUp.xml
View file @
0b7de53
... | ... | @@ -15,6 +15,9 @@ |
15 | 15 | <result column="audiphone" property="audiphone" jdbcType="INTEGER"/> |
16 | 16 | <result column="operation" property="operation" jdbcType="INTEGER"/> |
17 | 17 | <result column="artifi_cochlea" property="artifiCochlea" jdbcType="INTEGER"/> |
18 | + <result column="is_audiphone" property="isAudiphone" jdbcType="INTEGER"/> | |
19 | + <result column="is_operation" property="isOperation" jdbcType="INTEGER"/> | |
20 | + <result column="is_artifi_cochlea" property="isArtifiCochlea" jdbcType="INTEGER"/> | |
18 | 21 | <result column="guide_opinion" property="guideOpinion" jdbcType="VARCHAR"/> |
19 | 22 | <result column="follow_doctor_name" property="followDoctorName" jdbcType="VARCHAR"/> |
20 | 23 | <result column="follow_doctor_id" property="followDoctorId" jdbcType="VARCHAR"/> |
... | ... | @@ -32,10 +35,7 @@ |
32 | 35 | |
33 | 36 | <insert id="addBabyPatientExtendEarFollowUp" |
34 | 37 | parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarFollowUp"> |
35 | - insert into baby_patient_extend_ear_follow_up | |
36 | - (id,baby_id,follow_time,follow_addr,mark_time,mark_result,mark_detail,follow_info,audiphone,operation,artifi_cochlea,guide_opinion,follow_doctor_name,follow_doctor_id,next_time,ifdel,ifclose,hospital_id,modify_time,modify_id,create_time,create_id,enalble) | |
37 | - values | |
38 | - (#{id},#{babyId},#{followTime},#{followAddr},#{markTime},#{markResult},#{markDetail},#{followInfo},#{audiphone},#{operation},#{artifiCochlea},#{guideOpinion},#{followDoctorName},#{followDoctorId},#{nextTime},#{ifdel},#{ifclose},#{hospitalId},#{modifyTime},#{modifyId},#{createTime},#{createId},#{enalble}) | |
38 | + insert into baby_patient_extend_ear_follow_up (id,baby_id,follow_time,follow_addr,mark_time,mark_result,mark_detail,follow_info,audiphone,operation,artifi_cochlea,is_audiphone,is_operation,is_artifi_cochlea,guide_opinion,follow_doctor_name,follow_doctor_id,next_time,ifdel,ifclose,hospital_id,modify_time,modify_id,create_time,create_id,enalble) values (#{id},#{babyId},#{followTime},#{followAddr},#{markTime},#{markResult},#{markDetail},#{followInfo},#{audiphone},#{operation},#{artifiCochlea},#{isAudiphone},#{isOperation},#{isArtifiCochlea},#{guideOpinion},#{followDoctorName},#{followDoctorId},#{nextTime},#{ifdel},#{ifclose},#{hospitalId},#{modifyTime},#{modifyId},#{createTime},#{createId},#{enalble}) | |
39 | 39 | </insert> |
40 | 40 | |
41 | 41 | |
... | ... | @@ -73,6 +73,15 @@ |
73 | 73 | <if test="artifiCochlea != null and artifiCochlea >= 0"> |
74 | 74 | artifi_cochlea = #{artifiCochlea,jdbcType=INTEGER}, |
75 | 75 | </if> |
76 | + <if test="isAudiphone != null and isAudiphone >= 0"> | |
77 | + is_audiphone = #{isAudiphone,jdbcType=INTEGER}, | |
78 | + </if> | |
79 | + <if test="isOperation != null and isOperation >= 0"> | |
80 | + is_operation = #{isOperation,jdbcType=INTEGER}, | |
81 | + </if> | |
82 | + <if test="isArtifiCochlea != null and isArtifiCochlea >= 0"> | |
83 | + is_artifi_cochlea = #{isArtifiCochlea,jdbcType=INTEGER}, | |
84 | + </if> | |
76 | 85 | <if test="guideOpinion != null and guideOpinion != ''"> |
77 | 86 | guide_opinion = #{guideOpinion,jdbcType=VARCHAR}, |
78 | 87 | </if> |
... | ... | @@ -121,7 +130,7 @@ |
121 | 130 | |
122 | 131 | <select id="getBabyPatientExtendEarFollowUp" resultMap="BabyPatientExtendEarFollowUpResultMap" |
123 | 132 | parameterType="java.lang.String"> |
124 | -select id,baby_id,follow_time,follow_addr,mark_time,mark_result,mark_detail,follow_info,audiphone,operation,artifi_cochlea,guide_opinion,follow_doctor_name,follow_doctor_id,next_time,ifdel,ifclose,hospital_id,modify_time,modify_id,create_time,create_id,enalble | |
133 | +select id,baby_id,follow_time,follow_addr,mark_time,mark_result,mark_detail,follow_info,audiphone,operation,artifi_cochlea,is_audiphone,is_operation,is_artifi_cochlea,guide_opinion,follow_doctor_name,follow_doctor_id,next_time,ifdel,ifclose,hospital_id,modify_time,modify_id,create_time,create_id,enalble | |
125 | 134 | from baby_patient_extend_ear_follow_up where id = #{id,jdbcType=VARCHAR} |
126 | 135 | </select> |
127 | 136 | |
... | ... | @@ -147,7 +156,7 @@ |
147 | 156 | </if> |
148 | 157 | <if test="babyIds!=null"> |
149 | 158 | and baby_id in ( |
150 | - <foreach item="babyId" collection="babyIds" separator="," > | |
159 | + <foreach item="babyId" collection="babyIds" separator=","> | |
151 | 160 | #{babyId} |
152 | 161 | </foreach> |
153 | 162 | ) |
... | ... | @@ -247,7 +256,8 @@ |
247 | 256 | <select id="queryBabyPatientExtendEarFollowUp" resultMap="BabyPatientExtendEarFollowUpResultMap" |
248 | 257 | parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarFollowUpQuery"> |
249 | 258 | select |
250 | - id,baby_id,max(follow_time) as follow_time,follow_addr,mark_time,mark_result,mark_detail,follow_info,audiphone,operation,artifi_cochlea,guide_opinion,follow_doctor_name,follow_doctor_id,next_time,ifdel,ifclose,hospital_id,modify_time,modify_id,create_time,create_id,enalble | |
259 | + id,baby_id,max(follow_time) as | |
260 | + follow_time,follow_addr,mark_time,mark_result,mark_detail,follow_info,audiphone,operation,artifi_cochlea,guide_opinion,follow_doctor_name,follow_doctor_id,next_time,ifdel,ifclose,hospital_id,modify_time,modify_id,create_time,create_id,enalble | |
251 | 261 | from baby_patient_extend_ear_follow_up |
252 | 262 | <include refid="BabyPatientExtendEarFollowUpCondition"/> |
253 | 263 | GROUP BY baby_id |
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
0b7de53
... | ... | @@ -23,7 +23,10 @@ |
23 | 23 | |
24 | 24 | private String id; |
25 | 25 | private List<String> ids; |
26 | + private String pid; | |
26 | 27 | |
28 | + private List<String> pIds; | |
29 | + | |
27 | 30 | private String husbandPhone; |
28 | 31 | |
29 | 32 | /** |
... | ... | @@ -204,6 +207,14 @@ |
204 | 207 | return provinceId; |
205 | 208 | } |
206 | 209 | |
210 | + public List<String> getpIds() { | |
211 | + return pIds; | |
212 | + } | |
213 | + | |
214 | + public void setpIds(List<String> pIds) { | |
215 | + this.pIds = pIds; | |
216 | + } | |
217 | + | |
207 | 218 | public void setProvinceId(String provinceId) { |
208 | 219 | this.provinceId = provinceId; |
209 | 220 | } |
... | ... | @@ -272,7 +283,6 @@ |
272 | 283 | this.lastMensesNeEnd = lastMensesNeEnd; |
273 | 284 | } |
274 | 285 | |
275 | - private String pid; | |
276 | 286 | |
277 | 287 | public Date getLastRhTimeEnd() { |
278 | 288 | return lastRhTimeEnd; |
... | ... | @@ -1074,6 +1084,9 @@ |
1074 | 1084 | } |
1075 | 1085 | if (null != pid) { |
1076 | 1086 | condition = condition.and("pid", pid, MongoOper.IS); |
1087 | + } | |
1088 | + if (null != pIds) { | |
1089 | + condition = condition.and("pid", pIds, MongoOper.IN); | |
1077 | 1090 | } |
1078 | 1091 | Criteria c1 = null; |
1079 | 1092 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntexDoctorStatistController.java
View file @
0b7de53
... | ... | @@ -116,7 +116,7 @@ |
116 | 116 | } |
117 | 117 | } |
118 | 118 | if (CollectionUtils.isNotEmpty(patientIds)) { |
119 | - getAllPatientList(patientIds, resultInfo,loginState.getId()); | |
119 | + getAllPatientList(startDate, endDate, childBirth, patientIds, resultInfo, loginState.getId()); | |
120 | 120 | } |
121 | 121 | |
122 | 122 | |
123 | 123 | |
... | ... | @@ -169,8 +169,48 @@ |
169 | 169 | } |
170 | 170 | |
171 | 171 | //获取患者全部检测数据 |
172 | - public void getAllPatientList(List<String> patientId, Map<String, AntextDoctorPatient> resultInfo,Integer userId) { | |
172 | + public void getAllPatientList(Date startDate, Date endDate, Integer childBirth, List<String> patientId, Map<String, AntextDoctorPatient> resultInfo, Integer userId) { | |
173 | 173 | |
174 | + | |
175 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
176 | + patientsQuery.setIds(patientId); | |
177 | + | |
178 | + List<Patients> patientss = yunBookbuildingService.queryPregnantWithQuery(patientsQuery); | |
179 | + List<String> pIds = new ArrayList<>(); | |
180 | + for (Patients ps : patientss) { | |
181 | + pIds.add(ps.getPid()); | |
182 | + } | |
183 | + | |
184 | + patientsQuery = new PatientsQuery(); | |
185 | + patientsQuery.setpIds(pIds); | |
186 | + | |
187 | + if (startDate != null) { | |
188 | + //建档开始时间 | |
189 | + patientsQuery.setBookbuildingDateStart(startDate); | |
190 | + } | |
191 | + if (endDate != null) { | |
192 | + //建档结束时间 | |
193 | + patientsQuery.setBookbuildingDateEnd(endDate); | |
194 | + } | |
195 | + //有效 | |
196 | + patientsQuery.setYn(1); | |
197 | + if (childBirth != null) { | |
198 | + patientsQuery.setType(childBirth); | |
199 | + } | |
200 | + Map<String, List<String>> patientMap = new HashMap<>(); | |
201 | + //获取患者集合 | |
202 | + List<Patients> patientsList = yunBookbuildingService.queryPregnantWithQuery(patientsQuery); | |
203 | + for (Patients ps : patientsList) { | |
204 | + if(patientMap.containsKey(ps.getPid())){//存在 | |
205 | + List<String> paId = patientMap.get(ps.getPid()); | |
206 | + | |
207 | + }else{ | |
208 | + List<String> paId = new ArrayList<>(); | |
209 | + paId.add(ps.getId()); | |
210 | + patientMap.put(ps.getPid(),paId); | |
211 | + } | |
212 | + } | |
213 | + | |
174 | 214 | //根据当前登录人获取医院id |
175 | 215 | String hospital = autoMatchFacade.getHospitalId(userId); |
176 | 216 | |
177 | 217 | |
178 | 218 | |
179 | 219 | |
... | ... | @@ -188,22 +228,22 @@ |
188 | 228 | List<AntenatalExaminationModel> antenatalExaminationModels = antExService.queryAntenatalExamination(antExQuery.convertToQuery()); |
189 | 229 | |
190 | 230 | //复诊:患者id |
191 | - Map<String,Integer> hostNum = new HashMap<>(); | |
231 | + Map<String, Integer> hostNum = new HashMap<>(); | |
192 | 232 | |
193 | 233 | //添加初诊结果 |
194 | 234 | for (AntExChuModel ac : antExChuModels) { |
195 | 235 | AntextDoctorPatient doctorPatient = resultInfo.get(ac.getParentId()); |
196 | 236 | doctorPatient.setAllCjNum(doctorPatient.getAllCjNum() + 1); |
197 | - if(ac.getHospitalId().equals(hospital)){//如果医院id相同, | |
198 | - if(hostNum.containsKey(ac.getPid())){ | |
237 | + if (ac.getHospitalId().equals(hospital)) {//如果医院id相同, | |
238 | + if (hostNum.containsKey(ac.getPid())) { | |
199 | 239 | int num = hostNum.get(ac.getPid()); |
200 | 240 | num++; |
201 | - if(num>doctorPatient.getCjNum()){ | |
241 | + if (num > doctorPatient.getCjNum()) { | |
202 | 242 | doctorPatient.setCjNum(num); |
203 | 243 | } |
204 | - hostNum.put(ac.getPid(),num); | |
205 | - }else{ | |
206 | - hostNum.put(ac.getPid(),1); | |
244 | + hostNum.put(ac.getPid(), num); | |
245 | + } else { | |
246 | + hostNum.put(ac.getPid(), 1); | |
207 | 247 | } |
208 | 248 | } |
209 | 249 | if (ac.getCheckTime().after(doctorPatient.getCheckTime())) { |
210 | 250 | |
211 | 251 | |
212 | 252 | |
... | ... | @@ -214,20 +254,19 @@ |
214 | 254 | } |
215 | 255 | |
216 | 256 | |
217 | - | |
218 | 257 | //添加复诊结果 |
219 | 258 | for (AntenatalExaminationModel aec : antenatalExaminationModels) { |
220 | 259 | AntextDoctorPatient doctorPatient = resultInfo.get(aec.getParentId()); |
221 | - if(aec.getHospitalId().equals(hospital)){//如果医院id相同, | |
222 | - if(hostNum.containsKey(aec.getPid())){ | |
260 | + if (aec.getHospitalId().equals(hospital)) {//如果医院id相同, | |
261 | + if (hostNum.containsKey(aec.getPid())) { | |
223 | 262 | int num = hostNum.get(aec.getPid()); |
224 | 263 | num++; |
225 | - if(num>doctorPatient.getCjNum()){ | |
264 | + if (num > doctorPatient.getCjNum()) { | |
226 | 265 | doctorPatient.setCjNum(num); |
227 | 266 | } |
228 | - hostNum.put(aec.getPid(),num); | |
229 | - }else{ | |
230 | - hostNum.put(aec.getPid(),1); | |
267 | + hostNum.put(aec.getPid(), num); | |
268 | + } else { | |
269 | + hostNum.put(aec.getPid(), 1); | |
231 | 270 | } |
232 | 271 | } |
233 | 272 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/EarController.java
View file @
0b7de53
... | ... | @@ -110,10 +110,8 @@ |
110 | 110 | if (!isConfirm) {// //若没有听诊记录或所有听诊记录都未确诊。提示:该儿童还未听力确诊,不能进行随访。 |
111 | 111 | return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_POWER).setErrormsg("当前儿童听诊记录还未有确诊记录不能进行随访"); |
112 | 112 | } |
113 | - | |
114 | 113 | //根据条件查询基础配置信息表 |
115 | 114 | InitFollowUp initHearingDiagnose = new InitFollowUp(); |
116 | - initHearingDiagnose.setConfirmResult(EnumUtil.toJson(ConfirmedEnums.class)); | |
117 | 115 | return initHearingDiagnose.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); |
118 | 116 | } |
119 | 117 |