Commit 7a56af8566001dcef329a418503c84785d18077a
1 parent
8f1973d719
Exists in
master
and in
8 other branches
修改新电子病历
Showing 7 changed files with 52 additions and 7 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java
- platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java
- platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.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/facade/BabyBookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java
View file @
7a56af8
| ... | ... | @@ -9,10 +9,7 @@ |
| 9 | 9 | import com.lyms.platform.common.enums.YnEnums; |
| 10 | 10 | import com.lyms.platform.common.utils.DateUtil; |
| 11 | 11 | import com.lyms.platform.common.utils.LogUtil; |
| 12 | -import com.lyms.platform.pojo.Patients; | |
| 13 | -import com.lyms.platform.pojo.ReferralApplyOrderModel; | |
| 14 | -import com.lyms.platform.pojo.SieveApplyOrderModel; | |
| 15 | -import com.lyms.platform.pojo.SieveModel; | |
| 12 | +import com.lyms.platform.pojo.*; | |
| 16 | 13 | import com.lyms.platform.query.*; |
| 17 | 14 | import org.apache.commons.collections.CollectionUtils; |
| 18 | 15 | import org.apache.commons.lang.StringUtils; |
| ... | ... | @@ -215,6 +212,8 @@ |
| 215 | 212 | updateRefer(patients); |
| 216 | 213 | } |
| 217 | 214 | |
| 215 | + | |
| 216 | + | |
| 218 | 217 | /** |
| 219 | 218 | * 修改产筛数据 |
| 220 | 219 | * |
| ... | ... | @@ -280,6 +279,27 @@ |
| 280 | 279 | } |
| 281 | 280 | } |
| 282 | 281 | |
| 282 | + | |
| 283 | + | |
| 284 | + public void updateRefer(BabyModel babyModel){ | |
| 285 | + ReferralApplyOrderQuery referralApplyOrderQuery=new ReferralApplyOrderQuery(); | |
| 286 | + referralApplyOrderQuery.setParentId(babyModel.getId()); | |
| 287 | + referralApplyOrderQuery.setHospitalId(babyModel.getHospitalId()); | |
| 288 | + List<ReferralApplyOrderModel> referralApplyOrderModel = iReferralApplyOrderDao.queryList(referralApplyOrderQuery.convertToQuery()); | |
| 289 | + if(CollectionUtils.isNotEmpty(referralApplyOrderModel)) { | |
| 290 | + Patients patients=findOnePatientById(babyModel.getParentId()); | |
| 291 | + for (ReferralApplyOrderModel referralApplyOrderModel1 : referralApplyOrderModel) { | |
| 292 | + referralApplyOrderModel1.setBirth(babyModel.getBirth()); | |
| 293 | + referralApplyOrderModel1.setName(babyModel.getName()); | |
| 294 | + referralApplyOrderModel1.setCardNo(babyModel.getCardNo()); | |
| 295 | + referralApplyOrderModel1.setPhone(patients.getPhone()); | |
| 296 | + referralApplyOrderModel1.setmCardNo(patients.getCardNo()); | |
| 297 | + referralApplyOrderModel1.setMname(patients.getUsername()); | |
| 298 | + referralApplyOrderModel1.setSex(babyModel.getSex()); | |
| 299 | + iReferralApplyOrderDao.updateOne(referralApplyOrderModel1); | |
| 300 | + } | |
| 301 | + } | |
| 302 | + } | |
| 283 | 303 | |
| 284 | 304 | /** |
| 285 | 305 | * 修改转诊数据 |
platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java
View file @
7a56af8
| ... | ... | @@ -223,6 +223,16 @@ |
| 223 | 223 | |
| 224 | 224 | //person表主键 |
| 225 | 225 | private String pid; |
| 226 | + //是否隐藏 0 隐藏 1 显示 | |
| 227 | + private String enable; | |
| 228 | + | |
| 229 | + public String getEnable() { | |
| 230 | + return enable; | |
| 231 | + } | |
| 232 | + | |
| 233 | + public void setEnable(String enable) { | |
| 234 | + this.enable = enable; | |
| 235 | + } | |
| 226 | 236 | |
| 227 | 237 | public Date getHusbandBirth() { |
| 228 | 238 | return husbandBirth; |
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
7a56af8
| ... | ... | @@ -501,9 +501,19 @@ |
| 501 | 501 | condition = condition.and("dueStatus", dueStatus, MongoOper.IS); |
| 502 | 502 | } |
| 503 | 503 | if (buildType != -1) { |
| 504 | - condition = condition.and("buildType", buildType, MongoOper.NE); | |
| 504 | + MongoCondition mongoCondition=MongoCondition.newInstance("buildType",3,MongoOper.IS); | |
| 505 | + MongoCondition condition1=mongoCondition.and("enable", "1", MongoOper.IS); | |
| 506 | + | |
| 507 | + MongoCondition condition12 = MongoCondition.newInstance("buildType", buildType, MongoOper.NE); | |
| 508 | + | |
| 509 | + condition = condition.orCondition(new MongoCondition[]{condition12,condition1}); | |
| 505 | 510 | }else if(null!=buildTypeList){ |
| 506 | - condition = condition.and("buildType", buildTypeList, MongoOper.IN); | |
| 511 | + MongoCondition mongoCondition=MongoCondition.newInstance("buildType",3,MongoOper.IS); | |
| 512 | + MongoCondition condition1=mongoCondition.and("enable", "1", MongoOper.IS); | |
| 513 | + | |
| 514 | + MongoCondition condition2=MongoCondition.newInstance("buildType", buildTypeList, MongoOper.IN); | |
| 515 | + | |
| 516 | + condition = condition.orCondition(new MongoCondition[]{condition1,condition2}); | |
| 507 | 517 | } |
| 508 | 518 | |
| 509 | 519 | if (buildTypeEq != null) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
7a56af8
| ... | ... | @@ -202,6 +202,8 @@ |
| 202 | 202 | updatePatientRiskLevel(antExChuModel, patients); |
| 203 | 203 | |
| 204 | 204 | if (null != patients.getBuildType() && patients.getBuildType() == 3) { |
| 205 | + patients.setEnable("1"); | |
| 206 | + patientsService.updatePatient(patients); | |
| 205 | 207 | ReferralApplyOrderQuery referralApplyOrderQuery = new ReferralApplyOrderQuery(); |
| 206 | 208 | referralApplyOrderQuery.setParentId(patients.getId()); |
| 207 | 209 | String hospital = autoMatchFacade.getHospitalId(userId); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java
View file @
7a56af8
| ... | ... | @@ -161,6 +161,7 @@ |
| 161 | 161 | patients.setServiceType(ServiceTypeEnums.STANDARD_SERVICE.getId()); |
| 162 | 162 | patients.setServiceStatus(ServiceStatusEnums.STANDARD_OPEN.getId()); |
| 163 | 163 | patients.setExpVip(0); |
| 164 | + patients.setEnable("0"); | |
| 164 | 165 | id = patientsService.addPatient(patients).getId(); |
| 165 | 166 | } else { |
| 166 | 167 | Patients patients1 = patientsList.get(0); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
7a56af8
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
7a56af8
| ... | ... | @@ -218,7 +218,8 @@ |
| 218 | 218 | if(null!= riskPatientsQueryRequest.getEndAge()){ |
| 219 | 219 | Date date = DateUtil.addYear(currentDate, -riskPatientsQueryRequest.getEndAge()); |
| 220 | 220 | date = DateUtil.addYear(date,-1); |
| 221 | - patientsQuery.setBirthStart(date); | |
| 221 | + | |
| 222 | + patientsQuery.setBirthStart(DateUtil.addDay(date,1)); | |
| 222 | 223 | } |
| 223 | 224 | if(null!=riskPatientsQueryRequest.getStartChsj()){ |
| 224 | 225 | patientsQuery.setFmDateEnd(DateUtil.addDay(currentDate, -riskPatientsQueryRequest.getStartChsj())); |