Commit 618d7722cde289d7ddafdbc702b6cad61ec5f927
1 parent
dd49a57149
Exists in
master
and in
1 other branch
听力诊断模块
Showing 7 changed files with 326 additions and 73 deletions
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEar.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarQuery.java
- platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEar.xml
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyEarBase.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyPatientExtendEarMotherRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyEarBaseView.java
platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEar.java
View file @
618d772
... | ... | @@ -15,8 +15,6 @@ |
15 | 15 | |
16 | 16 | private Date createDate; |
17 | 17 | |
18 | - private String createUserId; | |
19 | - | |
20 | 18 | private String createHospitalId; |
21 | 19 | |
22 | 20 | private Date lastUpdateDate; |
23 | 21 | |
24 | 22 | |
... | ... | @@ -26,24 +24,31 @@ |
26 | 24 | private String lastUpdateHospitalId; |
27 | 25 | |
28 | 26 | /** |
29 | - * 听力高危因素 存字典表所对应的字段 多个用逗号分割 | |
30 | - */ | |
31 | - private String highRiskCause; | |
32 | - | |
33 | - /** | |
34 | 27 | * 状态 1=正常 -1=禁用 |
35 | 28 | */ |
36 | 29 | private Integer status; |
37 | 30 | |
38 | 31 | private String babyPatientId; |
39 | 32 | |
40 | - public String getBabyPatientId() { | |
41 | - return babyPatientId; | |
42 | - } | |
33 | + /** | |
34 | + * 高危及诊断 | |
35 | + */ | |
36 | + //母亲孕期高危因素 | |
37 | + private String mHighRiskFactorId; | |
38 | + //住院号 | |
39 | + private String admissNo; | |
40 | + //新生儿出院诊断 | |
41 | + private String dischargeDiagnosis; | |
42 | + //听力高危因素 | |
43 | + private String highRiskCause; | |
43 | 44 | |
44 | - public void setBabyPatientId(String babyPatientId) { | |
45 | - this.babyPatientId = babyPatientId; | |
46 | - } | |
45 | + /** | |
46 | + * 院内信息 | |
47 | + */ | |
48 | + //建档医生 | |
49 | + private String createUserId; | |
50 | + //条码 | |
51 | + private String barCode; | |
47 | 52 | |
48 | 53 | public String getPersonId() { |
49 | 54 | return personId; |
... | ... | @@ -52,6 +57,7 @@ |
52 | 57 | public void setPersonId(String personId) { |
53 | 58 | this.personId = personId; |
54 | 59 | } |
60 | + | |
55 | 61 | public Date getCreateDate() { |
56 | 62 | return createDate; |
57 | 63 | } |
... | ... | @@ -59,6 +65,43 @@ |
59 | 65 | public void setCreateDate(Date createDate) { |
60 | 66 | this.createDate = createDate; |
61 | 67 | } |
68 | + | |
69 | + public String getCreateHospitalId() { | |
70 | + return createHospitalId; | |
71 | + } | |
72 | + | |
73 | + public String getBabyPatientId() { | |
74 | + return babyPatientId; | |
75 | + } | |
76 | + | |
77 | + public void setBabyPatientId(String babyPatientId) { | |
78 | + this.babyPatientId = babyPatientId; | |
79 | + } | |
80 | + | |
81 | + public String getmHighRiskFactorId() { | |
82 | + return mHighRiskFactorId; | |
83 | + } | |
84 | + | |
85 | + public void setmHighRiskFactorId(String mHighRiskFactorId) { | |
86 | + this.mHighRiskFactorId = mHighRiskFactorId; | |
87 | + } | |
88 | + | |
89 | + public String getAdmissNo() { | |
90 | + return admissNo; | |
91 | + } | |
92 | + | |
93 | + public void setAdmissNo(String admissNo) { | |
94 | + this.admissNo = admissNo; | |
95 | + } | |
96 | + | |
97 | + public String getDischargeDiagnosis() { | |
98 | + return dischargeDiagnosis; | |
99 | + } | |
100 | + | |
101 | + public void setDischargeDiagnosis(String dischargeDiagnosis) { | |
102 | + this.dischargeDiagnosis = dischargeDiagnosis; | |
103 | + } | |
104 | + | |
62 | 105 | public String getCreateUserId() { |
63 | 106 | return createUserId; |
64 | 107 | } |
... | ... | @@ -66,8 +109,14 @@ |
66 | 109 | public void setCreateUserId(String createUserId) { |
67 | 110 | this.createUserId = createUserId; |
68 | 111 | } |
69 | - public String getCreateHospitalId() { | |
70 | - return createHospitalId; | |
112 | + | |
113 | + | |
114 | + public String getBarCode() { | |
115 | + return barCode; | |
116 | + } | |
117 | + | |
118 | + public void setBarCode(String barCode) { | |
119 | + this.barCode = barCode; | |
71 | 120 | } |
72 | 121 | |
73 | 122 | public void setCreateHospitalId(String createHospitalId) { |
platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarQuery.java
View file @
618d772
... | ... | @@ -9,17 +9,84 @@ |
9 | 9 | public class BabyPatientExtendEarQuery extends BaseQuery |
10 | 10 | { |
11 | 11 | private String id; |
12 | + | |
13 | + /** | |
14 | + * 儿童id | |
15 | + */ | |
12 | 16 | private String personId; |
17 | + | |
13 | 18 | private Date createDate; |
14 | - private String createUserId; | |
19 | + | |
15 | 20 | private String createHospitalId; |
21 | + | |
16 | 22 | private Date lastUpdateDate; |
23 | + | |
17 | 24 | private String lastUpdateUserId; |
25 | + | |
18 | 26 | private String lastUpdateHospitalId; |
19 | - private String highRiskCause; | |
27 | + | |
28 | + /** | |
29 | + * 状态 1=正常 -1=禁用 | |
30 | + */ | |
20 | 31 | private Integer status; |
32 | + | |
21 | 33 | private String babyPatientId; |
34 | + /** | |
35 | + * 高危及诊断 | |
36 | + */ | |
37 | + //母亲孕期高危因素 | |
38 | + private String mHighRiskFactorId; | |
39 | + //住院号 | |
40 | + private String admissNo; | |
41 | + //新生儿出院诊断 | |
42 | + private String dischargeDiagnosis; | |
43 | + //听力高危因素 | |
44 | + private String highRiskCause; | |
22 | 45 | |
46 | + /** | |
47 | + * 院内信息 | |
48 | + */ | |
49 | + //建档医生 | |
50 | + private String createUserId; | |
51 | + //条码 | |
52 | + private String barCode; | |
53 | + | |
54 | + public void setId(String id) { | |
55 | + this.id = id; | |
56 | + } | |
57 | + | |
58 | + public String getmHighRiskFactorId() { | |
59 | + return mHighRiskFactorId; | |
60 | + } | |
61 | + | |
62 | + public void setmHighRiskFactorId(String mHighRiskFactorId) { | |
63 | + this.mHighRiskFactorId = mHighRiskFactorId; | |
64 | + } | |
65 | + | |
66 | + public String getDischargeDiagnosis() { | |
67 | + return dischargeDiagnosis; | |
68 | + } | |
69 | + | |
70 | + public void setDischargeDiagnosis(String dischargeDiagnosis) { | |
71 | + this.dischargeDiagnosis = dischargeDiagnosis; | |
72 | + } | |
73 | + | |
74 | + public String getBarCode() { | |
75 | + return barCode; | |
76 | + } | |
77 | + | |
78 | + public void setBarCode(String barCode) { | |
79 | + this.barCode = barCode; | |
80 | + } | |
81 | + | |
82 | + public String getAdmissNo() { | |
83 | + return admissNo; | |
84 | + } | |
85 | + | |
86 | + public void setAdmissNo(String admissNo) { | |
87 | + this.admissNo = admissNo; | |
88 | + } | |
89 | + | |
23 | 90 | public String getId() |
24 | 91 | { |
25 | 92 | return id; |
... | ... | @@ -31,12 +98,6 @@ |
31 | 98 | |
32 | 99 | public void setBabyPatientId(String babyPatientId) { |
33 | 100 | this.babyPatientId = babyPatientId; |
34 | - } | |
35 | - | |
36 | - public void setId(String id) | |
37 | - { | |
38 | - this.id = id; | |
39 | - | |
40 | 101 | } |
41 | 102 | |
42 | 103 | public String getPersonId() |
platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEar.xml
View file @
618d772
... | ... | @@ -14,11 +14,15 @@ |
14 | 14 | <result column="high_risk_cause" property="highRiskCause" jdbcType="VARCHAR"/> |
15 | 15 | <result column="status" property="status" jdbcType="INTEGER"/> |
16 | 16 | <result column="baby_patient_id" property="babyPatientId" jdbcType="VARCHAR"/> |
17 | + <result column="admiss_no" property="admissNo" jdbcType="VARCHAR"/> | |
18 | + <result column="discharge_diagnosis" property="dischargeDiagnosis" jdbcType="VARCHAR"/> | |
19 | + <result column="bar_code" property="barCode" jdbcType="VARCHAR"/> | |
20 | + <result column="mhigh_risk_factor_id" property="mHighRiskFactorId" jdbcType="VARCHAR"/> | |
17 | 21 | </resultMap> |
18 | 22 | |
19 | 23 | |
20 | 24 | <insert id="addBabyPatientExtendEar" parameterType="com.lyms.platform.permission.model.BabyPatientExtendEar"> |
21 | -insert into baby_patient_extend_ear (id,person_id,create_date,create_user_id,create_hospital_id,last_update_date,last_update_user_id,last_update_hospital_id,high_risk_cause,status,baby_patient_id) values (#{id},#{personId},#{createDate},#{createUserId},#{createHospitalId},#{lastUpdateDate},#{lastUpdateUserId},#{lastUpdateHospitalId},#{highRiskCause},#{status},#{babyPatientId}) | |
25 | +insert into baby_patient_extend_ear (id,person_id,create_date,create_user_id,create_hospital_id,last_update_date,last_update_user_id,last_update_hospital_id,high_risk_cause,status,baby_patient_id,admiss_no,discharge_diagnosis,bar_code,mhigh_risk_factor_id) values (#{id},#{personId},#{createDate},#{createUserId},#{createHospitalId},#{lastUpdateDate},#{lastUpdateUserId},#{lastUpdateHospitalId},#{highRiskCause},#{status},#{babyPatientId},#{admissNo},#{dischargeDiagnosis},#{barCode},#{mHighRiskFactorId}) | |
22 | 26 | </insert> |
23 | 27 | |
24 | 28 | |
25 | 29 | |
26 | 30 | |
... | ... | @@ -49,12 +53,24 @@ |
49 | 53 | <if test="highRiskCause != null and highRiskCause != ''"> |
50 | 54 | high_risk_cause = #{highRiskCause,jdbcType=VARCHAR}, |
51 | 55 | </if> |
56 | + <if test="status != null and status >= 0"> | |
57 | + status = #{status,jdbcType=INTEGER}, | |
58 | + </if> | |
52 | 59 | <if test="babyPatientId != null and babyPatientId != ''"> |
53 | 60 | baby_patient_id = #{babyPatientId,jdbcType=VARCHAR}, |
54 | 61 | </if> |
55 | - <if test="status != null and status >= 0"> | |
56 | - status = #{status,jdbcType=INTEGER}, | |
62 | + <if test="admissNo != null and admissNo != ''"> | |
63 | + admiss_no = #{admissNo,jdbcType=VARCHAR}, | |
57 | 64 | </if> |
65 | + <if test="dischargeDiagnosis != null and dischargeDiagnosis != ''"> | |
66 | + discharge_diagnosis = #{dischargeDiagnosis,jdbcType=VARCHAR}, | |
67 | + </if> | |
68 | + <if test="barCode != null and barCode != ''"> | |
69 | + bar_code = #{barCode,jdbcType=VARCHAR}, | |
70 | + </if> | |
71 | + <if test="mHighRiskFactorId != null and mHighRiskFactorId != ''"> | |
72 | + mhigh_risk_factor_id = #{mHighRiskFactorId,jdbcType=VARCHAR}, | |
73 | + </if> | |
58 | 74 | </set> |
59 | 75 | where id = #{id,jdbcType=VARCHAR} |
60 | 76 | </update> |
... | ... | @@ -66,8 +82,8 @@ |
66 | 82 | |
67 | 83 | |
68 | 84 | <select id="getBabyPatientExtendEar" resultMap="BabyPatientExtendEarResultMap" parameterType="java.lang.String"> |
69 | -select id,person_id,create_date,create_user_id,create_hospital_id,last_update_date,last_update_user_id,last_update_hospital_id,high_risk_cause,status | |
70 | - ,baby_patient_id from baby_patient_extend_ear where id = #{id,jdbcType=VARCHAR} | |
85 | +select id,person_id,create_date,create_user_id,create_hospital_id,last_update_date,last_update_user_id,last_update_hospital_id,high_risk_cause,status,baby_patient_id,admiss_no,discharge_diagnosis,bar_code,mhigh_risk_factor_id | |
86 | +from baby_patient_extend_ear where id = #{id,jdbcType=VARCHAR} | |
71 | 87 | </select> |
72 | 88 | |
73 | 89 | |
... | ... | @@ -117,6 +133,18 @@ |
117 | 133 | <if test="babyPatientId != null and babyPatientId != ''"> |
118 | 134 | and baby_patient_id = #{babyPatientId,jdbcType=VARCHAR} |
119 | 135 | </if> |
136 | + <if test="admissNo != null and admissNo != ''"> | |
137 | + and admiss_no = #{admissNo,jdbcType=VARCHAR} | |
138 | + </if> | |
139 | + <if test="dischargeDiagnosis != null and dischargeDiagnosis != ''"> | |
140 | + and discharge_diagnosis = #{dischargeDiagnosis,jdbcType=VARCHAR} | |
141 | + </if> | |
142 | + <if test="barCode != null and barCode != ''"> | |
143 | + and bar_code = #{barCode,jdbcType=VARCHAR} | |
144 | + </if> | |
145 | + <if test="mHighRiskFactorId != null and mHighRiskFactorId != ''"> | |
146 | + and mhigh_risk_factor_id = #{mHighRiskFactorId,jdbcType=VARCHAR} | |
147 | + </if> | |
120 | 148 | </where> |
121 | 149 | </sql> |
122 | 150 | |
... | ... | @@ -124,7 +152,8 @@ |
124 | 152 | <select id="queryBabyPatientExtendEar" resultMap="BabyPatientExtendEarResultMap" |
125 | 153 | parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarQuery"> |
126 | 154 | select |
127 | - id,person_id,create_date,create_user_id,create_hospital_id,last_update_date,last_update_user_id,last_update_hospital_id,high_risk_cause,status,baby_patient_id from baby_patient_extend_ear | |
155 | + id,person_id,create_date,create_user_id,create_hospital_id,last_update_date,last_update_user_id,last_update_hospital_id,high_risk_cause,status,baby_patient_id,admiss_no,discharge_diagnosis,bar_code,mhigh_risk_factor_id | |
156 | + from baby_patient_extend_ear | |
128 | 157 | <include refid="BabyPatientExtendEarCondition"/> |
129 | 158 | <include refid="orderAndLimit"/> |
130 | 159 | </select> |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java
View file @
618d772
... | ... | @@ -20,6 +20,7 @@ |
20 | 20 | import com.lyms.platform.operate.web.utils.CommonsHelper; |
21 | 21 | import com.lyms.platform.operate.web.utils.InitDataUtils; |
22 | 22 | import com.lyms.platform.operate.web.utils.MongoUtil; |
23 | +import com.lyms.platform.operate.web.utils.ResolveUtils; | |
23 | 24 | import com.lyms.platform.permission.model.*; |
24 | 25 | import com.lyms.platform.permission.service.*; |
25 | 26 | import com.lyms.platform.pojo.BabyModel; |
... | ... | @@ -138,7 +139,8 @@ |
138 | 139 | return childrenPerson; |
139 | 140 | } |
140 | 141 | |
141 | - private void addMysqlBabyRecord(BabyModel baby) { | |
142 | + private void addMysqlBabyRecord(BabyEarBase babyarBaseb) { | |
143 | + BabyModel baby = babyarBaseb.convertToDataModel(); | |
142 | 144 | ChildrenPerson childrenPerson = fillChildren(baby); |
143 | 145 | //同时写mysql表 |
144 | 146 | childrenPersonService.addChildrenPerson(childrenPerson); |
145 | 147 | |
... | ... | @@ -177,8 +179,10 @@ |
177 | 179 | * @return 操作是否成功 |
178 | 180 | */ |
179 | 181 | public BaseResponse addOrUpdateBabyEar(BabyEarAddRequest babyEarAddRequest, Integer userId) { |
182 | + BabyEarBase babyEarBase = babyEarAddRequest.getBase(); | |
180 | 183 | //获取儿童信息 |
181 | - IBasicRequestConvert<BabyModel> convert = babyEarAddRequest.getBase(); | |
184 | + IBasicRequestConvert<BabyModel> convert =babyEarBase; | |
185 | + | |
182 | 186 | //儿童基本信息 |
183 | 187 | BabyModel baby = convert.convertToDataModel(); |
184 | 188 | //儿童出生信息 |
... | ... | @@ -187,6 +191,7 @@ |
187 | 191 | BabyPatientExtendEarFamily babyPatientExtendEarFamily = babyEarAddRequest.getPatientExtendEarFamily(); |
188 | 192 | //母亲信息 |
189 | 193 | BabyPatientExtendEarMotherRequest babyPatientExtendEarMotherRequest = babyEarAddRequest.getPatientExtendEarMother(); |
194 | + | |
190 | 195 | BabyPatientExtendEarMother babyPatientExtendEarMother=null; |
191 | 196 | if(null!=babyPatientExtendEarMotherRequest){ |
192 | 197 | babyPatientExtendEarMother= babyPatientExtendEarMotherRequest.convertToDataModel(); |
193 | 198 | |
... | ... | @@ -204,9 +209,15 @@ |
204 | 209 | baby.setYn(1); |
205 | 210 | baby.setCreated(new Date()); |
206 | 211 | babyPatientId = babyService.addOneBaby(baby).getId(); |
207 | - addMysqlBabyRecord(baby); | |
212 | + addMysqlBabyRecord(babyEarAddRequest.getBase()); | |
208 | 213 | } |
209 | 214 | BabyPatientExtendEar babyPatientExtendEar = new BabyPatientExtendEar(); |
215 | + babyPatientExtendEar.setmHighRiskFactorId(babyEarBase.getmHighRiskFactorId()); | |
216 | + babyPatientExtendEar.setAdmissNo(babyEarBase.getAdmissNo()); | |
217 | + babyPatientExtendEar.setDischargeDiagnosis(babyEarBase.getDischargeDiagnosis()); | |
218 | + babyPatientExtendEar.setHighRiskCause(babyEarBase.getHighRiskCause()); | |
219 | + babyPatientExtendEar.setHighRiskCause(babyEarBase.getHighRiskCause()); | |
220 | + | |
210 | 221 | if (StringUtils.isEmpty(id)) { |
211 | 222 | babyPatientExtendEar.setCreateDate(new Date()); |
212 | 223 | babyPatientExtendEar.setCreateHospitalId(hId); |
213 | 224 | |
... | ... | @@ -278,8 +289,38 @@ |
278 | 289 | babyPatientExtendEarQuery.setBabyPatientId(babyModel.getId()); |
279 | 290 | List<BabyPatientExtendEar> babyPatientExtendEars = babyPatientExtendEarService.queryBabyPatientExtendEar(babyPatientExtendEarQuery); |
280 | 291 | if (CollectionUtils.isNotEmpty(babyPatientExtendEars)) { |
281 | - babyEarBase.setId(babyPatientExtendEars.get(0).getId()); | |
292 | + BabyPatientExtendEar babyPatientExtendEar = babyPatientExtendEars.get(0); | |
293 | + babyEarBase.setId(babyPatientExtendEar.getId()); | |
294 | + babyEarBase.setAdmissNo(babyPatientExtendEar.getAdmissNo()); | |
295 | + babyEarBase.setBarCode(babyPatientExtendEar.getBarCode()); | |
296 | + babyEarBase.setCreateUserId(babyPatientExtendEar.getCreateUserId()); | |
297 | + //母亲孕期高危因素 | |
298 | + if(babyPatientExtendEar.getmHighRiskFactorId()!=null){ | |
299 | + | |
300 | + String[] highFactors = babyPatientExtendEar.getmHighRiskFactorId().split(","); | |
301 | + List<String> ids = Arrays.asList(highFactors); | |
302 | + | |
303 | + HighScoreResult highScoreResult = ResolveUtils.queryRisk(ids, true, basicConfigService); | |
304 | + List<Map<String, Object>> checkList = ResolveUtils.queryHighRisk(highScoreResult); | |
305 | + babyEarBase.setmHighRiskFactorList(checkList); | |
306 | + } | |
307 | + //听力高危因素 | |
308 | + if(babyPatientExtendEar.getHighRiskCause()!=null){ | |
309 | + List highArr = new ArrayList(); | |
310 | + String[] highFactors = babyPatientExtendEar.getHighRiskCause().split(","); | |
311 | + for (String hf : highFactors) { | |
312 | + if (StringUtils.isNotEmpty(hf)) { | |
313 | + String name = HighRiskEnum.getTitle(Integer.parseInt(hf)); | |
314 | + JSONObject confiJo = new JSONObject(); | |
315 | + confiJo.put("id",hf); | |
316 | + confiJo.put("name",name); | |
317 | + highArr.add(confiJo); | |
318 | + } | |
319 | + } | |
320 | + babyEarBase.setHighRiskCauseList(highArr); | |
321 | + } | |
282 | 322 | } |
323 | + babyEarResult.setBase(babyEarBase); | |
283 | 324 | |
284 | 325 | //查詢母親的信息 |
285 | 326 | BabyPatientExtendEarMotherQuery babyPatientExtendEarMotherQuery = new BabyPatientExtendEarMotherQuery(); |
... | ... | @@ -305,7 +346,6 @@ |
305 | 346 | if (CollectionUtils.isNotEmpty(babyPatientExtendEarBirths)) { |
306 | 347 | babyEarResult.setBabyBirth(babyPatientExtendEarBirths.get(0)); |
307 | 348 | } |
308 | - babyEarResult.setBase(babyEarBase); | |
309 | 349 | objectResponse.setData(babyEarResult); |
310 | 350 | objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
311 | 351 | } else { |
312 | 352 | |
313 | 353 | |
314 | 354 | |
315 | 355 | |
316 | 356 | |
317 | 357 | |
318 | 358 | |
... | ... | @@ -327,41 +367,83 @@ |
327 | 367 | BabyEarBase babyEarBase = new BabyEarBase(babyModel); |
328 | 368 | //儿童基础信息 |
329 | 369 | BabyEarBaseView babyEarBaseView = convertToBabyEarBase(babyEarBase); |
330 | - babyEarResult.setBase(babyEarBaseView); | |
331 | 370 | |
332 | - //查詢母親的信息 | |
333 | - BabyPatientExtendEarMotherQuery babyPatientExtendEarMotherQuery = new BabyPatientExtendEarMotherQuery(); | |
334 | - babyPatientExtendEarMotherQuery.setBabyPatientId(babyId); | |
335 | - List<BabyPatientExtendEarMother> babyPatientExtendEarMothers = babyPatientExtendEarMotherService.queryBabyPatientExtendEarMother(babyPatientExtendEarMotherQuery); | |
371 | + BabyPatientExtendEarQuery babyPatientExtendEarQuery = new BabyPatientExtendEarQuery(); | |
372 | + babyPatientExtendEarQuery.setBabyPatientId(babyModel.getId()); | |
373 | + List<BabyPatientExtendEar> babyPatientExtendEars = babyPatientExtendEarService.queryBabyPatientExtendEar(babyPatientExtendEarQuery); | |
374 | + if (CollectionUtils.isNotEmpty(babyPatientExtendEars)) { | |
375 | + BabyPatientExtendEar babyPatientExtendEar = babyPatientExtendEars.get(0); | |
376 | + babyEarBaseView.setAdmissNo(babyPatientExtendEar.getAdmissNo()); | |
377 | + babyEarBaseView.setDischargeDiagnosis(babyPatientExtendEar.getDischargeDiagnosis()); | |
336 | 378 | |
337 | - if (CollectionUtils.isNotEmpty(babyPatientExtendEarMothers)) { | |
338 | - BabyEarMotherView babyEarMotherView = convertToBabyEarMotherView(babyPatientExtendEarMothers.get(0)); | |
339 | - babyEarResult.setPatientExtendEarMother(babyEarMotherView); | |
340 | - } | |
379 | + babyEarBaseView.setBarCode(babyPatientExtendEar.getBarCode()); | |
380 | + //听力高危因素 | |
381 | + if (babyPatientExtendEar.getHighRiskCause() != null) { | |
382 | + String[] highFactors = babyPatientExtendEar.getHighRiskCause().split(","); | |
383 | + StringBuffer hfBuff = new StringBuffer(); | |
341 | 384 | |
342 | - BabyPatientExtendEarFamilyQuery babyPatientExtendEarFamilyQuery = new BabyPatientExtendEarFamilyQuery(); | |
343 | - babyPatientExtendEarFamilyQuery.setBabyPatientId(babyId); | |
385 | + for (String hf : highFactors) { | |
386 | + if (StringUtils.isNotEmpty(hf)) { | |
387 | + String name = HighRiskEnum.getTitle(Integer.parseInt(hf)); | |
388 | + hfBuff.append(name + "、"); | |
389 | + } | |
390 | + } | |
391 | + babyEarBaseView.setHighRiskCause(hfBuff.toString()); | |
392 | + } | |
393 | + //母亲孕期高危因素 | |
394 | + if (babyPatientExtendEar.getmHighRiskFactorId() != null) { | |
395 | + String[] highFactors = babyPatientExtendEar.getmHighRiskFactorId().split(","); | |
396 | + List<String> ids = Arrays.asList(highFactors); | |
344 | 397 | |
345 | - //查詢家庭信息 | |
346 | - List<BabyPatientExtendEarFamily> babyPatientExtendEarFamilies = babyPatientExtendEarFamilyService.queryBabyPatientExtendEarFamily(babyPatientExtendEarFamilyQuery); | |
347 | - if (CollectionUtils.isNotEmpty(babyPatientExtendEarFamilies)) { | |
348 | - BabyEarFamilyView babyEarFamilyView = convertToBabyEarFamilyView(babyPatientExtendEarFamilies.get(0)); | |
349 | - babyEarResult.setPatientExtendEarFamily(babyEarFamilyView); | |
350 | - } | |
398 | + HighScoreResult highScoreResult = ResolveUtils.queryRisk(ids, true, basicConfigService); | |
399 | + Integer score = 0; | |
400 | + if (highScoreResult != null && highScoreResult.getScore() != null) { | |
401 | + score = highScoreResult.getScore(); | |
402 | + } | |
403 | + List<Map<String, Object>> checkList = ResolveUtils.queryHighRisk(highScoreResult); | |
404 | + List<Map<String, Object>> list = new ArrayList<>(); | |
405 | + if (CollectionUtils.isNotEmpty(checkList)) { | |
406 | + list.addAll(checkList); | |
407 | + } | |
408 | + babyEarBaseView.setmHighRiskFactorList(list); | |
409 | + } | |
351 | 410 | |
352 | - BabyPatientExtendEarBirthQuery babyPatientExtendEarBirthQuery = new BabyPatientExtendEarBirthQuery(); | |
353 | - babyPatientExtendEarBirthQuery.setBabyPatientId(babyId); | |
354 | - //出生信息 | |
355 | - List<BabyPatientExtendEarBirth> babyPatientExtendEarBirths = babyPatientExtendEarBirthService.queryBabyPatientExtendEarBirth(babyPatientExtendEarBirthQuery); | |
411 | + babyEarResult.setBase(babyEarBaseView); | |
356 | 412 | |
357 | - if (CollectionUtils.isNotEmpty(babyPatientExtendEarBirths)) { | |
358 | - BabyEarBirthView babyEarBirthView = convertToBabyEarBirthView(babyPatientExtendEarBirths.get(0)); | |
359 | - babyEarResult.setBabyBirth(babyEarBirthView); | |
413 | + //查詢母親的信息 | |
414 | + BabyPatientExtendEarMotherQuery babyPatientExtendEarMotherQuery = new BabyPatientExtendEarMotherQuery(); | |
415 | + babyPatientExtendEarMotherQuery.setBabyPatientId(babyId); | |
416 | + List<BabyPatientExtendEarMother> babyPatientExtendEarMothers = babyPatientExtendEarMotherService.queryBabyPatientExtendEarMother(babyPatientExtendEarMotherQuery); | |
417 | + | |
418 | + if (CollectionUtils.isNotEmpty(babyPatientExtendEarMothers)) { | |
419 | + BabyEarMotherView babyEarMotherView = convertToBabyEarMotherView(babyPatientExtendEarMothers.get(0)); | |
420 | + babyEarResult.setPatientExtendEarMother(babyEarMotherView); | |
421 | + } | |
422 | + | |
423 | + BabyPatientExtendEarFamilyQuery babyPatientExtendEarFamilyQuery = new BabyPatientExtendEarFamilyQuery(); | |
424 | + babyPatientExtendEarFamilyQuery.setBabyPatientId(babyId); | |
425 | + | |
426 | + //查詢家庭信息 | |
427 | + List<BabyPatientExtendEarFamily> babyPatientExtendEarFamilies = babyPatientExtendEarFamilyService.queryBabyPatientExtendEarFamily(babyPatientExtendEarFamilyQuery); | |
428 | + if (CollectionUtils.isNotEmpty(babyPatientExtendEarFamilies)) { | |
429 | + BabyEarFamilyView babyEarFamilyView = convertToBabyEarFamilyView(babyPatientExtendEarFamilies.get(0)); | |
430 | + babyEarResult.setPatientExtendEarFamily(babyEarFamilyView); | |
431 | + } | |
432 | + | |
433 | + BabyPatientExtendEarBirthQuery babyPatientExtendEarBirthQuery = new BabyPatientExtendEarBirthQuery(); | |
434 | + babyPatientExtendEarBirthQuery.setBabyPatientId(babyId); | |
435 | + //出生信息 | |
436 | + List<BabyPatientExtendEarBirth> babyPatientExtendEarBirths = babyPatientExtendEarBirthService.queryBabyPatientExtendEarBirth(babyPatientExtendEarBirthQuery); | |
437 | + | |
438 | + if (CollectionUtils.isNotEmpty(babyPatientExtendEarBirths)) { | |
439 | + BabyEarBirthView babyEarBirthView = convertToBabyEarBirthView(babyPatientExtendEarBirths.get(0)); | |
440 | + babyEarResult.setBabyBirth(babyEarBirthView); | |
441 | + } | |
442 | + objectResponse.setData(babyEarResult); | |
443 | + objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
444 | + } else { | |
445 | + objectResponse.setErrorcode(ErrorCodeConstants.BUSINESS_ERROR).setErrormsg("没有对应的儿童"); | |
360 | 446 | } |
361 | - objectResponse.setData(babyEarResult); | |
362 | - objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
363 | - } else { | |
364 | - objectResponse.setErrorcode(ErrorCodeConstants.BUSINESS_ERROR).setErrormsg("没有对应的儿童"); | |
365 | 447 | } |
366 | 448 | return objectResponse; |
367 | 449 | } |
368 | 450 | |
369 | 451 | |
... | ... | @@ -454,13 +536,15 @@ |
454 | 536 | fetuStr = "有"; |
455 | 537 | } |
456 | 538 | } |
539 | + babyEarBirthView.setFetuEmbarras(fetuStr); | |
457 | 540 | |
458 | 541 | String apgarScore = babyPatientExtendEarBirth.getApgarScoreOne()+"-"+babyPatientExtendEarBirth.getApgarScoreFive()+"-"+babyPatientExtendEarBirth.getApgarScoreTen(); |
459 | 542 | if(babyPatientExtendEarBirth.getFetuEmbarras()!=null&&babyPatientExtendEarBirth.getFetuEmbarras()==1){ |
460 | 543 | apgarScore+="不详"; |
461 | 544 | } |
545 | + babyEarBirthView.setApgarScore(apgarScore); | |
462 | 546 | |
463 | - babyEarBirthView.setFetuEmbarras(fetuStr); | |
547 | + | |
464 | 548 | String deformity = "无"; |
465 | 549 | if(babyPatientExtendEarBirth.getDeformityType()!=null&&babyPatientExtendEarBirth.getDeformityType()==1){ |
466 | 550 | deformity = "有"; |
... | ... | @@ -523,6 +607,8 @@ |
523 | 607 | outsideResponse = "迟钝"; |
524 | 608 | } |
525 | 609 | } |
610 | + | |
611 | + | |
526 | 612 | babyEarBirthView.setOutsideResponse(outsideResponse); |
527 | 613 | return babyEarBirthView; |
528 | 614 | } |
529 | 615 | |
... | ... | @@ -563,14 +649,9 @@ |
563 | 649 | babyEarBaseView.setfLevel(getBasicConfig(babyEarBase.getfLevelId())); |
564 | 650 | babyEarBaseView.setFproType(getBasicConfig(babyEarBase.getFproTypeId())); |
565 | 651 | babyEarBaseView.setFphone(babyEarBase.getFphone()); |
566 | - babyEarBaseView.setmHighRiskFactor(babyEarBase.getmHighRiskFactorId()); | |
567 | - babyEarBaseView.setAdmissNo(babyEarBase.getAdmissNo()); | |
568 | - babyEarBaseView.setDischargeDiagnosis(babyEarBase.getDischargeDiagnosis()); | |
569 | - babyEarBaseView.setHighRiskCause(babyEarBase.getHighRiskCause()); | |
570 | 652 | babyEarBaseView.setCreateUser(babyEarBase.getCreateUserId()); |
571 | 653 | babyEarBaseView.setCreateTime(babyEarBase.getCreateTime()); |
572 | 654 | babyEarBaseView.setVcCardNo(babyEarBase.getVcCardNo()); |
573 | - babyEarBaseView.setBarCode(babyEarBase.getBarCode()); | |
574 | 655 | babyEarBaseView.setServiceType(ServiceStatusEnums.getNameById(babyEarBase.getServiceType())); |
575 | 656 | babyEarBaseView.setMonthAge(babyEarBase.getMonthAge()); |
576 | 657 | return babyEarBaseView; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyEarBase.java
View file @
618d772
... | ... | @@ -5,6 +5,7 @@ |
5 | 5 | import com.lyms.platform.pojo.BabyModel; |
6 | 6 | |
7 | 7 | import java.util.Date; |
8 | +import java.util.List; | |
8 | 9 | |
9 | 10 | /** |
10 | 11 | * 邮政编码和高危因素没有存储在mongodb |
11 | 12 | |
... | ... | @@ -89,12 +90,16 @@ |
89 | 90 | */ |
90 | 91 | //母亲孕期高危因素 |
91 | 92 | private String mHighRiskFactorId; |
93 | + //母亲孕期高危因素集合 | |
94 | + private List mHighRiskFactorList; | |
92 | 95 | //住院号 |
93 | 96 | private String admissNo; |
94 | 97 | //新生儿出院诊断 |
95 | 98 | private String dischargeDiagnosis; |
96 | 99 | //听力高危因素 |
97 | 100 | private String highRiskCause; |
101 | + //听力高危因素 | |
102 | + private List highRiskCauseList; | |
98 | 103 | |
99 | 104 | /** |
100 | 105 | * 院内信息 |
... | ... | @@ -128,6 +133,10 @@ |
128 | 133 | setAreaId(babyModel.getAreaId()); |
129 | 134 | setStreetId(babyModel.getStreetId()); |
130 | 135 | setAddress(babyModel.getAddress()); |
136 | + setVcCardNo(babyModel.getVcCardNo()); | |
137 | + setServiceType(babyModel.getServiceType()); | |
138 | + setServiceStatus(babyModel.getServiceStatus()); | |
139 | + setRemark(babyModel.getMremark()); | |
131 | 140 | setMname(babyModel.getMname()); |
132 | 141 | setMphone(babyModel.getMphone()); |
133 | 142 | setFcertNo(babyModel.getFcertNo()); |
... | ... | @@ -161,6 +170,10 @@ |
161 | 170 | babyModel.setMcertTypeId(mcertTypeId); |
162 | 171 | babyModel.setmLevelId(mLevelId); |
163 | 172 | babyModel.setId(babyId); |
173 | + babyModel.setMremark(remark); | |
174 | + babyModel.setVcCardNo(vcCardNo); | |
175 | + babyModel.setServiceType(serviceType); | |
176 | + babyModel.setServiceStatus(serviceStatus); | |
164 | 177 | babyModel.setBuildDoctor(createUserId); |
165 | 178 | babyModel.setBuildDate(new Date()); |
166 | 179 | babyModel.setBirth(DateUtil.parseYMD(birth)); |
... | ... | @@ -461,6 +474,21 @@ |
461 | 474 | |
462 | 475 | public void setPostCode(String postCode) { |
463 | 476 | this.postCode = postCode; |
477 | + } | |
478 | + | |
479 | + public List getmHighRiskFactorList() { | |
480 | + return mHighRiskFactorList; | |
481 | + } | |
482 | + | |
483 | + public void setmHighRiskFactorList(List mHighRiskFactorList) { | |
484 | + this.mHighRiskFactorList = mHighRiskFactorList; | |
485 | + } | |
486 | + public List getHighRiskCauseList() { | |
487 | + return highRiskCauseList; | |
488 | + } | |
489 | + | |
490 | + public void setHighRiskCauseList(List highRiskCauseList) { | |
491 | + this.highRiskCauseList = highRiskCauseList; | |
464 | 492 | } |
465 | 493 | |
466 | 494 | public Integer getSex() { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyPatientExtendEarMotherRequest.java
View file @
618d772
... | ... | @@ -4,6 +4,7 @@ |
4 | 4 | import com.lyms.platform.common.utils.JsonUtil; |
5 | 5 | import com.lyms.platform.permission.model.BabyPatientExtendEarMother; |
6 | 6 | |
7 | +import java.util.List; | |
7 | 8 | import java.util.Map; |
8 | 9 | |
9 | 10 | /** |
... | ... | @@ -59,6 +60,8 @@ |
59 | 60 | * 有异常妊娠 |
60 | 61 | */ |
61 | 62 | private Map bnormalPregnancyHistoryType; |
63 | + | |
64 | + | |
62 | 65 | /** |
63 | 66 | * 儿童建档的主键 |
64 | 67 | */ |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyEarBaseView.java
View file @
618d772
1 | 1 | package com.lyms.platform.operate.web.result; |
2 | 2 | |
3 | +import java.util.List; | |
4 | + | |
3 | 5 | /** |
4 | 6 | * @auther yangfei |
5 | 7 | * @createTime 2017年08月16日 22时40分 |
... | ... | @@ -69,7 +71,7 @@ |
69 | 71 | * 高危及诊断 |
70 | 72 | */ |
71 | 73 | //母亲孕期高危因素 |
72 | - private String mHighRiskFactor; | |
74 | + private List mHighRiskFactorList; | |
73 | 75 | //住院号 |
74 | 76 | private String admissNo; |
75 | 77 | //新生儿出院诊断 |
76 | 78 | |
... | ... | @@ -295,12 +297,12 @@ |
295 | 297 | this.fphone = fphone; |
296 | 298 | } |
297 | 299 | |
298 | - public String getmHighRiskFactor() { | |
299 | - return mHighRiskFactor; | |
300 | + public List getmHighRiskFactorList() { | |
301 | + return mHighRiskFactorList; | |
300 | 302 | } |
301 | 303 | |
302 | - public void setmHighRiskFactor(String mHighRiskFactor) { | |
303 | - this.mHighRiskFactor = mHighRiskFactor; | |
304 | + public void setmHighRiskFactorList(List mHighRiskFactorList) { | |
305 | + this.mHighRiskFactorList = mHighRiskFactorList; | |
304 | 306 | } |
305 | 307 | |
306 | 308 | public String getAdmissNo() { |