Commit 41aff8c41401559f55b722faddcce066daa73c78
1 parent
4c0cb6c539
Exists in
master
and in
6 other branches
update code
Showing 3 changed files with 75 additions and 1 deletions
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
41aff8c
| ... | ... | @@ -57,6 +57,8 @@ |
| 57 | 57 | */ |
| 58 | 58 | private Integer age; |
| 59 | 59 | |
| 60 | + private String oRiskFactor; | |
| 61 | + | |
| 60 | 62 | public Integer getDueStatus() { |
| 61 | 63 | return dueStatus; |
| 62 | 64 | } |
| ... | ... | @@ -131,6 +133,14 @@ |
| 131 | 133 | private String[] pc; |
| 132 | 134 | private String[] pv; |
| 133 | 135 | |
| 136 | + public String getoRiskFactor() { | |
| 137 | + return oRiskFactor; | |
| 138 | + } | |
| 139 | + | |
| 140 | + public void setoRiskFactor(String oRiskFactor) { | |
| 141 | + this.oRiskFactor = oRiskFactor; | |
| 142 | + } | |
| 143 | + | |
| 134 | 144 | public List<String> getIds() { |
| 135 | 145 | return ids; |
| 136 | 146 | } |
| ... | ... | @@ -1436,6 +1446,15 @@ |
| 1436 | 1446 | if (null != fmType) { |
| 1437 | 1447 | condition = condition.and("fmType", fmType, MongoOper.LIKE); |
| 1438 | 1448 | } |
| 1449 | + | |
| 1450 | + if (StringUtils.isNotEmpty(oRiskFactor)) { | |
| 1451 | + if (null != c1) { | |
| 1452 | + c1 = c1.and("oRiskFactor").exists(false); | |
| 1453 | + } else { | |
| 1454 | + c1 = Criteria.where("oRiskFactor").exists(false); | |
| 1455 | + } | |
| 1456 | + } | |
| 1457 | + | |
| 1439 | 1458 | |
| 1440 | 1459 | if (null != c1) { |
| 1441 | 1460 | condition = condition.andCondition(new MongoCondition(c1)); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/RiskReportFacade.java
View file @
41aff8c
| ... | ... | @@ -159,11 +159,66 @@ |
| 159 | 159 | } |
| 160 | 160 | } |
| 161 | 161 | |
| 162 | + results.addAll(getOtherRiskCount(allPatientCount,patientsQuery)); | |
| 163 | + | |
| 162 | 164 | Collections.sort(results,new RiskReportResult()); |
| 163 | 165 | |
| 164 | 166 | return new BaseListResponse() |
| 165 | 167 | .setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS).setData(results); |
| 166 | 168 | } |
| 169 | + | |
| 170 | + | |
| 171 | + /** | |
| 172 | + * 自定义高危因素统计 | |
| 173 | + * @return | |
| 174 | + */ | |
| 175 | + private List<RiskReportResult> getOtherRiskCount( int allPatientCount,PatientsQuery patientsQuery) | |
| 176 | + { | |
| 177 | + List<RiskReportResult> results = new ArrayList<>(); | |
| 178 | + | |
| 179 | + PatientsQuery query = new PatientsQuery(); | |
| 180 | + query.setYn(YnEnums.YES.getId()); | |
| 181 | + query.setBuildTypeList(patientsQuery.getBuildTypeList()); | |
| 182 | + query.setHospitalId(patientsQuery.getHospitalId()); | |
| 183 | + query.setDueStatus(patientsQuery.getDueStatus()); | |
| 184 | + //高危等级 | |
| 185 | + query.setrLevel(patientsQuery.getrLevel()); | |
| 186 | + //产检医生 | |
| 187 | + query.setLastCheckEmployeeId(patientsQuery.getLastCheckEmployeeId()); | |
| 188 | + query.setDueDateStart(patientsQuery.getDueDateStart()); | |
| 189 | + query.setDueDateEnd(patientsQuery.getDueDateEnd()); | |
| 190 | + | |
| 191 | + query.setBookbuildingDateStart(patientsQuery.getBookbuildingDateStart()); | |
| 192 | + query.setBookbuildingDateEnd(patientsQuery.getBookbuildingDateEnd()); | |
| 193 | + query.setoRiskFactor("true"); | |
| 194 | + | |
| 195 | + query.setType(patientsQuery.getType()); | |
| 196 | + | |
| 197 | + //单个高危因素孕产妇条数 | |
| 198 | + int riskPatientCount = patientsService.queryPatientCount(query); | |
| 199 | + if (riskPatientCount > 0) | |
| 200 | + { | |
| 201 | + RiskReportResult risk = new RiskReportResult(); | |
| 202 | + risk.setHighRiskId("otherRiskId"); | |
| 203 | + risk.setHighRisk("自定义高危"); | |
| 204 | + risk.setRiskCount(String.valueOf(riskPatientCount)); | |
| 205 | + | |
| 206 | + DecimalFormat df = new DecimalFormat("0.00"); | |
| 207 | + String percent = df.format((double)riskPatientCount/allPatientCount*100)+"%"; | |
| 208 | + risk.setPercent(percent); | |
| 209 | + | |
| 210 | + List level = new ArrayList(); | |
| 211 | + Map map = new HashMap(); | |
| 212 | + | |
| 213 | + map.put("name", "自定义高危"); | |
| 214 | + map.put("color", "risk_white"); | |
| 215 | + | |
| 216 | + risk.setHighLevel(level); | |
| 217 | + results.add(risk); | |
| 218 | + } | |
| 219 | + return results; | |
| 220 | + } | |
| 221 | + | |
| 167 | 222 | // |
| 168 | 223 | // public BaseResponse queryRiskPatientReport(Integer userId,) { |
| 169 | 224 | // LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
41aff8c
| ... | ... | @@ -3135,7 +3135,7 @@ |
| 3135 | 3135 | String qtText = map.get("qtText") == null ? "" : map.get("qtText").toString(); |
| 3136 | 3136 | drugGllergic += " " + qtText; |
| 3137 | 3137 | } |
| 3138 | - FunvCommonUtil.spitd(drugGllergic); | |
| 3138 | + drugGllergic = FunvCommonUtil.spitd(drugGllergic); | |
| 3139 | 3139 | } |
| 3140 | 3140 | } |
| 3141 | 3141 |