Commit 9deab76c9647cfbf38cdded48bef3ea0eabec914

Authored by yangfei
1 parent dc99e62a21

听力诊断模块

Showing 1 changed file with 158 additions and 107 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java View file @ 9deab76
... ... @@ -26,6 +26,7 @@
26 26 import com.lyms.platform.pojo.BabyModel;
27 27 import com.lyms.platform.pojo.BasicConfig;
28 28 import com.lyms.platform.pojo.PersonModel;
  29 +import com.lyms.platform.query.BabyModelQuery;
29 30 import com.lyms.platform.query.PersonModelQuery;
30 31 import org.apache.commons.collections.CollectionUtils;
31 32 import org.apache.commons.lang.StringUtils;
... ... @@ -163,7 +164,7 @@
163 164 childrenRecord.setCreateTime(baby.getCreated());
164 165 childrenRecord.setBirthHospital(baby.getHospitalId());
165 166 childrenRecord.setRemark(baby.getMremark());
166   - if(baby.getBabyHeight()!=null){
  167 + if (baby.getBabyHeight() != null) {
167 168 childrenRecord.setHeight(Float.valueOf(baby.getBabyHeight()));
168 169 }
169 170 // childrenRecord.setBirthNum(baby.get);
... ... @@ -181,7 +182,7 @@
181 182 public BaseResponse addOrUpdateBabyEar(BabyEarAddRequest babyEarAddRequest, Integer userId) {
182 183 BabyEarBase babyEarBase = babyEarAddRequest.getBase();
183 184 //获取儿童信息
184   - IBasicRequestConvert<BabyModel> convert =babyEarBase;
  185 + IBasicRequestConvert<BabyModel> convert = babyEarBase;
185 186  
186 187 //儿童基本信息
187 188 BabyModel baby = convert.convertToDataModel();
188 189  
189 190  
190 191  
191 192  
192 193  
193 194  
... ... @@ -192,33 +193,59 @@
192 193 //母亲信息
193 194 BabyPatientExtendEarMotherRequest babyPatientExtendEarMotherRequest = babyEarAddRequest.getPatientExtendEarMother();
194 195  
195   - BabyPatientExtendEarMother babyPatientExtendEarMother=null;
196   - if(null!=babyPatientExtendEarMotherRequest){
197   - babyPatientExtendEarMother= babyPatientExtendEarMotherRequest.convertToDataModel();
  196 + BabyPatientExtendEarMother babyPatientExtendEarMother = null;
  197 + if (null != babyPatientExtendEarMotherRequest) {
  198 + babyPatientExtendEarMother = babyPatientExtendEarMotherRequest.convertToDataModel();
198 199 }
199 200 String hId = autoMatchFacade.getHospitalId(userId);
200 201  
201 202 if (null != baby) {
202 203 //处理儿童person信息
203 204 String pid = handBabyPerson(baby).getId();
  205 + //儿童基本信息id
204 206 String id = babyEarAddRequest.getBase().getId();
  207 + //babyId 不存在新增
205 208 String babyPatientId = baby.getId();
206 209 if (StringUtils.isEmpty(baby.getId())) {
207 210 baby.setPid(pid);
208 211 baby.setHospitalId(hId);
209 212 baby.setYn(1);
210 213 baby.setCreated(new Date());
211   - babyPatientId = babyService.addOneBaby(baby).getId();
212   - addMysqlBabyRecord(babyEarAddRequest.getBase());
  214 + BabyModelQuery babyQuery = new BabyModelQuery();
  215 + babyQuery.setPid(pid);
  216 + babyQuery.setHospitalId(hId);
  217 + List<BabyModel> babyModels = babyService.queryBabyWithQuery(babyQuery);
  218 + if (CollectionUtils.isNotEmpty(babyModels)) {//修改
  219 + BabyModel babyModel = babyModels.get(0);
  220 + baby.setId(babyModel.getId());
  221 + babyService.updateOneBaby(baby, babyModel.getId());
  222 + babyPatientId = babyModel.getId();
  223 + } else {//新增
  224 + //babyId
  225 + babyPatientId = babyService.addOneBaby(baby).getId();
  226 + }
213 227 }
  228 +
  229 + //数据转换
214 230 BabyPatientExtendEar babyPatientExtendEar = new BabyPatientExtendEar();
215 231 babyPatientExtendEar.setmHighRiskFactorId(babyEarBase.getmHighRiskFactorId());
216 232 babyPatientExtendEar.setAdmissNo(babyEarBase.getAdmissNo());
217 233 babyPatientExtendEar.setDischargeDiagnosis(babyEarBase.getDischargeDiagnosis());
218 234 babyPatientExtendEar.setHighRiskCause(babyEarBase.getHighRiskCause());
219 235 babyPatientExtendEar.setHighRiskCause(babyEarBase.getHighRiskCause());
  236 + //根据babyId查询是否存
  237 + BabyPatientExtendEarQuery earQuery = new BabyPatientExtendEarQuery();
  238 + earQuery.setBabyPatientId(babyPatientId);
  239 + List<BabyPatientExtendEar> babyPatientExtendEars = babyPatientExtendEarService.queryBabyPatientExtendEar(earQuery);
220 240  
221   - if (StringUtils.isEmpty(id)) {
  241 + if(CollectionUtils.isNotEmpty(babyPatientExtendEars)){//修改
  242 + BabyPatientExtendEar babyPatientExtendEar1 = babyPatientExtendEars.get(0);
  243 + babyPatientExtendEar.setId(babyPatientExtendEar1.getId());
  244 + babyPatientExtendEar.setLastUpdateDate(new Date());
  245 + babyPatientExtendEar.setLastUpdateHospitalId(hId);
  246 + babyPatientExtendEar.setLastUpdateUserId(userId + "");
  247 + babyPatientExtendEarService.updateBabyPatientExtendEar(babyPatientExtendEar);
  248 + }else{
222 249 babyPatientExtendEar.setCreateDate(new Date());
223 250 babyPatientExtendEar.setCreateHospitalId(hId);
224 251 babyPatientExtendEar.setCreateUserId(userId + "");
225 252  
... ... @@ -229,17 +256,8 @@
229 256 babyPatientExtendEar.setStatus(1);
230 257 babyPatientExtendEar.setBabyPatientId(babyPatientId);
231 258 babyPatientExtendEarService.addBabyPatientExtendEar(babyPatientExtendEar);
232   - } else {
233   - babyPatientExtendEar.setId(id);
234   - babyPatientExtendEar.setLastUpdateDate(new Date());
235   - babyPatientExtendEar.setLastUpdateHospitalId(hId);
236   - babyPatientExtendEar.setLastUpdateUserId(userId + "");
237   - babyPatientExtendEarService.updateBabyPatientExtendEar(babyPatientExtendEar);
238 259 }
239 260  
240   - if (StringUtils.isEmpty(babyPatientExtendEarBirth.getBabyPatientId())) {
241   - babyPatientExtendEarBirth.setBabyPatientId(babyPatientId);
242   - }
243 261 if (null != babyPatientExtendEarBirth)
244 262 babyPatientExtendEarBirth.setBabyPatientId(babyPatientId);
245 263 if (null != babyPatientExtendEarFamily) {
246 264  
247 265  
248 266  
249 267  
250 268  
... ... @@ -248,26 +266,40 @@
248 266 if (null != babyPatientExtendEarMother) {
249 267 babyPatientExtendEarMother.setBabyPatientId(babyPatientId);
250 268 }
251   - //判断是否是新增
252   - if (StringUtils.isEmpty(babyPatientExtendEarBirth.getId())) {
  269 +
  270 + BabyPatientExtendEarBirthQuery birthQuery = new BabyPatientExtendEarBirthQuery();
  271 + birthQuery.setBabyPatientId(babyPatientId);
  272 + List<BabyPatientExtendEarBirth> babyPatientExtendEarBirths = babyPatientExtendEarBirthService.queryBabyPatientExtendEarBirth(birthQuery);
  273 + if(CollectionUtils.isNotEmpty(babyPatientExtendEarBirths)){
  274 + BabyPatientExtendEarBirth babyPatientExtendEarBirth1 = babyPatientExtendEarBirths.get(0);
  275 + babyPatientExtendEarBirth.setId(babyPatientExtendEarBirth1.getId());
  276 + babyPatientExtendEarBirthService.updateBabyPatientExtendEarBirth(babyPatientExtendEarBirth);
  277 + }else{
253 278 babyPatientExtendEarBirth.setId(UUID.randomUUID().toString().replace("-", ""));
254 279 babyPatientExtendEarBirthService.addBabyPatientExtendEarBirth(babyPatientExtendEarBirth);
255   - } else {
256   - babyPatientExtendEarBirthService.updateBabyPatientExtendEarBirth(babyPatientExtendEarBirth);
257 280 }
258   - //判断是否是新增
259   - if (StringUtils.isEmpty(babyPatientExtendEarFamily.getId())) {
  281 + BabyPatientExtendEarFamilyQuery familyQuery = new BabyPatientExtendEarFamilyQuery();
  282 + familyQuery.setBabyPatientId(babyPatientId);
  283 + List<BabyPatientExtendEarFamily> babyPatientExtendEarFamilies = babyPatientExtendEarFamilyService.queryBabyPatientExtendEarFamily(familyQuery);
  284 + if(CollectionUtils.isNotEmpty(babyPatientExtendEarFamilies)){
  285 + BabyPatientExtendEarFamily babyPatientExtendEarFamily1 = babyPatientExtendEarFamilies.get(0);
  286 + babyPatientExtendEarFamily.setId(babyPatientExtendEarFamily1.getId());
  287 + babyPatientExtendEarFamilyService.updateBabyPatientExtendEarFamily(babyPatientExtendEarFamily);
  288 + }else{
260 289 babyPatientExtendEarFamily.setId(UUID.randomUUID().toString().replace("-", ""));
261 290 babyPatientExtendEarFamilyService.addBabyPatientExtendEarFamily(babyPatientExtendEarFamily);
262   - } else {
263   - babyPatientExtendEarFamilyService.updateBabyPatientExtendEarFamily(babyPatientExtendEarFamily);
264 291 }
265   - //判断是否是新增
266   - if (StringUtils.isEmpty(babyPatientExtendEarMother.getId())) {
  292 +
  293 + BabyPatientExtendEarMotherQuery motherQuery = new BabyPatientExtendEarMotherQuery();
  294 + motherQuery.setBabyPatientId(babyPatientId);
  295 + List<BabyPatientExtendEarMother> babyPatientExtendEarMothers = babyPatientExtendEarMotherService.queryBabyPatientExtendEarMother(motherQuery);
  296 + if(CollectionUtils.isNotEmpty(babyPatientExtendEarMothers)){
  297 + BabyPatientExtendEarMother babyPatientExtendEarMother1 = babyPatientExtendEarMothers.get(0);
  298 + babyPatientExtendEarMother.setId(babyPatientExtendEarMother1.getId());
  299 + babyPatientExtendEarMotherService.updateBabyPatientExtendEarMother(babyPatientExtendEarMother);
  300 + }else {
267 301 babyPatientExtendEarMother.setId(UUID.randomUUID().toString().replace("-", ""));
268 302 babyPatientExtendEarMotherService.addBabyPatientExtendEarMother(babyPatientExtendEarMother);
269   - } else {
270   - babyPatientExtendEarMotherService.updateBabyPatientExtendEarMother(babyPatientExtendEarMother);
271 303 }
272 304 }
273 305 return RespBuilder.buildSuccess(baby.getId());
... ... @@ -295,7 +327,7 @@
295 327 babyEarBase.setBarCode(babyPatientExtendEar.getBarCode());
296 328 babyEarBase.setCreateUserId(babyPatientExtendEar.getCreateUserId());
297 329 //母亲孕期高危因素
298   - if(babyPatientExtendEar.getmHighRiskFactorId()!=null){
  330 + if (babyPatientExtendEar.getmHighRiskFactorId() != null) {
299 331  
300 332 String[] highFactors = babyPatientExtendEar.getmHighRiskFactorId().split(",");
301 333 List<String> ids = Arrays.asList(highFactors);
302 334  
... ... @@ -305,15 +337,15 @@
305 337 babyEarBase.setmHighRiskFactorList(checkList);
306 338 }
307 339 //听力高危因素
308   - if(babyPatientExtendEar.getHighRiskCause()!=null){
  340 + if (babyPatientExtendEar.getHighRiskCause() != null) {
309 341 List highArr = new ArrayList();
310 342 String[] highFactors = babyPatientExtendEar.getHighRiskCause().split(",");
311 343 for (String hf : highFactors) {
312 344 if (StringUtils.isNotEmpty(hf)) {
313 345 String name = HighRiskEnum.getTitle(Integer.parseInt(hf));
314 346 JSONObject confiJo = new JSONObject();
315   - confiJo.put("id",hf);
316   - confiJo.put("name",name);
  347 + confiJo.put("id", hf);
  348 + confiJo.put("name", name);
317 349 highArr.add(confiJo);
318 350 }
319 351 }
... ... @@ -357,6 +389,7 @@
357 389  
358 390 /**
359 391 * 查看页面儿童听筛建档
  392 + *
360 393 * @param babyId
361 394 */
362 395 public BaseResponse getBabyEarInfo(String babyId) {
... ... @@ -450,6 +483,7 @@
450 483  
451 484 /**
452 485 * 儿童出生信息-数据转换
  486 + *
453 487 * @param babyPatientExtendEarFamily 儿童家庭信息
454 488 * @return
455 489 */
... ... @@ -459,8 +493,8 @@
459 493 babyEarFamilyView.setBadLifeHistory(babyPatientExtendEarFamily.getBadLifeHistory());
460 494  
461 495 String deafType = "无";
462   - if(babyPatientExtendEarFamily.getDeafType()!=null){
463   - if(babyPatientExtendEarFamily.getDeafType()==1){
  496 + if (babyPatientExtendEarFamily.getDeafType() != null) {
  497 + if (babyPatientExtendEarFamily.getDeafType() == 1) {
464 498 deafType = "有";
465 499 }
466 500 }
... ... @@ -468,8 +502,8 @@
468 502 babyEarFamilyView.setDeafType(deafType);
469 503 babyEarFamilyView.setDeatRelationship(babyPatientExtendEarFamily.getDeatRelationship());
470 504 String proximityType = "无";
471   - if(babyPatientExtendEarFamily.getProximityType()!=null){
472   - if(babyPatientExtendEarFamily.getProximityType()==1){
  505 + if (babyPatientExtendEarFamily.getProximityType() != null) {
  506 + if (babyPatientExtendEarFamily.getProximityType() == 1) {
473 507 proximityType = "有";
474 508 }
475 509 }
476 510  
... ... @@ -478,8 +512,10 @@
478 512 babyEarFamilyView.setProximityRelationship(babyPatientExtendEarFamily.getProximityRelationship());
479 513 return babyEarFamilyView;
480 514 }
  515 +
481 516 /**
482 517 * 儿童出生信息-数据转换
  518 + *
483 519 * @param babyPatientExtendEarMother 母亲妊娠信息
484 520 * @return
485 521 */
486 522  
487 523  
488 524  
489 525  
490 526  
491 527  
492 528  
493 529  
494 530  
... ... @@ -497,33 +533,35 @@
497 533 babyEarMotherView.setBnormalPregnancyHistoryType(babyPatientExtendEarMother.getBnormalPregnancyHistoryType());
498 534 return babyEarMotherView;
499 535 }
  536 +
500 537 /**
501 538 * 儿童出生信息-数据转换
  539 + *
502 540 * @param babyPatientExtendEarBirth 儿童出生信息
503 541 * @return
504 542 */
505 543 public BabyEarBirthView convertToBabyEarBirthView(BabyPatientExtendEarBirth babyPatientExtendEarBirth) {
506 544 BabyEarBirthView babyEarBirthView = new BabyEarBirthView();
507   - babyEarBirthView.setFetuNumber(babyPatientExtendEarBirth.getFetuNumber()+"");
508   - babyEarBirthView.setProductNumber(babyPatientExtendEarBirth.getProductNumber()+"");
  545 + babyEarBirthView.setFetuNumber(babyPatientExtendEarBirth.getFetuNumber() + "");
  546 + babyEarBirthView.setProductNumber(babyPatientExtendEarBirth.getProductNumber() + "");
509 547 babyEarBirthView.setBirthWeight(babyPatientExtendEarBirth.getBirthWeight());
510   - babyEarBirthView.setProductNumber(babyPatientExtendEarBirth.getProductNumber()+"");
  548 + babyEarBirthView.setProductNumber(babyPatientExtendEarBirth.getProductNumber() + "");
511 549 babyEarBirthView.setBirthWeight(babyPatientExtendEarBirth.getBirthWeight());
512   - babyEarBirthView.setParturitionType(babyPatientExtendEarBirth.getParturitionType()+"");
  550 + babyEarBirthView.setParturitionType(babyPatientExtendEarBirth.getParturitionType() + "");
513 551 babyEarBirthView.setTireNumber(babyPatientExtendEarBirth.getTireNumber());
514 552 babyEarBirthView.setBirthDefectDesc(babyPatientExtendEarBirth.getBirthDefectDesc());
515 553 babyEarBirthView.setBirthInjuryPosition(babyPatientExtendEarBirth.getBirthInjuryPosition());
516   - babyEarBirthView.setAmnioticFluid(babyPatientExtendEarBirth.getAmnioticFluidType()+"");
  554 + babyEarBirthView.setAmnioticFluid(babyPatientExtendEarBirth.getAmnioticFluidType() + "");
517 555 String parturitType = "无";
518   - if(babyPatientExtendEarBirth.getAbnormalParturitionType()!=null){
519   - if(babyPatientExtendEarBirth.getAbnormalParturitionType() == 1){//有
  556 + if (babyPatientExtendEarBirth.getAbnormalParturitionType() != null) {
  557 + if (babyPatientExtendEarBirth.getAbnormalParturitionType() == 1) {//有
520 558 parturitType = "有";
521   - if(babyPatientExtendEarBirth.getAbnormalParturitionPosition()!=null){//异常分娩部位 1=臀部 2=脐带绕颈 3=胎膜早破
522   - if(babyPatientExtendEarBirth.getAbnormalParturitionPosition() == 1){
  559 + if (babyPatientExtendEarBirth.getAbnormalParturitionPosition() != null) {//异常分娩部位 1=臀部 2=脐带绕颈 3=胎膜早破
  560 + if (babyPatientExtendEarBirth.getAbnormalParturitionPosition() == 1) {
523 561 parturitType = "有(臀部)";
524   - }else if(babyPatientExtendEarBirth.getAbnormalParturitionPosition() == 2){
  562 + } else if (babyPatientExtendEarBirth.getAbnormalParturitionPosition() == 2) {
525 563 parturitType = "有(脐带绕颈)";
526   - }else if(babyPatientExtendEarBirth.getAbnormalParturitionPosition() == 3){
  564 + } else if (babyPatientExtendEarBirth.getAbnormalParturitionPosition() == 3) {
527 565 parturitType = "有(胎膜早破)";
528 566 }
529 567 }
530 568  
531 569  
532 570  
533 571  
534 572  
535 573  
536 574  
537 575  
... ... @@ -531,46 +569,46 @@
531 569 }
532 570 babyEarBirthView.setAbnormalParturition(parturitType);
533 571 String fetuStr = "无";
534   - if(babyPatientExtendEarBirth.getFetuEmbarrasType()!=null){
535   - if(babyPatientExtendEarBirth.getFetuEmbarrasType()==1){//有
  572 + if (babyPatientExtendEarBirth.getFetuEmbarrasType() != null) {
  573 + if (babyPatientExtendEarBirth.getFetuEmbarrasType() == 1) {//有
536 574 fetuStr = "有";
537 575 }
538 576 }
539 577 babyEarBirthView.setFetuEmbarras(fetuStr);
540 578  
541   - String apgarScore = babyPatientExtendEarBirth.getApgarScoreOne()+"-"+babyPatientExtendEarBirth.getApgarScoreFive()+"-"+babyPatientExtendEarBirth.getApgarScoreTen();
542   - if(babyPatientExtendEarBirth.getFetuEmbarras()!=null&&babyPatientExtendEarBirth.getFetuEmbarras()==1){
543   - apgarScore+="不详";
  579 + String apgarScore = babyPatientExtendEarBirth.getApgarScoreOne() + "-" + babyPatientExtendEarBirth.getApgarScoreFive() + "-" + babyPatientExtendEarBirth.getApgarScoreTen();
  580 + if (babyPatientExtendEarBirth.getFetuEmbarras() != null && babyPatientExtendEarBirth.getFetuEmbarras() == 1) {
  581 + apgarScore += "不详";
544 582 }
545 583 babyEarBirthView.setApgarScore(apgarScore);
546 584  
547 585  
548 586 String deformity = "无";
549   - if(babyPatientExtendEarBirth.getDeformityType()!=null&&babyPatientExtendEarBirth.getDeformityType()==1){
  587 + if (babyPatientExtendEarBirth.getDeformityType() != null && babyPatientExtendEarBirth.getDeformityType() == 1) {
550 588 deformity = "有";
551   - if(babyPatientExtendEarBirth.getDeformityPosition()!=null){
552   - deformity="有("+babyPatientExtendEarBirth.getDeformityPosition()+")";
  589 + if (babyPatientExtendEarBirth.getDeformityPosition() != null) {
  590 + deformity = "有(" + babyPatientExtendEarBirth.getDeformityPosition() + ")";
553 591 }
554 592 }
555 593  
556 594 babyEarBirthView.setDeformity(deformity);
557 595 String headTraumaHistory = "无";
558   - if(babyPatientExtendEarBirth.getHeadTraumaHistory()!=null&&babyPatientExtendEarBirth.getHeadTraumaHistory()==1){
  596 + if (babyPatientExtendEarBirth.getHeadTraumaHistory() != null && babyPatientExtendEarBirth.getHeadTraumaHistory() == 1) {
559 597 headTraumaHistory = "有";
560   - if(babyPatientExtendEarBirth.getHeadTraumaDesc()!=null){
561   - headTraumaHistory="有("+babyPatientExtendEarBirth.getHeadTraumaDesc()+")";
  598 + if (babyPatientExtendEarBirth.getHeadTraumaDesc() != null) {
  599 + headTraumaHistory = "有(" + babyPatientExtendEarBirth.getHeadTraumaDesc() + ")";
562 600 }
563 601 }
564   -
  602 + babyEarBirthView.setHeadTraumaDesc(headTraumaHistory);
565 603 String birthInfection = "无";
566   - if(babyPatientExtendEarBirth.getBirthInfectionType()!=null&&babyPatientExtendEarBirth.getBirthInfectionType()==1){
  604 + if (babyPatientExtendEarBirth.getBirthInfectionType() != null && babyPatientExtendEarBirth.getBirthInfectionType() == 1) {
567 605 birthInfection = "有";
568 606 }
569 607 babyEarBirthView.setBirthInfectionType(birthInfection);
570 608 babyEarBirthView.setBirthInfectionCause(babyPatientExtendEarBirth.getBirthInfectionCause());
571 609 babyEarBirthView.setBirthCourseDisease(babyPatientExtendEarBirth.getBirthCourseDisease());
572 610 String birthIllType = "无";
573   - if(babyPatientExtendEarBirth.getBirthIllType()!=null&&babyPatientExtendEarBirth.getBirthIllType()==1){
  611 + if (babyPatientExtendEarBirth.getBirthIllType() != null && babyPatientExtendEarBirth.getBirthIllType() == 1) {
574 612 birthIllType = "有";
575 613 }
576 614 babyEarBirthView.setBirthIllType(birthIllType);
577 615  
578 616  
579 617  
580 618  
581 619  
... ... @@ -578,32 +616,42 @@
578 616 babyEarBirthView.setBirthIllCause(babyPatientExtendEarBirth.getBirthIllCause());
579 617 babyEarBirthView.setBirthIllDisease(babyPatientExtendEarBirth.getBirthIllDisease());
580 618 String earPoisonType = "无";
581   - if(babyPatientExtendEarBirth.getEarPoisonType()!=null&&babyPatientExtendEarBirth.getEarPoisonType()==1){
  619 + if (babyPatientExtendEarBirth.getEarPoisonType() != null && babyPatientExtendEarBirth.getEarPoisonType() == 1) {
582 620 earPoisonType = "有";
583 621 }
584 622 babyEarBirthView.setEarPoisonType(earPoisonType);
585 623  
586 624 babyEarBirthView.setEarPoison(babyPatientExtendEarBirth.getEarPoisonMap());
587   - babyEarBirthView.setTympanitisDesc(babyPatientExtendEarBirth.getTympanitisDesc());
  625 +
  626 + String tympanitisType = "无";
  627 + if (babyPatientExtendEarBirth.getNicuType() != null && babyPatientExtendEarBirth.getNicuType() == 1) {
  628 + tympanitisType = "有";
  629 + if (babyPatientExtendEarBirth.getTympanitisDesc() != null) {
  630 + tympanitisType = "有" + babyPatientExtendEarBirth.getTympanitisDesc();
  631 + }
  632 + }
  633 +
  634 + babyEarBirthView.setTympanitisDesc(tympanitisType);
  635 +
588 636 String nicuType = "无";
589   - if(babyPatientExtendEarBirth.getNicuType()!=null&&babyPatientExtendEarBirth.getNicuType()==1){
  637 + if (babyPatientExtendEarBirth.getNicuType() != null && babyPatientExtendEarBirth.getNicuType() == 1) {
590 638 nicuType = "有";
591 639 }
592 640 babyEarBirthView.setNicuType(nicuType);
593 641 babyEarBirthView.setNicuCause(babyPatientExtendEarBirth.getNicuCause());
594 642 babyEarBirthView.setNicuContinuedDate(babyPatientExtendEarBirth.getNicuContinuedDate());
595 643 String respiratorType = "无";
596   - if(babyPatientExtendEarBirth.getRespiratorType()!=null&&babyPatientExtendEarBirth.getRespiratorType()==1){
  644 + if (babyPatientExtendEarBirth.getRespiratorType() != null && babyPatientExtendEarBirth.getRespiratorType() == 1) {
597 645 respiratorType = "有";
598 646 }
599 647 babyEarBirthView.setRespiratorType(respiratorType);
600 648  
601 649 babyEarBirthView.setRespiratorContinuedDate(babyPatientExtendEarBirth.getRespiratorContinuedDate());
602 650 String outsideResponse = "";
603   - if(babyPatientExtendEarBirth.getOutsideResponse()!=null){
604   - if(babyPatientExtendEarBirth.getOutsideResponse()==1){
  651 + if (babyPatientExtendEarBirth.getOutsideResponse() != null) {
  652 + if (babyPatientExtendEarBirth.getOutsideResponse() == 1) {
605 653 outsideResponse = "灵敏";
606   - }else{
  654 + } else {
607 655 outsideResponse = "迟钝";
608 656 }
609 657 }
610 658  
... ... @@ -612,8 +660,10 @@
612 660 babyEarBirthView.setOutsideResponse(outsideResponse);
613 661 return babyEarBirthView;
614 662 }
  663 +
615 664 /**
616 665 * 儿童基础-数据转换
  666 + *
617 667 * @param babyEarBase
618 668 * @return
619 669 */
... ... @@ -658,7 +708,6 @@
658 708 }
659 709  
660 710  
661   -
662 711 private String getBasicConfig(String id) {
663 712 if (com.lyms.platform.common.utils.StringUtils.isEmpty(id)) {
664 713 return "";
... ... @@ -723,7 +772,7 @@
723 772 query.setBabyId(babyId);
724 773 query.setStatus(0);
725 774 query.setSort("create_date");
726   - List<BabyPatientExtendEarScreen> babyPatientExtendEarScreens = babyPatientExtendEarScreenService.queryBabyPatientExtendEarScreen(query);
  775 + List<BabyPatientExtendEarScreen> babyPatientExtendEarScreens = babyPatientExtendEarScreenService.queryBabyPatientExtendEarScreen(query);
727 776  
728 777  
729 778 List<Map<String, String>> list = new ArrayList<>();
... ... @@ -748,7 +797,7 @@
748 797 data.put("screenTypeStr", babyPatientExtendEarScreen.getScreenType() == 1 ? "初筛" : "复筛");//1= 2=
749 798 data.put("screenType", babyPatientExtendEarScreen.getScreenType());
750 799 data.put("checkHospitalId", babyPatientExtendEarScreen.getCheckHospitalId());
751   - if(babyPatientExtendEarScreen.getCheckHospitalId()!=null){
  800 + if (babyPatientExtendEarScreen.getCheckHospitalId() != null) {
752 801 data.put("checkHospital", organizationService.getOrganization(Integer.valueOf(babyPatientExtendEarScreen.getCheckHospitalId())).getName());
753 802 }
754 803 data.put("screenDate", DateUtil.getYyyyMmDd(babyPatientExtendEarScreen.getScreenDate()));
755 804  
756 805  
757 806  
758 807  
759 808  
760 809  
... ... @@ -765,42 +814,42 @@
765 814 String name = HighRiskEnum.getTitle(Integer.parseInt(hf));
766 815 hfBuff.append(name + "、");
767 816 JSONObject confiJo = new JSONObject();
768   - confiJo.put("id",hf);
769   - confiJo.put("name",name);
  817 + confiJo.put("id", hf);
  818 + confiJo.put("name", name);
770 819 highArr.add(confiJo);
771 820 }
772 821 }
773   - data.put("highRiskCauseStr",hfBuff.toString());
  822 + data.put("highRiskCauseStr", hfBuff.toString());
774 823 data.put("highRiskCause", highArr);
775 824 }
776 825 data.put("oaeLeft", babyPatientExtendEarScreen.getOaeLeft());
777   - data.put("oaeLeftStr", BabyEarResultEnums.getTitle(babyPatientExtendEarScreen.getOaeLeft()==null?0:babyPatientExtendEarScreen.getOaeLeft()));
  826 + data.put("oaeLeftStr", BabyEarResultEnums.getTitle(babyPatientExtendEarScreen.getOaeLeft() == null ? 0 : babyPatientExtendEarScreen.getOaeLeft()));
778 827 data.put("oaeRight", babyPatientExtendEarScreen.getOaeRight());
779   - data.put("oaeRightStr", BabyEarResultEnums.getTitle(babyPatientExtendEarScreen.getOaeRight()==null?0:babyPatientExtendEarScreen.getOaeRight()));
  828 + data.put("oaeRightStr", BabyEarResultEnums.getTitle(babyPatientExtendEarScreen.getOaeRight() == null ? 0 : babyPatientExtendEarScreen.getOaeRight()));
780 829 data.put("aabrLeft", babyPatientExtendEarScreen.getAabrLeft());
781   - data.put("aabrLeftStr", BabyEarResultEnums.getTitle(babyPatientExtendEarScreen.getAabrLeft()==null?0:babyPatientExtendEarScreen.getAabrLeft()));
  830 + data.put("aabrLeftStr", BabyEarResultEnums.getTitle(babyPatientExtendEarScreen.getAabrLeft() == null ? 0 : babyPatientExtendEarScreen.getAabrLeft()));
782 831 data.put("aabrRight", babyPatientExtendEarScreen.getAabrRight());
783   - data.put("aabrRightStr", BabyEarResultEnums.getTitle(babyPatientExtendEarScreen.getAabrRight()==null?0:babyPatientExtendEarScreen.getAabrRight()));
784   - data.put("gjb2Del35", babyPatientExtendEarScreen.getGjb2Del35()+"");
785   - data.put("gjb2Del35Str", DeafEnums.getTitle(babyPatientExtendEarScreen.getGjb2Del35()==null?0:babyPatientExtendEarScreen.getGjb2Del35()));
786   - data.put("gjb2Del176", babyPatientExtendEarScreen.getGjb2Del176()+"");
787   - data.put("gjb2Del176Str", DeafEnums.getTitle(babyPatientExtendEarScreen.getGjb2Del176()==null?0:babyPatientExtendEarScreen.getGjb2Del176()));
788   - data.put("gjb2Del235", babyPatientExtendEarScreen.getGjb2Del235()+"");
789   - data.put("gjb2Del235Str", DeafEnums.getTitle(babyPatientExtendEarScreen.getGjb2Del235()==null?0:babyPatientExtendEarScreen.getGjb2Del235()));
790   - data.put("gjb2Del299", babyPatientExtendEarScreen.getGjb2Del299()+"");
791   - data.put("gjb2Del299Str", DeafEnums.getTitle(babyPatientExtendEarScreen.getGjb2Del299()==null?0:babyPatientExtendEarScreen.getGjb2Del299()));
792   - data.put("gjb3Slc26a4538", babyPatientExtendEarScreen.getGjb3Slc26a4538()+"");
793   - data.put("gjb3Slc26a4538Str", DeafEnums.getTitle(babyPatientExtendEarScreen.getGjb3Slc26a4538()==null?0:babyPatientExtendEarScreen.getGjb3Slc26a4538()));
794   - data.put("gjb3Slc26a42168", babyPatientExtendEarScreen.getGjb3Slc26a42168()+"");
795   - data.put("gjb3Slc26a42168Str", DeafEnums.getTitle(babyPatientExtendEarScreen.getGjb3Slc26a42168()==null?0:babyPatientExtendEarScreen.getGjb3Slc26a42168()));
796   - data.put("gjb3Slc26a4Ivs7", babyPatientExtendEarScreen.getGjb3Slc26a4Ivs7()+"");
797   - data.put("gjb3Slc26a4Ivs7Str", DeafEnums.getTitle(babyPatientExtendEarScreen.getGjb3Slc26a4Ivs7()==null?0:babyPatientExtendEarScreen.getGjb3Slc26a4Ivs7()));
798   - data.put("rrna1494", babyPatientExtendEarScreen.getRrna1494()+"");
799   - data.put("rrna1494Str", DeafEnums.getTitle(babyPatientExtendEarScreen.getRrna1494()==null?0:babyPatientExtendEarScreen.getRrna1494()));
800   - data.put("rrna1555", babyPatientExtendEarScreen.getRrna1555()+"");
801   - data.put("rrna1555Str", DeafEnums.getTitle(babyPatientExtendEarScreen.getRrna1555()==null?0:babyPatientExtendEarScreen.getRrna1555()));
  832 + data.put("aabrRightStr", BabyEarResultEnums.getTitle(babyPatientExtendEarScreen.getAabrRight() == null ? 0 : babyPatientExtendEarScreen.getAabrRight()));
  833 + data.put("gjb2Del35", babyPatientExtendEarScreen.getGjb2Del35() + "");
  834 + data.put("gjb2Del35Str", DeafEnums.getTitle(babyPatientExtendEarScreen.getGjb2Del35() == null ? 0 : babyPatientExtendEarScreen.getGjb2Del35()));
  835 + data.put("gjb2Del176", babyPatientExtendEarScreen.getGjb2Del176() + "");
  836 + data.put("gjb2Del176Str", DeafEnums.getTitle(babyPatientExtendEarScreen.getGjb2Del176() == null ? 0 : babyPatientExtendEarScreen.getGjb2Del176()));
  837 + data.put("gjb2Del235", babyPatientExtendEarScreen.getGjb2Del235() + "");
  838 + data.put("gjb2Del235Str", DeafEnums.getTitle(babyPatientExtendEarScreen.getGjb2Del235() == null ? 0 : babyPatientExtendEarScreen.getGjb2Del235()));
  839 + data.put("gjb2Del299", babyPatientExtendEarScreen.getGjb2Del299() + "");
  840 + data.put("gjb2Del299Str", DeafEnums.getTitle(babyPatientExtendEarScreen.getGjb2Del299() == null ? 0 : babyPatientExtendEarScreen.getGjb2Del299()));
  841 + data.put("gjb3Slc26a4538", babyPatientExtendEarScreen.getGjb3Slc26a4538() + "");
  842 + data.put("gjb3Slc26a4538Str", DeafEnums.getTitle(babyPatientExtendEarScreen.getGjb3Slc26a4538() == null ? 0 : babyPatientExtendEarScreen.getGjb3Slc26a4538()));
  843 + data.put("gjb3Slc26a42168", babyPatientExtendEarScreen.getGjb3Slc26a42168() + "");
  844 + data.put("gjb3Slc26a42168Str", DeafEnums.getTitle(babyPatientExtendEarScreen.getGjb3Slc26a42168() == null ? 0 : babyPatientExtendEarScreen.getGjb3Slc26a42168()));
  845 + data.put("gjb3Slc26a4Ivs7", babyPatientExtendEarScreen.getGjb3Slc26a4Ivs7() + "");
  846 + data.put("gjb3Slc26a4Ivs7Str", DeafEnums.getTitle(babyPatientExtendEarScreen.getGjb3Slc26a4Ivs7() == null ? 0 : babyPatientExtendEarScreen.getGjb3Slc26a4Ivs7()));
  847 + data.put("rrna1494", babyPatientExtendEarScreen.getRrna1494() + "");
  848 + data.put("rrna1494Str", DeafEnums.getTitle(babyPatientExtendEarScreen.getRrna1494() == null ? 0 : babyPatientExtendEarScreen.getRrna1494()));
  849 + data.put("rrna1555", babyPatientExtendEarScreen.getRrna1555() + "");
  850 + data.put("rrna1555Str", DeafEnums.getTitle(babyPatientExtendEarScreen.getRrna1555() == null ? 0 : babyPatientExtendEarScreen.getRrna1555()));
802 851 data.put("processOptionType", babyPatientExtendEarScreen.getProcessOptionType());//1=复筛 2=诊断
803   - data.put("processOptionTypeStr", babyPatientExtendEarScreen.getProcessOptionType()==null?"初诊":babyPatientExtendEarScreen.getProcessOptionType() == 1 ? "复筛" : "诊断");//1=复筛 2=诊断
  852 + data.put("processOptionTypeStr", babyPatientExtendEarScreen.getProcessOptionType() == null ? "初诊" : babyPatientExtendEarScreen.getProcessOptionType() == 1 ? "复筛" : "诊断");//1=复筛 2=诊断
804 853 data.put("processOptionDesc", babyPatientExtendEarScreen.getProcessOptionDesc());
805 854 data.put("guidOpinion", babyPatientExtendEarScreen.getGuidOpinion());
806 855 data.put("checkDoctorId", babyPatientExtendEarScreen.getCheckDoctorId());
... ... @@ -808,7 +857,7 @@
808 857 data.put("referralDate", DateUtil.getYyyyMmDd(babyPatientExtendEarScreen.getReferralDate()));
809 858 BabyModel babyModel = babyService.getOneBabyById(babyPatientExtendEarScreen.getBabyId());
810 859 if (babyModel != null) {
811   - data.put("monthAge", DateUtil.getBabyMonthAge(babyModel.getBirth(),babyPatientExtendEarScreen.getScreenDate()));
  860 + data.put("monthAge", DateUtil.getBabyMonthAge(babyModel.getBirth(), babyPatientExtendEarScreen.getScreenDate()));
812 861 }
813 862 return data;
814 863 }
... ... @@ -867,7 +916,7 @@
867 916 return baseResponse;
868 917 }
869 918  
870   - public BaseResponse babyEarInit(){
  919 + public BaseResponse babyEarInit() {
871 920 Map map = new HashMap();
872 921 //胎数
873 922 map.put("taishu", InitDataUtils.getTaiShu());
... ... @@ -882,7 +931,7 @@
882 931 map.put("levelType", levelType);
883 932  
884 933 //听力高危因数
885   - map.put("highRiskConfirms", EnumUtil.toJson(HighRiskEnum.class));
  934 + map.put("highRiskConfirms", EnumUtil.toJson(HighRiskEnum.class));
886 935  
887 936 // 职业类别
888 937 List<BasicConfigResult> professionTypeResults = basicConfigFacade.getBaseicConfigByParentId(SystemConfig.PROFESSION_TYPE_ID);
... ... @@ -897,7 +946,7 @@
897 946 map.put("serviceStatus", serviceStatus);
898 947  
899 948 //医院
900   - List hospitals = InitDataUtils.getAbortionEnums();
  949 + List hospitals = InitDataUtils.getAbortionEnums();
901 950 map.put("liuchan", hospitals);
902 951  
903 952 //分娩方式
... ... @@ -909,6 +958,7 @@
909 958 map.put("expType", expType);
910 959 return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION).setData(map);
911 960 }
  961 +
912 962 @Autowired
913 963 private BasicConfigFacade basicConfigFacade;
914 964 @Autowired
... ... @@ -916,6 +966,7 @@
916 966  
917 967 /**
918 968 * 根据查询条件查询听筛列表
  969 + *
919 970 * @param earScreenListRequest
920 971 * @return
921 972 */
... ... @@ -933,7 +984,7 @@
933 984  
934 985 List<BabyPatientExtendEarScreen> babyPatientExtendEarScreens = babyPatientExtendEarScreenService.queryEarScreenList(screenQuery);
935 986 List<EarScreenResult> earScreenResults = new ArrayList<>();
936   - for(BabyPatientExtendEarScreen earScreen : babyPatientExtendEarScreens) {
  987 + for (BabyPatientExtendEarScreen earScreen : babyPatientExtendEarScreens) {
937 988 EarScreenResult screenResult = new EarScreenResult();
938 989 screenResult.setId(earScreen.getId());
939 990 BabyModel babyModel = babyService.getOneBabyById(earScreen.getBabyId());
940 991  
... ... @@ -958,10 +1009,10 @@
958 1009 screenResult.setHighRiskCause(hfBuff.toString());
959 1010 }
960 1011 String srcResult = "通过";
961   - if(earScreen.getAabrLeft()!=null&&earScreen.getAabrLeft()==-1&&earScreen.getOaeLeft()!=null&&earScreen.getOaeLeft()==-1){
  1012 + if (earScreen.getAabrLeft() != null && earScreen.getAabrLeft() == -1 && earScreen.getOaeLeft() != null && earScreen.getOaeLeft() == -1) {
962 1013 srcResult = "不通过";
963 1014 }
964   - if(earScreen.getOaeRight()!=null&&earScreen.getOaeRight()==-1&&earScreen.getAabrRight()!=null&&earScreen.getAabrRight()==-1){
  1015 + if (earScreen.getOaeRight() != null && earScreen.getOaeRight() == -1 && earScreen.getAabrRight() != null && earScreen.getAabrRight() == -1) {
965 1016 srcResult = "不通过";
966 1017 }
967 1018 screenResult.setSrcResult(srcResult);
... ... @@ -981,7 +1032,7 @@
981 1032 pageInfo.setSize(earScreenResults.size());
982 1033 baseResponse.setPageInfo(pageInfo);
983 1034 baseResponse.setErrormsg("成功");
984   - return baseResponse;
  1035 + return baseResponse;
985 1036 }
986 1037 }