Commit b399062b6221b0a60010b456da77b2f07f7817e5

Authored by yangfei
1 parent 324386e8ac

听力诊断模块

Showing 22 changed files with 298 additions and 61 deletions

platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarBaby.java View file @ b399062
... ... @@ -21,6 +21,15 @@
21 21 private Date buildDate;
22 22 private String babyPatientId;
23 23 private String babyEarId;
  24 + private String personId;
  25 +
  26 + public String getPersonId() {
  27 + return personId;
  28 + }
  29 +
  30 + public void setPersonId(String personId) {
  31 + this.personId = personId;
  32 + }
24 33  
25 34 public String getId() {
26 35 return id;
platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarBabyQuery.java View file @ b399062
... ... @@ -22,12 +22,14 @@
22 22 private String hospitalId;
23 23 private Integer buildType;
24 24 private String enable;
  25 + private String noEnable;
25 26 private Integer yn;
26 27 private Date buildDate;
27 28 private String babyPatientId;
28 29 private String babyEarId;
29 30 //儿童姓名、母亲证件号、母亲联系方式
30 31 private String queryNo;
  32 + private String personId;
31 33 /**
32 34 * 生日
33 35 */
... ... @@ -37,6 +39,14 @@
37 39 */
38 40 private Date birthEnd;
39 41  
  42 + public String getPersonId() {
  43 + return personId;
  44 + }
  45 +
  46 + public void setPersonId(String personId) {
  47 + this.personId = personId;
  48 + }
  49 +
40 50 public Date getBirthStart() {
41 51 return birthStart;
42 52 }
... ... @@ -51,6 +61,14 @@
51 61  
52 62 public void setBirthEnd(Date birthEnd) {
53 63 this.birthEnd = birthEnd;
  64 + }
  65 +
  66 + public String getNoEnable() {
  67 + return noEnable;
  68 + }
  69 +
  70 + public void setNoEnable(String noEnable) {
  71 + this.noEnable = noEnable;
54 72 }
55 73  
56 74 public String getId() {
platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarFollowUp.java View file @ b399062
... ... @@ -133,7 +133,15 @@
133 133 * 状态
134 134 */
135 135 private Integer enalble;
  136 + private String pid;
136 137  
  138 + public String getPid() {
  139 + return pid;
  140 + }
  141 +
  142 + public void setPid(String pid) {
  143 + this.pid = pid;
  144 + }
137 145  
138 146 public Integer getIsAudiphone() {
139 147 return isAudiphone;
platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarFollowUpQuery.java View file @ b399062
... ... @@ -119,6 +119,7 @@
119 119 * 创建人id
120 120 */
121 121 private String createId;
  122 + private String pid;
122 123 /**
123 124 * 状态
124 125 */
... ... @@ -138,6 +139,14 @@
138 139 private String nextEndTime;
139 140 //获取sql语句
140 141 private String sqlStr;
  142 +
  143 + public String getPid() {
  144 + return pid;
  145 + }
  146 +
  147 + public void setPid(String pid) {
  148 + this.pid = pid;
  149 + }
141 150  
142 151 public Integer getIsAudiphone() {
143 152 return isAudiphone;
platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarHearingDiagnose.java View file @ b399062
... ... @@ -480,6 +480,15 @@
480 480 * 确诊时间
481 481 */
482 482 private String confirmTimeStr;
  483 + private String pid;
  484 +
  485 + public String getPid() {
  486 + return pid;
  487 + }
  488 +
  489 + public void setPid(String pid) {
  490 + this.pid = pid;
  491 + }
483 492  
484 493 public String getMonthAge() {
485 494 return monthAge;
platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarHearingDiagnoseQuery.java View file @ b399062
... ... @@ -436,6 +436,8 @@
436 436 * 确诊结果
437 437 */
438 438 private String confirmResult;
  439 + private String pid;
  440 + private String[] pids;
439 441 /**
440 442 * 确诊结果程度
441 443 */
... ... @@ -452,6 +454,22 @@
452 454 * 确诊结束时间
453 455 */
454 456 private Date confirmEndTime;
  457 +
  458 + public String[] getPids() {
  459 + return pids;
  460 + }
  461 +
  462 + public void setPids(String[] pids) {
  463 + this.pids = pids;
  464 + }
  465 +
  466 + public String getPid() {
  467 + return pid;
  468 + }
  469 +
  470 + public void setPid(String pid) {
  471 + this.pid = pid;
  472 + }
455 473  
456 474 public String[] getConfirmResults() {
457 475 return confirmResults;
platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarQuery.java View file @ b399062
... ... @@ -53,6 +53,15 @@
53 53 private String createUserId;
54 54 //条码
55 55 private String barCode;
  56 + private String pid;
  57 +
  58 + public String getPid() {
  59 + return pid;
  60 + }
  61 +
  62 + public void setPid(String pid) {
  63 + this.pid = pid;
  64 + }
56 65  
57 66 public String getNation() {
58 67 return nation;
platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarScreen.java View file @ b399062
... ... @@ -107,6 +107,8 @@
107 107 * 预约诊断时间
108 108 */
109 109 private Date nextCheckTime;
  110 + //pid
  111 + private String pid;
110 112  
111 113 private Date createDate;
112 114 private String createUserId;
... ... @@ -115,6 +117,14 @@
115 117 private String lastUpdateUserId;
116 118 private String lastUpdateHospitalId;
117 119 private Integer status;
  120 +
  121 + public String getPid() {
  122 + return pid;
  123 + }
  124 +
  125 + public void setPid(String pid) {
  126 + this.pid = pid;
  127 + }
118 128  
119 129 public Integer getScrIspass() {
120 130 return scrIspass;
platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarScreenQuery.java View file @ b399062
... ... @@ -129,6 +129,7 @@
129 129 private String nextStartTime;
130 130 //预约复查结束时间
131 131 private String nextEndTime;
  132 + private String pid;
132 133  
133 134 //筛查结果 -1未通过 1-通过
134 135 private Integer isPass;
... ... @@ -140,6 +141,13 @@
140 141 //筛查结果 1通过 2-未通过
141 142 private Integer scrIspass;
142 143  
  144 + public String getPid() {
  145 + return pid;
  146 + }
  147 +
  148 + public void setPid(String pid) {
  149 + this.pid = pid;
  150 + }
143 151  
144 152 public Integer getScrIspass() {
145 153 return scrIspass;
platform-biz-service/src/main/java/com/lyms/platform/permission/model/HighriskChangeHospital.java View file @ b399062
... ... @@ -74,6 +74,15 @@
74 74 * 听筛记录ID
75 75 */
76 76 private String scrreenId;
  77 + private String pid;
  78 +
  79 + public String getPid() {
  80 + return pid;
  81 + }
  82 +
  83 + public void setPid(String pid) {
  84 + this.pid = pid;
  85 + }
77 86  
78 87 public String getScrreenId() {
79 88 return scrreenId;
platform-biz-service/src/main/java/com/lyms/platform/permission/model/HighriskChangeHospitalQuery.java View file @ b399062
... ... @@ -88,8 +88,17 @@
88 88 * 听筛记录ID
89 89 */
90 90 private String scrreenId;
  91 + private String pid;
91 92 //听诊儿童档案集合
92 93 private String[] babyIds;
  94 +
  95 + public String getPid() {
  96 + return pid;
  97 + }
  98 +
  99 + public void setPid(String pid) {
  100 + this.pid = pid;
  101 + }
93 102  
94 103 public String[] getBabyIds() {
95 104 return babyIds;
platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarBaby.xml View file @ b399062
... ... @@ -22,12 +22,13 @@
22 22 <result column="build_date" property="buildDate" jdbcType="TIMESTAMP"/>
23 23 <result column="baby_patient_id" property="babyPatientId" jdbcType="VARCHAR"/>
24 24 <result column="baby_ear_id" property="babyEarId" jdbcType="VARCHAR"/>
  25 + <result column="person_id" property="personId" jdbcType="VARCHAR"/>
25 26 </resultMap>
26 27  
27 28  
28 29 <insert id="addBabyPatientExtendEarBaby"
29 30 parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarBaby">
30   -insert into baby_patient_extend_ear_baby (id,name,sex,cardNo,birth,mname,mcert_type_id,mcert_no,mphone,vc_card_no,build_doctor,hospital_id,build_type,enable,yn,build_date,baby_patient_id,baby_ear_id) values (#{id},#{name},#{sex},#{cardno},#{birth},#{mname},#{mcertTypeId},#{mcertNo},#{mphone},#{vcCardNo},#{buildDoctor},#{hospitalId},#{buildType},#{enable},#{yn},#{buildDate},#{babyPatientId},#{babyEarId})
  31 +insert into baby_patient_extend_ear_baby (id,name,sex,cardNo,birth,mname,mcert_type_id,mcert_no,mphone,vc_card_no,build_doctor,hospital_id,build_type,enable,yn,build_date,baby_patient_id,baby_ear_id,person_id) values (#{id},#{name},#{sex},#{cardno},#{birth},#{mname},#{mcertTypeId},#{mcertNo},#{mphone},#{vcCardNo},#{buildDoctor},#{hospitalId},#{buildType},#{enable},#{yn},#{buildDate},#{babyPatientId},#{babyEarId},#{personId})
31 32 </insert>
32 33  
33 34  
... ... @@ -86,6 +87,9 @@
86 87 <if test="babyEarId != null and babyEarId != ''">
87 88 baby_ear_id = #{babyEarId,jdbcType=VARCHAR},
88 89 </if>
  90 + <if test="personId != null and personId != ''">
  91 + person_id = #{personId,jdbcType=VARCHAR},
  92 + </if>
89 93 </set>
90 94 where id = #{id,jdbcType=VARCHAR}
91 95 </update>
... ... @@ -98,7 +102,7 @@
98 102  
99 103 <select id="getBabyPatientExtendEarBaby" resultMap="BabyPatientExtendEarBabyResultMap"
100 104 parameterType="java.lang.String">
101   -select id,name,sex,cardNo,birth,mname,mcert_type_id,mcert_no,mphone,vc_card_no,build_doctor,hospital_id,build_type,enable,yn,build_date,baby_patient_id,baby_ear_id
  105 +select id,name,sex,cardNo,birth,mname,mcert_type_id,mcert_no,mphone,vc_card_no,build_doctor,hospital_id,build_type,enable,yn,build_date,baby_patient_id,baby_ear_id,person_id
102 106 from baby_patient_extend_ear_baby where id = #{id,jdbcType=VARCHAR}
103 107 </select>
104 108  
105 109  
... ... @@ -179,8 +183,15 @@
179 183 and build_type = #{buildType,jdbcType=INTEGER}
180 184 </if>
181 185 <if test="enable != null and enable != ''">
182   - and enable = #{enable,jdbcType=VARCHAR}
  186 + and (enable = #{enable,jdbcType=VARCHAR}
  187 + or `enable` is null
  188 + )
183 189 </if>
  190 + <if test="noEnable != null and noEnable != ''">
  191 + and (enable != #{noEnable,jdbcType=VARCHAR}
  192 + or `enable` is null
  193 + )
  194 + </if>
184 195 <if test="yn != null and yn >= 0">
185 196 and yn = #{yn,jdbcType=INTEGER}
186 197 </if>
... ... @@ -193,6 +204,10 @@
193 204 <if test="babyEarId != null and babyEarId != ''">
194 205 and baby_ear_id = #{babyEarId,jdbcType=VARCHAR}
195 206 </if>
  207 + <if test="personId != null and personId != ''">
  208 + and person_id = #{personId,jdbcType=VARCHAR}
  209 + </if>
  210 +
196 211 </where>
197 212 </sql>
198 213  
... ... @@ -200,7 +215,7 @@
200 215 <select id="queryBabyPatientExtendEarBaby" resultMap="BabyPatientExtendEarBabyResultMap"
201 216 parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarBabyQuery">
202 217 select
203   - id,name,sex,cardNo,birth,mname,mcert_type_id,mcert_no,mphone,vc_card_no,build_doctor,hospital_id,build_type,enable,yn,build_date,baby_patient_id,baby_ear_id
  218 + id,name,sex,cardNo,birth,mname,mcert_type_id,mcert_no,mphone,vc_card_no,build_doctor,hospital_id,build_type,enable,yn,build_date,baby_patient_id,baby_ear_id,person_id
204 219 from baby_patient_extend_ear_baby
205 220 <include refid="BabyPatientExtendEarBabyCondition"/>
206 221 <include refid="orderAndLimit"/>
platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarFollowUp.xml View file @ b399062
... ... @@ -32,12 +32,13 @@
32 32 <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
33 33 <result column="create_id" property="createId" jdbcType="VARCHAR"/>
34 34 <result column="enalble" property="enalble" jdbcType="INTEGER"/>
  35 + <result column="pid" property="pid" jdbcType="VARCHAR"/>
35 36 </resultMap>
36 37  
37 38  
38 39 <insert id="addBabyPatientExtendEarFollowUp"
39 40 parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarFollowUp">
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})
  41 + 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,pid) 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},#{pid})
41 42 </insert>
42 43  
43 44  
... ... @@ -123,6 +124,9 @@
123 124 <if test="createId != null and createId != ''">
124 125 create_id = #{createId,jdbcType=VARCHAR},
125 126 </if>
  127 + <if test="pid != null and pid != ''">
  128 + pid = #{pid,jdbcType=VARCHAR},
  129 + </if>
126 130 <if test="enalble != null and enalble >= 0">
127 131 enalble = #{enalble,jdbcType=INTEGER},
128 132 </if>
... ... @@ -138,7 +142,7 @@
138 142  
139 143 <select id="getBabyPatientExtendEarFollowUp" resultMap="BabyPatientExtendEarFollowUpResultMap"
140 144 parameterType="java.lang.String">
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
  145 +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,pid
142 146 from baby_patient_extend_ear_follow_up where id = #{id,jdbcType=VARCHAR}
143 147 </select>
144 148  
... ... @@ -195,6 +199,9 @@
195 199 </if>
196 200 <if test="followInfo != null and followInfo != ''">
197 201 and follow_info = #{followInfo,jdbcType=VARCHAR}
  202 + </if>
  203 + <if test="pid != null and pid != ''">
  204 + and pid = #{pid,jdbcType=VARCHAR}
198 205 </if>
199 206  
200 207 <if test="sqlStr!=null and sqlStr!=''">
platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarHearingDiagnose.xml View file @ b399062
... ... @@ -107,12 +107,13 @@
107 107 <result column="diagn_result" property="diagnResult" jdbcType="VARCHAR"/>
108 108 <result column="confirm_result" property="confirmResult" jdbcType="VARCHAR"/>
109 109 <result column="confirm_time" property="confirmTime" jdbcType="TIMESTAMP"/>
  110 + <result column="pid" property="pid" jdbcType="VARCHAR"/>
110 111 </resultMap>
111 112  
112 113  
113 114 <insert id="addBabyPatientExtendEarHearingDiagnose"
114 115 parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarHearingDiagnose">
115   -insert into baby_patient_extend_ear_hearing_diagnose (id,baby_id,hospital_id,diagnose_time,high_factor,abr_left_dbnhl,abr_left_l_wave,abr_left_lll_wave,abr_left_V_wave,abr_left_shield,abr_right_dbnhl,abr_right_l_wave,abr_right_lll_wave,abr_right_V_wave,abr_right_shield,abr_thr_left_dbnhl,abr_thr_left_ms,abr_thr_left_shield_dbnhl,abr_thr_right_dbnhl,abr_thr_right_ms,abr_thr_right_shield_dbnhl,abr_bc_left_thr_dbnhl,abr_bc_left_thr_ms,abr_bc_left_thr_shield_dbnhl,abr_bc_right_thr_dbnhl,abr_bc_right_thr_ms,abr_bc_right_thr_shield_dbnhl,reaction_thr_left_dbnhl,reaction_thr_left_shield_dbnhl,reaction_thr_right_dbnhl,reaction_thr_right_shield_dbnhl,oae_left_750,oae_left_1k,oae_left_2k,oae_left_3k,oae_left_4k,oae_left_6k,oae_left_8k,oae_left_10k,oae_right_750,oae_right_1k,oae_right_2k,oae_right_3k,oae_right_4k,oae_right_6k,oae_right_8k,oae_right_10k,acad_left_curve_type,acad_left_drum_cp,acad_left_acco,acad_left_secondo_volume,acad_left_gradient,acad_right_reflect_tts,acad_left_1K_reflect_thre,acad_right_curve_type,acad_right_drum_cp,acad_right_acco,acad_right_secondo_volume,acad_right_gradient,acad_left_reflect_tts,acad_right_1K_reflect_thre,sound_refl_left_ipsi_500,sound_refl_left_ipsi_1k,sound_refl_left_ipsi_2k,sound_refl_left_ipsi_4k,sound_refl_left_offsi_500,sound_refl_left_offsi_1k,sound_refl_left_offsi_2k,sound_refl_left_offsi_4k,sound_refl_left_atten,sound_refl_right_ipsi_500,sound_refl_right_ipsi_1k,sound_refl_right_ipsi_2k,sound_refl_right_ipsi_4k,sound_refl_right_offsi_500,sound_refl_right_offsi_1k,sound_refl_right_offsi_2k,sound_refl_right_offsi_4k,sound_refl_right_atten,aabr_left_if_pass,aabr_right_if_pass,assr_left_500,assr_left_1k,assr_left_2k,assr_left_4k,assr_right_500,assr_right_1k,assr_right_2k,assr_right_4k,diagn_hand_sugge,diagn_guide_sugge,diagn_doctor_id,diagn_next_time,create_time,create_id,modify_id,modify_time,ifdel,enalble,isconfirm,diagn_result,confirm_result,confirm_time) values (#{id},#{babyId},#{hospitalId},#{diagnoseTime},#{highFactor},#{abrLeftDbnhl},#{abrLeftLWave},#{abrLeftLllWave},#{abrLeftVWave},#{abrLeftShield},#{abrRightDbnhl},#{abrRightLWave},#{abrRightLllWave},#{abrRightVWave},#{abrRightShield},#{abrThrLeftDbnhl},#{abrThrLeftMs},#{abrThrLeftShieldDbnhl},#{abrThrRightDbnhl},#{abrThrRightMs},#{abrThrRightShieldDbnhl},#{abrBcLeftThrDbnhl},#{abrBcLeftThrMs},#{abrBcLeftThrShieldDbnhl},#{abrBcRightThrDbnhl},#{abrBcRightThrMs},#{abrBcRightThrShieldDbnhl},#{reactionThrLeftDbnhl},#{reactionThrLeftShieldDbnhl},#{reactionThrRightDbnhl},#{reactionThrRightShieldDbnhl},#{oaeLeft750},#{oaeLeft1k},#{oaeLeft2k},#{oaeLeft3k},#{oaeLeft4k},#{oaeLeft6k},#{oaeLeft8k},#{oaeLeft10k},#{oaeRight750},#{oaeRight1k},#{oaeRight2k},#{oaeRight3k},#{oaeRight4k},#{oaeRight6k},#{oaeRight8k},#{oaeRight10k},#{acadLeftCurveType},#{acadLeftDrumCp},#{acadLeftAcco},#{acadLeftSecondoVolume},#{acadLeftGradient},#{acadLeftReflectTTS},#{acadLeft1kReflectThre},#{acadRightCurveType},#{acadRightDrumCp},#{acadRightAcco},#{acadRightSecondoVolume},#{acadRightGradient},#{acadRightReflectTTS},#{acadRight1kReflectThre},#{soundReflLeftIpsi500},#{soundReflLeftIpsi1k},#{soundReflLeftIpsi2k},#{soundReflLeftIpsi4k},#{soundReflLeftOffsi500},#{soundReflLeftOffsi1k},#{soundReflLeftOffsi2k},#{soundReflLeftOffsi4k},#{soundReflLeftAtten},#{soundReflRightIpsi500},#{soundReflRightIpsi1k},#{soundReflRightIpsi2k},#{soundReflRightIpsi4k},#{soundReflRightOffsi500},#{soundReflRightOffsi1k},#{soundReflRightOffsi2k},#{soundReflRightOffsi4k},#{soundReflRightAtten},#{aabrLeftIfPass},#{aabrRightIfPass},#{assrLeft500},#{assrLeft1k},#{assrLeft2k},#{assrLeft4k},#{assrRight500},#{assrRight1k},#{assrRight2k},#{assrRight4k},#{diagnHandSugge},#{diagnGuideSugge},#{diagnDoctorId},#{diagnNextTime},#{createTime},#{createId},#{modifyId},#{modifyTime},#{ifdel},#{enalble},#{isconfirm},#{diagnResult},#{confirmResult},#{confirmTime})
  116 +insert into baby_patient_extend_ear_hearing_diagnose (id,baby_id,hospital_id,diagnose_time,high_factor,abr_left_dbnhl,abr_left_l_wave,abr_left_lll_wave,abr_left_V_wave,abr_left_shield,abr_right_dbnhl,abr_right_l_wave,abr_right_lll_wave,abr_right_V_wave,abr_right_shield,abr_thr_left_dbnhl,abr_thr_left_ms,abr_thr_left_shield_dbnhl,abr_thr_right_dbnhl,abr_thr_right_ms,abr_thr_right_shield_dbnhl,abr_bc_left_thr_dbnhl,abr_bc_left_thr_ms,abr_bc_left_thr_shield_dbnhl,abr_bc_right_thr_dbnhl,abr_bc_right_thr_ms,abr_bc_right_thr_shield_dbnhl,reaction_thr_left_dbnhl,reaction_thr_left_shield_dbnhl,reaction_thr_right_dbnhl,reaction_thr_right_shield_dbnhl,oae_left_750,oae_left_1k,oae_left_2k,oae_left_3k,oae_left_4k,oae_left_6k,oae_left_8k,oae_left_10k,oae_right_750,oae_right_1k,oae_right_2k,oae_right_3k,oae_right_4k,oae_right_6k,oae_right_8k,oae_right_10k,acad_left_curve_type,acad_left_drum_cp,acad_left_acco,acad_left_secondo_volume,acad_left_gradient,acad_right_reflect_tts,acad_left_1K_reflect_thre,acad_right_curve_type,acad_right_drum_cp,acad_right_acco,acad_right_secondo_volume,acad_right_gradient,acad_left_reflect_tts,acad_right_1K_reflect_thre,sound_refl_left_ipsi_500,sound_refl_left_ipsi_1k,sound_refl_left_ipsi_2k,sound_refl_left_ipsi_4k,sound_refl_left_offsi_500,sound_refl_left_offsi_1k,sound_refl_left_offsi_2k,sound_refl_left_offsi_4k,sound_refl_left_atten,sound_refl_right_ipsi_500,sound_refl_right_ipsi_1k,sound_refl_right_ipsi_2k,sound_refl_right_ipsi_4k,sound_refl_right_offsi_500,sound_refl_right_offsi_1k,sound_refl_right_offsi_2k,sound_refl_right_offsi_4k,sound_refl_right_atten,aabr_left_if_pass,aabr_right_if_pass,assr_left_500,assr_left_1k,assr_left_2k,assr_left_4k,assr_right_500,assr_right_1k,assr_right_2k,assr_right_4k,diagn_hand_sugge,diagn_guide_sugge,diagn_doctor_id,diagn_next_time,create_time,create_id,modify_id,modify_time,ifdel,enalble,isconfirm,diagn_result,confirm_result,confirm_time,pid) values (#{id},#{babyId},#{hospitalId},#{diagnoseTime},#{highFactor},#{abrLeftDbnhl},#{abrLeftLWave},#{abrLeftLllWave},#{abrLeftVWave},#{abrLeftShield},#{abrRightDbnhl},#{abrRightLWave},#{abrRightLllWave},#{abrRightVWave},#{abrRightShield},#{abrThrLeftDbnhl},#{abrThrLeftMs},#{abrThrLeftShieldDbnhl},#{abrThrRightDbnhl},#{abrThrRightMs},#{abrThrRightShieldDbnhl},#{abrBcLeftThrDbnhl},#{abrBcLeftThrMs},#{abrBcLeftThrShieldDbnhl},#{abrBcRightThrDbnhl},#{abrBcRightThrMs},#{abrBcRightThrShieldDbnhl},#{reactionThrLeftDbnhl},#{reactionThrLeftShieldDbnhl},#{reactionThrRightDbnhl},#{reactionThrRightShieldDbnhl},#{oaeLeft750},#{oaeLeft1k},#{oaeLeft2k},#{oaeLeft3k},#{oaeLeft4k},#{oaeLeft6k},#{oaeLeft8k},#{oaeLeft10k},#{oaeRight750},#{oaeRight1k},#{oaeRight2k},#{oaeRight3k},#{oaeRight4k},#{oaeRight6k},#{oaeRight8k},#{oaeRight10k},#{acadLeftCurveType},#{acadLeftDrumCp},#{acadLeftAcco},#{acadLeftSecondoVolume},#{acadLeftGradient},#{acadLeftReflectTTS},#{acadLeft1kReflectThre},#{acadRightCurveType},#{acadRightDrumCp},#{acadRightAcco},#{acadRightSecondoVolume},#{acadRightGradient},#{acadRightReflectTTS},#{acadRight1kReflectThre},#{soundReflLeftIpsi500},#{soundReflLeftIpsi1k},#{soundReflLeftIpsi2k},#{soundReflLeftIpsi4k},#{soundReflLeftOffsi500},#{soundReflLeftOffsi1k},#{soundReflLeftOffsi2k},#{soundReflLeftOffsi4k},#{soundReflLeftAtten},#{soundReflRightIpsi500},#{soundReflRightIpsi1k},#{soundReflRightIpsi2k},#{soundReflRightIpsi4k},#{soundReflRightOffsi500},#{soundReflRightOffsi1k},#{soundReflRightOffsi2k},#{soundReflRightOffsi4k},#{soundReflRightAtten},#{aabrLeftIfPass},#{aabrRightIfPass},#{assrLeft500},#{assrLeft1k},#{assrLeft2k},#{assrLeft4k},#{assrRight500},#{assrRight1k},#{assrRight2k},#{assrRight4k},#{diagnHandSugge},#{diagnGuideSugge},#{diagnDoctorId},#{diagnNextTime},#{createTime},#{createId},#{modifyId},#{modifyTime},#{ifdel},#{enalble},#{isconfirm},#{diagnResult},#{confirmResult},#{confirmTime},#{pid})
116 117 </insert>
117 118  
118 119  
... ... @@ -425,6 +426,9 @@
425 426 <if test="confirmResult != null and confirmResult != ''">
426 427 confirm_result = #{confirmResult,jdbcType=VARCHAR},
427 428 </if>
  429 + <if test="pid != null and pid != ''">
  430 + pid = #{pid,jdbcType=VARCHAR},
  431 + </if>
428 432 <if test="confirmTime != null">
429 433 confirm_time = #{confirmTime,jdbcType=TIMESTAMP},
430 434 </if>
... ... @@ -440,7 +444,7 @@
440 444  
441 445 <select id="getBabyPatientExtendEarHearingDiagnose" resultMap="BabyPatientExtendEarHearingDiagnoseResultMap"
442 446 parameterType="java.lang.String">
443   -select id,baby_id,hospital_id,diagnose_time,high_factor,abr_left_dbnhl,abr_left_l_wave,abr_left_lll_wave,abr_left_V_wave,abr_left_shield,abr_right_dbnhl,abr_right_l_wave,abr_right_lll_wave,abr_right_V_wave,abr_right_shield,abr_thr_left_dbnhl,abr_thr_left_ms,abr_thr_left_shield_dbnhl,abr_thr_right_dbnhl,abr_thr_right_ms,abr_thr_right_shield_dbnhl,abr_bc_left_thr_dbnhl,abr_bc_left_thr_ms,abr_bc_left_thr_shield_dbnhl,abr_bc_right_thr_dbnhl,abr_bc_right_thr_ms,abr_bc_right_thr_shield_dbnhl,reaction_thr_left_dbnhl,reaction_thr_left_shield_dbnhl,reaction_thr_right_dbnhl,reaction_thr_right_shield_dbnhl,oae_left_750,oae_left_1k,oae_left_2k,oae_left_3k,oae_left_4k,oae_left_6k,oae_left_8k,oae_left_10k,oae_right_750,oae_right_1k,oae_right_2k,oae_right_3k,oae_right_4k,oae_right_6k,oae_right_8k,oae_right_10k,acad_left_curve_type,acad_left_drum_cp,acad_left_acco,acad_left_secondo_volume,acad_left_gradient,acad_left_1K_reflect_thre,acad_left_reflect_tts,acad_right_curve_type,acad_right_drum_cp,acad_right_acco,acad_right_secondo_volume,acad_right_gradient,acad_right_1K_reflect_thre,acad_right_reflect_tts,sound_refl_left_ipsi_500,sound_refl_left_ipsi_1k,sound_refl_left_ipsi_2k,sound_refl_left_ipsi_4k,sound_refl_left_offsi_500,sound_refl_left_offsi_1k,sound_refl_left_offsi_2k,sound_refl_left_offsi_4k,sound_refl_left_atten,sound_refl_right_ipsi_500,sound_refl_right_ipsi_1k,sound_refl_right_ipsi_2k,sound_refl_right_ipsi_4k,sound_refl_right_offsi_500,sound_refl_right_offsi_1k,sound_refl_right_offsi_2k,sound_refl_right_offsi_4k,sound_refl_right_atten,aabr_left_if_pass,aabr_right_if_pass,assr_left_500,assr_left_1k,assr_left_2k,assr_left_4k,assr_right_500,assr_right_1k,assr_right_2k,assr_right_4k,diagn_hand_sugge,diagn_guide_sugge,diagn_doctor_id,diagn_next_time,create_time,create_id,modify_id,modify_time,ifdel,enalble,isconfirm,diagn_result,confirm_result,confirm_time
  447 +select id,baby_id,hospital_id,diagnose_time,high_factor,abr_left_dbnhl,abr_left_l_wave,abr_left_lll_wave,abr_left_V_wave,abr_left_shield,abr_right_dbnhl,abr_right_l_wave,abr_right_lll_wave,abr_right_V_wave,abr_right_shield,abr_thr_left_dbnhl,abr_thr_left_ms,abr_thr_left_shield_dbnhl,abr_thr_right_dbnhl,abr_thr_right_ms,abr_thr_right_shield_dbnhl,abr_bc_left_thr_dbnhl,abr_bc_left_thr_ms,abr_bc_left_thr_shield_dbnhl,abr_bc_right_thr_dbnhl,abr_bc_right_thr_ms,abr_bc_right_thr_shield_dbnhl,reaction_thr_left_dbnhl,reaction_thr_left_shield_dbnhl,reaction_thr_right_dbnhl,reaction_thr_right_shield_dbnhl,oae_left_750,oae_left_1k,oae_left_2k,oae_left_3k,oae_left_4k,oae_left_6k,oae_left_8k,oae_left_10k,oae_right_750,oae_right_1k,oae_right_2k,oae_right_3k,oae_right_4k,oae_right_6k,oae_right_8k,oae_right_10k,acad_left_curve_type,acad_left_drum_cp,acad_left_acco,acad_left_secondo_volume,acad_left_gradient,acad_left_1K_reflect_thre,acad_left_reflect_tts,acad_right_curve_type,acad_right_drum_cp,acad_right_acco,acad_right_secondo_volume,acad_right_gradient,acad_right_1K_reflect_thre,acad_right_reflect_tts,sound_refl_left_ipsi_500,sound_refl_left_ipsi_1k,sound_refl_left_ipsi_2k,sound_refl_left_ipsi_4k,sound_refl_left_offsi_500,sound_refl_left_offsi_1k,sound_refl_left_offsi_2k,sound_refl_left_offsi_4k,sound_refl_left_atten,sound_refl_right_ipsi_500,sound_refl_right_ipsi_1k,sound_refl_right_ipsi_2k,sound_refl_right_ipsi_4k,sound_refl_right_offsi_500,sound_refl_right_offsi_1k,sound_refl_right_offsi_2k,sound_refl_right_offsi_4k,sound_refl_right_atten,aabr_left_if_pass,aabr_right_if_pass,assr_left_500,assr_left_1k,assr_left_2k,assr_left_4k,assr_right_500,assr_right_1k,assr_right_2k,assr_right_4k,diagn_hand_sugge,diagn_guide_sugge,diagn_doctor_id,diagn_next_time,create_time,create_id,modify_id,modify_time,ifdel,enalble,isconfirm,diagn_result,confirm_result,confirm_time,pid
444 448 from baby_patient_extend_ear_hearing_diagnose where id = #{id,jdbcType=VARCHAR}
445 449 </select>
446 450  
... ... @@ -783,6 +787,9 @@
783 787 <if test="confirmResult != null and confirmResult != ''">
784 788 and confirm_result LIKE concat("%,",#{confirmResult,jdbcType=VARCHAR},",%")
785 789 </if>
  790 + <if test="pid != null and pid != ''">
  791 + and pid = #{pid,jdbcType=VARCHAR}
  792 + </if>
786 793 <if test="confirmTime != null">
787 794 and confirm_time = #{confirmTime,jdbcType=TIMESTAMP}
788 795 </if>
... ... @@ -800,7 +807,7 @@
800 807 <select id="queryBabyPatientExtendEarHearingDiagnose" resultMap="BabyPatientExtendEarHearingDiagnoseResultMap"
801 808 parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarHearingDiagnoseQuery">
802 809 select
803   - id,baby_id,hospital_id,diagnose_time,high_factor,abr_left_dbnhl,abr_left_l_wave,abr_left_lll_wave,abr_left_V_wave,abr_left_shield,abr_right_dbnhl,abr_right_l_wave,abr_right_lll_wave,abr_right_V_wave,abr_right_shield,abr_thr_left_dbnhl,abr_thr_left_ms,abr_thr_left_shield_dbnhl,abr_thr_right_dbnhl,abr_thr_right_ms,abr_thr_right_shield_dbnhl,abr_bc_left_thr_dbnhl,abr_bc_left_thr_ms,abr_bc_left_thr_shield_dbnhl,abr_bc_right_thr_dbnhl,abr_bc_right_thr_ms,abr_bc_right_thr_shield_dbnhl,reaction_thr_left_dbnhl,reaction_thr_left_shield_dbnhl,reaction_thr_right_dbnhl,reaction_thr_right_shield_dbnhl,oae_left_750,oae_left_1k,oae_left_2k,oae_left_3k,oae_left_4k,oae_left_6k,oae_left_8k,oae_left_10k,oae_right_750,oae_right_1k,oae_right_2k,oae_right_3k,oae_right_4k,oae_right_6k,oae_right_8k,oae_right_10k,acad_left_curve_type,acad_left_drum_cp,acad_left_acco,acad_left_secondo_volume,acad_left_gradient,acad_left_1K_reflect_thre,acad_left_reflect_tts,acad_right_curve_type,acad_right_drum_cp,acad_right_acco,acad_right_secondo_volume,acad_right_gradient,acad_right_1K_reflect_thre,acad_right_reflect_tts,sound_refl_left_ipsi_500,sound_refl_left_ipsi_1k,sound_refl_left_ipsi_2k,sound_refl_left_ipsi_4k,sound_refl_left_offsi_500,sound_refl_left_offsi_1k,sound_refl_left_offsi_2k,sound_refl_left_offsi_4k,sound_refl_left_atten,sound_refl_right_ipsi_500,sound_refl_right_ipsi_1k,sound_refl_right_ipsi_2k,sound_refl_right_ipsi_4k,sound_refl_right_offsi_500,sound_refl_right_offsi_1k,sound_refl_right_offsi_2k,sound_refl_right_offsi_4k,sound_refl_right_atten,aabr_left_if_pass,aabr_right_if_pass,assr_left_500,assr_left_1k,assr_left_2k,assr_left_4k,assr_right_500,assr_right_1k,assr_right_2k,assr_right_4k,diagn_hand_sugge,diagn_guide_sugge,diagn_doctor_id,diagn_next_time,create_time,create_id,modify_id,modify_time,ifdel,enalble,isconfirm,diagn_result,confirm_result,confirm_time
  810 + id,baby_id,hospital_id,diagnose_time,high_factor,abr_left_dbnhl,abr_left_l_wave,abr_left_lll_wave,abr_left_V_wave,abr_left_shield,abr_right_dbnhl,abr_right_l_wave,abr_right_lll_wave,abr_right_V_wave,abr_right_shield,abr_thr_left_dbnhl,abr_thr_left_ms,abr_thr_left_shield_dbnhl,abr_thr_right_dbnhl,abr_thr_right_ms,abr_thr_right_shield_dbnhl,abr_bc_left_thr_dbnhl,abr_bc_left_thr_ms,abr_bc_left_thr_shield_dbnhl,abr_bc_right_thr_dbnhl,abr_bc_right_thr_ms,abr_bc_right_thr_shield_dbnhl,reaction_thr_left_dbnhl,reaction_thr_left_shield_dbnhl,reaction_thr_right_dbnhl,reaction_thr_right_shield_dbnhl,oae_left_750,oae_left_1k,oae_left_2k,oae_left_3k,oae_left_4k,oae_left_6k,oae_left_8k,oae_left_10k,oae_right_750,oae_right_1k,oae_right_2k,oae_right_3k,oae_right_4k,oae_right_6k,oae_right_8k,oae_right_10k,acad_left_curve_type,acad_left_drum_cp,acad_left_acco,acad_left_secondo_volume,acad_left_gradient,acad_left_1K_reflect_thre,acad_left_reflect_tts,acad_right_curve_type,acad_right_drum_cp,acad_right_acco,acad_right_secondo_volume,acad_right_gradient,acad_right_1K_reflect_thre,acad_right_reflect_tts,sound_refl_left_ipsi_500,sound_refl_left_ipsi_1k,sound_refl_left_ipsi_2k,sound_refl_left_ipsi_4k,sound_refl_left_offsi_500,sound_refl_left_offsi_1k,sound_refl_left_offsi_2k,sound_refl_left_offsi_4k,sound_refl_left_atten,sound_refl_right_ipsi_500,sound_refl_right_ipsi_1k,sound_refl_right_ipsi_2k,sound_refl_right_ipsi_4k,sound_refl_right_offsi_500,sound_refl_right_offsi_1k,sound_refl_right_offsi_2k,sound_refl_right_offsi_4k,sound_refl_right_atten,aabr_left_if_pass,aabr_right_if_pass,assr_left_500,assr_left_1k,assr_left_2k,assr_left_4k,assr_right_500,assr_right_1k,assr_right_2k,assr_right_4k,diagn_hand_sugge,diagn_guide_sugge,diagn_doctor_id,diagn_next_time,create_time,create_id,modify_id,modify_time,ifdel,enalble,isconfirm,diagn_result,confirm_result,confirm_time,pid
804 811 from baby_patient_extend_ear_hearing_diagnose
805 812 <include refid="BabyPatientExtendEarHearingDiagnoseCondition"/>
806 813 <include refid="orderAndLimit"/>
... ... @@ -955,6 +962,13 @@
955 962 </if>
956 963 <if test="hospitalId != null and hospitalId != ''">
957 964 and hospital_id = #{hospitalId,jdbcType=VARCHAR}
  965 + </if>
  966 +
  967 + <if test="pids != null">
  968 + and pid in
  969 + <foreach item="item" index="index" collection="pids" open="(" separator="," close=")">
  970 + #{item}
  971 + </foreach>
958 972 </if>
959 973 <if test="babyIds!=null">
960 974 and baby_id in (
platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarScreen.xml View file @ b399062
... ... @@ -37,12 +37,13 @@
37 37 <result column="last_update_hospital_id" property="lastUpdateHospitalId" jdbcType="VARCHAR"/>
38 38 <result column="status" property="status" jdbcType="INTEGER"/>
39 39 <result column="scr_ispass" property="scrIspass" jdbcType="INTEGER"/>
  40 + <result column="pid" property="pid" jdbcType="VARCHAR"/>
40 41 </resultMap>
41 42  
42 43  
43 44 <insert id="addBabyPatientExtendEarScreen"
44 45 parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarScreen">
45   -insert into baby_patient_extend_ear_screen (id,baby_id,screen_type,check_hospital_id,screen_date,high_risk_cause,oae_left,oae_right,aabr_left,aabr_right,gjb2_del_35,gjb2_del_176,gjb2_del_235,gjb2_del_299,gjb3_slc26a4_538,gjb3_slc26a4_2168,gjb3_slc26a4_ivs7,rrna_1494,rrna_1555,process_option_type,process_option_desc,guid_opinion,check_doctor_id,referral_date,create_date,create_user_id,create_hospital_id,next_check_time,last_update_date,last_update_user_id,last_update_hospital_id,status,scr_ispass) values (#{id},#{babyId},#{screenType},#{checkHospitalId},#{screenDate},#{highRiskCause},#{oaeLeft},#{oaeRight},#{aabrLeft},#{aabrRight},#{gjb2Del35},#{gjb2Del176},#{gjb2Del235},#{gjb2Del299},#{gjb3Slc26a4538},#{gjb3Slc26a42168},#{gjb3Slc26a4Ivs7},#{rrna1494},#{rrna1555},#{processOptionType},#{processOptionDesc},#{guidOpinion},#{checkDoctorId},#{referralDate},#{createDate},#{createUserId},#{createHospitalId},#{nextCheckTime},#{lastUpdateDate},#{lastUpdateUserId},#{lastUpdateHospitalId},#{status},#{scrIspass})
  46 +insert into baby_patient_extend_ear_screen (id,baby_id,screen_type,check_hospital_id,screen_date,high_risk_cause,oae_left,oae_right,aabr_left,aabr_right,gjb2_del_35,gjb2_del_176,gjb2_del_235,gjb2_del_299,gjb3_slc26a4_538,gjb3_slc26a4_2168,gjb3_slc26a4_ivs7,rrna_1494,rrna_1555,process_option_type,process_option_desc,guid_opinion,check_doctor_id,referral_date,create_date,create_user_id,create_hospital_id,next_check_time,last_update_date,last_update_user_id,last_update_hospital_id,status,scr_ispass,pid) values (#{id},#{babyId},#{screenType},#{checkHospitalId},#{screenDate},#{highRiskCause},#{oaeLeft},#{oaeRight},#{aabrLeft},#{aabrRight},#{gjb2Del35},#{gjb2Del176},#{gjb2Del235},#{gjb2Del299},#{gjb3Slc26a4538},#{gjb3Slc26a42168},#{gjb3Slc26a4Ivs7},#{rrna1494},#{rrna1555},#{processOptionType},#{processOptionDesc},#{guidOpinion},#{checkDoctorId},#{referralDate},#{createDate},#{createUserId},#{createHospitalId},#{nextCheckTime},#{lastUpdateDate},#{lastUpdateUserId},#{lastUpdateHospitalId},#{status},#{scrIspass},#{pid})
46 47 </insert>
47 48  
48 49  
... ... @@ -146,6 +147,9 @@
146 147 <if test="scrIspass != null and scrIspass >= 0">
147 148 scr_ispass = #{scrIspass,jdbcType=INTEGER},
148 149 </if>
  150 + <if test="pid != null and pid != ''">
  151 + pid = #{scrIspass,jdbcType=VARCHAR},
  152 + </if>
149 153 </set>
150 154 where id = #{id,jdbcType=VARCHAR}
151 155 </update>
... ... @@ -158,7 +162,7 @@
158 162  
159 163 <select id="getBabyPatientExtendEarScreen" resultMap="BabyPatientExtendEarScreenResultMap"
160 164 parameterType="java.lang.String">
161   -select id,baby_id,screen_type,check_hospital_id,screen_date,high_risk_cause,oae_left,oae_right,aabr_left,aabr_right,gjb2_del_35,gjb2_del_176,gjb2_del_235,gjb2_del_299,gjb3_slc26a4_538,gjb3_slc26a4_2168,gjb3_slc26a4_ivs7,rrna_1494,rrna_1555,process_option_type,process_option_desc,guid_opinion,check_doctor_id,referral_date,create_date,create_user_id,create_hospital_id,next_check_time,last_update_date,last_update_user_id,last_update_hospital_id,status,scr_ispass
  165 +select id,baby_id,screen_type,check_hospital_id,screen_date,high_risk_cause,oae_left,oae_right,aabr_left,aabr_right,gjb2_del_35,gjb2_del_176,gjb2_del_235,gjb2_del_299,gjb3_slc26a4_538,gjb3_slc26a4_2168,gjb3_slc26a4_ivs7,rrna_1494,rrna_1555,process_option_type,process_option_desc,guid_opinion,check_doctor_id,referral_date,create_date,create_user_id,create_hospital_id,next_check_time,last_update_date,last_update_user_id,last_update_hospital_id,status,scr_ispass,pid
162 166 from baby_patient_extend_ear_screen where id = #{id,jdbcType=VARCHAR}
163 167 </select>
164 168  
... ... @@ -281,6 +285,9 @@
281 285 <if test="scrIspass != null and scrIspass >= 0">
282 286 and scr_ispass = #{scrIspass,jdbcType=INTEGER}
283 287 </if>
  288 + <if test="pid != null and pid != ''">
  289 + and pid = #{pid,jdbcType=VARCHAR}
  290 + </if>
284 291  
285 292 </where>
286 293 </sql>
... ... @@ -289,7 +296,7 @@
289 296 <select id="queryBabyPatientExtendEarScreen" resultMap="BabyPatientExtendEarScreenResultMap"
290 297 parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarScreenQuery">
291 298 select
292   - id,baby_id,screen_type,check_hospital_id,screen_date,high_risk_cause,oae_left,oae_right,aabr_left,aabr_right,gjb2_del_35,gjb2_del_176,gjb2_del_235,gjb2_del_299,gjb3_slc26a4_538,gjb3_slc26a4_2168,gjb3_slc26a4_ivs7,process_option_type,process_option_desc,guid_opinion,check_doctor_id,referral_date,create_date,create_user_id,create_hospital_id,last_update_date,next_check_time,last_update_user_id,last_update_hospital_id,status,scr_ispass
  299 + id,baby_id,screen_type,check_hospital_id,screen_date,high_risk_cause,oae_left,oae_right,aabr_left,aabr_right,gjb2_del_35,gjb2_del_176,gjb2_del_235,gjb2_del_299,gjb3_slc26a4_538,gjb3_slc26a4_2168,gjb3_slc26a4_ivs7,process_option_type,process_option_desc,guid_opinion,check_doctor_id,referral_date,create_date,create_user_id,create_hospital_id,last_update_date,next_check_time,last_update_user_id,last_update_hospital_id,status,scr_ispass,pid
293 300 from baby_patient_extend_ear_screen
294 301 <include refid="BabyPatientExtendEarScreenCondition"/>
295 302 <include refid="orderAndLimit"/>
... ... @@ -298,7 +305,7 @@
298 305 <select id="queryEarScreenList" resultMap="BabyPatientExtendEarScreenResultMap"
299 306 parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarScreenQuery">
300 307 select
301   - id,baby_id,screen_type,check_hospital_id,screen_date,high_risk_cause,oae_left,oae_right,aabr_left,aabr_right,gjb2_del_35,gjb2_del_176,gjb2_del_235,gjb2_del_299,gjb3_slc26a4_538,gjb3_slc26a4_2168,gjb3_slc26a4_ivs7,process_option_type,process_option_desc,guid_opinion,check_doctor_id,referral_date,create_date,create_user_id,create_hospital_id,last_update_date,next_check_time,last_update_user_id,last_update_hospital_id,status,scr_ispass
  308 + id,baby_id,screen_type,check_hospital_id,screen_date,high_risk_cause,oae_left,oae_right,aabr_left,aabr_right,gjb2_del_35,gjb2_del_176,gjb2_del_235,gjb2_del_299,gjb3_slc26a4_538,gjb3_slc26a4_2168,gjb3_slc26a4_ivs7,process_option_type,process_option_desc,guid_opinion,check_doctor_id,referral_date,create_date,create_user_id,create_hospital_id,last_update_date,next_check_time,last_update_user_id,last_update_hospital_id,status,scr_ispass,pid
302 309 from baby_patient_extend_ear_screen
303 310 <where>
304 311 status = 0
... ... @@ -322,6 +329,9 @@
322 329 <if test="checkDoctorId!=null and checkDoctorId != ''">
323 330 and check_doctor_id = #{checkDoctorId}
324 331 </if>
  332 + <if test="pid!=null and pid != ''">
  333 + and pid = #{pid}
  334 + </if>
325 335  
326 336 <if test="checkHospitalIds != null ">
327 337 and check_hospital_id in
... ... @@ -461,7 +471,7 @@
461 471 <select id="notAuscultationBabyPatientExtendEarScreen" resultMap="BabyPatientExtendEarScreenResultMap"
462 472 parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarScreenQuery">
463 473 select
464   - id,baby_id,screen_type,check_hospital_id,screen_date,high_risk_cause,oae_left,oae_right,aabr_left,aabr_right,gjb2_del_35,gjb2_del_176,gjb2_del_235,gjb2_del_299,gjb3_slc26a4_538,gjb3_slc26a4_2168,gjb3_slc26a4_ivs7,rrna_1494,rrna_1555,process_option_type,process_option_desc,guid_opinion,check_doctor_id,referral_date,create_date,create_user_id,create_hospital_id,last_update_date,next_check_time,last_update_user_id,last_update_hospital_id,status,scr_ispass
  474 + id,baby_id,screen_type,check_hospital_id,screen_date,high_risk_cause,oae_left,oae_right,aabr_left,aabr_right,gjb2_del_35,gjb2_del_176,gjb2_del_235,gjb2_del_299,gjb3_slc26a4_538,gjb3_slc26a4_2168,gjb3_slc26a4_ivs7,rrna_1494,rrna_1555,process_option_type,process_option_desc,guid_opinion,check_doctor_id,referral_date,create_date,create_user_id,create_hospital_id,last_update_date,next_check_time,last_update_user_id,last_update_hospital_id,status,scr_ispass,pid
465 475 from baby_patient_extend_ear_screen
466 476  
467 477 <where>
... ... @@ -565,6 +575,9 @@
565 575 <if test="lastUpdateHospitalId != null and lastUpdateHospitalId != ''">
566 576 and last_update_hospital_id = #{lastUpdateHospitalId,jdbcType=VARCHAR}
567 577 </if>
  578 + <if test="pid != null and pid != ''">
  579 + and pid = #{pid,jdbcType=VARCHAR}
  580 + </if>
568 581 <if test="status != null and status >= 0">
569 582 and status = #{status,jdbcType=INTEGER}
570 583 </if>
... ... @@ -578,7 +591,7 @@
578 591 <select id="dubiousScreen" resultMap="BabyPatientExtendEarScreenResultMap"
579 592 parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarScreenQuery">
580 593 select
581   - id,baby_id,screen_type,check_hospital_id,screen_date,high_risk_cause,oae_left,oae_right,aabr_left,aabr_right,gjb2_del_35,gjb2_del_176,gjb2_del_235,gjb2_del_299,gjb3_slc26a4_538,gjb3_slc26a4_2168,gjb3_slc26a4_ivs7,rrna_1494,rrna_1555,process_option_type,process_option_desc,guid_opinion,check_doctor_id,referral_date,create_date,create_user_id,create_hospital_id,last_update_date,next_check_time,last_update_user_id,last_update_hospital_id,status,scr_ispass
  594 + id,baby_id,screen_type,check_hospital_id,screen_date,high_risk_cause,oae_left,oae_right,aabr_left,aabr_right,gjb2_del_35,gjb2_del_176,gjb2_del_235,gjb2_del_299,gjb3_slc26a4_538,gjb3_slc26a4_2168,gjb3_slc26a4_ivs7,rrna_1494,rrna_1555,process_option_type,process_option_desc,guid_opinion,check_doctor_id,referral_date,create_date,create_user_id,create_hospital_id,last_update_date,next_check_time,last_update_user_id,last_update_hospital_id,status,scr_ispass,pid
582 595 from baby_patient_extend_ear_screen
583 596 <where>
584 597 (oae_left =-1 or oae_right = -1 or aabr_left = -1 or aabr_right = -1)
... ... @@ -597,6 +610,9 @@
597 610 </if>
598 611 <if test="checkDoctorId!=null and checkDoctorId != ''">
599 612 and check_doctor_id = #{checkDoctorId}
  613 + </if>
  614 + <if test="pid!=null and pid != ''">
  615 + and pid = #{pid}
600 616 </if>
601 617 <if test="checkHospitalId != null and checkHospitalId != ''">
602 618 and check_hospital_id = #{checkHospitalId}
platform-biz-service/src/main/resources/mainOrm/master/HighriskChangeHospital.xml View file @ b399062
... ... @@ -20,11 +20,12 @@
20 20 <result column="RECEIVE_TIME" property="receiveTime" jdbcType="TIMESTAMP"/>
21 21 <result column="RECEIVE_DOCTORID" property="receiveDoctorid" jdbcType="VARCHAR"/>
22 22 <result column="SCRREEN_ID" property="scrreenId" jdbcType="VARCHAR"/>
  23 + <result column="pid" property="pid" jdbcType="VARCHAR"/>
23 24 </resultMap>
24 25  
25 26  
26 27 <insert id="addHighriskChangeHospital" parameterType="com.lyms.platform.permission.model.HighriskChangeHospital">
27   -insert into HIGHRISK_CHANGE_HOSPITAL (ID,TARGET_TYPE,TARGET_ID,OUT_ORGID,INTO_ORGID,DESCRIPTION,MUSTDESC,RISK,CHANGEWAY,APPLY_DOCTORID,CREATE_ID,CHANGE_TYPE,STATUS,CREATE_TIME,RECEIVE_TIME,RECEIVE_DOCTORID,SCRREEN_ID) values (#{id},#{targetType},#{targetId},#{outOrgid},#{intoOrgid},#{description},#{mustdesc},#{risk},#{changeway},#{applyDoctorid},#{createId},#{changeType},#{status},#{createTime},#{receiveTime},#{receiveDoctorid},#{scrreenId})
  28 +insert into HIGHRISK_CHANGE_HOSPITAL (ID,TARGET_TYPE,TARGET_ID,OUT_ORGID,INTO_ORGID,DESCRIPTION,MUSTDESC,RISK,CHANGEWAY,APPLY_DOCTORID,CREATE_ID,CHANGE_TYPE,STATUS,CREATE_TIME,RECEIVE_TIME,RECEIVE_DOCTORID,SCRREEN_ID,pid) values (#{id},#{targetType},#{targetId},#{outOrgid},#{intoOrgid},#{description},#{mustdesc},#{risk},#{changeway},#{applyDoctorid},#{createId},#{changeType},#{status},#{createTime},#{receiveTime},#{receiveDoctorid},#{scrreenId},#{pid})
28 29 </insert>
29 30  
30 31  
31 32  
... ... @@ -79,13 +80,16 @@
79 80 <if test="scrreenId != null and scrreenId != ''">
80 81 SCRREEN_ID = #{scrreenId,jdbcType=VARCHAR},
81 82 </if>
  83 + <if test="pid != null and pid != ''">
  84 + pid = #{pid,jdbcType=VARCHAR},
  85 + </if>
82 86 </set>
83 87 where id = #{id,jdbcType=VARCHAR}
84 88 </update>
85 89  
86 90  
87 91 <select id="getHighriskChangeHospital" resultMap="HighriskChangeHospitalResultMap" parameterType="java.lang.String">
88   -select ID,TARGET_TYPE,TARGET_ID,OUT_ORGID,INTO_ORGID,DESCRIPTION,MUSTDESC,RISK,CHANGEWAY,APPLY_DOCTORID,CREATE_ID,CHANGE_TYPE,STATUS,CREATE_TIME,RECEIVE_TIME,RECEIVE_DOCTORID,SCRREEN_ID
  92 +select ID,TARGET_TYPE,TARGET_ID,OUT_ORGID,INTO_ORGID,DESCRIPTION,MUSTDESC,RISK,CHANGEWAY,APPLY_DOCTORID,CREATE_ID,CHANGE_TYPE,STATUS,CREATE_TIME,RECEIVE_TIME,RECEIVE_DOCTORID,SCRREEN_ID,pid
89 93 from HIGHRISK_CHANGE_HOSPITAL where id = #{id,jdbcType=VARCHAR}
90 94 </select>
91 95  
... ... @@ -174,6 +178,9 @@
174 178 </if>
175 179 <if test="scrreenId != null and scrreenId != ''">
176 180 and SCRREEN_ID = #{scrreenId,jdbcType=VARCHAR}
  181 + </if>
  182 + <if test="pid != null and pid != ''">
  183 + and pid = #{pid,jdbcType=VARCHAR}
177 184 </if>
178 185 </where>
179 186 </sql>
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/EarController.java View file @ b399062
1 1 package com.lyms.platform.operate.web.controller;
2 2  
3 3 import com.alibaba.fastjson.JSONObject;
  4 +import com.lyms.platform.biz.service.BabyService;
4 5 import com.lyms.platform.common.annotation.TokenRequired;
5 6 import com.lyms.platform.common.base.BaseController;
6 7 import com.lyms.platform.common.base.LoginContext;
... ... @@ -16,6 +17,7 @@
16 17 import com.lyms.platform.operate.web.result.*;
17 18 import com.lyms.platform.permission.model.*;
18 19 import com.lyms.platform.permission.service.*;
  20 +import com.lyms.platform.pojo.BabyModel;
19 21 import org.apache.commons.collections.CollectionUtils;
20 22 import org.springframework.beans.factory.annotation.Autowired;
21 23 import org.springframework.stereotype.Controller;
... ... @@ -59,6 +61,8 @@
59 61 private AutoMatchFacade autoMatchFacade;
60 62 @Autowired
61 63 private BabyEarFacade babyEarFacade;
  64 + @Autowired
  65 + private BabyService babyService;
62 66  
63 67  
64 68 /**
... ... @@ -293,6 +297,20 @@
293 297 BabyPatientExtendEarScreenQuery query = new BabyPatientExtendEarScreenQuery();
294 298 List<String> babyIds = babyEarFacade.getBabyIdsByItemOrg(babyId, hospitalId);
295 299  
  300 +
  301 +
  302 + BabyModel babyModel = babyService.getOneBabyById(babyId);
  303 + String pid = babyModel.getPid();
  304 +
  305 + // List<String> hospiIds = babyEarFacade.getOrgHospitalIds(hospitalId);
  306 + BabyPatientExtendEarQuery babyPatientExtendEarQuery = new BabyPatientExtendEarQuery();
  307 + babyPatientExtendEarQuery.setPersonId(pid);
  308 + // babyPatientExtendEarQuery.setCreateHospitalIds((String[]) hospiIds.toArray(new String[hospiIds.size()]));
  309 + List<BabyPatientExtendEar> ears = babyPatientExtendEarService.queryBabyPatientExtendEar(babyPatientExtendEarQuery);
  310 + for(BabyPatientExtendEar es : ears){
  311 + babyIds.add(es.getBabyPatientId());
  312 + }
  313 +
296 314 query.setBabyIds((String[]) babyIds.toArray(new String[babyIds.size()]));
297 315 // d、本院:初筛未通过或复筛确诊
298 316 List<BabyPatientExtendEarScreen> screenList = screenService.queryBabyPatientExtendEarScreen(query);
... ... @@ -308,7 +326,7 @@
308 326 } else {
309 327 boolean isResu = false;
310 328 for (BabyPatientExtendEarScreen scr : screenList) {
311   - if (scr.getScrIspass() == 2 && scr.getScreenType() == 2) {//是复筛并且未通过
  329 + if (scr.getScrIspass() == 2) {//是复筛并且未通过
312 330 isResu = true;
313 331 break;
314 332 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FollowUpController.java View file @ b399062
... ... @@ -527,7 +527,9 @@
527 527 if (loginState == null) {
528 528 return new BaseResponse().setErrorcode(ErrorCodeConstants.TOKEN_EXPIRE).setErrormsg("请重新登录");
529 529 }
530   -
  530 + BabyModel babyModel = babyService.getOneBabyById(obj.getBabyId());
  531 + String pid = babyModel.getPid();
  532 + obj.setPid(pid);
531 533 String hospitalId = autoMatchFacade.getHospitalId(loginState.getId());
532 534 obj.setId(UUID.randomUUID().toString().replace("-", ""));
533 535 obj.setIfdel(0);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearDiagnManageController.java View file @ b399062
... ... @@ -892,6 +892,7 @@
892 892 }
893 893  
894 894 babyQuery.setHospitalId(hospitalId);
  895 + babyQuery.setNoEnable("0");
895 896 List<BabyPatientExtendEarBaby> babyModels = earBabyService.queryBabyPatientExtendEarBaby(babyQuery);
896 897  
897 898 List<String> babyIds = new ArrayList<>();
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearingDiagnoseController.java View file @ b399062
... ... @@ -335,8 +335,8 @@
335 335  
336 336 //当前登录人医院Id
337 337 String hospitalId = autoMatchFacade.getHospitalId(loginState.getId());
338   - //医院ID 集合。本院、外院、全部...
339   - List<String> outOrgids = new ArrayList<>();
  338 +
  339 + List<String> pids = new ArrayList<>();
340 340 if (hdReq.getSource() != null) {
341 341 if (hdReq.getSource() == 2) {//2.外院
342 342 //转诊过来的医院id
343 343  
344 344  
345 345  
... ... @@ -348,33 +348,20 @@
348 348 List<HighriskChangeHospital> hchList = highchangeService.queryHighriskChangeHospital(hchQuery);
349 349 if (hchList != null && hchList.size() > 0) {
350 350 for (HighriskChangeHospital hch : hchList) {//如果存在则修改转诊记录状态为接收
351   - outOrgids.add(hch.getOutOrgid());
  351 + pids.add(hch.getPid());
352 352 }
353 353 }
354 354 } else if (hdReq.getSource() == 1) {//1.本院
355   - //当前医院
356   - outOrgids.add(hospitalId);
357   - } else {//4.全部医院/默认全部医院
358   - //当前登录人区域医院Id
359   - //当前医院
360   - outOrgids.add(hospitalId);
361   - //转诊过来的医院id
362   - HighriskChangeHospitalQuery hchQuery = new HighriskChangeHospitalQuery();
363   - hchQuery.setTargetType(2);//儿童
364   - hchQuery.setChangeType(1);//听力转诊
365   - hchQuery.setStatus(2);//已接受
366   - hchQuery.setIntoOrgid(hospitalId);
367   - List<HighriskChangeHospital> hchList = highchangeService.queryHighriskChangeHospital(hchQuery);
368   - if (hchList != null && hchList.size() > 0) {
369   - for (HighriskChangeHospital hch : hchList) {
370   - outOrgids.add(hch.getOutOrgid());
371   - }
  355 + BabyPatientExtendEarBabyQuery babyQuery = new BabyPatientExtendEarBabyQuery();
  356 + babyQuery.setHospitalId(hospitalId);
  357 + babyQuery.setEnable("2");
  358 + List<BabyPatientExtendEarBaby> earBabies = earBabyService.queryBabyPatientExtendEarBaby(babyQuery);
  359 + for (BabyPatientExtendEarBaby eb:earBabies){
  360 + pids.add(eb.getBabyPatientId());
372 361 }
373 362 }
374   - } else {
375   - //当前医院
376   - outOrgids.add(hospitalId);
377 363 }
  364 +
378 365 BabyPatientExtendEarScreenQuery scrQuery = new BabyPatientExtendEarScreenQuery();
379 366 //如果查询号不为空,根据查询号查询儿童档案表,获取儿童档案Id
380 367 if (StringUtils.isNotEmpty(hdReq.getKeyWord())) {//关键字:姓名、联系方式、就诊卡 查询babyId
381 368  
382 369  
383 370  
... ... @@ -393,23 +380,13 @@
393 380 }
394 381 }
395 382  
396   - scrQuery.setCheckHospitalIds((String[]) outOrgids.toArray(new String[outOrgids.size()]));
397   - if (scrQuery.getCheckHospitalIds() == null || scrQuery.getCheckHospitalIds().length == 0) {
398   - return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("没有找到数据");
399   - }
400 383 //主数据
401 384 List<String> babyIds = screenService.queryScrBabyIds(scrQuery);
402 385  
403   - if (babyIds.size() == 0) {
404   - return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("没有找到数据");
405   - }
406   -
407   - //设置要显示的医院集合(已加入条件本院、外院、全部)
408 386 BabyPatientExtendEarHearingDiagnoseQuery query = new BabyPatientExtendEarHearingDiagnoseQuery();
409   -
  387 + query.setPids((String[]) pids.toArray(new String[pids.size()]));
410 388 //设置要查询的babyId
411   - query.setBabyIds(babyIds.toArray(new String[babyIds.size()]));
412   -
  389 + query.setHospitalId(hospitalId);
413 390 if (hdReq.getDiagnoseStartTime() != null) {//诊断开始时间
414 391 query.setDiagnoseStartTime(hdReq.getDiagnoseStartTime());
415 392 }
... ... @@ -794,6 +771,8 @@
794 771 if(obj.getIsconfirm()==1){
795 772 obj.setConfirmTime(new Date());
796 773 }
  774 + String pid = babyModel.getPid();
  775 + obj.setPid(pid);
797 776 obj.setIfdel(0);
798 777 obj.setCreateTime(new Date());
799 778 obj.setCreateId(String.valueOf(loginState.getId()));
800 779  
... ... @@ -805,8 +784,9 @@
805 784 //根据babyId和当前医院id获取是否有转诊记录
806 785 HighriskChangeHospitalQuery hchQuery = new HighriskChangeHospitalQuery();
807 786 hchQuery.setTargetType(2);
808   - hchQuery.setTargetId(obj.getBabyId());
  787 + // hchQuery.setTargetId(obj.getBabyId());
809 788 hchQuery.setIntoOrgid(hospitalId);
  789 + hchQuery.setPid(pid);
810 790 hchQuery.setStatus(1);
811 791 List<HighriskChangeHospital> hchList = highchangeService.queryHighriskChangeHospital(hchQuery);
812 792 if (hchList != null && hchList.size() > 0) {
... ... @@ -816,7 +796,7 @@
816 796 hch.setReceiveDoctorid(String.valueOf(loginState.getId()));
817 797 highchangeService.updateHighriskChangeHospital(hch);
818 798 //调用儿童档案接口,将隐藏档案设置为显示
819   - babyEarFacade.showBabyEar(obj.getBabyId());
  799 + babyEarFacade.showBabyEar(obj.getBabyId(),hospitalId);
820 800 }
821 801 }
822 802 //听力筛查-当某个儿童在同一院组内某家医院完成了的听筛建档后去院组内其他医院做了听筛、听诊或随访,应该要在对应的医院下创建一个隐藏档案
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HighriskChangeHospitalController.java View file @ b399062
... ... @@ -522,6 +522,9 @@
522 522 if (StringUtil.isBlank(obj.getTargetId())) {
523 523 return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入儿童档案id");
524 524 }
  525 + BabyModel babyModel = babyService.getOneBabyById(obj.getTargetId());
  526 + String pid = babyModel.getPid();
  527 + obj.setPid(pid);
525 528 obj.setId(UUID.randomUUID().toString().replace("-", ""));
526 529 obj.setTargetType(2);//儿童
527 530 obj.setCreateTime(new Date());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java View file @ b399062
... ... @@ -210,20 +210,42 @@
210 210 * @param babyId 儿童档案Id
211 211 * @return 操作是否成功
212 212 */
213   - public boolean showBabyEar(String babyId) {
  213 + public boolean showBabyEar(String babyId,String hospitalId) {
214 214 if (StringUtils.isEmpty(babyId)) {
215 215 return false;
216 216 }
  217 +
217 218 BabyModel babyModel = babyService.getOneBabyById(babyId);
  219 + String pid = babyModel.getPid();
  220 + BabyModelQuery babyQuery = new BabyModelQuery();
  221 + babyQuery.setPid(pid);
  222 + babyQuery.setEnable("0");
  223 + babyQuery.setHospitalId(hospitalId);
  224 + List<BabyModel> babyModels = babyService.queryBabyWithQuery(babyQuery);
  225 + if(CollectionUtils.isNotEmpty(babyModels)){
  226 + babyModel = babyModels.get(0);
  227 + }
218 228  
219   - //建立儿童隐藏档案
  229 + //儿童转诊档案设置为 1-转诊已接收
220 230 if (babyModel != null) {
221 231 babyModel.setYn(YnEnums.YES.getId());
222 232 babyModel.setModified(new Date());
223 233 babyModel.setEnable("1");
224 234 babyService.updateOneBaby(babyModel, babyId);
225 235 }
  236 + BabyPatientExtendEarBabyQuery extendEarBabyQuery = new BabyPatientExtendEarBabyQuery();
  237 + extendEarBabyQuery.setBabyPatientId(babyModel.getId());
  238 + extendEarBabyQuery.setEnable("0");
  239 + extendEarBabyQuery.setHospitalId(hospitalId);
226 240  
  241 + List<BabyPatientExtendEarBaby> babyPatientExtendEarBaby = babyPatientExtendEarBabyService.queryBabyPatientExtendEarBaby(extendEarBabyQuery);
  242 +
  243 + if(CollectionUtils.isNotEmpty(babyPatientExtendEarBaby)){
  244 + BabyPatientExtendEarBaby earBaby = babyPatientExtendEarBaby.get(0);
  245 + earBaby.setEnable("1");
  246 + babyPatientExtendEarBabyService.updateBabyPatientExtendEarBaby(earBaby);
  247 + }
  248 +
227 249 BabyPatientExtendEarQuery earQuery = new BabyPatientExtendEarQuery();
228 250 earQuery.setBabyPatientId(babyId);
229 251  
230 252  
231 253  
... ... @@ -281,18 +303,48 @@
281 303  
282 304 BabyPatientExtendEarQuery earQuery = new BabyPatientExtendEarQuery();
283 305 earQuery.setBabyPatientId(babyId);
284   -
  306 + // earQuery.setCreateHospitalId(hospitalId);
285 307 List<BabyPatientExtendEar> ears = babyPatientExtendEarService.queryBabyPatientExtendEar(earQuery);
286 308 if (CollectionUtils.isNotEmpty(ears)) {
287 309 BabyPatientExtendEar ear = ears.get(0);
288   - //如果相同,则已经存在,不处理
289   - if (!newBabyId.equals(babyId)) {
  310 + //如果不相同转诊档案
  311 + if (!hospitalId.equals(ear.getCreateHospitalId())) {
290 312 ear.setId(UUID.randomUUID().toString().replace("-", ""));
291 313 ear.setBabyPatientId(newBabyId);
292 314 ear.setCreateHospitalId(hospitalId);
293 315 ear.setStatus(YnEnums.NO.getId());
294 316 babyPatientExtendEarService.addBabyPatientExtendEar(ear);
295 317  
  318 + BabyPatientExtendEarBabyQuery query = new BabyPatientExtendEarBabyQuery();
  319 + query.setBabyPatientId(babyId);
  320 + List<BabyPatientExtendEarBaby> babyPatientExtendEarBabies = babyPatientExtendEarBabyService.queryBabyPatientExtendEarBaby(query);
  321 + if(CollectionUtils.isNotEmpty(babyPatientExtendEarBabies)){
  322 + BabyPatientExtendEarBaby earBaby = babyPatientExtendEarBabies.get(0);
  323 + if(!earBaby.getHospitalId().equals(hospitalId)){
  324 + BabyPatientExtendEarBaby babyPatientExtendEarBaby = new BabyPatientExtendEarBaby();
  325 + babyModel = babyService.getOneBabyById(newBabyId);
  326 + babyPatientExtendEarBaby.setId(UUID.randomUUID().toString().replace("-", ""));
  327 + babyPatientExtendEarBaby.setName(babyModel.getName());
  328 + babyPatientExtendEarBaby.setSex(babyModel.getSex());
  329 + babyPatientExtendEarBaby.setCardno(babyModel.getCardNo());
  330 + babyPatientExtendEarBaby.setBirth(babyModel.getBirth());
  331 + babyPatientExtendEarBaby.setMname(babyModel.getMname());
  332 + babyPatientExtendEarBaby.setMcertTypeId(babyModel.getMcertTypeId());
  333 + babyPatientExtendEarBaby.setMcertNo(babyModel.getMcertNo());
  334 + babyPatientExtendEarBaby.setMphone(babyModel.getMphone());
  335 + babyPatientExtendEarBaby.setVcCardNo(babyModel.getVcCardNo());
  336 + babyPatientExtendEarBaby.setBuildDoctor(babyModel.getBuildDoctor());
  337 + babyPatientExtendEarBaby.setHospitalId(babyModel.getHospitalId());
  338 + babyPatientExtendEarBaby.setBuildType(babyModel.getBuildType());
  339 + babyPatientExtendEarBaby.setYn(babyModel.getYn());
  340 + babyPatientExtendEarBaby.setBuildDate(babyModel.getBuildDate());
  341 + babyPatientExtendEarBaby.setEnable(babyModel.getEnable());
  342 + babyPatientExtendEarBaby.setBabyPatientId(babyModel.getId());
  343 + babyPatientExtendEarBaby.setBabyEarId(ear.getId());
  344 + babyPatientExtendEarBabyService.addBabyPatientExtendEarBaby(babyPatientExtendEarBaby);
  345 + }
  346 + }
  347 +
296 348 //儿童基本信息
297 349 BabyPatientExtendEarBirthQuery earBirthQuery = new BabyPatientExtendEarBirthQuery();
298 350 earBirthQuery.setBabyPatientId(babyId);
299 351  
... ... @@ -464,8 +516,10 @@
464 516 babyPatientExtendEarBaby.setBuildType(baby.getBuildType());
465 517 babyPatientExtendEarBaby.setYn(baby.getYn());
466 518 babyPatientExtendEarBaby.setBuildDate(baby.getBuildDate());
  519 + babyPatientExtendEarBaby.setEnable(baby.getEnable());
467 520 babyPatientExtendEarBaby.setBabyPatientId(babyPatientId);
468 521 babyPatientExtendEarBaby.setBabyEarId(babyPatientExtendEar.getId());
  522 + babyPatientExtendEarBaby.setPersonId(baby.getPid());
469 523  
470 524 BabyPatientExtendEarBabyQuery extendEarBabyQuery = new BabyPatientExtendEarBabyQuery();
471 525 extendEarBabyQuery.setBabyPatientId(babyPatientId);
... ... @@ -1671,6 +1725,10 @@
1671 1725 if (null != babyPatientExtendEarScreen) {
1672 1726 String hId = autoMatchFacade.getHospitalId(userId);
1673 1727 if (StringUtils.isEmpty(babyPatientExtendEarScreen.getId())) {
  1728 +
  1729 + BabyModel babyModel = babyService.getOneBabyById(babyPatientExtendEarScreen.getBabyId());
  1730 + String pid = babyModel.getPid();
  1731 + babyPatientExtendEarScreen.setPid(pid);
1674 1732 babyPatientExtendEarScreen.setStatus(0);
1675 1733 babyPatientExtendEarScreen.setId(UUID.randomUUID().toString().replace("-", ""));
1676 1734 babyPatientExtendEarScreen.setCreateDate(new Date());