Commit f872fb9a3179f996382f629a740cb1f18f5015f1
1 parent
c257722d6c
Exists in
master
and in
6 other branches
听力诊断模块
Showing 10 changed files with 72 additions and 40 deletions
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarFollowUp.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarFollowUpQuery.java
- platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarBaby.xml
- platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarFollowUp.xml
- platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarScreen.xml
- platform-common/src/main/java/com/lyms/platform/common/enums/SourceEnums.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FollowUpController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearingDiagnoseController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HighriskChangeHospitalController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java
platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarFollowUp.java
View file @
f872fb9
... | ... | @@ -102,6 +102,10 @@ |
102 | 102 | */ |
103 | 103 | private String ifcloseStr; |
104 | 104 | /** |
105 | + * 结案结论 | |
106 | + */ | |
107 | + private String verdict; | |
108 | + /** | |
105 | 109 | * 医院ID |
106 | 110 | */ |
107 | 111 | private String hospitalId; |
... | ... | @@ -133,6 +137,14 @@ |
133 | 137 | |
134 | 138 | public Integer getIsAudiphone() { |
135 | 139 | return isAudiphone; |
140 | + } | |
141 | + | |
142 | + public String getVerdict() { | |
143 | + return verdict; | |
144 | + } | |
145 | + | |
146 | + public void setVerdict(String verdict) { | |
147 | + this.verdict = verdict; | |
136 | 148 | } |
137 | 149 | |
138 | 150 | public void setIsAudiphone(Integer isAudiphone) { |
platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarFollowUpQuery.java
View file @
f872fb9
... | ... | @@ -92,6 +92,10 @@ |
92 | 92 | */ |
93 | 93 | private Integer ifclose; |
94 | 94 | /** |
95 | + * 结案结论 | |
96 | + */ | |
97 | + private String verdict; | |
98 | + /** | |
95 | 99 | * 医院ID |
96 | 100 | */ |
97 | 101 | private String hospitalId; |
... | ... | @@ -149,6 +153,14 @@ |
149 | 153 | |
150 | 154 | public void setIsOperation(Integer isOperation) { |
151 | 155 | this.isOperation = isOperation; |
156 | + } | |
157 | + | |
158 | + public String getVerdict() { | |
159 | + return verdict; | |
160 | + } | |
161 | + | |
162 | + public void setVerdict(String verdict) { | |
163 | + this.verdict = verdict; | |
152 | 164 | } |
153 | 165 | |
154 | 166 | public Integer getIsArtifiCochlea() { |
platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarBaby.xml
View file @
f872fb9
... | ... | @@ -126,7 +126,7 @@ |
126 | 126 | and ( |
127 | 127 | name LIKE concat("%",#{queryNo,jdbcType=VARCHAR},"%") |
128 | 128 | or |
129 | - mcertNo LIKE concat("%",#{queryNo,jdbcType=VARCHAR},"%") | |
129 | + mcert_no LIKE concat("%",#{queryNo,jdbcType=VARCHAR},"%") | |
130 | 130 | or |
131 | 131 | mphone LIKE concat(#{queryNo,jdbcType=VARCHAR},"%") |
132 | 132 | or |
platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarFollowUp.xml
View file @
f872fb9
... | ... | @@ -25,6 +25,7 @@ |
25 | 25 | <result column="month_age" property="monthAge" jdbcType="INTEGER"/> |
26 | 26 | <result column="ifdel" property="ifdel" jdbcType="INTEGER"/> |
27 | 27 | <result column="ifclose" property="ifclose" jdbcType="INTEGER"/> |
28 | + <result column="verdict" property="verdict" jdbcType="VARCHAR"/> | |
28 | 29 | <result column="hospital_id" property="hospitalId" jdbcType="VARCHAR"/> |
29 | 30 | <result column="modify_time" property="modifyTime" jdbcType="TIMESTAMP"/> |
30 | 31 | <result column="modify_id" property="modifyId" jdbcType="VARCHAR"/> |
... | ... | @@ -36,7 +37,7 @@ |
36 | 37 | |
37 | 38 | <insert id="addBabyPatientExtendEarFollowUp" |
38 | 39 | parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarFollowUp"> |
39 | - 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,month_age,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},#{monthAge},#{ifdel},#{ifclose},#{hospitalId},#{modifyTime},#{modifyId},#{createTime},#{createId},#{enalble}) | |
40 | + 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,month_age,ifdel,ifclose,verdict,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},#{monthAge},#{ifdel},#{ifclose},#{verdict},#{hospitalId},#{modifyTime},#{modifyId},#{createTime},#{createId},#{enalble}) | |
40 | 41 | </insert> |
41 | 42 | |
42 | 43 | |
... | ... | @@ -104,6 +105,9 @@ |
104 | 105 | <if test="ifclose != null and ifclose >= 0"> |
105 | 106 | ifclose = #{ifclose,jdbcType=INTEGER}, |
106 | 107 | </if> |
108 | + <if test="verdict != null and verdict != ''"> | |
109 | + verdict = #{verdict,jdbcType=VARCHAR}, | |
110 | + </if> | |
107 | 111 | <if test="hospitalId != null and hospitalId != ''"> |
108 | 112 | hospital_id = #{hospitalId,jdbcType=VARCHAR}, |
109 | 113 | </if> |
... | ... | @@ -134,7 +138,7 @@ |
134 | 138 | |
135 | 139 | <select id="getBabyPatientExtendEarFollowUp" resultMap="BabyPatientExtendEarFollowUpResultMap" |
136 | 140 | parameterType="java.lang.String"> |
137 | -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,month_age,ifdel,ifclose,hospital_id,modify_time,modify_id,create_time,create_id,enalble | |
141 | +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,month_age,ifdel,ifclose,verdict,hospital_id,modify_time,modify_id,create_time,create_id,enalble | |
138 | 142 | from baby_patient_extend_ear_follow_up where id = #{id,jdbcType=VARCHAR} |
139 | 143 | </select> |
140 | 144 | |
... | ... | @@ -184,7 +188,7 @@ |
184 | 188 | and mark_time = #{markTime,jdbcType=TIMESTAMP} |
185 | 189 | </if> |
186 | 190 | <if test="markResult != null and markResult != ''"> |
187 | - and mark_result like concat("%,",#{markResult},",%") | |
191 | + and mark_result = #{markResult,jdbcType=VARCHAR} | |
188 | 192 | </if> |
189 | 193 | <if test="markDetail != null and markDetail != ''"> |
190 | 194 | and mark_detail = #{markDetail,jdbcType=VARCHAR} |
191 | 195 | |
... | ... | @@ -227,10 +231,13 @@ |
227 | 231 | <if test="ifclose != null and ifclose >= 0"> |
228 | 232 | and ifclose = #{ifclose,jdbcType=INTEGER} |
229 | 233 | </if> |
234 | + <if test="verdict != null and verdict != ''"> | |
235 | + and verdict = #{verdict,jdbcType=VARCHAR} | |
236 | + </if> | |
230 | 237 | <if test="hospitalId != null and hospitalId != ''"> |
231 | 238 | and hospital_id = #{hospitalId,jdbcType=VARCHAR} |
232 | 239 | </if> |
233 | - <if test="checkHospitalIds != null and checkHospitalIds != ''"> | |
240 | + <if test="checkHospitalIds != null"> | |
234 | 241 | and hospital_id in |
235 | 242 | <foreach item="item" index="index" collection="checkHospitalIds" open="(" separator="," close=")"> |
236 | 243 | #{item} |
... | ... | @@ -258,7 +265,7 @@ |
258 | 265 | <select id="queryBabyPatientExtendEarFollowUp" resultMap="BabyPatientExtendEarFollowUpResultMap" |
259 | 266 | parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarFollowUpQuery"> |
260 | 267 | select |
261 | - 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,month_age,ifdel,ifclose,hospital_id,modify_time,modify_id,create_time,create_id,enalble | |
268 | + 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,month_age,ifdel,ifclose,verdict,hospital_id,modify_time,modify_id,create_time,create_id,enalble | |
262 | 269 | from baby_patient_extend_ear_follow_up |
263 | 270 | <include refid="BabyPatientExtendEarFollowUpCondition"/> |
264 | 271 | <include refid="orderAndLimit"/> |
265 | 272 | |
266 | 273 | |
... | ... | @@ -266,15 +273,12 @@ |
266 | 273 | |
267 | 274 | <select id="queryBabyPatientExtendEarFollowUpCount" resultType="int" |
268 | 275 | parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarFollowUpQuery"> |
269 | - select count(1) from ( | |
270 | - select * from baby_patient_extend_ear_follow_up | |
276 | + select count(1) from baby_patient_extend_ear_follow_up | |
271 | 277 | <include refid="BabyPatientExtendEarFollowUpCondition"/> |
272 | - GROUP BY baby_id | |
273 | - ) bpef | |
274 | 278 | </select> |
275 | 279 | |
276 | 280 | <select id="queryBabyPatientExtendEarFollowUpByBaby" resultMap="BabyPatientExtendEarFollowUpResultMap" parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarFollowUpQuery"> |
277 | - 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 | |
281 | + 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,verdict,hospital_id,modify_time,modify_id,create_time,create_id,enalble | |
278 | 282 | from baby_patient_extend_ear_follow_up |
279 | 283 | |
280 | 284 | <where> |
platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarScreen.xml
View file @
f872fb9
platform-common/src/main/java/com/lyms/platform/common/enums/SourceEnums.java
View file @
f872fb9
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FollowUpController.java
View file @
f872fb9
... | ... | @@ -304,11 +304,14 @@ |
304 | 304 | outOrgids.add(hospitalId); |
305 | 305 | } |
306 | 306 | |
307 | + if(CollectionUtils.isEmpty(outOrgids)){ | |
308 | + return FrontEndResult.ini().setData(new ArrayList()).setPageInfo(query.getPageInfo()).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); | |
309 | + } | |
310 | + | |
307 | 311 | query.setCheckHospitalIds((String[]) outOrgids.toArray(new String[outOrgids.size()])); |
308 | 312 | |
309 | 313 | query.setKeyword(fur.getKeyWord()); |
310 | 314 | |
311 | - // query.setMarkResult(fur.getMarkResult()); | |
312 | 315 | query.setIfclose(fur.getIfclose()); |
313 | 316 | |
314 | 317 | StringBuffer sqlStr = new StringBuffer(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearingDiagnoseController.java
View file @
f872fb9
... | ... | @@ -310,7 +310,7 @@ |
310 | 310 | //医院ID 集合。本院、外院、全部... |
311 | 311 | List<String> outOrgids = new ArrayList<>(); |
312 | 312 | if (hdReq.getSource() != null) { |
313 | - if (hdReq.getSource() == 2) {//2.转诊过来的医院、 | |
313 | + if (hdReq.getSource() == 2) {//2.外院 | |
314 | 314 | //转诊过来的医院id |
315 | 315 | HighriskChangeHospitalQuery hchQuery = new HighriskChangeHospitalQuery(); |
316 | 316 | hchQuery.setTargetType(2);//儿童 |
317 | 317 | |
... | ... | @@ -340,15 +340,12 @@ |
340 | 340 | hchQuery.setIntoOrgid(hospitalId); |
341 | 341 | List<HighriskChangeHospital> hchList = highchangeService.queryHighriskChangeHospital(hchQuery); |
342 | 342 | if (hchList != null && hchList.size() > 0) { |
343 | - for (HighriskChangeHospital hch : hchList) {//如果存在则修改转诊记录状态为接收 | |
343 | + for (HighriskChangeHospital hch : hchList) { | |
344 | 344 | outOrgids.add(hch.getOutOrgid()); |
345 | 345 | } |
346 | 346 | } |
347 | 347 | } |
348 | 348 | } else { |
349 | - //当前登录人区域医院Id | |
350 | - List hospiIds = babyEarFacade.getOrgHospitalIds(hospitalId); | |
351 | - outOrgids.addAll(hospiIds); | |
352 | 349 | //当前医院 |
353 | 350 | outOrgids.add(hospitalId); |
354 | 351 | } |
355 | 352 | |
... | ... | @@ -484,7 +481,22 @@ |
484 | 481 | hd.setBabyId(babyIds.get(i)); |
485 | 482 | int index1 = Collections.binarySearch(hearingDiagnoseList, hd, new MyComparator()); |
486 | 483 | HearingDiagnoseListResult hea = new HearingDiagnoseListResult(); |
484 | + BabyModel babyModel = babyService.getOneBabyById(hd.getBabyId()); | |
485 | + if (babyModel != null) { | |
486 | + hea.setBabyName(babyModel.getName()); | |
487 | + hea.setBabyId(hd.getBabyId()); | |
488 | + hea.setMommyName(com.lyms.platform.common.utils.StringUtils.emptyDeal(babyModel.getMname())); | |
489 | + hea.setMommnyPhone(com.lyms.platform.common.utils.StringUtils.emptyDeal(babyModel.getMphone())); | |
490 | + hea.setMommnyEncryptPhone(com.lyms.platform.common.utils.StringUtils.encryPhone(babyModel.getMphone())); | |
491 | + hea.setMonthAge(DateUtil.getBabyMonthAge(babyModel.getBirth(), new Date())); | |
492 | + hea.setBirthday(com.lyms.platform.common.utils.StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(babyModel.getBirth()))); | |
493 | + hea.setSex(com.lyms.platform.common.utils.StringUtils.emptyDeal(SexEnum.getTextById(babyModel.getSex()))); | |
494 | + } | |
487 | 495 | if (index1 < 0) { |
496 | + //全部 | |
497 | + hdrList.add(hea); | |
498 | + //待诊断 | |
499 | + waitConfiList.add(hea); | |
488 | 500 | continue; |
489 | 501 | } |
490 | 502 | if (index1 >= 0) { |
... | ... | @@ -532,17 +544,7 @@ |
532 | 544 | hea.setDiagnResult(hdSb.toString()); |
533 | 545 | } |
534 | 546 | } |
535 | - BabyModel babyModel = babyService.getOneBabyById(hd.getBabyId()); | |
536 | - if (babyModel != null) { | |
537 | - hea.setBabyName(babyModel.getName()); | |
538 | - hea.setBabyId(hd.getBabyId()); | |
539 | - hea.setMommyName(com.lyms.platform.common.utils.StringUtils.emptyDeal(babyModel.getMname())); | |
540 | - hea.setMommnyPhone(com.lyms.platform.common.utils.StringUtils.emptyDeal(babyModel.getMphone())); | |
541 | - hea.setMommnyEncryptPhone(com.lyms.platform.common.utils.StringUtils.encryPhone(babyModel.getMphone())); | |
542 | - hea.setMonthAge(DateUtil.getBabyMonthAge(babyModel.getBirth(), new Date())); | |
543 | - hea.setBirthday(com.lyms.platform.common.utils.StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(babyModel.getBirth()))); | |
544 | - hea.setSex(com.lyms.platform.common.utils.StringUtils.emptyDeal(SexEnum.getTextById(babyModel.getSex()))); | |
545 | - } | |
547 | + | |
546 | 548 | //诊断结果,肯定是有诊断记录 |
547 | 549 | if (hdReq.getConfirmResult() != null || hdReq.getConfirmDegree() != null) { |
548 | 550 | // 1、已诊断、2、待诊断、0、全部 |
... | ... | @@ -727,6 +729,7 @@ |
727 | 729 | hchQuery.setTargetType(2); |
728 | 730 | hchQuery.setTargetId(obj.getBabyId()); |
729 | 731 | hchQuery.setIntoOrgid(hospitalId); |
732 | + hchQuery.setStatus(1); | |
730 | 733 | List<HighriskChangeHospital> hchList = highchangeService.queryHighriskChangeHospital(hchQuery); |
731 | 734 | if (hchList != null && hchList.size() > 0) { |
732 | 735 | for (HighriskChangeHospital hch : hchList) {//如果存在则修改转诊记录状态为接收 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HighriskChangeHospitalController.java
View file @
f872fb9
... | ... | @@ -522,7 +522,6 @@ |
522 | 522 | if (StringUtil.isBlank(obj.getTargetId())) { |
523 | 523 | return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入儿童档案id"); |
524 | 524 | } |
525 | - obj.setApplyDoctorid(String.valueOf(loginState.getId())); | |
526 | 525 | obj.setId(UUID.randomUUID().toString().replace("-", "")); |
527 | 526 | obj.setTargetType(2);//儿童 |
528 | 527 | obj.setCreateTime(new Date()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java
View file @
f872fb9
... | ... | @@ -196,12 +196,10 @@ |
196 | 196 | |
197 | 197 | //建立儿童隐藏档案 |
198 | 198 | if (babyModel != null) { |
199 | - if (babyModel.getYn() != YnEnums.YES.getId()) { | |
200 | - babyModel.setYn(YnEnums.YES.getId()); | |
201 | - babyModel.setModified(new Date()); | |
202 | - babyModel.setEnable("1"); | |
203 | - babyService.updateOneBaby(babyModel, babyId); | |
204 | - } | |
199 | + babyModel.setYn(YnEnums.YES.getId()); | |
200 | + babyModel.setModified(new Date()); | |
201 | + babyModel.setEnable("1"); | |
202 | + babyService.updateOneBaby(babyModel, babyId); | |
205 | 203 | } |
206 | 204 | |
207 | 205 | BabyPatientExtendEarQuery earQuery = new BabyPatientExtendEarQuery(); |
... | ... | @@ -1637,9 +1635,7 @@ |
1637 | 1635 | screenQuery.setNextEndTime(earScreenListRequest.getNextEndTime()); |
1638 | 1636 | //当前登录人医院Id |
1639 | 1637 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
1640 | - List hospitalIds = getOrgHospitalIds(hospitalId); | |
1641 | - String[] checkHospitalIds = (String[]) hospitalIds.toArray(new String[hospitalIds.size()]); | |
1642 | - screenQuery.setCheckHospitalIds(checkHospitalIds); | |
1638 | + screenQuery.setCheckHospitalId(hospitalId); | |
1643 | 1639 | |
1644 | 1640 | //如果查询号不为空,根据查询号查询儿童档案表,获取儿童档案Id |
1645 | 1641 | if (StringUtils.isNotEmpty(earScreenListRequest.getKeyWord()) || earScreenListRequest.getBirthStartTime() != null || earScreenListRequest.getBirthEndTime() != null) {//关键字:姓名、联系方式、就诊卡 查询babyId |
... | ... | @@ -1669,7 +1665,7 @@ |
1669 | 1665 | BabyModel babyModel = babyService.getOneBabyById(earScreen.getBabyId()); |
1670 | 1666 | if (babyModel != null) { |
1671 | 1667 | screenResult.setBabyName(babyModel.getName()); |
1672 | - screenResult.setMommyName(babyModel.getName()); | |
1668 | + screenResult.setMommyName(babyModel.getMname()); | |
1673 | 1669 | screenResult.setSex(SexEnum.getTextById(babyModel.getSex())); |
1674 | 1670 | screenResult.setMonthAge(DateUtil.getBabyMonthAge(babyModel.getBirth(), earScreen.getScreenDate())); |
1675 | 1671 | screenResult.setBirthday(DateUtil.getyyyy_MM_dd(babyModel.getBirth())); |