Commit 978444f14e21f201e543b5bb95612e2131055f5b
Exists in
master
Merge remote-tracking branch 'origin/master'
Showing 13 changed files
- platform-dal/src/main/java/com/lyms/platform/pojo/AntExChuModel.java
- platform-dal/src/main/java/com/lyms/platform/pojo/AntenatalExaminationModel.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/BookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/OrganizationGroupsFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PostReviewFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/StopPregnancyFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AntExAddRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AntExcAddRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntenatalExaminationResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntexChuResult.java
platform-dal/src/main/java/com/lyms/platform/pojo/AntExChuModel.java
View file @
978444f
... | ... | @@ -17,8 +17,8 @@ |
17 | 17 | public class AntExChuModel extends BaseModel { |
18 | 18 | |
19 | 19 | private static final long serialVersionUID = SerialIdEnum.AntExChuModel.getCid(); |
20 | - | |
21 | - | |
20 | + //条码 | |
21 | + private String barCode; | |
22 | 22 | private String id; |
23 | 23 | private String parentId; |
24 | 24 | private String pid; |
... | ... | @@ -102,6 +102,14 @@ |
102 | 102 | private Integer abortionZR; |
103 | 103 | //人工流产 |
104 | 104 | private Integer abortionRG; |
105 | + | |
106 | + public String getBarCode() { | |
107 | + return barCode; | |
108 | + } | |
109 | + | |
110 | + public void setBarCode(String barCode) { | |
111 | + this.barCode = barCode; | |
112 | + } | |
105 | 113 | |
106 | 114 | public Integer getAbortionZR() { |
107 | 115 | return abortionZR; |
platform-dal/src/main/java/com/lyms/platform/pojo/AntenatalExaminationModel.java
View file @
978444f
... | ... | @@ -19,6 +19,7 @@ |
19 | 19 | private static final long serialVersionUID = SerialIdEnum.AntenatalExaminationModel.getCid(); |
20 | 20 | |
21 | 21 | private String id; |
22 | + private String barCode; | |
22 | 23 | private String pid; |
23 | 24 | private String parentId; |
24 | 25 | /* //名字 |
... | ... | @@ -98,6 +99,14 @@ |
98 | 99 | private String cDueWeek; |
99 | 100 | //操作人 |
100 | 101 | private Integer operator; |
102 | + | |
103 | + public String getBarCode() { | |
104 | + return barCode; | |
105 | + } | |
106 | + | |
107 | + public void setBarCode(String barCode) { | |
108 | + this.barCode = barCode; | |
109 | + } | |
101 | 110 | |
102 | 111 | public Integer getOperator() { |
103 | 112 | return operator; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
978444f
... | ... | @@ -862,7 +862,7 @@ |
862 | 862 | |
863 | 863 | if (CollectionUtils.isNotEmpty(list)) { |
864 | 864 | // Patients patients2 = findOnePatient(null, null, null, hospital, -1, true, exListQueryRequest.getPid(),false); |
865 | - Patients patients2 = findOnePatient(null, null, null, groupsFacade.findGroupHospital(userId), -1, true, exListQueryRequest.getPid(), false); | |
865 | + Patients patients2 = findOnePatient(null, null, null, groupsFacade.findGroupHospital(userId,true), -1, true, exListQueryRequest.getPid(), false); | |
866 | 866 | antexListResult.convertToResult(null, patients2, null); |
867 | 867 | |
868 | 868 | HighScoreResult highScoreResult = findLastRisk(list.get(0).getPid(), false); |
... | ... | @@ -1042,6 +1042,7 @@ |
1042 | 1042 | Organization organization = null; |
1043 | 1043 | String pid = ""; |
1044 | 1044 | List listData = new ArrayList(); |
1045 | + | |
1045 | 1046 | while (iterator.hasNext()) { |
1046 | 1047 | Patients patients = iterator.next(); |
1047 | 1048 | |
... | ... | @@ -1084,6 +1085,7 @@ |
1084 | 1085 | if (null != an.getHospitalId()) { |
1085 | 1086 | organization = organizationService.getOrganization(Integer.valueOf(an.getHospitalId())); |
1086 | 1087 | } |
1088 | + | |
1087 | 1089 | listData.add(new AntData(an, null != organization ? organization.getName() : "", patientses.get(0).getLastMenses())); |
1088 | 1090 | } |
1089 | 1091 | } |
... | ... | @@ -1105,6 +1107,7 @@ |
1105 | 1107 | if (null != an.getHospitalId()) { |
1106 | 1108 | organization = organizationService.getOrganization(Integer.valueOf(an.getHospitalId())); |
1107 | 1109 | } |
1110 | + | |
1108 | 1111 | listData.add(new AntData(an, null != organization ? organization.getName() : "", patientses.get(0).getLastMenses())); |
1109 | 1112 | } |
1110 | 1113 | } |
1111 | 1114 | |
... | ... | @@ -1117,12 +1120,13 @@ |
1117 | 1120 | if (null != model.getHospitalId()) { |
1118 | 1121 | organization = organizationService.getOrganization(Integer.valueOf(model.getHospitalId())); |
1119 | 1122 | } |
1123 | + | |
1120 | 1124 | listData.add(new AntData((MaternalDeliverModel) obj, patientses.get(0).getLastMenses(), null != organization ? organization.getName() : "")); |
1121 | 1125 | } |
1122 | 1126 | } |
1123 | 1127 | |
1124 | 1128 | PostReviewQuery postReviewQuery = new PostReviewQuery(); |
1125 | - if (list.size() - 1 > i) { | |
1129 | + if (list.size() - 1 >i) { | |
1126 | 1130 | postReviewQuery.setStart(dueDate); |
1127 | 1131 | if (CollectionUtils.isNotEmpty(listDate)) { |
1128 | 1132 | //下次建档记录前都是产后复查,如果没有下个产程的数据就直接显示 |
1129 | 1133 | |
1130 | 1134 | |
1131 | 1135 | |
... | ... | @@ -1137,22 +1141,25 @@ |
1137 | 1141 | //产后复查记录 |
1138 | 1142 | List<PostReviewModel> reviewModels = postReviewService.findWithList(postReviewQuery); |
1139 | 1143 | if (CollectionUtils.isNotEmpty(reviewModels)) { |
1140 | - for (PostReviewModel postReviewModel : reviewModels) { | |
1141 | - if (postReviewModel.getYn() == YnEnums.YES.getId()) { | |
1142 | - if (null != postReviewModel.getHospitalId()) { | |
1143 | - organization = organizationService.getOrganization(Integer.valueOf(postReviewModel.getHospitalId())); | |
1144 | - } | |
1144 | + if(CollectionUtils.isNotEmpty(listData)){ | |
1145 | + for (PostReviewModel postReviewModel : reviewModels) { | |
1146 | + if (postReviewModel.getYn() == YnEnums.YES.getId()) { | |
1147 | + if (null != postReviewModel.getHospitalId()) { | |
1148 | + organization = organizationService.getOrganization(Integer.valueOf(postReviewModel.getHospitalId())); | |
1149 | + } | |
1145 | 1150 | |
1146 | - listData.add(new AntData(postReviewModel, null != organization ? organization.getName() : "", dueDate)); | |
1151 | + listData.add(new AntData(postReviewModel, null != organization ? organization.getName() : "", dueDate)); | |
1152 | + } | |
1147 | 1153 | } |
1148 | - | |
1149 | 1154 | } |
1150 | 1155 | } |
1151 | 1156 | iterator.remove(); |
1152 | - sort(listData); | |
1153 | - updateEditEnable(listData, sortList); | |
1154 | - sortList.add(listData); | |
1155 | - listData = new ArrayList(); | |
1157 | + if(CollectionUtils.isNotEmpty(listData)){ | |
1158 | + sort(listData); | |
1159 | + updateEditEnable(listData, sortList); | |
1160 | + sortList.add(listData); | |
1161 | + listData = new ArrayList(); | |
1162 | + } | |
1156 | 1163 | } |
1157 | 1164 | } |
1158 | 1165 | } |
... | ... | @@ -1739,7 +1746,7 @@ |
1739 | 1746 | patients = list.get(0); |
1740 | 1747 | } |
1741 | 1748 | } else { |
1742 | - patients = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(), null, groupsFacade.findGroupHospital(userId), 1, false, null, og.getbStatus() == 1); | |
1749 | + patients = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(), null, groupsFacade.findGroupHospital(userId,false), 1, false, null, og.getbStatus() == 1); | |
1743 | 1750 | //查询产妇数据 |
1744 | 1751 | // patients = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(), null, hospitalId, 1, false, null, false); |
1745 | 1752 | } |
... | ... | @@ -1752,7 +1759,7 @@ |
1752 | 1759 | // //查询是否还有其他记录 |
1753 | 1760 | // patients = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(), null, hospitalId, 3, false, null, false); |
1754 | 1761 | // } |
1755 | - patients = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(), null, groupsFacade.findGroupHospital(userId), 3, false, null, og.getbStatus() == 1); | |
1762 | + patients = findOnePatient(queryRequest.getCardNo(), queryRequest.getVcCardNo(), null, groupsFacade.findGroupHospital(userId,false), 3, false, null, og.getbStatus() == 1); | |
1756 | 1763 | |
1757 | 1764 | //原来单机 |
1758 | 1765 | if (null != patients) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
978444f
... | ... | @@ -498,7 +498,7 @@ |
498 | 498 | patientsQuery.setVcCardNo(bookbuildingQueryRequest.getVcCardNo()); |
499 | 499 | |
500 | 500 | //区域模式 |
501 | - patientsQuery.setHospitalList(groupsFacade.findGroupHospital(userId)); | |
501 | + patientsQuery.setHospitalList(groupsFacade.findGroupHospital(userId,false)); | |
502 | 502 | |
503 | 503 | List<Patients> patientsVc = yunBookbuildingService.queryPregnantWithQuery(patientsQuery); |
504 | 504 | if (CollectionUtils.isNotEmpty(patientsVc)) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
978444f
... | ... | @@ -562,9 +562,9 @@ |
562 | 562 | |
563 | 563 | //http://jira.healthbaby.com.cn/browse/WEB-204 修改bug |
564 | 564 | //本院的孕妇 |
565 | - Patients patients = antenatalExaminationFacade.findOnePatient(deliverQueryRequest.getCardNo(), deliverQueryRequest.getVcCardNo(), null, organizationGroupsFacade.findGroupHospital(userId), 1, false, null,isEnable); | |
565 | + Patients patients = antenatalExaminationFacade.findOnePatient(deliverQueryRequest.getCardNo(), deliverQueryRequest.getVcCardNo(), null, organizationGroupsFacade.findGroupHospital(userId,false), 1, false, null,isEnable); | |
566 | 566 | //本院产妇 |
567 | - Patients patients3 = antenatalExaminationFacade.findOnePatient(deliverQueryRequest.getCardNo(), deliverQueryRequest.getVcCardNo(), null, organizationGroupsFacade.findGroupHospital(userId), 3, false, null,isEnable); | |
567 | + Patients patients3 = antenatalExaminationFacade.findOnePatient(deliverQueryRequest.getCardNo(), deliverQueryRequest.getVcCardNo(), null, organizationGroupsFacade.findGroupHospital(userId,false), 3, false, null,isEnable); | |
568 | 568 | PersonModelQuery personModelQuery = new PersonModelQuery(); |
569 | 569 | String pid = ""; |
570 | 570 | if (null != patients1) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/OrganizationGroupsFacade.java
View file @
978444f
... | ... | @@ -82,14 +82,18 @@ |
82 | 82 | * 查询当前用户可以查看那些医院 |
83 | 83 | * |
84 | 84 | * @param userId 用户id |
85 | - * @return | |
85 | + * @return 是否是电子病历 电子病历显示全系统的数据 | |
86 | 86 | */ |
87 | - public List<String> findGroupHospital(Integer userId) { | |
87 | + public List<String> findGroupHospital(Integer userId,boolean medicalRecord) { | |
88 | 88 | String hospital = autoMatchFacade.getHospitalId(userId); |
89 | 89 | //查询当前帐号所在的组 |
90 | 90 | String groupId = findByCurrentUserId(hospital); |
91 | 91 | |
92 | 92 | if (null == groupId) { |
93 | + //电子病历不区分医院 | |
94 | + if(medicalRecord){ | |
95 | + return null; | |
96 | + } | |
93 | 97 | List<String> data = new ArrayList<>(); |
94 | 98 | data.add(hospital); |
95 | 99 | return data; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
978444f
... | ... | @@ -21,7 +21,9 @@ |
21 | 21 | import com.lyms.platform.permission.service.OrganizationService; |
22 | 22 | import com.lyms.platform.permission.service.UsersService; |
23 | 23 | import com.lyms.platform.pojo.*; |
24 | -import com.lyms.platform.query.*; | |
24 | +import com.lyms.platform.query.BabyModelQuery; | |
25 | +import com.lyms.platform.query.DataPermissionsModelQuery; | |
26 | +import com.lyms.platform.query.PatientsQuery; | |
25 | 27 | import org.apache.commons.collections.CollectionUtils; |
26 | 28 | import org.apache.commons.lang.StringUtils; |
27 | 29 | import org.slf4j.Logger; |
... | ... | @@ -33,7 +35,10 @@ |
33 | 35 | import javax.servlet.http.HttpServletResponse; |
34 | 36 | import java.io.OutputStream; |
35 | 37 | import java.util.*; |
36 | -import java.util.concurrent.*; | |
38 | +import java.util.concurrent.Future; | |
39 | +import java.util.concurrent.LinkedBlockingQueue; | |
40 | +import java.util.concurrent.ThreadPoolExecutor; | |
41 | +import java.util.concurrent.TimeUnit; | |
37 | 42 | |
38 | 43 | /** |
39 | 44 | * Created by Administrator on 2016/4/22 0022. |
... | ... | @@ -463,7 +468,7 @@ |
463 | 468 | patientsQuery.setPhone(patientQueryRequest.getPhone()); |
464 | 469 | patientsQuery.setCardNo(patientQueryRequest.getCardNo()); |
465 | 470 | |
466 | - Patients patients = antenatalExaminationFacade.findOnePatient(patientQueryRequest.getCardNo(), null, patientQueryRequest.getId(), groupsFacade.findGroupHospital(userId), -1, false, patientQueryRequest.getPid(),false); | |
471 | + Patients patients = antenatalExaminationFacade.findOnePatient(patientQueryRequest.getCardNo(), null, patientQueryRequest.getId(), groupsFacade.findGroupHospital(userId,false), -1, false, patientQueryRequest.getPid(),false); | |
467 | 472 | PatientBaseResult patientBaseResult = new PatientBaseResult(); |
468 | 473 | if (null != patients) { |
469 | 474 | patientBaseResult.convert(patients); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PostReviewFacade.java
View file @
978444f
... | ... | @@ -209,7 +209,7 @@ |
209 | 209 | |
210 | 210 | //取所有医院的建档数据 优先取本院 ,然后取外院 |
211 | 211 | |
212 | - Patients patientsList = examinationFacade.findOnePatient(postReviewQueryRequest.getCardNo(), postReviewQueryRequest.getVcCardNo(), null, groupsFacade.findGroupHospital(userId), 3, true, null, og.getbStatus() != 1); | |
212 | + Patients patientsList = examinationFacade.findOnePatient(postReviewQueryRequest.getCardNo(), postReviewQueryRequest.getVcCardNo(), null, groupsFacade.findGroupHospital(userId,false), 3, true, null, og.getbStatus() != 1); | |
213 | 213 | PostReviewListResult postReviewListResult = new PostReviewListResult(); |
214 | 214 | if (null != patientsList) { |
215 | 215 | if (null != patientsList.getDueStatus() && 1 == patientsList.getDueStatus()) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/StopPregnancyFacade.java
View file @
978444f
... | ... | @@ -156,12 +156,12 @@ |
156 | 156 | |
157 | 157 | |
158 | 158 | String groupId = groupsFacade.findByCurrentUserId(request.getHospitalId()); |
159 | - List<String> hos = groupsFacade.findGroupHospital(userId); | |
159 | + List<String> hos = groupsFacade.findGroupHospital(userId,false); | |
160 | 160 | String hospital = autoMatchFacade.getHospitalId(userId); |
161 | 161 | for (Patients patient : patients) { |
162 | 162 | if (patient != null) { |
163 | 163 | String hid = patient.getHospitalId(); |
164 | - if (StringUtils.isNotEmpty(groupId) && hos.contains(hospital)) { | |
164 | + if (StringUtils.isNotEmpty(groupId) &&CollectionUtils.isNotEmpty(hos)&& hos.contains(hospital)) { | |
165 | 165 | pat = patient; |
166 | 166 | } else if (StringUtils.isNotEmpty(hid) && hid.equals(request.getHospitalId())) { |
167 | 167 | pat = patient; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AntExAddRequest.java
View file @
978444f
... | ... | @@ -19,6 +19,16 @@ |
19 | 19 | // 访视记录id |
20 | 20 | private String id; |
21 | 21 | |
22 | + private String barCode; | |
23 | + | |
24 | + public String getBarCode() { | |
25 | + return barCode; | |
26 | + } | |
27 | + | |
28 | + public void setBarCode(String barCode) { | |
29 | + this.barCode = barCode; | |
30 | + } | |
31 | + | |
22 | 32 | private String pid; |
23 | 33 | //产妇id |
24 | 34 | private String parentId; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AntExcAddRequest.java
View file @
978444f
... | ... | @@ -24,6 +24,9 @@ |
24 | 24 | @FormParam |
25 | 25 | @NotEmpty(message = "孕妇id不能为空") |
26 | 26 | private String parentId; |
27 | + | |
28 | + private String barCode; | |
29 | + | |
27 | 30 | private String id; |
28 | 31 | |
29 | 32 | private String pid; |
... | ... | @@ -201,6 +204,14 @@ |
201 | 204 | //人工流产 |
202 | 205 | private Integer abortionRG; |
203 | 206 | |
207 | + public String getBarCode() { | |
208 | + return barCode; | |
209 | + } | |
210 | + | |
211 | + public void setBarCode(String barCode) { | |
212 | + this.barCode = barCode; | |
213 | + } | |
214 | + | |
204 | 215 | public Integer getAbortionZR() { |
205 | 216 | return abortionZR; |
206 | 217 | } |
... | ... | @@ -874,6 +885,7 @@ |
874 | 885 | public AntExChuModel convertToDataModel() { |
875 | 886 | AntExChuModel antExChuModel=new AntExChuModel(); |
876 | 887 | antExChuModel.setBg(bg); |
888 | + antExChuModel.setBarCode(barCode); | |
877 | 889 | antExChuModel.setId(id); |
878 | 890 | antExChuModel.setParentId(parentId); |
879 | 891 | antExChuModel.setSyjg(syjg); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntenatalExaminationResult.java
View file @
978444f
... | ... | @@ -14,7 +14,7 @@ |
14 | 14 | * Created by Administrator on 2016/6/15 0015. |
15 | 15 | */ |
16 | 16 | public class AntenatalExaminationResult implements IBasicResultConvert<AntenatalExaminationResult, AntenatalExaminationModel> { |
17 | - | |
17 | + private String barCode; | |
18 | 18 | private String id; |
19 | 19 | private String isSieve; |
20 | 20 | private String parentId; |
... | ... | @@ -76,6 +76,14 @@ |
76 | 76 | private int hasSieve; |
77 | 77 | private String cDueWeek; |
78 | 78 | |
79 | + public String getBarCode() { | |
80 | + return barCode; | |
81 | + } | |
82 | + | |
83 | + public void setBarCode(String barCode) { | |
84 | + this.barCode = barCode; | |
85 | + } | |
86 | + | |
79 | 87 | public String getIsSieve() { |
80 | 88 | return isSieve; |
81 | 89 | } |
... | ... | @@ -120,7 +128,7 @@ |
120 | 128 | public AntenatalExaminationResult convertToResult(AntenatalExaminationModel destModel) { |
121 | 129 | setEdema(destModel.getEdema()); |
122 | 130 | setParentId(destModel.getParentId()); |
123 | - | |
131 | + setBarCode(destModel.getBarCode()); | |
124 | 132 | setUrineProtein(destModel.getUrineProtein()); |
125 | 133 | setTreatmentOpinion(destModel.getTreatmentOpinion()); |
126 | 134 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntexChuResult.java
View file @
978444f
... | ... | @@ -14,7 +14,16 @@ |
14 | 14 | * Created by Administrator on 2016/6/20 0020. |
15 | 15 | */ |
16 | 16 | public class AntexChuResult { |
17 | + private String barCode; | |
17 | 18 | |
19 | + public String getBarCode() { | |
20 | + return barCode; | |
21 | + } | |
22 | + | |
23 | + public void setBarCode(String barCode) { | |
24 | + this.barCode = barCode; | |
25 | + } | |
26 | + | |
18 | 27 | private String parentId; |
19 | 28 | |
20 | 29 | private String isSieve; |
... | ... | @@ -893,6 +902,7 @@ |
893 | 902 | |
894 | 903 | public AntexChuResult convertToResult(AntExChuModel antExChuModel) { |
895 | 904 | if (null != antExChuModel) { |
905 | + setBarCode(antExChuModel.getBarCode()); | |
896 | 906 | setId(antExChuModel.getId()); |
897 | 907 | setParentId(antExChuModel.getParentId()); |
898 | 908 | try { |