Commit 9f5d30ff57d7b0b67ef7f385f7b70dc5efaf6acb
1 parent
9e5eb8134a
Exists in
master
and in
6 other branches
初诊电子病历
Showing 1 changed file with 17 additions and 8 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
9f5d30f
| ... | ... | @@ -923,6 +923,7 @@ |
| 923 | 923 | patientsQuery.setPhone(exListQueryRequest.getPhone()); |
| 924 | 924 | patientsQuery.setPid(exListQueryRequest.getPid()); |
| 925 | 925 | patientsQuery.setBuildType(1); |
| 926 | + patientsQuery.setSort("created"); | |
| 926 | 927 | //在区域组的时候不用查询隐藏档案 |
| 927 | 928 | if (null != groupsFacade.findByCurrentUserId(autoMatchFacade.getHospitalId(userId))) { |
| 928 | 929 | patientsQuery.setExtEnable(false); |
| ... | ... | @@ -934,8 +935,6 @@ |
| 934 | 935 | |
| 935 | 936 | List sortList = new ArrayList(); |
| 936 | 937 | |
| 937 | - List<SortIn> listDate = new ArrayList(); | |
| 938 | - | |
| 939 | 938 | if (CollectionUtils.isNotEmpty(list)) { |
| 940 | 939 | Patients patients2 = findOnePatient(null, null, null, groupsFacade.findGroupHospital(userId, true), -1, true, exListQueryRequest.getPid(), false); |
| 941 | 940 | antexListResult.convertToResult(null, patients2, null); |
| ... | ... | @@ -943,7 +942,6 @@ |
| 943 | 942 | HighScoreResult highScoreResult = findLastRisk(list.get(0).getPid(), false); |
| 944 | 943 | antexListResult.setRiskFactor(highScoreResult.getHighRisk()); |
| 945 | 944 | antexListResult.setRiskScore(highScoreResult.getScoreStr()); |
| 946 | - sortList(listDate); | |
| 947 | 945 | distPatientData(list, sortList); |
| 948 | 946 | } |
| 949 | 947 | antexListResult.setData(sortList); |
| ... | ... | @@ -1366,7 +1364,10 @@ |
| 1366 | 1364 | /** |
| 1367 | 1365 | * 处理产程数据 |
| 1368 | 1366 | */ |
| 1369 | - private void distPatientData(List<Patients> patientses, List sortList) { | |
| 1367 | + private void distPatientData(List<Patients> patientses, List<List<AntData>> sortList) { | |
| 1368 | + Set<List<AntData>> resultDatas = new TreeSet<>(); | |
| 1369 | + | |
| 1370 | + | |
| 1370 | 1371 | Iterator<Patients> iterator = patientses.iterator(); |
| 1371 | 1372 | Organization organization = null; |
| 1372 | 1373 | String patientId = ""; |
| ... | ... | @@ -1380,6 +1381,12 @@ |
| 1380 | 1381 | } |
| 1381 | 1382 | //获取产程ID |
| 1382 | 1383 | patientId = patients.getId(); |
| 1384 | + if(patients.getBuildType()==3){//转诊建档,数据则装入主档案数据中,必须要有主档案,而且是第一条 | |
| 1385 | + if(CollectionUtils.isNotEmpty(sortList)){ | |
| 1386 | + listData = sortList.get(sortList.size()-1); | |
| 1387 | + } | |
| 1388 | + } | |
| 1389 | + | |
| 1383 | 1390 | //当主档案的医院不在group组里需要显示本来的隐藏档案 |
| 1384 | 1391 | if (!"2".equals(patients.getEnable())) { |
| 1385 | 1392 | listData.add(new AntData(patients, null != organization ? organization.getName() : "")); |
| ... | ... | @@ -1402,7 +1409,7 @@ |
| 1402 | 1409 | antExChuQuery.setEnd(new Date(patients.getFmDate().getTime() + 86398000)); |
| 1403 | 1410 | } |
| 1404 | 1411 | if (patients2!=null) { |
| 1405 | - antExChuQuery.setParentId(patients2.getId()); | |
| 1412 | + antExChuQuery.setParentIds(Arrays.asList(patientId,patients2.getId())); | |
| 1406 | 1413 | } else { |
| 1407 | 1414 | antExChuQuery.setParentId(patientId); |
| 1408 | 1415 | } |
| ... | ... | @@ -1426,7 +1433,7 @@ |
| 1426 | 1433 | antExQuery.setEnd(new Date(patients.getFmDate().getTime() + 86398000)); |
| 1427 | 1434 | } |
| 1428 | 1435 | if (patients2!=null) { |
| 1429 | - antExQuery.setParentId(patients2.getId()); | |
| 1436 | + antExQuery.setParentIds(Arrays.asList(patientId,patients2.getId())); | |
| 1430 | 1437 | } else { |
| 1431 | 1438 | antExQuery.setParentId(patientId); |
| 1432 | 1439 | } |
| ... | ... | @@ -1447,7 +1454,7 @@ |
| 1447 | 1454 | matDeliverQuery.setYn(YnEnums.YES.getId()); |
| 1448 | 1455 | |
| 1449 | 1456 | if (patients2!=null) { |
| 1450 | - matDeliverQuery.setParentId(patients2.getId()); | |
| 1457 | + matDeliverQuery.setParentIdList(Arrays.asList(patientId,patients2.getId())); | |
| 1451 | 1458 | } else { |
| 1452 | 1459 | matDeliverQuery.setParentId(patientId); |
| 1453 | 1460 | } |
| ... | ... | @@ -1521,7 +1528,9 @@ |
| 1521 | 1528 | if (CollectionUtils.isNotEmpty(listData)) { |
| 1522 | 1529 | sort(listData); |
| 1523 | 1530 | updateEditEnable(listData, sortList); |
| 1524 | - sortList.add(listData); | |
| 1531 | + if(!sortList.contains(listData)){ | |
| 1532 | + sortList.add(listData); | |
| 1533 | + } | |
| 1525 | 1534 | } |
| 1526 | 1535 | } |
| 1527 | 1536 | } |