Commit da95e1addab5bf19669e8f60d960e0a10e019f6d
1 parent
2fbd25b18a
Exists in
master
and in
8 other branches
儿童建档
Showing 3 changed files with 31 additions and 8 deletions
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
da95e1a
... | ... | @@ -174,6 +174,8 @@ |
174 | 174 | |
175 | 175 | private Integer buildType = -1; |
176 | 176 | |
177 | + private Integer buildTypeEq; | |
178 | + | |
177 | 179 | public Integer getBuildType() { |
178 | 180 | return buildType; |
179 | 181 | } |
... | ... | @@ -182,6 +184,15 @@ |
182 | 184 | this.buildType = buildType; |
183 | 185 | } |
184 | 186 | |
187 | + | |
188 | + public Integer getBuildTypeEq() { | |
189 | + return buildTypeEq; | |
190 | + } | |
191 | + | |
192 | + public void setBuildTypeEq(Integer buildTypeEq) { | |
193 | + this.buildTypeEq = buildTypeEq; | |
194 | + } | |
195 | + | |
185 | 196 | public String getHcertificateNum() { |
186 | 197 | return hcertificateNum; |
187 | 198 | } |
... | ... | @@ -439,6 +450,10 @@ |
439 | 450 | } |
440 | 451 | if (buildType != -1) { |
441 | 452 | condition = condition.and("buildType", buildType, MongoOper.NE); |
453 | + } | |
454 | + | |
455 | + if (buildTypeEq != null) { | |
456 | + condition = condition.and("buildType", buildTypeEq, MongoOper.IS); | |
442 | 457 | } |
443 | 458 | if (visitstatus != -1) { |
444 | 459 | condition = condition.and("isVisit", visitstatus, MongoOper.IS); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
da95e1a
... | ... | @@ -197,7 +197,7 @@ |
197 | 197 | { |
198 | 198 | //查询儿童基本信息 |
199 | 199 | PersonModelQuery personModelQuery = new PersonModelQuery(); |
200 | - personModelQuery.setPhone(request.getMommyPhone()); | |
200 | +// personModelQuery.setPhone(request.getMommyPhone()); | |
201 | 201 | personModelQuery.setYn(YnEnums.YES.getId()); |
202 | 202 | personModelQuery.setName(request.getBabyName()); |
203 | 203 | personModelQuery.setType(2); |
204 | 204 | |
... | ... | @@ -256,12 +256,11 @@ |
256 | 256 | if (patients.getType() == 1) { |
257 | 257 | |
258 | 258 | //判断在儿童建档的时候,是否设置到这个儿童对应的孕妇 设置成产妇 |
259 | - //计算规则 儿童生日 >= 孕妇预产期 + 24周 设置成分娩 (高帆 2016-08-04 17:34定) | |
260 | - Date dueDate = patients.getDueDate(); | |
261 | - if (dueDate != null && request.getBabyBirthday() != null) { | |
259 | + //计算规则 儿童生日 >= 孕妇末次月经 + 24周 设置成分娩 (高帆 2016-08-09 16:47定 ) | |
260 | + Date lastMenses = patients.getLastMenses(); | |
261 | + if (lastMenses != null && request.getBabyBirthday() != null) { | |
262 | 262 | Date brith = DateUtil.parseYMD(request.getBabyBirthday()); |
263 | -// Date tempDate = DateUtil.addMonth(dueDate, -2); | |
264 | - Date tempDate = DateUtil.addWeek(dueDate, 24); | |
263 | + Date tempDate = DateUtil.addWeek(lastMenses, 24); | |
265 | 264 | if (brith.getTime() >= tempDate.getTime()) { |
266 | 265 | //设置孕妇已分娩 |
267 | 266 | Patients patientUpdate = new Patients(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
da95e1a
... | ... | @@ -83,7 +83,8 @@ |
83 | 83 | patientsQuery.setYn(YnEnums.YES.getId()); |
84 | 84 | patientsQuery.setType(1); |
85 | 85 | patientsQuery.setHospitalId(yunRequest.getHospitalId()); |
86 | - patientsQuery.setBuildType(0); | |
86 | + patientsQuery.setBuildTypeEq(0); | |
87 | + patientsQuery.setDueStatus(0); | |
87 | 88 | |
88 | 89 | if (yunRequest.getPregnantCertificateNum() != null) |
89 | 90 | { |
... | ... | @@ -797,7 +798,15 @@ |
797 | 798 | List<Patients> patients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery); |
798 | 799 | if (CollectionUtils.isNotEmpty(patients)) |
799 | 800 | { |
800 | - pat = patients.get(0); | |
801 | + Patients vcCardNoPat = patients.get(0); | |
802 | + patientsQuery.setHospitalId(null); | |
803 | + patientsQuery.setVcCardNo(null); | |
804 | + patientsQuery.setCardNo(vcCardNoPat.getCardNo()); | |
805 | + List<Patients> cardNoPat = yunBookbuildingService.queryPregnantWithQuery(patientsQuery); | |
806 | + if (CollectionUtils.isNotEmpty(cardNoPat)) | |
807 | + { | |
808 | + pat = cardNoPat.get(0); | |
809 | + } | |
801 | 810 | } |
802 | 811 | } |
803 | 812 | BaseObjectResponse objectResponse = new BaseObjectResponse(); |