Commit 384a358eca21dcfe367c21698fcd19d3525ff406
1 parent
71fb60b9a1
Exists in
master
and in
6 other branches
转诊时显示筛查结果数据
Showing 8 changed files with 78 additions and 90 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/BasicConfigService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntexListResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ApplyOrderOutResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/AntExRecordWorker.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanPatientWorker.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/WorkHR.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/BasicConfigService.java
View file @
384a358
| ... | ... | @@ -30,8 +30,30 @@ |
| 30 | 30 | @Autowired |
| 31 | 31 | private IBasicConfigDao basicConfigDao; |
| 32 | 32 | |
| 33 | - private LoadingCache<String, BasicConfig> cached=null; | |
| 33 | + private LoadingCache<String, BasicConfig> cached = null; | |
| 34 | 34 | |
| 35 | + //获取产检的筛查结果字符串 | |
| 36 | + public String getScreenResult(List<String> screen) { | |
| 37 | + StringBuilder sb = new StringBuilder(56); | |
| 38 | + //筛查结果 | |
| 39 | + if (CollectionUtils.isNotEmpty(screen)) { | |
| 40 | + for (String srt : screen) { | |
| 41 | + if (StringUtils.isNotEmpty(srt)) { | |
| 42 | + BasicConfig basicConfig = getOneBasicConfigById(srt); | |
| 43 | + if (null != basicConfig && sb.indexOf(basicConfig.getName()) == -1) { | |
| 44 | + sb.append(basicConfig.getName()).append(','); | |
| 45 | + } | |
| 46 | + } | |
| 47 | + } | |
| 48 | + if (sb.toString().endsWith(",")) { | |
| 49 | + return sb.substring(0, sb.length() - 1); | |
| 50 | + } else { | |
| 51 | + return sb.toString(); | |
| 52 | + } | |
| 53 | + } | |
| 54 | + return "-"; | |
| 55 | + } | |
| 56 | + | |
| 35 | 57 | public void addBasicConfig(BasicConfig obj) { |
| 36 | 58 | obj.setModifiedDate(System.currentTimeMillis()); |
| 37 | 59 | basicConfigDao.addBasicConfig(obj); |
| 38 | 60 | |
| ... | ... | @@ -74,9 +96,9 @@ |
| 74 | 96 | |
| 75 | 97 | |
| 76 | 98 | public BasicConfig getOneBasicConfigById(String id) { |
| 77 | - try{ | |
| 99 | + try { | |
| 78 | 100 | return cached.get(id); |
| 79 | - }catch (Exception e){ | |
| 101 | + } catch (Exception e) { | |
| 80 | 102 | } |
| 81 | 103 | return basicConfigDao.getOneBasicConfigById(id); |
| 82 | 104 | } |
| ... | ... | @@ -97,7 +119,7 @@ |
| 97 | 119 | public BasicConfig load(String key) throws Exception { |
| 98 | 120 | return basicConfigDao.getOneBasicConfigById(key); |
| 99 | 121 | } |
| 100 | - },400,3); | |
| 122 | + }, 400, 3); | |
| 101 | 123 | } |
| 102 | 124 | |
| 103 | 125 | public BaseObjectResponse getAddressItems(String address) { |
| 104 | 126 | |
| 105 | 127 | |
| 106 | 128 | |
| 107 | 129 | |
| ... | ... | @@ -111,25 +133,21 @@ |
| 111 | 133 | regionsQuery.setTypeId(SystemConfig.CHINA_TYPE_ID); |
| 112 | 134 | regionsQuery.setYn(YnEnums.YES.getId()); |
| 113 | 135 | |
| 114 | - if (items != null && items.size() == 4) | |
| 115 | - { | |
| 136 | + if (items != null && items.size() == 4) { | |
| 116 | 137 | regionsQuery.setOrName(items.get(0)); |
| 117 | 138 | |
| 118 | 139 | List<BasicConfig> provinceList = queryBasicConfig(regionsQuery); |
| 119 | 140 | |
| 120 | - if (CollectionUtils.isNotEmpty(provinceList)) | |
| 121 | - { | |
| 141 | + if (CollectionUtils.isNotEmpty(provinceList)) { | |
| 122 | 142 | regionsQuery = new BasicConfigQuery(); |
| 123 | 143 | regionsQuery.setTypeId(SystemConfig.CHINA_TYPE_ID); |
| 124 | 144 | regionsQuery.setParentId(provinceList.get(0).getId()); |
| 125 | - map.put("provinceId",provinceList.get(0).getId()); | |
| 145 | + map.put("provinceId", provinceList.get(0).getId()); | |
| 126 | 146 | |
| 127 | 147 | List<BasicConfig> cityList = queryBasicConfig(regionsQuery); |
| 128 | - if (CollectionUtils.isNotEmpty(cityList)) | |
| 129 | - { | |
| 148 | + if (CollectionUtils.isNotEmpty(cityList)) { | |
| 130 | 149 | List<String> cityIds = new ArrayList<>(); |
| 131 | - for (BasicConfig basicConfig : cityList) | |
| 132 | - { | |
| 150 | + for (BasicConfig basicConfig : cityList) { | |
| 133 | 151 | cityIds.add(basicConfig.getId()); |
| 134 | 152 | } |
| 135 | 153 | |
| ... | ... | @@ -140,10 +158,9 @@ |
| 140 | 158 | |
| 141 | 159 | |
| 142 | 160 | List<BasicConfig> area = queryBasicConfig(regionsQuery); |
| 143 | - if (CollectionUtils.isNotEmpty(area)) | |
| 144 | - { | |
| 145 | - map.put("cityId",area.get(0).getParentId()); | |
| 146 | - map.put("areaId",area.get(0).getId()); | |
| 161 | + if (CollectionUtils.isNotEmpty(area)) { | |
| 162 | + map.put("cityId", area.get(0).getParentId()); | |
| 163 | + map.put("areaId", area.get(0).getId()); | |
| 147 | 164 | |
| 148 | 165 | |
| 149 | 166 | regionsQuery = new BasicConfigQuery(); |
| 150 | 167 | |
| 151 | 168 | |
| 152 | 169 | |
| 153 | 170 | |
| 154 | 171 | |
| 155 | 172 | |
| ... | ... | @@ -152,57 +169,50 @@ |
| 152 | 169 | regionsQuery.setParentId(area.get(0).getId()); |
| 153 | 170 | |
| 154 | 171 | List<BasicConfig> street = queryBasicConfig(regionsQuery); |
| 155 | - if (CollectionUtils.isNotEmpty(street)) | |
| 156 | - { | |
| 157 | - map.put("streetId",street.get(0).getId()); | |
| 172 | + if (CollectionUtils.isNotEmpty(street)) { | |
| 173 | + map.put("streetId", street.get(0).getId()); | |
| 158 | 174 | } |
| 159 | 175 | |
| 160 | 176 | } |
| 161 | 177 | } |
| 162 | 178 | |
| 163 | 179 | } |
| 164 | - map.put("address", items.get(items.size()-1)); | |
| 165 | - } | |
| 166 | - else if (items != null && items.size() == 5) | |
| 167 | - { | |
| 180 | + map.put("address", items.get(items.size() - 1)); | |
| 181 | + } else if (items != null && items.size() == 5) { | |
| 168 | 182 | regionsQuery.setOrName(items.get(0)); |
| 169 | 183 | |
| 170 | 184 | List<BasicConfig> provinceList = queryBasicConfig(regionsQuery); |
| 171 | - if (CollectionUtils.isNotEmpty(provinceList)) | |
| 172 | - { | |
| 173 | - map.put("provinceId",provinceList.get(0).getId()); | |
| 185 | + if (CollectionUtils.isNotEmpty(provinceList)) { | |
| 186 | + map.put("provinceId", provinceList.get(0).getId()); | |
| 174 | 187 | |
| 175 | 188 | regionsQuery = new BasicConfigQuery(); |
| 176 | 189 | regionsQuery.setParentId(provinceList.get(0).getId()); |
| 177 | 190 | regionsQuery.setOrName(items.get(1)); |
| 178 | 191 | |
| 179 | 192 | List<BasicConfig> cityList = queryBasicConfig(regionsQuery); |
| 180 | - if (CollectionUtils.isNotEmpty(cityList)) | |
| 181 | - { | |
| 182 | - map.put("cityId",cityList.get(0).getId()); | |
| 193 | + if (CollectionUtils.isNotEmpty(cityList)) { | |
| 194 | + map.put("cityId", cityList.get(0).getId()); | |
| 183 | 195 | |
| 184 | 196 | regionsQuery = new BasicConfigQuery(); |
| 185 | 197 | regionsQuery.setTypeId(SystemConfig.CHINA_TYPE_ID); |
| 186 | 198 | regionsQuery.setOrName(items.get(2)); |
| 187 | 199 | regionsQuery.setParentId(cityList.get(0).getId()); |
| 188 | 200 | List<BasicConfig> area = queryBasicConfig(regionsQuery); |
| 189 | - if (CollectionUtils.isNotEmpty(area)) | |
| 190 | - { | |
| 191 | - map.put("areaId",area.get(0).getId()); | |
| 201 | + if (CollectionUtils.isNotEmpty(area)) { | |
| 202 | + map.put("areaId", area.get(0).getId()); | |
| 192 | 203 | regionsQuery = new BasicConfigQuery(); |
| 193 | 204 | regionsQuery.setTypeId(SystemConfig.CHINA_TYPE_ID); |
| 194 | 205 | regionsQuery.setOrName(items.get(3)); |
| 195 | 206 | regionsQuery.setParentId(area.get(0).getId()); |
| 196 | 207 | |
| 197 | 208 | List<BasicConfig> street = queryBasicConfig(regionsQuery); |
| 198 | - if (CollectionUtils.isNotEmpty(street)) | |
| 199 | - { | |
| 200 | - map.put("streetId",street.get(0).getId()); | |
| 209 | + if (CollectionUtils.isNotEmpty(street)) { | |
| 210 | + map.put("streetId", street.get(0).getId()); | |
| 201 | 211 | } |
| 202 | 212 | } |
| 203 | 213 | } |
| 204 | 214 | } |
| 205 | - map.put("address",items.get(items.size()-1)); | |
| 215 | + map.put("address", items.get(items.size() - 1)); | |
| 206 | 216 | } |
| 207 | 217 | BaseObjectResponse objectResponse = new BaseObjectResponse(); |
| 208 | 218 | objectResponse.setData(map); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
384a358
| ... | ... | @@ -2362,9 +2362,12 @@ |
| 2362 | 2362 | if (CollectionUtils.isNotEmpty(configModels) && StringUtils.isNotEmpty(configModels.get(0).getEnable())) { |
| 2363 | 2363 | antexListResult.setEnableConfig(configModels.get(0).getEnable()); |
| 2364 | 2364 | } |
| 2365 | + List<Map<String, Object>> screenList = getscreenResult(patients.getScreenResult()); | |
| 2366 | + antexListResult.setScreenResult(screenList); | |
| 2365 | 2367 | } |
| 2366 | 2368 | return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(antexListResult); |
| 2367 | 2369 | } |
| 2370 | + | |
| 2368 | 2371 | |
| 2369 | 2372 | public List handlAntData(List<AntExChuModel> antExChulist, List<AntenatalExaminationModel> list) { |
| 2370 | 2373 | List<AntData> dataList = new ArrayList<>(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java
View file @
384a358
| ... | ... | @@ -843,7 +843,8 @@ |
| 843 | 843 | } |
| 844 | 844 | applyOrderResult.setrLevel(rLevel); |
| 845 | 845 | Patients patients = patientsService.findOnePatientById(orderModel.getParentId()); |
| 846 | - | |
| 846 | + String screenStr = basicConfigService.getScreenResult(patients.getScreenResult()); | |
| 847 | + applyOrderResult.setScreenResult(screenStr); | |
| 847 | 848 | if (null != patients) { |
| 848 | 849 | applyOrderResult.setIsGravida(patients.getType() == 3 ? "0" : "1"); |
| 849 | 850 | if (1 == patients.getDueStatus()) |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntexListResult.java
View file @
384a358
| ... | ... | @@ -31,7 +31,8 @@ |
| 31 | 31 | private List<String> treatmentOpinion2; |
| 32 | 32 | /** 处理意见 */ |
| 33 | 33 | private String treatmentOpinion2Types; |
| 34 | - | |
| 34 | + //筛查结果 | |
| 35 | + private List<Map<String, Object>> screenResult; | |
| 35 | 36 | private String pid; |
| 36 | 37 | //名字 |
| 37 | 38 | private String name; |
| ... | ... | @@ -71,6 +72,14 @@ |
| 71 | 72 | |
| 72 | 73 | //<!---------基本信息-----------> |
| 73 | 74 | |
| 75 | + | |
| 76 | + public List<Map<String, Object>> getScreenResult() { | |
| 77 | + return screenResult; | |
| 78 | + } | |
| 79 | + | |
| 80 | + public void setScreenResult(List<Map<String, Object>> screenResult) { | |
| 81 | + this.screenResult = screenResult; | |
| 82 | + } | |
| 74 | 83 | |
| 75 | 84 | public String getEnableConfig() { |
| 76 | 85 | return enableConfig; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ApplyOrderOutResult.java
View file @
384a358
| ... | ... | @@ -33,7 +33,8 @@ |
| 33 | 33 | private List<java.util.Map> rLevel; |
| 34 | 34 | //风险因素 |
| 35 | 35 | private String rRisk; |
| 36 | - | |
| 36 | + //筛查结果 | |
| 37 | + private String screenResult; | |
| 37 | 38 | private Integer score = 0; |
| 38 | 39 | //病情描述 |
| 39 | 40 | private String diseaseDesc; |
| ... | ... | @@ -68,6 +69,13 @@ |
| 68 | 69 | //1 孕妇 0 产妇 |
| 69 | 70 | private String isGravida; |
| 70 | 71 | |
| 72 | + public String getScreenResult() { | |
| 73 | + return screenResult; | |
| 74 | + } | |
| 75 | + | |
| 76 | + public void setScreenResult(String screenResult) { | |
| 77 | + this.screenResult = screenResult; | |
| 78 | + } | |
| 71 | 79 | |
| 72 | 80 | public String getIsGravida() { |
| 73 | 81 | return isGravida; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/AntExRecordWorker.java
View file @
384a358
| ... | ... | @@ -15,7 +15,6 @@ |
| 15 | 15 | import com.lyms.platform.pojo.AntExChuModel; |
| 16 | 16 | import com.lyms.platform.pojo.AntExRecordModel; |
| 17 | 17 | import com.lyms.platform.pojo.AntenatalExaminationModel; |
| 18 | -import com.lyms.platform.pojo.BasicConfig; | |
| 19 | 18 | import com.lyms.platform.query.AntExRecordQuery; |
| 20 | 19 | import org.apache.commons.collections.CollectionUtils; |
| 21 | 20 | import org.apache.commons.lang.math.NumberUtils; |
| 22 | 21 | |
| ... | ... | @@ -199,23 +198,9 @@ |
| 199 | 198 | |
| 200 | 199 | //筛查结果 |
| 201 | 200 | List<String> screen = e.getScreenResult(); |
| 202 | - if (CollectionUtils.isNotEmpty(screen)) { | |
| 203 | - StringBuilder sb = new StringBuilder(56); | |
| 204 | - for (String srt : screen) { | |
| 205 | - if (org.apache.commons.lang.StringUtils.isNotEmpty(srt)) { | |
| 206 | - BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(srt); | |
| 207 | - if (null != basicConfig && sb.indexOf(basicConfig.getName()) == -1) { | |
| 208 | - sb.append(basicConfig.getName()).append(','); | |
| 209 | - } | |
| 210 | - } | |
| 211 | - } | |
| 212 | - if (sb.toString().endsWith(",")) { | |
| 213 | - antExManagerResult.setScreenResult(sb.substring(0, sb.length() - 1)); | |
| 214 | - } else { | |
| 215 | - antExManagerResult.setScreenResult(sb.toString()); | |
| 216 | - } | |
| 217 | - } | |
| 218 | 201 | |
| 202 | + String screenStr = basicConfigService.getScreenResult(screen); | |
| 203 | + antExManagerResult.setScreenResult(screenStr); | |
| 219 | 204 | antExManagerResult.setRiskFactor(ri); |
| 220 | 205 | antExManagerResult.setRiskScore((e.gethScore() + score) + ""); |
| 221 | 206 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanPatientWorker.java
View file @
384a358
| ... | ... | @@ -92,23 +92,8 @@ |
| 92 | 92 | } |
| 93 | 93 | } |
| 94 | 94 | //筛查结果 |
| 95 | - List<String> screen = patients.getScreenResult(); | |
| 96 | - if (CollectionUtils.isNotEmpty(screen)) { | |
| 97 | - StringBuilder sb = new StringBuilder(56); | |
| 98 | - for (String srt : screen) { | |
| 99 | - if (StringUtils.isNotEmpty(srt)) { | |
| 100 | - BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(srt); | |
| 101 | - if (null != basicConfig && sb.indexOf(basicConfig.getName()) == -1) { | |
| 102 | - sb.append(basicConfig.getName()).append(','); | |
| 103 | - } | |
| 104 | - } | |
| 105 | - } | |
| 106 | - if (sb.toString().endsWith(",")) { | |
| 107 | - quanPatientsResult.setScreenResult(sb.substring(0, sb.length() - 1)); | |
| 108 | - } else { | |
| 109 | - quanPatientsResult.setScreenResult(sb.toString()); | |
| 110 | - } | |
| 111 | - } | |
| 95 | + String screenStr = basicConfigService.getScreenResult(patients.getScreenResult()); | |
| 96 | + quanPatientsResult.setScreenResult(screenStr); | |
| 112 | 97 | quanPatientsResult.setbTime(DateUtil.getyyyy_MM_dd(patients.getBookbuildingDate())); |
| 113 | 98 | stopWatch.start("query ant count"); |
| 114 | 99 | antExChuQuery1.setPid(patients.getPid()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/WorkHR.java
View file @
384a358
| ... | ... | @@ -178,22 +178,9 @@ |
| 178 | 178 | stopWatch.start("query findLastRisk"); |
| 179 | 179 | //筛查结果 |
| 180 | 180 | List<String> screen = patients.getScreenResult(); |
| 181 | - if (CollectionUtils.isNotEmpty(screen)) { | |
| 182 | - StringBuilder sb = new StringBuilder(56); | |
| 183 | - for (String srt : screen) { | |
| 184 | - if (StringUtils.isNotEmpty(srt)) { | |
| 185 | - BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(srt); | |
| 186 | - if (null != basicConfig && sb.indexOf(basicConfig.getName()) == -1) { | |
| 187 | - sb.append(basicConfig.getName()).append(','); | |
| 188 | - } | |
| 189 | - } | |
| 190 | - } | |
| 191 | - if (sb.toString().endsWith(",")) { | |
| 192 | - riskPatientsResult.setScreenResult(sb.substring(0, sb.length() - 1)); | |
| 193 | - } else { | |
| 194 | - riskPatientsResult.setScreenResult(sb.toString()); | |
| 195 | - } | |
| 196 | - } | |
| 181 | + | |
| 182 | + String screenStr = basicConfigService.getScreenResult(screen); | |
| 183 | + riskPatientsResult.setScreenResult(screenStr); | |
| 197 | 184 | |
| 198 | 185 | //高危因素 |
| 199 | 186 | List<String> factor = patients.getRiskFactorId(); |