Commit ac879c0af6553ec87c77a599f51a751ae60b81e1
1 parent
3f0e459543
Exists in
master
and in
6 other branches
听力诊断模块
Showing 9 changed files with 122 additions and 13 deletions
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarQuery.java
- platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEar.xml
- platform-common/src/main/java/com/lyms/platform/common/enums/FmTypeEnums.java
- platform-common/src/main/java/com/lyms/platform/common/enums/HdEnums.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/EarController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FollowUpController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearDiagnManageController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearingDiagnoseController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java
platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarQuery.java
View file @
ac879c0
| ... | ... | @@ -18,6 +18,7 @@ |
| 18 | 18 | private Date createDate; |
| 19 | 19 | |
| 20 | 20 | private String createHospitalId; |
| 21 | + private String[] createHospitalIds; | |
| 21 | 22 | |
| 22 | 23 | private Date lastUpdateDate; |
| 23 | 24 | |
| ... | ... | @@ -50,6 +51,14 @@ |
| 50 | 51 | private String createUserId; |
| 51 | 52 | //条码 |
| 52 | 53 | private String barCode; |
| 54 | + | |
| 55 | + public String[] getCreateHospitalIds() { | |
| 56 | + return createHospitalIds; | |
| 57 | + } | |
| 58 | + | |
| 59 | + public void setCreateHospitalIds(String[] createHospitalIds) { | |
| 60 | + this.createHospitalIds = createHospitalIds; | |
| 61 | + } | |
| 53 | 62 | |
| 54 | 63 | public void setId(String id) { |
| 55 | 64 | this.id = id; |
platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEar.xml
View file @
ac879c0
| ... | ... | @@ -115,6 +115,13 @@ |
| 115 | 115 | <if test="createHospitalId != null and createHospitalId != ''"> |
| 116 | 116 | and create_hospital_id = #{createHospitalId,jdbcType=VARCHAR} |
| 117 | 117 | </if> |
| 118 | + <if test="createHospitalIds != null"> | |
| 119 | + and create_hospital_id in | |
| 120 | + <foreach item="item" index="index" collection="createHospitalIds" open="(" separator="," close=")"> | |
| 121 | + #{item} | |
| 122 | + </foreach> | |
| 123 | + </if> | |
| 124 | + | |
| 118 | 125 | <if test="lastUpdateDate != null"> |
| 119 | 126 | and last_update_date = #{lastUpdateDate,jdbcType=TIMESTAMP} |
| 120 | 127 | </if> |
platform-common/src/main/java/com/lyms/platform/common/enums/FmTypeEnums.java
View file @
ac879c0
| ... | ... | @@ -122,6 +122,61 @@ |
| 122 | 122 | return null; |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | + public static List<Map> getHdFmEnums() { | |
| 126 | + List<Map> list = new ArrayList<>(); | |
| 127 | + for (HdFmEnums e : HdFmEnums.values()) { | |
| 128 | + Map rootMap = new HashMap(); | |
| 129 | + rootMap.put("id", e.getId()); | |
| 130 | + rootMap.put("name", e.getName()); | |
| 131 | + list.add(rootMap); | |
| 132 | + } | |
| 133 | + return list; | |
| 134 | + } | |
| 135 | + public enum HdFmEnums{ | |
| 136 | + O("顺产", "1"), | |
| 137 | + O1("早产", "2"), | |
| 138 | + O2("足月产", "3"), | |
| 139 | + O3("过期产", "4"), | |
| 140 | + O4("负压吸引", "5"), | |
| 141 | + O5("产钳", "6"), | |
| 142 | + O6("剖宫产", "7"); | |
| 143 | + | |
| 144 | + private HdFmEnums(String name,String id) { | |
| 145 | + this.id = id; | |
| 146 | + this.name = name; | |
| 147 | + } | |
| 148 | + | |
| 149 | + private String id; | |
| 150 | + private String name; | |
| 151 | + | |
| 152 | + public String getId() { | |
| 153 | + return id; | |
| 154 | + } | |
| 155 | + | |
| 156 | + public void setId(String id) { | |
| 157 | + this.id = id; | |
| 158 | + } | |
| 159 | + | |
| 160 | + public String getName() { | |
| 161 | + return name; | |
| 162 | + } | |
| 163 | + | |
| 164 | + public void setName(String name) { | |
| 165 | + this.name = name; | |
| 166 | + } | |
| 167 | + } | |
| 168 | + | |
| 169 | + public static String getHdFmNameById(String id) | |
| 170 | + { | |
| 171 | + for (HdFmEnums e : HdFmEnums.values()) { | |
| 172 | + if (e.getId().equals(id)) | |
| 173 | + { | |
| 174 | + return e.getName(); | |
| 175 | + } | |
| 176 | + } | |
| 177 | + return null; | |
| 178 | + } | |
| 179 | + | |
| 125 | 180 | public enum FmScEnums { |
| 126 | 181 | |
| 127 | 182 | O("自然娩出", "1"), |
platform-common/src/main/java/com/lyms/platform/common/enums/HdEnums.java
View file @
ac879c0
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/EarController.java
View file @
ac879c0
| ... | ... | @@ -11,6 +11,7 @@ |
| 11 | 11 | import com.lyms.platform.common.utils.EnumUtil; |
| 12 | 12 | import com.lyms.platform.common.utils.StringUtils; |
| 13 | 13 | import com.lyms.platform.operate.web.facade.AutoMatchFacade; |
| 14 | +import com.lyms.platform.operate.web.facade.BabyEarFacade; | |
| 14 | 15 | import com.lyms.platform.operate.web.result.*; |
| 15 | 16 | import com.lyms.platform.permission.model.*; |
| 16 | 17 | import com.lyms.platform.permission.service.*; |
| ... | ... | @@ -54,6 +55,8 @@ |
| 54 | 55 | //获取医院信息 |
| 55 | 56 | @Autowired |
| 56 | 57 | private AutoMatchFacade autoMatchFacade; |
| 58 | + @Autowired | |
| 59 | + private BabyEarFacade babyEarFacade; | |
| 57 | 60 | |
| 58 | 61 | /** |
| 59 | 62 | * 检测儿童是否能够随访 |
| ... | ... | @@ -131,7 +134,7 @@ |
| 131 | 134 | } |
| 132 | 135 | |
| 133 | 136 | /** |
| 134 | - * 检测儿童是否能够随访 | |
| 137 | + * 检测儿童是否能够听筛 | |
| 135 | 138 | * |
| 136 | 139 | * @param babyId 儿童档案id |
| 137 | 140 | * @return |
| 138 | 141 | |
| 139 | 142 | |
| 140 | 143 | |
| ... | ... | @@ -139,15 +142,29 @@ |
| 139 | 142 | @RequestMapping(method = RequestMethod.GET, value = "/checkBabySrccen") |
| 140 | 143 | @ResponseBody |
| 141 | 144 | @TokenRequired |
| 142 | - public BaseResponse checkBabySrccen(String babyId) { | |
| 145 | + public BaseResponse checkBabySrccen(String babyId, HttpServletRequest request) { | |
| 143 | 146 | |
| 147 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
| 148 | + if (loginState == null) { | |
| 149 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.TOKEN_EXPIRE).setErrormsg("请重新登录"); | |
| 150 | + } | |
| 151 | + | |
| 152 | + | |
| 144 | 153 | if (StringUtils.isEmpty(babyId)) {//传入儿童档案id |
| 145 | 154 | return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("请传入儿童档案id"); |
| 146 | 155 | } |
| 156 | + | |
| 157 | + | |
| 147 | 158 | //查询儿童听力基础信息 |
| 148 | 159 | //根据babyId查询是否存 |
| 149 | 160 | BabyPatientExtendEarQuery earQuery = new BabyPatientExtendEarQuery(); |
| 150 | 161 | earQuery.setBabyPatientId(babyId); |
| 162 | + //当前登录人医院Id | |
| 163 | + String hospitalId = autoMatchFacade.getHospitalId(loginState.getId()); | |
| 164 | + //获取院内医院集合 | |
| 165 | + List hospiIds = babyEarFacade.getOrgHospitalIds(hospitalId); | |
| 166 | + earQuery.setCreateHospitalIds((String[]) hospiIds.toArray(new String[hospiIds.size()])); | |
| 167 | + | |
| 151 | 168 | List<BabyPatientExtendEar> babyPatientExtendEars = babyPatientExtendEarService.queryBabyPatientExtendEar(earQuery); |
| 152 | 169 | //是否听力建档 |
| 153 | 170 | if(CollectionUtils.isEmpty(babyPatientExtendEars)){ |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FollowUpController.java
View file @
ac879c0
| ... | ... | @@ -515,11 +515,15 @@ |
| 515 | 515 | String hospitalId = autoMatchFacade.getHospitalId(loginState.getId()); |
| 516 | 516 | obj.setId(UUID.randomUUID().toString().replace("-", "")); |
| 517 | 517 | obj.setIfdel(0); |
| 518 | - obj.setIfclose(0);//是否结案 | |
| 518 | + //obj.setIfclose(0);//是否结案 | |
| 519 | 519 | obj.setCreateTime(new Date()); |
| 520 | 520 | obj.setCreateId(String.valueOf(loginState.getId())); |
| 521 | 521 | obj.setHospitalId(hospitalId); |
| 522 | 522 | obj.setEnalble(1); |
| 523 | + | |
| 524 | + //听力筛查-当某个儿童在同一院组内某家医院完成了的听筛建档后去院组内其他医院做了听筛、听诊或随访,应该要在对应的医院下创建一个隐藏档案 | |
| 525 | + //建立隐藏档案 | |
| 526 | + babyEarFacade.addhideBabyEar(obj.getBabyId(),hospitalId); | |
| 523 | 527 | |
| 524 | 528 | babyPatientExtendEarFollowUpService.addBabyPatientExtendEarFollowUp(obj); |
| 525 | 529 | BaseResponse result = new BaseResponse(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearDiagnManageController.java
View file @
ac879c0
| ... | ... | @@ -501,9 +501,12 @@ |
| 501 | 501 | HearDiagnManageListResult hdm = new HearDiagnManageListResult(); |
| 502 | 502 | hdm.setId(es.getId()); |
| 503 | 503 | String docotorId = es.getCheckDoctorId(); |
| 504 | - Users users = usersService.getUsers(Integer.parseInt(docotorId == null ? "0" : docotorId)); | |
| 505 | - if (users != null) { | |
| 506 | - hdm.setDoctorName(users.getName() == null ? "-" : users.getName()); | |
| 504 | + if(StringUtils.isNotEmpty(docotorId)) | |
| 505 | + { | |
| 506 | + Users users = usersService.getUsers(Integer.parseInt(docotorId == null ? "0" : docotorId)); | |
| 507 | + if (users != null) { | |
| 508 | + hdm.setDoctorName(users.getName() == null ? "-" : users.getName()); | |
| 509 | + } | |
| 507 | 510 | } |
| 508 | 511 | hdm.setSecrTime(DateUtil.getyyyy_MM_dd(es.getScreenDate())); |
| 509 | 512 | BabyModel babyModel = babyService.getOneBabyById(es.getBabyId()); |
| ... | ... | @@ -824,7 +827,7 @@ |
| 824 | 827 | } |
| 825 | 828 | |
| 826 | 829 | /** |
| 827 | - * 获取听力可疑儿童列表(听力筛查表,当前医院的复诊未通过的数据) | |
| 830 | + * 获取全部儿童列表(听力筛查表,当前医院的复诊未通过的数据) | |
| 828 | 831 | * |
| 829 | 832 | * @param request |
| 830 | 833 | * @return |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearingDiagnoseController.java
View file @
ac879c0
| ... | ... | @@ -369,8 +369,6 @@ |
| 369 | 369 | } |
| 370 | 370 | } |
| 371 | 371 | |
| 372 | - | |
| 373 | - | |
| 374 | 372 | scrQuery.setCheckHospitalIds((String[]) outOrgids.toArray(new String[outOrgids.size()])); |
| 375 | 373 | if(scrQuery.getCheckHospitalIds()==null||scrQuery.getCheckHospitalIds().length==0){ |
| 376 | 374 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("没有找到数据"); |
| ... | ... | @@ -739,6 +737,9 @@ |
| 739 | 737 | babyEarFacade.showBabyEar(obj.getBabyId()); |
| 740 | 738 | } |
| 741 | 739 | } |
| 740 | + //听力筛查-当某个儿童在同一院组内某家医院完成了的听筛建档后去院组内其他医院做了听筛、听诊或随访,应该要在对应的医院下创建一个隐藏档案 | |
| 741 | + //建立隐藏档案 | |
| 742 | + babyEarFacade.addhideBabyEar(obj.getBabyId(),hospitalId); | |
| 742 | 743 | |
| 743 | 744 | BaseResponse result = new BaseResponse(); |
| 744 | 745 | result.setErrorcode(ErrorCodeConstants.SUCCESS); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java
View file @
ac879c0
| ... | ... | @@ -97,7 +97,6 @@ |
| 97 | 97 | private OrganizationGroupsFacade groupsFacade; |
| 98 | 98 | @Autowired |
| 99 | 99 | private BabyBookbuildingService babyBookbuildingService; |
| 100 | - | |
| 101 | 100 | //处理儿童person信息 |
| 102 | 101 | private PersonModel handBabyPerson(BabyModel baby) { |
| 103 | 102 | //跟距母親的證件號查詢兒童person信息 |
| ... | ... | @@ -180,6 +179,7 @@ |
| 180 | 179 | // childrenRecordService.addChildrenRecord(childrenRecord); |
| 181 | 180 | }*/ |
| 182 | 181 | |
| 182 | + | |
| 183 | 183 | /** |
| 184 | 184 | * 显示儿童隐藏建档 |
| 185 | 185 | * |
| ... | ... | @@ -225,6 +225,10 @@ |
| 225 | 225 | */ |
| 226 | 226 | public boolean addhideBabyEar(String babyId, String hospitalId) { |
| 227 | 227 | |
| 228 | + if(StringUtils.isEmpty(babyId)||StringUtils.isEmpty(hospitalId)){ | |
| 229 | + return false; | |
| 230 | + } | |
| 231 | + | |
| 228 | 232 | BabyModel babyModel = babyService.getOneBabyById(babyId); |
| 229 | 233 | |
| 230 | 234 | //隐藏档案儿童Id |
| ... | ... | @@ -258,6 +262,7 @@ |
| 258 | 262 | if (!newBabyId.equals(babyId)) { |
| 259 | 263 | ear.setId(UUID.randomUUID().toString().replace("-", "")); |
| 260 | 264 | ear.setBabyPatientId(newBabyId); |
| 265 | + ear.setCreateHospitalId(hospitalId); | |
| 261 | 266 | ear.setStatus(YnEnums.NO.getId()); |
| 262 | 267 | babyPatientExtendEarService.addBabyPatientExtendEar(ear); |
| 263 | 268 | |
| ... | ... | @@ -1062,7 +1067,7 @@ |
| 1062 | 1067 | babyEarBirthView.setBirthWeight(babyPatientExtendEarBirth.getBirthWeight()); |
| 1063 | 1068 | babyEarBirthView.setBirthWeight(babyPatientExtendEarBirth.getBirthWeight()); |
| 1064 | 1069 | if (babyPatientExtendEarBirth.getParturitionType() != null) { |
| 1065 | - String parturitionType = FmTypeEnums.getIdByName(babyPatientExtendEarBirth.getParturitionType()); | |
| 1070 | + String parturitionType = FmTypeEnums.getHdFmNameById(babyPatientExtendEarBirth.getParturitionType()); | |
| 1066 | 1071 | babyEarBirthView.setParturitionType(parturitionType); |
| 1067 | 1072 | } |
| 1068 | 1073 | if (babyPatientExtendEarBirth.getAmnioticFluidType() != null) { |
| 1069 | 1074 | |
| ... | ... | @@ -1507,12 +1512,16 @@ |
| 1507 | 1512 | babyPatientExtendEarScreen.setLastUpdateUserId(userId + ""); |
| 1508 | 1513 | babyPatientExtendEarScreen.setLastUpdateHospitalId(hId); |
| 1509 | 1514 | babyPatientExtendEarScreenService.addBabyPatientExtendEarScreen(babyPatientExtendEarScreen); |
| 1515 | + //听力筛查-当某个儿童在同一院组内某家医院完成了的听筛建档后去院组内其他医院做了听筛、听诊或随访,应该要在对应的医院下创建一个隐藏档案 | |
| 1516 | + //建立隐藏档案 | |
| 1517 | + addhideBabyEar(babyPatientExtendEarScreen.getBabyId(),hId); | |
| 1510 | 1518 | } else { |
| 1511 | 1519 | babyPatientExtendEarScreen.setLastUpdateDate(new Date()); |
| 1512 | 1520 | babyPatientExtendEarScreen.setLastUpdateUserId(userId + ""); |
| 1513 | 1521 | babyPatientExtendEarScreen.setLastUpdateHospitalId(hId); |
| 1514 | 1522 | babyPatientExtendEarScreenService.updateBabyPatientExtendEarScreen(babyPatientExtendEarScreen); |
| 1515 | 1523 | } |
| 1524 | + | |
| 1516 | 1525 | } |
| 1517 | 1526 | BaseResponse baseResponse = new BaseResponse(); |
| 1518 | 1527 | baseResponse.setObject(babyPatientExtendEarScreen.getId()); |
| 1519 | 1528 | |
| ... | ... | @@ -1555,8 +1564,12 @@ |
| 1555 | 1564 | map.put("liuchan", hospitals); |
| 1556 | 1565 | |
| 1557 | 1566 | //分娩方式 |
| 1558 | - List fmType = FmTypeEnums.getFmTypeEnums(); | |
| 1567 | + List fmType = FmTypeEnums.getHdFmEnums(); | |
| 1559 | 1568 | map.put("fmType", fmType); |
| 1569 | + | |
| 1570 | + // 民族 | |
| 1571 | + List<BasicConfigResult> nationResults = basicConfigFacade.getBaseicConfigByParentId(SystemConfig.NATION_TYPE_ID); | |
| 1572 | + map.put("nations", nationResults); | |
| 1560 | 1573 | |
| 1561 | 1574 | //体验类型 |
| 1562 | 1575 | List expType = ExpEnums.getExpEnums(); |