Commit ad5b356f75d1f777d4e7f83740e7bd00a0a66453
1 parent
ba61b2323a
Exists in
master
and in
6 other branches
听力诊断
Showing 16 changed files with 398 additions and 235 deletions
- platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/BabyPatientExtendEarScreenMapper.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarHearingDiagnose.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarHearingDiagnoseQuery.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarScreenQuery.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/service/BabyPatientExtendEarScreenService.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/BabyPatientExtendEarScreenServiceImpl.java
- platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarHearingDiagnose.xml
- platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarScreen.xml
- platform-common/src/main/java/com/lyms/platform/common/enums/ConfirmedEnums.java
- platform-common/src/main/java/com/lyms/platform/common/enums/HighRiskEnum.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/EarController.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/request/HearingDiagnoseRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/HearingDiagnoseListResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/MyComparator.java
platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/BabyPatientExtendEarScreenMapper.java
View file @
ad5b356
| ... | ... | @@ -18,6 +18,8 @@ |
| 18 | 18 | |
| 19 | 19 | public List<BabyPatientExtendEarScreen> queryBabyPatientExtendEarScreen(BabyPatientExtendEarScreenQuery query); |
| 20 | 20 | |
| 21 | + public List<String> queryScrBabyIds(BabyPatientExtendEarScreenQuery query); | |
| 22 | + | |
| 21 | 23 | public List<BabyPatientExtendEarScreen> notAuscultationBabyPatientExtendEarScreen(BabyPatientExtendEarScreenQuery query); |
| 22 | 24 | |
| 23 | 25 | } |
platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarHearingDiagnose.java
View file @
ad5b356
| ... | ... | @@ -24,6 +24,7 @@ |
| 24 | 24 | * 高危因素 |
| 25 | 25 | */ |
| 26 | 26 | private String highFactor; |
| 27 | + | |
| 27 | 28 | /** |
| 28 | 29 | * ABR潜伏期左耳dBnHL |
| 29 | 30 | */ |
| 30 | 31 | |
| ... | ... | @@ -313,11 +314,11 @@ |
| 313 | 314 | */ |
| 314 | 315 | private String soundReflRightAtten; |
| 315 | 316 | /** |
| 316 | - * AABR左耳是否通过 | |
| 317 | + * AABR左耳是否通过 0-未通过,1-通过 | |
| 317 | 318 | */ |
| 318 | 319 | private Integer aabrLeftIfPass; |
| 319 | 320 | /** |
| 320 | - * AABR右耳是否通过 | |
| 321 | + * AABR右耳是否通过 0-未通过,1-通过 | |
| 321 | 322 | */ |
| 322 | 323 | private Integer aabrRightIfPass; |
| 323 | 324 | /** |
| ... | ... | @@ -385,7 +386,7 @@ |
| 385 | 386 | */ |
| 386 | 387 | private Date modifyTime; |
| 387 | 388 | /** |
| 388 | - * 是否删除 | |
| 389 | + * 是否删除 0-未删除,1-删除 | |
| 389 | 390 | */ |
| 390 | 391 | private Integer ifdel; |
| 391 | 392 | /** |
platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarHearingDiagnoseQuery.java
View file @
ad5b356
| ... | ... | @@ -437,6 +437,10 @@ |
| 437 | 437 | */ |
| 438 | 438 | private String confirmResult; |
| 439 | 439 | /** |
| 440 | + * 确诊结果程度 | |
| 441 | + */ | |
| 442 | + private String[] confirmResults; | |
| 443 | + /** | |
| 440 | 444 | * 确诊时间 |
| 441 | 445 | */ |
| 442 | 446 | private Date confirmTime; |
| ... | ... | @@ -448,6 +452,14 @@ |
| 448 | 452 | * 确诊结束时间 |
| 449 | 453 | */ |
| 450 | 454 | private Date confirmEndTime; |
| 455 | + | |
| 456 | + public String[] getConfirmResults() { | |
| 457 | + return confirmResults; | |
| 458 | + } | |
| 459 | + | |
| 460 | + public void setConfirmResults(String[] confirmResults) { | |
| 461 | + this.confirmResults = confirmResults; | |
| 462 | + } | |
| 451 | 463 | |
| 452 | 464 | public String[] getCheckHospitalIds() { |
| 453 | 465 | return checkHospitalIds; |
platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarScreenQuery.java
View file @
ad5b356
| ... | ... | @@ -4,7 +4,6 @@ |
| 4 | 4 | import com.lyms.platform.common.dao.BaseQuery; |
| 5 | 5 | |
| 6 | 6 | import java.util.Date; |
| 7 | -import java.util.List; | |
| 8 | 7 | |
| 9 | 8 | |
| 10 | 9 | public class BabyPatientExtendEarScreenQuery extends BaseQuery { |
| ... | ... | @@ -27,7 +26,7 @@ |
| 27 | 26 | /** |
| 28 | 27 | * 检查医院的id集合 |
| 29 | 28 | */ |
| 30 | - private List<String> checkHospitalIds; | |
| 29 | + private String[] checkHospitalIds; | |
| 31 | 30 | |
| 32 | 31 | /** |
| 33 | 32 | * 筛查时间 |
| 34 | 33 | |
| ... | ... | @@ -146,11 +145,11 @@ |
| 146 | 145 | |
| 147 | 146 | } |
| 148 | 147 | |
| 149 | - public List<String> getCheckHospitalIds() { | |
| 148 | + public String[] getCheckHospitalIds() { | |
| 150 | 149 | return checkHospitalIds; |
| 151 | 150 | } |
| 152 | 151 | |
| 153 | - public void setCheckHospitalIds(List<String> checkHospitalIds) { | |
| 152 | + public void setCheckHospitalIds(String[] checkHospitalIds) { | |
| 154 | 153 | this.checkHospitalIds = checkHospitalIds; |
| 155 | 154 | } |
| 156 | 155 |
platform-biz-service/src/main/java/com/lyms/platform/permission/service/BabyPatientExtendEarScreenService.java
View file @
ad5b356
| ... | ... | @@ -18,6 +18,8 @@ |
| 18 | 18 | |
| 19 | 19 | public List<BabyPatientExtendEarScreen> queryBabyPatientExtendEarScreen(BabyPatientExtendEarScreenQuery query); |
| 20 | 20 | |
| 21 | + public List<String> queryScrBabyIds(BabyPatientExtendEarScreenQuery query); | |
| 22 | + | |
| 21 | 23 | public List<BabyPatientExtendEarScreen> notAuscultationBabyPatientExtendEarScreen(BabyPatientExtendEarScreenQuery query); |
| 22 | 24 | |
| 23 | 25 | } |
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/BabyPatientExtendEarScreenServiceImpl.java
View file @
ad5b356
| ... | ... | @@ -53,5 +53,9 @@ |
| 53 | 53 | return babyPatientExtendEarScreenMapper.notAuscultationBabyPatientExtendEarScreen(query); |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | + @Override | |
| 57 | + public List<String> queryScrBabyIds(BabyPatientExtendEarScreenQuery query) { | |
| 58 | + return babyPatientExtendEarScreenMapper.queryScrBabyIds(query); | |
| 59 | + } | |
| 56 | 60 | } |
platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarHearingDiagnose.xml
View file @
ad5b356
| ... | ... | @@ -805,119 +805,79 @@ |
| 805 | 805 | |
| 806 | 806 | <select id="getHdAndScreen" resultMap="BabyPatientExtendEarHearingDiagnoseResultMap" |
| 807 | 807 | parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarHearingDiagnoseQuery"> |
| 808 | - select hd.id,hd.baby_id,hd.diagnose_time,hd.high_factor,hd.diagn_result,hd.confirm_result,hd.diagn_doctor_id | |
| 809 | - from baby_patient_extend_ear_hearing_diagnose hd LEFT JOIN baby_patient_extend_ear_screen sc | |
| 810 | - on hd.baby_id = sc.baby_id | |
| 808 | + select hd.id,hd.baby_id,max(hd.diagnose_time) diagnose_time,hd.high_factor,hd.confirm_result,hd.diagn_doctor_id,diagn_result,isconfirm,diagn_hand_sugge | |
| 809 | + from baby_patient_extend_ear_hearing_diagnose hd | |
| 811 | 810 | <where> |
| 812 | - <if test="checkHospitalIds != null"> | |
| 813 | - and sc.check_hospital_id in ( | |
| 814 | - <foreach item="hsId" collection="checkHospitalIds" separator=","> | |
| 815 | - #{hsId} | |
| 816 | - </foreach> | |
| 817 | - ) | |
| 811 | + | |
| 812 | + <if test="diagnoseStartTime!=null"> | |
| 813 | + AND | |
| 814 | + <![CDATA[ | |
| 815 | + DATEDIFF(#{diagnoseStartTime},hd.diagnose_time) <=0 | |
| 816 | + ]]> | |
| 818 | 817 | </if> |
| 819 | - /*诊断日期*/ | |
| 820 | - <if test="diagnoseStartTime != null "> | |
| 821 | - and hd.diagnose_time <![CDATA[ >= #{diagnoseStartTime} ]]> | |
| 818 | + <if test="diagnoseEndTime!=null"> | |
| 819 | + and | |
| 820 | + <![CDATA[ | |
| 821 | + DATEDIFF(#{diagnoseEndTime},hd.diagnose_time) >=0 | |
| 822 | + ]]> | |
| 822 | 823 | </if> |
| 823 | - <if test="diagnoseStartTime != null "> | |
| 824 | - and hd.diagnose_time <![CDATA[ <= #{diagnoseEndTime} ]]> | |
| 824 | + <if test="diagnDoctorId!=null"> | |
| 825 | + and | |
| 826 | + hd.diagn_doctor_id = #{diagnDoctorId} | |
| 825 | 827 | </if> |
| 826 | - <if test="diagnDoctorId != null "> | |
| 827 | - and hd.diagn_doctor_id = #{diagnDoctorId} | |
| 828 | + <if test="diagnNextStartTime!=null"> | |
| 829 | + and | |
| 830 | + <![CDATA[ | |
| 831 | + DATEDIFF(#{diagnNextStartTime},hd.diagn_next_time)<=0 | |
| 832 | + ]]> | |
| 828 | 833 | </if> |
| 829 | - <if test="babyIds != null "> | |
| 830 | - and hd.baby_id in | |
| 831 | - <foreach item="item" index="index" collection="babyIds" open="(" separator="," close=")"> | |
| 832 | - #{item} | |
| 833 | - </foreach> | |
| 834 | + <if test="diagnNextEndTime!=null"> | |
| 835 | + AND | |
| 836 | + <![CDATA[ | |
| 837 | + DATEDIFF(#{diagnNextEndTime},hd.diagn_next_time) >=0 | |
| 838 | + ]]> | |
| 834 | 839 | </if> |
| 835 | - <if test="enalble != null and enalble == 1"> | |
| 836 | - and hd.id is not NULL | |
| 840 | + <if test="isconfirm!=null"> | |
| 841 | + AND | |
| 842 | + hd.isconfirm = #{isconfirm} | |
| 837 | 843 | </if> |
| 838 | - | |
| 839 | - <if test="enalble != null and enalble == 2"> | |
| 840 | - and hd.id is NULL | |
| 844 | + <if test="isconfirm!=null"> | |
| 845 | + and | |
| 846 | + hd.confirm_result like concat("%",#{confirmResult},"%") | |
| 841 | 847 | </if> |
| 842 | - <if test="diagnNextStartTime != null "> | |
| 843 | - and hd.diagn_next_time <![CDATA[ >= #{diagnNextStartTime} ]]> | |
| 848 | + <if test="confirmStartTime!=null"> | |
| 849 | + and | |
| 850 | + <![CDATA[ | |
| 851 | + DATEDIFF(#{confirmStartTime},hd.confirm_time)<=0 | |
| 852 | + ]]> | |
| 844 | 853 | </if> |
| 845 | - <if test="diagnNextEndTime != null "> | |
| 846 | - and hd.diagn_next_time <![CDATA[ <=#{diagnNextEndTime} ]]> | |
| 854 | + <if test="confirmEndTime!=null"> | |
| 855 | + AND | |
| 856 | + <![CDATA[ | |
| 857 | + DATEDIFF(#{confirmEndTime},hd.confirm_time) >=0 | |
| 858 | + ]]> | |
| 847 | 859 | </if> |
| 848 | - <if test="isconfirm != null "> | |
| 849 | - and hd.isconfirm = #{isconfirm} | |
| 850 | - </if> | |
| 851 | 860 | |
| 852 | - <if test="confirmResult != null "> | |
| 853 | - and hd.confirm_result like concat("%",#{confirmResult},"%") | |
| 861 | + <if test="babyIds!=null"> | |
| 862 | + and baby_id in ( | |
| 863 | + <foreach item="babyId" collection="babyIds" separator="," > | |
| 864 | + #{babyId} | |
| 865 | + </foreach> | |
| 866 | + ) | |
| 854 | 867 | </if> |
| 855 | 868 | |
| 856 | - <if test="confirmStartTime != null "> | |
| 857 | - and hd.confirm_time <![CDATA[ >=#{confirmStartTime} ]]> | |
| 869 | + <if test="confirmResult != null and confirmResult != ''"> | |
| 870 | + and confirm_result like concat("%,",#{confirmResult,jdbcType=VARCHAR},",%") | |
| 858 | 871 | </if> |
| 859 | - <if test="confirmEndTime != null "> | |
| 860 | - and hd.confirm_time <![CDATA[ <= #{confirmEndTime} ]]> | |
| 861 | - </if> | |
| 862 | - </where> | |
| 863 | - <include refid="orderAndLimit"/> | |
| 864 | - </select> | |
| 865 | 872 | |
| 866 | - <select id="getHdAndScreenCount" resultType="int" | |
| 867 | - parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarHearingDiagnoseQuery"> | |
| 868 | - select hd.id,hd.baby_id,hd.diagnose_time,hd.high_factor,hd.diagn_result,hd.confirm_result,hd.diagn_doctor_id | |
| 869 | - from baby_patient_extend_ear_hearing_diagnose hd LEFT JOIN baby_patient_extend_ear_screen sc | |
| 870 | - on hd.baby_id = sc.baby_id | |
| 871 | - <where> | |
| 872 | - <if test="checkHospitalIds != null"> | |
| 873 | - and sc.check_hospital_id in | |
| 874 | - <foreach item="item" index="index" collection="checkHospitalIds" open="(" separator="," close=")"> | |
| 875 | - #{item} | |
| 873 | + <if test="confirmResults!=null"> | |
| 874 | + and ( | |
| 875 | + <foreach item="cfrs" collection="confirmResults" separator=" or "> | |
| 876 | + confirm_result like concat("%",#{cfrs,jdbcType=VARCHAR},"%") | |
| 876 | 877 | </foreach> |
| 878 | + ) | |
| 877 | 879 | </if> |
| 878 | - /*诊断日期*/ | |
| 879 | - <if test="diagnoseStartTime != null "> | |
| 880 | - and hd.diagnose_time <![CDATA[ >= #{diagnoseStartTime} ]]> | |
| 881 | - </if> | |
| 882 | - <if test="diagnoseStartTime != null "> | |
| 883 | - and hd.diagnose_time <![CDATA[ <= #{diagnoseEndTime} ]]> | |
| 884 | - </if> | |
| 885 | - <if test="diagnDoctorId != null "> | |
| 886 | - and hd.diagn_doctor_id = #{diagnDoctorId} | |
| 887 | - </if> | |
| 888 | - <if test="babyIds != null "> | |
| 889 | - and hd.baby_id in | |
| 890 | - <foreach item="item" index="index" collection="babyIds" open="(" separator="," close=")"> | |
| 891 | - #{item} | |
| 892 | - </foreach> | |
| 893 | - </if> | |
| 894 | - <if test="enalble != null and enalble == 1"> | |
| 895 | - and hd.id is not NULL | |
| 896 | - </if> | |
| 897 | - | |
| 898 | - <if test="enalble != null and enalble == 2"> | |
| 899 | - and hd.id is NULL | |
| 900 | - </if> | |
| 901 | - <if test="diagnNextStartTime != null "> | |
| 902 | - and hd.diagn_next_time <![CDATA[ >= #{diagnNextStartTime} ]]> | |
| 903 | - </if> | |
| 904 | - <if test="diagnNextEndTime != null "> | |
| 905 | - and hd.diagn_next_time <![CDATA[ <= #{diagnNextEndTime} ]]> | |
| 906 | - </if> | |
| 907 | - <if test="isconfirm != null "> | |
| 908 | - and hd.isconfirm = #{isconfirm} | |
| 909 | - </if> | |
| 910 | - | |
| 911 | - <if test="confirmResult != null "> | |
| 912 | - and hd.confirm_result like concat("%",#{confirmResult},"%") | |
| 913 | - </if> | |
| 914 | - | |
| 915 | - <if test="confirmStartTime != null "> | |
| 916 | - and hd.confirm_time <![CDATA[ >= #{confirmStartTime} ]]> | |
| 917 | - </if> | |
| 918 | - <if test="confirmEndTime != null "> | |
| 919 | - and hd.confirm_time <![CDATA[ <= #{confirmEndTime} ]]> | |
| 920 | - </if> | |
| 880 | + group by baby_id | |
| 921 | 881 | </where> |
| 922 | 882 | </select> |
| 923 | 883 |
platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarScreen.xml
View file @
ad5b356
| ... | ... | @@ -289,6 +289,26 @@ |
| 289 | 289 | <include refid="BabyPatientExtendEarScreenCondition"/> |
| 290 | 290 | </select> |
| 291 | 291 | |
| 292 | - | |
| 292 | + <select id="queryScrBabyIds" parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarScreenQuery" resultType="String"> | |
| 293 | + select DISTINCT baby_id from baby_patient_extend_ear_screen sc | |
| 294 | + <where> | |
| 295 | + <if test="checkHospitalIds!=null"> | |
| 296 | + and sc.check_hospital_id in ( | |
| 297 | + <foreach item="hsId" collection="checkHospitalIds" separator=","> | |
| 298 | + #{hsId} | |
| 299 | + </foreach> | |
| 300 | + ) | |
| 301 | + </if> | |
| 302 | + /*根据儿童id进行查询*/ | |
| 303 | + <if test="babyIds!=null"> | |
| 304 | + and sc.baby_id in ( | |
| 305 | + <foreach item="bId" collection="babyIds" separator=","> | |
| 306 | + #{bId} | |
| 307 | + </foreach> | |
| 308 | + ) | |
| 309 | + </if> | |
| 310 | + ORDER BY sc.create_date DESC | |
| 311 | + </where> | |
| 312 | + </select> | |
| 293 | 313 | </mapper> |
platform-common/src/main/java/com/lyms/platform/common/enums/ConfirmedEnums.java
View file @
ad5b356
| ... | ... | @@ -4,23 +4,24 @@ |
| 4 | 4 | * @auther yangfei |
| 5 | 5 | * @createTime 2017年05月15日 18时01分 |
| 6 | 6 | * @discription 确诊结果 |
| 7 | + * | |
| 7 | 8 | */ |
| 8 | 9 | public enum ConfirmedEnums { |
| 9 | 10 | ZEQDGYSJ(1, "轻度感音神经性聋合并耳聋基因异常(左耳)"), |
| 10 | 11 | YEQDGYSJ(2, "轻度感音神经性聋合并耳聋基因异常(右耳)"), |
| 11 | 12 | SEQDGYSJXEH(3, "双耳轻度感音神经性聋合并耳聋基因异常"), |
| 12 | - ZEQDGYSJXLHBEL(4, "中度感音神经性聋合并耳聋基因异常(左耳)"), | |
| 13 | - YEQDGYSJXLHBEL(5, "中度感音神经性聋合并耳聋基因异常(右耳)"), | |
| 13 | + ZEQDGYSJXLHBEL(4, "单耳中度感音神经性聋合并耳聋基因异常(左耳)"), | |
| 14 | + YEQDGYSJXLHBEL(5, "单耳中度感音神经性聋合并耳聋基因异常(右耳)"), | |
| 14 | 15 | SEZDGYSJX(6, "双耳中度感音神经性聋"), |
| 15 | 16 | ZEQDGYSJSJXL(7, "单耳中重度感音神经性聋(左耳)"), |
| 16 | - YEQDGYSJSJXL(8, "中重度感音神经性聋(右耳)"), | |
| 17 | + YEQDGYSJSJXL(8, "单耳中重度感音神经性聋(右耳)"), | |
| 17 | 18 | SEZZDGYSJX(9, "双耳中重度感音神经性聋"), |
| 18 | - ZEQDGYSJXL(10, "重度感音神经性聋(左耳)"), | |
| 19 | - YEQDGYSJXL(11, "重度感音神经性聋(右耳)"), | |
| 20 | - SEQDGYSJXL(3, "双耳重度感音神经性聋"), | |
| 21 | - ZEJZDGYSJXSJ(12, "极重度感音神经性聋(左耳)"), | |
| 22 | - YEZDGYSJXSJ(13, "极重度感音神经性聋(右耳)"), | |
| 23 | - SEJZDGYSJXL(14, "双耳极重度感音神经性聋"); | |
| 19 | + ZEQDGYSJXL(10, "单耳重度感音神经性聋(左耳)"), | |
| 20 | + YEQDGYSJXL(11, "单耳重度感音神经性聋(右耳)"), | |
| 21 | + SEQDGYSJXL(12, "双耳重度感音神经性聋"), | |
| 22 | + ZEJZDGYSJXSJ(13, "单耳极重度感音神经性聋(左耳)"), | |
| 23 | + YEZDGYSJXSJ(14, "单耳极重度感音神经性聋(右耳)"), | |
| 24 | + SEJZDGYSJXL(15, "双耳极重度感音神经性聋"); | |
| 24 | 25 | |
| 25 | 26 | private int id; |
| 26 | 27 | private String name; |
platform-common/src/main/java/com/lyms/platform/common/enums/HighRiskEnum.java
View file @
ad5b356
platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java
View file @
ad5b356
| ... | ... | @@ -6,6 +6,10 @@ |
| 6 | 6 | public class Test { |
| 7 | 7 | |
| 8 | 8 | public static void main(String[] args) { |
| 9 | + String a = "3.220.33"; | |
| 10 | + int b = a.lastIndexOf('.'); | |
| 11 | + System.out.println("-----:"+b); | |
| 12 | + | |
| 9 | 13 | // ConfirmedEnums [] strs = ConfirmedEnums.values(); |
| 10 | 14 | // String vas = ConfirmedEnums.getTitle(1); |
| 11 | 15 | // ConfirmedEnums.getTitle(2); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/EarController.java
View file @
ad5b356
| ... | ... | @@ -155,6 +155,9 @@ |
| 155 | 155 | } else { |
| 156 | 156 | boolean isResu = false; |
| 157 | 157 | for (BabyPatientExtendEarScreen scr : screenList) { |
| 158 | + if(scr.getOaeRight()==null||scr.getOaeLeft()==null||scr.getAabrLeft()==null||scr.getAabrRight()==null){ | |
| 159 | + | |
| 160 | + }else | |
| 158 | 161 | //只要有听筛未通过的就可以进入听诊了 |
| 159 | 162 | if (scr.getOaeLeft() == -1 || scr.getOaeRight() == -1 || scr.getAabrLeft() == -1 || scr.getAabrRight() == -1) {//1=通过 -1=未通过 |
| 160 | 163 | isResu = true; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearingDiagnoseController.java
View file @
ad5b356
| ... | ... | @@ -5,21 +5,24 @@ |
| 5 | 5 | import com.lyms.platform.common.annotation.TokenRequired; |
| 6 | 6 | import com.lyms.platform.common.base.BaseController; |
| 7 | 7 | import com.lyms.platform.common.base.LoginContext; |
| 8 | +import com.lyms.platform.common.base.PageInfo; | |
| 8 | 9 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
| 10 | +import com.lyms.platform.common.enums.ConfirmedEnums; | |
| 11 | +import com.lyms.platform.common.enums.HighRiskEnum; | |
| 12 | +import com.lyms.platform.common.enums.SexEnum; | |
| 13 | +import com.lyms.platform.common.result.BaseListResponse; | |
| 9 | 14 | import com.lyms.platform.common.result.BaseResponse; |
| 10 | 15 | import com.lyms.platform.common.utils.DateUtil; |
| 11 | 16 | import com.lyms.platform.operate.web.facade.AutoMatchFacade; |
| 12 | 17 | import com.lyms.platform.operate.web.request.HearingDiagnoseRequest; |
| 13 | 18 | import com.lyms.platform.operate.web.result.HearingDiagnoseListResult; |
| 14 | -import com.lyms.platform.permission.model.BabyPatientExtendEarHearingDiagnose; | |
| 15 | -import com.lyms.platform.permission.model.BabyPatientExtendEarHearingDiagnoseQuery; | |
| 16 | -import com.lyms.platform.permission.model.HighriskChangeHospital; | |
| 17 | -import com.lyms.platform.permission.model.HighriskChangeHospitalQuery; | |
| 19 | +import com.lyms.platform.operate.web.utils.MyComparator; | |
| 20 | +import com.lyms.platform.permission.model.*; | |
| 18 | 21 | import com.lyms.platform.permission.service.BabyPatientExtendEarHearingDiagnoseService; |
| 19 | 22 | import com.lyms.platform.permission.service.BabyPatientExtendEarScreenService; |
| 20 | 23 | import com.lyms.platform.permission.service.HighriskChangeHospitalService; |
| 24 | +import com.lyms.platform.permission.service.UsersService; | |
| 21 | 25 | import com.lyms.platform.pojo.BabyModel; |
| 22 | -import com.lyms.platform.query.BasicConfigQuery; | |
| 23 | 26 | import org.apache.commons.lang.StringUtils; |
| 24 | 27 | import org.springframework.beans.factory.annotation.Autowired; |
| 25 | 28 | import org.springframework.stereotype.Controller; |
| 26 | 29 | |
| ... | ... | @@ -51,8 +54,11 @@ |
| 51 | 54 | //转诊记录 |
| 52 | 55 | @Autowired |
| 53 | 56 | private HighriskChangeHospitalService highchangeService; |
| 57 | + @Autowired | |
| 54 | 58 | //听筛 |
| 55 | 59 | private BabyPatientExtendEarScreenService screenService; |
| 60 | + @Autowired | |
| 61 | + private UsersService usersService; | |
| 56 | 62 | |
| 57 | 63 | /** |
| 58 | 64 | * 根据id获取听力诊断记录信息 |
| 59 | 65 | |
| ... | ... | @@ -97,12 +103,12 @@ |
| 97 | 103 | List<String> hospitalIds = new ArrayList<String>(); |
| 98 | 104 | hospitalIds.add(hospitalId); |
| 99 | 105 | List<HighriskChangeHospital> hchList = highchangeService.queryHighriskChangeHospital(hcQuery); |
| 100 | - if(hchList.size()>0){ | |
| 101 | - for(HighriskChangeHospital h:hchList){ | |
| 106 | + if (hchList.size() > 0) { | |
| 107 | + for (HighriskChangeHospital h : hchList) { | |
| 102 | 108 | hospitalIds.add(h.getOutOrgid()); |
| 103 | 109 | } |
| 104 | 110 | } |
| 105 | - query.setCheckHospitalIds((String[])hospitalIds.toArray(new String[hospitalIds.size()])); | |
| 111 | + query.setCheckHospitalIds((String[]) hospitalIds.toArray(new String[hospitalIds.size()])); | |
| 106 | 112 | |
| 107 | 113 | List<BabyPatientExtendEarHearingDiagnose> behdList = hearingDiagnoseService.queryBabyPatientExtendEarHearingDiagnose(query); |
| 108 | 114 | List<Map<String, String>> list = new ArrayList<>(); |
| 109 | 115 | |
| 110 | 116 | |
| 111 | 117 | |
| 112 | 118 | |
| 113 | 119 | |
| 114 | 120 | |
| 115 | 121 | |
| 116 | 122 | |
| ... | ... | @@ -136,52 +142,73 @@ |
| 136 | 142 | return new BaseResponse().setErrorcode(ErrorCodeConstants.TOKEN_EXPIRE).setErrormsg("请重新登录"); |
| 137 | 143 | } |
| 138 | 144 | |
| 139 | - //如果查询号不为空,根据查询号查询儿童档案表,获取儿童档案Id | |
| 140 | - if (hdReq.getKeyWord() != null) {//关键字:姓名、联系方式、就诊卡 | |
| 141 | - //调用mysql表查询baby档案。 表还未设计 | |
| 142 | - } | |
| 143 | - | |
| 144 | 145 | //当前登录人医院Id |
| 145 | 146 | String hospitalId = autoMatchFacade.getHospitalId(loginState.getId()); |
| 146 | 147 | //医院ID 集合。本院、外院、全部... |
| 147 | 148 | List<String> outOrgids = new ArrayList<>(); |
| 148 | - if (hdReq.getSource() == 2) {//2.转诊过来的医院、 | |
| 149 | - //转诊过来的医院id | |
| 150 | - HighriskChangeHospitalQuery hchQuery = new HighriskChangeHospitalQuery(); | |
| 151 | - hchQuery.setTargetType(2);//儿童 | |
| 152 | - hchQuery.setChangeType(1);//听力转诊 | |
| 153 | - hchQuery.setStatus(2);//已接受 | |
| 154 | - hchQuery.setIntoOrgid(hospitalId); | |
| 155 | - List<HighriskChangeHospital> hchList = highchangeService.queryHighriskChangeHospital(hchQuery); | |
| 156 | - if (hchList != null && hchList.size() > 0) { | |
| 157 | - for (HighriskChangeHospital hch : hchList) {//如果存在则修改转诊记录状态为接收 | |
| 158 | - outOrgids.add(hch.getOutOrgid()); | |
| 149 | + if (hdReq.getSource() != null) { | |
| 150 | + if (hdReq.getSource() == 2) {//2.转诊过来的医院、 | |
| 151 | + //转诊过来的医院id | |
| 152 | + HighriskChangeHospitalQuery hchQuery = new HighriskChangeHospitalQuery(); | |
| 153 | + hchQuery.setTargetType(2);//儿童 | |
| 154 | + hchQuery.setChangeType(1);//听力转诊 | |
| 155 | + hchQuery.setStatus(2);//已接受 | |
| 156 | + hchQuery.setIntoOrgid(hospitalId); | |
| 157 | + List<HighriskChangeHospital> hchList = highchangeService.queryHighriskChangeHospital(hchQuery); | |
| 158 | + if (hchList != null && hchList.size() > 0) { | |
| 159 | + for (HighriskChangeHospital hch : hchList) {//如果存在则修改转诊记录状态为接收 | |
| 160 | + outOrgids.add(hch.getOutOrgid()); | |
| 161 | + } | |
| 159 | 162 | } |
| 163 | + } else if (hdReq.getSource() == 1) {//1.本院 | |
| 164 | + //当前医院 | |
| 165 | + outOrgids.add(hospitalId); | |
| 166 | + } else {//4.全部医院/默认全部医院 | |
| 167 | + //当前医院 | |
| 168 | + outOrgids.add(hospitalId); | |
| 169 | + //转诊过来的医院id | |
| 170 | + HighriskChangeHospitalQuery hchQuery = new HighriskChangeHospitalQuery(); | |
| 171 | + hchQuery.setTargetType(2);//儿童 | |
| 172 | + hchQuery.setChangeType(1);//听力转诊 | |
| 173 | + hchQuery.setStatus(2);//已接受 | |
| 174 | + hchQuery.setIntoOrgid(hospitalId); | |
| 175 | + List<HighriskChangeHospital> hchList = highchangeService.queryHighriskChangeHospital(hchQuery); | |
| 176 | + if (hchList != null && hchList.size() > 0) { | |
| 177 | + for (HighriskChangeHospital hch : hchList) {//如果存在则修改转诊记录状态为接收 | |
| 178 | + outOrgids.add(hch.getOutOrgid()); | |
| 179 | + } | |
| 180 | + } | |
| 160 | 181 | } |
| 161 | - } else if (hdReq.getSource() == 1) {//1.本院 | |
| 182 | + } else { | |
| 162 | 183 | //当前医院 |
| 163 | 184 | outOrgids.add(hospitalId); |
| 164 | - } else {//4.全部医院/默认全部医院 | |
| 165 | - //当前医院 | |
| 166 | - outOrgids.add(hospitalId); | |
| 167 | - //转诊过来的医院id | |
| 168 | - HighriskChangeHospitalQuery hchQuery = new HighriskChangeHospitalQuery(); | |
| 169 | - hchQuery.setTargetType(2);//儿童 | |
| 170 | - hchQuery.setChangeType(1);//听力转诊 | |
| 171 | - hchQuery.setStatus(2);//已接受 | |
| 172 | - hchQuery.setIntoOrgid(hospitalId); | |
| 173 | - List<HighriskChangeHospital> hchList = highchangeService.queryHighriskChangeHospital(hchQuery); | |
| 174 | - if (hchList != null && hchList.size() > 0) { | |
| 175 | - for (HighriskChangeHospital hch : hchList) {//如果存在则修改转诊记录状态为接收 | |
| 176 | - outOrgids.add(hch.getOutOrgid()); | |
| 177 | - } | |
| 178 | - } | |
| 179 | 185 | } |
| 186 | + BabyPatientExtendEarScreenQuery scrQuery = new BabyPatientExtendEarScreenQuery(); | |
| 187 | + //如果查询号不为空,根据查询号查询儿童档案表,获取儿童档案Id | |
| 188 | + if (hdReq.getKeyWord() != null) {//关键字:姓名、联系方式、就诊卡 查询babyId | |
| 189 | + //调用mysql表查询baby档案。 表还未设计 | |
| 190 | + // scrQuery.setBabyIds(); | |
| 191 | + } | |
| 180 | 192 | |
| 181 | - BabyPatientExtendEarHearingDiagnoseQuery query = new BabyPatientExtendEarHearingDiagnoseQuery(); | |
| 193 | + scrQuery.setCheckHospitalIds((String[]) outOrgids.toArray(new String[outOrgids.size()])); | |
| 194 | + | |
| 195 | + //主数据 | |
| 196 | + List<String> babyIds = screenService.queryScrBabyIds(scrQuery); | |
| 197 | + | |
| 198 | + if (babyIds.size() == 0) { | |
| 199 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("没有找到数据"); | |
| 200 | + } | |
| 201 | + | |
| 182 | 202 | //设置要显示的医院集合(已加入条件本院、外院、全部) |
| 183 | - query.setCheckHospitalIds((String[])outOrgids.toArray(new String[outOrgids.size()])); | |
| 203 | + BabyPatientExtendEarHearingDiagnoseQuery query = new BabyPatientExtendEarHearingDiagnoseQuery(); | |
| 184 | 204 | |
| 205 | + //设置要查询的babyId | |
| 206 | + query.setBabyIds(babyIds.toArray(new String[babyIds.size()])); | |
| 207 | + | |
| 208 | + if(hdReq.getConfirmResult()!=null){ | |
| 209 | + query.setConfirmResult(String.valueOf(hdReq.getConfirmResult())); | |
| 210 | + } | |
| 211 | + | |
| 185 | 212 | if (hdReq.getDiagnoseStartTime() != null) {//诊断开始时间 |
| 186 | 213 | query.setDiagnoseStartTime(hdReq.getDiagnoseStartTime()); |
| 187 | 214 | } |
| ... | ... | @@ -208,8 +235,33 @@ |
| 208 | 235 | query.setIsconfirm(hdReq.getIsconfirm()); |
| 209 | 236 | } |
| 210 | 237 | |
| 211 | - if (StringUtils.isNotEmpty(hdReq.getConfirmResult())) {//模糊查询确诊结果 | |
| 212 | - query.setConfirmResult(","+hdReq.getConfirmResult()+","); | |
| 238 | + | |
| 239 | + | |
| 240 | + if (hdReq.getConfirmDegree() != null) {//模糊查询确诊结果 | |
| 241 | + List<String> cfList = new ArrayList<>(); | |
| 242 | + if (hdReq.getConfirmDegree() == 1) {//轻度 | |
| 243 | + cfList.add(",1,"); | |
| 244 | + cfList.add(",2,"); | |
| 245 | + cfList.add(",3,"); | |
| 246 | + } else if (hdReq.getConfirmDegree() == 2) {//中度 | |
| 247 | + cfList.add(",4,"); | |
| 248 | + cfList.add(",5,"); | |
| 249 | + cfList.add(",6,"); | |
| 250 | + } else if (hdReq.getConfirmDegree() == 3) {//重度 | |
| 251 | + cfList.add(",7,"); | |
| 252 | + cfList.add(",8,"); | |
| 253 | + cfList.add(",9,"); | |
| 254 | + } else if (hdReq.getConfirmDegree() == 3) {//重度 | |
| 255 | + cfList.add(",10,"); | |
| 256 | + cfList.add(",11,"); | |
| 257 | + cfList.add(",12,"); | |
| 258 | + } else if (hdReq.getConfirmDegree() == 4) {//极重度 | |
| 259 | + cfList.add(",13,"); | |
| 260 | + cfList.add(",14,"); | |
| 261 | + cfList.add(",15,"); | |
| 262 | + } | |
| 263 | + query.setConfirmResults(cfList.toArray(new String[cfList.size()])); | |
| 264 | + // query.setConfirmResult("," + hdReq.getConfirmResult() + ","); | |
| 213 | 265 | } |
| 214 | 266 | |
| 215 | 267 | if (hdReq.getConfirmStartTime() != null) {//确诊开始时间 |
| 216 | 268 | |
| 217 | 269 | |
| 218 | 270 | |
| 219 | 271 | |
| 220 | 272 | |
| 221 | 273 | |
| ... | ... | @@ -220,46 +272,132 @@ |
| 220 | 272 | query.setConfirmEndTime(hdReq.getConfirmEndTime()); |
| 221 | 273 | } |
| 222 | 274 | |
| 223 | - | |
| 224 | - | |
| 225 | - //根据当前医院id,和已接受儿童档案的转入医院id 进行查询 | |
| 226 | - if (hdReq.getEnalble() == 2) {//2待诊断,查询听筛记录,还未做听诊的 | |
| 227 | - //没有听诊记录 | |
| 228 | - query.setEnalble(2); | |
| 229 | - } else if (hdReq.getEnalble() == 1) {//已诊断 | |
| 230 | - //有听诊记录 | |
| 231 | - query.setEnalble(1); | |
| 232 | - //医院id | |
| 233 | - //没有听诊记录 | |
| 234 | - } | |
| 235 | 275 | query.setSort("diagnose_time"); |
| 276 | + | |
| 236 | 277 | List<BabyPatientExtendEarHearingDiagnose> hearingDiagnoseList = hearingDiagnoseService.getHdAndScreen(query); |
| 278 | + | |
| 279 | + List<HearingDiagnoseListResult> waitConfiList = new ArrayList<>(); | |
| 280 | + List<HearingDiagnoseListResult> confiList = new ArrayList<>(); | |
| 237 | 281 | List<HearingDiagnoseListResult> hdrList = new ArrayList<>(); |
| 238 | - for (BabyPatientExtendEarHearingDiagnose hd : hearingDiagnoseList) { | |
| 239 | - BabyModel babyModel = babyService.getOneBabyById(hd.getBabyId()); | |
| 282 | + // for (int i = (hdReq.getPage() - 1) * hdReq.getLimit(); (i < babyIds.size() && i < hdReq.getLimit()); i++) { | |
| 283 | + for (int i = 0; i < babyIds.size(); i++) { | |
| 284 | + BabyPatientExtendEarHearingDiagnose hd = new BabyPatientExtendEarHearingDiagnose(); | |
| 285 | + hd.setBabyId(babyIds.get(i)); | |
| 286 | + int index1 = Collections.binarySearch(hearingDiagnoseList, hd, new MyComparator()); | |
| 240 | 287 | HearingDiagnoseListResult hea = new HearingDiagnoseListResult(); |
| 241 | - hea.setId(hd.getId()); | |
| 242 | - hea.setBabyName(babyModel.getName()); | |
| 243 | - hea.setMommyName(babyModel.getMname()); | |
| 244 | - hea.setMonthAge(DateUtil.getBabyMonthAge(babyModel.getBirth(), new Date())); | |
| 245 | - hea.setBirthday(DateUtil.getyyyy_MM_dd(babyModel.getBirth())); | |
| 246 | - hea.setHdTime(DateUtil.getyyyy_MM_dd(hd.getDiagnoseTime())); | |
| 247 | - hea.setSex(babyModel.getSex() == 0 ? "女" : babyModel.getSex() == 1 ? "男" : "未知"); | |
| 248 | - BasicConfigQuery basicConfigQuery = new BasicConfigQuery(); | |
| 249 | - basicConfigQuery.setIds(Arrays.asList(hd.getHighFactor().split(","))); | |
| 250 | - //高危儿的确定因素 | |
| 251 | - // hea.setHighRiskCause(); | |
| 252 | - hdrList.add(hea); | |
| 288 | + if (index1 >= 0) { | |
| 289 | + hd = hearingDiagnoseList.get(index1); | |
| 290 | + hea.setIsconfirm(hd.getIsconfirm() == null ? "未确诊" : hd.getIsconfirm() == 0 ? "未确诊" : "已确诊"); | |
| 291 | + hea.setId(hd.getId()); | |
| 292 | + hea.setDiagnoseTime(DateUtil.getyyyy_MM_dd(hd.getDiagnoseTime())); | |
| 293 | + String docotorId = hd.getDiagnDoctorId(); | |
| 294 | + Users users = usersService.getUsers(Integer.parseInt(docotorId)); | |
| 295 | + if (users != null) { | |
| 296 | + hea.setDoctorName(users.getName() == null ? "-" : users.getName()); | |
| 297 | + } | |
| 298 | + hea.setHdTime(com.lyms.platform.common.utils.StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(hd.getDiagnoseTime()))); | |
| 299 | + if (hd.getHighFactor() != null) { | |
| 300 | + String hf[] = hd.getHighFactor().split(","); | |
| 301 | + List<Map<Integer, String>> highRiskEnums = new ArrayList<>(); | |
| 302 | + for (int b = 0; b < hf.length; b++) { | |
| 303 | + if (StringUtils.isNotEmpty(hf[b])) { | |
| 304 | + Map<Integer, String> map = new HashMap<>(); | |
| 305 | + String title = HighRiskEnum.getTitle(Integer.parseInt(hf[b])); | |
| 306 | + map.put(Integer.parseInt(hf[b]), title); | |
| 307 | + highRiskEnums.add(map); | |
| 308 | + } | |
| 309 | + } | |
| 310 | + hea.setHighRiskEnums(highRiskEnums); | |
| 311 | + } | |
| 312 | + //确诊结果 | |
| 313 | + if (hd.getConfirmResult() != null) { | |
| 314 | + String cr[] = hd.getConfirmResult().split(","); | |
| 315 | + List<Map<Integer, String>> hdEnums = new ArrayList<>(); | |
| 316 | + for (int b = 0; b < cr.length; b++) { | |
| 317 | + if (StringUtils.isNotEmpty(cr[b])) { | |
| 318 | + Map<Integer, String> map = new HashMap<>(); | |
| 319 | + String title = ConfirmedEnums.getTitle(Integer.parseInt(cr[b])); | |
| 320 | + map.put(Integer.parseInt(cr[b]), title); | |
| 321 | + hdEnums.add(map); | |
| 322 | + } | |
| 323 | + } | |
| 324 | + hea.setDiagnResult(hdEnums); | |
| 325 | + } | |
| 326 | + } | |
| 327 | + BabyModel babyModel = babyService.getOneBabyById(hd.getBabyId()); | |
| 328 | + if (babyModel != null) { | |
| 329 | + hea.setBabyName(babyModel.getName()); | |
| 330 | + hea.setMommyName(com.lyms.platform.common.utils.StringUtils.emptyDeal(babyModel.getMname())); | |
| 331 | + hea.setMommnyPhone(com.lyms.platform.common.utils.StringUtils.emptyDeal(babyModel.getMphone())); | |
| 332 | + hea.setMommnyEncryptPhone(com.lyms.platform.common.utils.StringUtils.encryPhone(babyModel.getMphone())); | |
| 333 | + hea.setMonthAge(DateUtil.getBabyMonthAge(babyModel.getBirth(), new Date())); | |
| 334 | + hea.setBirthday(com.lyms.platform.common.utils.StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(babyModel.getBirth()))); | |
| 335 | + hea.setSex(com.lyms.platform.common.utils.StringUtils.emptyDeal(SexEnum.getTextById(babyModel.getSex()))); | |
| 336 | + } | |
| 337 | + //诊断结果,肯定是有诊断记录 | |
| 338 | + if(hdReq.getConfirmResult()!=null||hdReq.getConfirmDegree()!=null){ | |
| 339 | + // 1、已诊断、2、待诊断、0、全部 | |
| 340 | + if (StringUtils.isNotEmpty(hea.getId())) {//1、已诊断 | |
| 341 | + confiList.add(hea); | |
| 342 | + //全部 | |
| 343 | + hdrList.add(hea); | |
| 344 | + } | |
| 345 | + }else{ | |
| 346 | + // 1、已诊断、2、待诊断、0、全部 | |
| 347 | + if (StringUtils.isEmpty(hea.getId())) { | |
| 348 | + waitConfiList.add(hea); | |
| 349 | + } else if (StringUtils.isNotEmpty(hea.getId())) {//1、已诊断 | |
| 350 | + confiList.add(hea); | |
| 351 | + } | |
| 352 | + //全部 | |
| 353 | + hdrList.add(hea); | |
| 354 | + } | |
| 253 | 355 | } |
| 254 | - BaseResponse result = new BaseResponse(); | |
| 255 | - result.setObject(hdrList); | |
| 356 | + | |
| 357 | + BaseListResponse result = new BaseListResponse(); | |
| 358 | + PageInfo pageInfo = new PageInfo(); | |
| 359 | + List<HearingDiagnoseListResult> resList = new ArrayList<>(); | |
| 360 | + if (hdReq.getEnalble() != null) | |
| 361 | + { | |
| 362 | + if (hdReq.getEnalble() == 1) { | |
| 363 | + for (int i = (hdReq.getPage() - 1) * hdReq.getLimit(); (i < confiList.size() && i < hdReq.getLimit()); i++) { | |
| 364 | + resList.add(confiList.get(i)); | |
| 365 | + } | |
| 366 | + result.setData(confiList); | |
| 367 | + pageInfo.setCount(confiList.size()); | |
| 368 | + } else if (hdReq.getEnalble() == 2) { | |
| 369 | + for (int i = (hdReq.getPage() - 1) * hdReq.getLimit(); (i < waitConfiList.size() && i < hdReq.getLimit()); i++) { | |
| 370 | + resList.add(waitConfiList.get(i)); | |
| 371 | + } | |
| 372 | + pageInfo.setCount(waitConfiList.size()); | |
| 373 | + result.setData(waitConfiList); | |
| 374 | + } else if (hdReq.getEnalble() == 3) { | |
| 375 | + for (int i = (hdReq.getPage() - 1) * hdReq.getLimit(); (i < hdrList.size() && i < hdReq.getLimit()); i++) { | |
| 376 | + resList.add(hdrList.get(i)); | |
| 377 | + } | |
| 378 | + pageInfo.setCount(hdrList.size()); | |
| 379 | + result.setData(hdrList); | |
| 380 | + } | |
| 381 | + } else | |
| 382 | + { | |
| 383 | + for (int i = (hdReq.getPage() - 1) * hdReq.getLimit(); (i < hdrList.size() && i < hdReq.getLimit()); i++) { | |
| 384 | + resList.add(hdrList.get(i)); | |
| 385 | + } | |
| 386 | + pageInfo.setCount(hdrList.size()); | |
| 387 | + result.setData(hdrList); | |
| 388 | + } | |
| 389 | + | |
| 390 | + pageInfo.setLimit(hdReq.getLimit()); | |
| 391 | + pageInfo.setPage(hdReq.getPage()); | |
| 392 | + result.setPageInfo(pageInfo); | |
| 256 | 393 | result.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("查询成功"); |
| 257 | 394 | return result; |
| 258 | 395 | } |
| 259 | 396 | |
| 260 | 397 | /** |
| 261 | 398 | * 删除听力诊断 |
| 262 | - * @param obj 听力诊断对象 | |
| 399 | + * | |
| 400 | + * @param obj 听力诊断对象 | |
| 263 | 401 | * @param request |
| 264 | 402 | * @return |
| 265 | 403 | */ |
| ... | ... | @@ -370,8 +508,6 @@ |
| 370 | 508 | hch.setReceiveDoctorid(String.valueOf(loginState.getId())); |
| 371 | 509 | highchangeService.updateHighriskChangeHospital(hch); |
| 372 | 510 | //调用儿童档案接口,将隐藏档案设置为显示 |
| 373 | - | |
| 374 | - | |
| 375 | 511 | } |
| 376 | 512 | } |
| 377 | 513 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/HearingDiagnoseRequest.java
View file @
ad5b356
| ... | ... | @@ -45,13 +45,13 @@ |
| 45 | 45 | */ |
| 46 | 46 | private Integer isconfirm; |
| 47 | 47 | /** |
| 48 | - * 确诊结果 | |
| 48 | + * 确诊结果 0-全部,1-轻度耳聋,2-中度耳聋,3-重度耳聋,4-极重耳聋 | |
| 49 | 49 | */ |
| 50 | - private String confirmResult; | |
| 50 | + private Integer confirmResult; | |
| 51 | 51 | /** |
| 52 | 52 | * 确诊程度 0-全部,1-轻度,2-中度,3-重度,4-极重 |
| 53 | 53 | */ |
| 54 | - private String confirmDegree; | |
| 54 | + private Integer confirmDegree; | |
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | 57 | * 确诊开始时间 |
| 58 | 58 | |
| 59 | 59 | |
| ... | ... | @@ -104,14 +104,21 @@ |
| 104 | 104 | this.isconfirm = isconfirm; |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | - public String getConfirmResult() { | |
| 107 | + public Integer getConfirmResult() { | |
| 108 | 108 | return confirmResult; |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | - public void setConfirmResult(String confirmResult) { | |
| 111 | + public void setConfirmResult(Integer confirmResult) { | |
| 112 | 112 | this.confirmResult = confirmResult; |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | + public Integer getConfirmDegree() { | |
| 116 | + return confirmDegree; | |
| 117 | + } | |
| 118 | + | |
| 119 | + public void setConfirmDegree(Integer confirmDegree) { | |
| 120 | + this.confirmDegree = confirmDegree; | |
| 121 | + } | |
| 115 | 122 | |
| 116 | 123 | public Date getDiagnoseStartTime() { |
| 117 | 124 | return diagnoseStartTime; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/HearingDiagnoseListResult.java
View file @
ad5b356
| 1 | 1 | package com.lyms.platform.operate.web.result; |
| 2 | 2 | |
| 3 | +import java.util.List; | |
| 4 | +import java.util.Map; | |
| 5 | + | |
| 3 | 6 | /** |
| 4 | 7 | * 听力诊断列表 |
| 5 | 8 | * Created by yf on 2017/5/11. |
| 6 | 9 | |
| 7 | 10 | |
| 8 | 11 | |
| 9 | 12 | |
| 10 | 13 | |
| ... | ... | @@ -19,23 +22,29 @@ |
| 19 | 22 | private String hdTime; |
| 20 | 23 | //性别 |
| 21 | 24 | private String sex; |
| 22 | - //高危因素 1=早产 2=晚产 | |
| 23 | - private String highRiskCause; | |
| 24 | 25 | //诊断结果 |
| 25 | - private String diagnose; | |
| 26 | + private List<Map<Integer,String>> diagnResult; | |
| 26 | 27 | //是否确诊 0-待确诊,1-确诊 |
| 27 | - private String enalble; | |
| 28 | - //诊断指导处理意见 | |
| 29 | - private String diagnHandSugge; | |
| 28 | + private String isconfirm; | |
| 30 | 29 | //创建时间 |
| 31 | - private String buildTime; | |
| 30 | + private String diagnoseTime; | |
| 32 | 31 | //医生名称 |
| 33 | 32 | private String doctorName; |
| 34 | 33 | //母亲联系方式 |
| 35 | 34 | private String mommnyPhone; |
| 36 | 35 | //母亲加密联系方式 |
| 37 | 36 | private String mommnyEncryptPhone; |
| 37 | + //听力高危集合 | |
| 38 | + private List<Map<Integer,String>> highRiskEnums; | |
| 38 | 39 | |
| 40 | + public List<Map<Integer, String>> getHighRiskEnums() { | |
| 41 | + return highRiskEnums; | |
| 42 | + } | |
| 43 | + | |
| 44 | + public void setHighRiskEnums(List<Map<Integer, String>> highRiskEnums) { | |
| 45 | + this.highRiskEnums = highRiskEnums; | |
| 46 | + } | |
| 47 | + | |
| 39 | 48 | public String getId() { |
| 40 | 49 | return id; |
| 41 | 50 | } |
| 42 | 51 | |
| 43 | 52 | |
| 44 | 53 | |
| 45 | 54 | |
| 46 | 55 | |
| 47 | 56 | |
| ... | ... | @@ -92,44 +101,29 @@ |
| 92 | 101 | this.sex = sex; |
| 93 | 102 | } |
| 94 | 103 | |
| 95 | - public String getHighRiskCause() { | |
| 96 | - return highRiskCause; | |
| 97 | - } | |
| 98 | 104 | |
| 99 | - public void setHighRiskCause(String highRiskCause) { | |
| 100 | - this.highRiskCause = highRiskCause; | |
| 105 | + public List<Map<Integer, String>> getDiagnResult() { | |
| 106 | + return diagnResult; | |
| 101 | 107 | } |
| 102 | 108 | |
| 103 | - public String getDiagnose() { | |
| 104 | - return diagnose; | |
| 109 | + public void setDiagnResult(List<Map<Integer, String>> diagnResult) { | |
| 110 | + this.diagnResult = diagnResult; | |
| 105 | 111 | } |
| 106 | 112 | |
| 107 | - public void setDiagnose(String diagnose) { | |
| 108 | - this.diagnose = diagnose; | |
| 113 | + public String getIsconfirm() { | |
| 114 | + return isconfirm; | |
| 109 | 115 | } |
| 110 | 116 | |
| 111 | - public String getEnalble() { | |
| 112 | - return enalble; | |
| 117 | + public void setIsconfirm(String isconfirm) { | |
| 118 | + this.isconfirm = isconfirm; | |
| 113 | 119 | } |
| 114 | 120 | |
| 115 | - public void setEnalble(String enalble) { | |
| 116 | - this.enalble = enalble; | |
| 121 | + public String getDiagnoseTime() { | |
| 122 | + return diagnoseTime; | |
| 117 | 123 | } |
| 118 | 124 | |
| 119 | - public String getDiagnHandSugge() { | |
| 120 | - return diagnHandSugge; | |
| 121 | - } | |
| 122 | - | |
| 123 | - public void setDiagnHandSugge(String diagnHandSugge) { | |
| 124 | - this.diagnHandSugge = diagnHandSugge; | |
| 125 | - } | |
| 126 | - | |
| 127 | - public String getBuildTime() { | |
| 128 | - return buildTime; | |
| 129 | - } | |
| 130 | - | |
| 131 | - public void setBuildTime(String buildTime) { | |
| 132 | - this.buildTime = buildTime; | |
| 125 | + public void setDiagnoseTime(String diagnoseTime) { | |
| 126 | + this.diagnoseTime = diagnoseTime; | |
| 133 | 127 | } |
| 134 | 128 | |
| 135 | 129 | public String getDoctorName() { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/MyComparator.java
View file @
ad5b356
| 1 | +package com.lyms.platform.operate.web.utils; | |
| 2 | + | |
| 3 | +import com.lyms.platform.permission.model.BabyPatientExtendEarHearingDiagnose; | |
| 4 | + | |
| 5 | +import java.util.Comparator; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * @auther yangfei | |
| 9 | + * @createTime 2017年05月22日 16时52分 | |
| 10 | + * @discription | |
| 11 | + */ | |
| 12 | +public class MyComparator implements Comparator<BabyPatientExtendEarHearingDiagnose> { | |
| 13 | + @Override | |
| 14 | + public int compare(BabyPatientExtendEarHearingDiagnose s1, BabyPatientExtendEarHearingDiagnose s2) { | |
| 15 | + int num1 = (s1.getBabyId().compareTo(s2.getBabyId())); | |
| 16 | + return num1; | |
| 17 | + } | |
| 18 | +} |