Commit 0c2b842d5ff7b5dcf66b0aaa176dcb27c4ba2880
1 parent
86d8641292
Exists in
master
and in
6 other branches
秦皇岛基本公卫接口修改
Showing 8 changed files with 715 additions and 26 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IdiagnosisDao.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/DiagnosisDaoImpl.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/DiagnosisService.java
- platform-dal/src/main/java/com/lyms/platform/pojo/DiagnosisModel.java
- platform-dal/src/main/java/com/lyms/platform/query/DiagnosisQuery.java
- platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdJbgwInterface.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/diagnosisFacaed.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/diagnosisResult.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IdiagnosisDao.java
View file @
0c2b842
1 | +package com.lyms.platform.biz.dal; | |
2 | + | |
3 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
4 | +import com.lyms.platform.pojo.DiagnosisModel; | |
5 | + | |
6 | +import java.util.List; | |
7 | + | |
8 | +/** | |
9 | + * Created by Administrator on 2018/9/10. | |
10 | + */ | |
11 | +public interface IdiagnosisDao { | |
12 | + public List<DiagnosisModel> queryDiagnosis(MongoQuery query); | |
13 | + | |
14 | + public DiagnosisModel findOneDiagnosisById(String id); | |
15 | + | |
16 | + public DiagnosisModel addDiagnosis(DiagnosisModel data); | |
17 | + | |
18 | + public void updateDiagnosisById(DiagnosisModel obj,String id); | |
19 | + | |
20 | + public int queryDiagnosisCount(MongoQuery query); | |
21 | +} |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/DiagnosisDaoImpl.java
View file @
0c2b842
1 | +package com.lyms.platform.biz.dal.impl; | |
2 | + | |
3 | +import com.lyms.platform.biz.dal.IdiagnosisDao; | |
4 | +import com.lyms.platform.common.dao.BaseMongoDAOImpl; | |
5 | +import com.lyms.platform.common.dao.operator.MongoCondition; | |
6 | +import com.lyms.platform.common.dao.operator.MongoOper; | |
7 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
8 | +import com.lyms.platform.pojo.DiagnosisModel; | |
9 | +import org.springframework.stereotype.Repository; | |
10 | + | |
11 | +import java.util.List; | |
12 | + | |
13 | +/** | |
14 | + * Created by Administrator on 2018/9/10. | |
15 | + */ | |
16 | +@Repository("diagnosisDao") | |
17 | +public class DiagnosisDaoImpl extends BaseMongoDAOImpl<DiagnosisModel> implements IdiagnosisDao { | |
18 | + | |
19 | + public List<DiagnosisModel> queryDiagnosis(MongoQuery query){ | |
20 | + return find(query.convertToMongoQuery()); | |
21 | + } | |
22 | + | |
23 | + public DiagnosisModel findOneDiagnosisById(String id){ | |
24 | + return findById(id); | |
25 | + } | |
26 | + | |
27 | + public DiagnosisModel addDiagnosis(DiagnosisModel data){ | |
28 | + return save(data); | |
29 | + } | |
30 | + | |
31 | + public void updateDiagnosisById(DiagnosisModel obj,String id){ | |
32 | + update(new MongoQuery(new MongoCondition("id", id, MongoOper.IS)).convertToMongoQuery(), obj); | |
33 | + } | |
34 | + | |
35 | + public int queryDiagnosisCount(MongoQuery query){ | |
36 | + return (int) count(query.convertToMongoQuery()); | |
37 | + } | |
38 | +} |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/DiagnosisService.java
View file @
0c2b842
1 | +package com.lyms.platform.biz.service; | |
2 | + | |
3 | +import com.lyms.platform.biz.dal.IdiagnosisDao; | |
4 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
5 | +import com.lyms.platform.pojo.DiagnosisModel; | |
6 | +import com.lyms.platform.query.DiagnosisQuery; | |
7 | +import org.apache.commons.lang.StringUtils; | |
8 | +import org.springframework.beans.factory.annotation.Autowired; | |
9 | +import org.springframework.data.domain.Sort; | |
10 | +import org.springframework.stereotype.Service; | |
11 | + | |
12 | +import java.util.Date; | |
13 | +import java.util.List; | |
14 | + | |
15 | +/** | |
16 | + * Created by Administrator on 2018/9/10. | |
17 | + */ | |
18 | +@Service("diagnosisService") | |
19 | +public class DiagnosisService { | |
20 | + | |
21 | + @Autowired | |
22 | + private IdiagnosisDao diagnosisDao; | |
23 | + | |
24 | + public List<DiagnosisModel> queryDiagnosis(DiagnosisQuery diagnosisQuery){ | |
25 | + MongoQuery query = diagnosisQuery.convertToQuery(); | |
26 | + if (StringUtils.isNotEmpty(diagnosisQuery.getNeed())) { | |
27 | + diagnosisQuery.mysqlBuild(diagnosisDao.queryDiagnosisCount(query)); | |
28 | + query.start(diagnosisQuery.getOffset()).end(diagnosisQuery.getLimit()); | |
29 | + } | |
30 | + return diagnosisDao.queryDiagnosis(query.addOrder(Sort.Direction.DESC, "created")); | |
31 | + } | |
32 | + | |
33 | + public DiagnosisModel findOneDiagnosisById(String id){ | |
34 | + return diagnosisDao.findOneDiagnosisById(id); | |
35 | + } | |
36 | + | |
37 | + public DiagnosisModel addDiagnosis(DiagnosisModel data){ | |
38 | + data.setCreated(new Date()); | |
39 | + data.setModified(new Date()); | |
40 | + return diagnosisDao.addDiagnosis(data); | |
41 | + } | |
42 | + | |
43 | + public void updateDiagnosisById(DiagnosisModel obj,String id){ | |
44 | + obj.setModified(new Date()); | |
45 | + diagnosisDao.updateDiagnosisById(obj, id); | |
46 | + } | |
47 | + | |
48 | +} |
platform-dal/src/main/java/com/lyms/platform/pojo/DiagnosisModel.java
View file @
0c2b842
1 | +package com.lyms.platform.pojo; | |
2 | + | |
3 | +import com.lyms.platform.common.result.BaseModel; | |
4 | +import org.springframework.data.mongodb.core.mapping.Document; | |
5 | + | |
6 | +import java.util.Date; | |
7 | + | |
8 | +/** | |
9 | + * 产前诊断申请(新增) | |
10 | + * Created by Administrator on 2018/9/10. | |
11 | + */ | |
12 | +@Document(collection = "lyms_diagnosis") | |
13 | +public class DiagnosisModel extends BaseModel { | |
14 | + | |
15 | + private String id; | |
16 | + private String hospitalId;//医院ID | |
17 | + private String parentId;//孕妇档案ID | |
18 | + private String name;//孕妇姓名 | |
19 | + private String cardNo;//身份证号 | |
20 | + private String age;//年龄 | |
21 | + private String dueWeek;//孕周 | |
22 | + private Date yChanQi;//预产期 | |
23 | + private String phone;//联系方式 | |
24 | + private String diaProject;//诊断项目(1,羊水穿刺;2,) | |
25 | + private Date birth;//出生日期 | |
26 | + private String weight;//体重 | |
27 | + private Date lastMenses;//末次月经 | |
28 | + private String mensStartDay;//月经周期开始天数 | |
29 | + private String mensEndDay;//月经周期结束天数 | |
30 | + private String mensStopStartDay;//月经停留开始天数 | |
31 | + private String mensStopEndDay;//月经停留结束天数 | |
32 | + private String specimenNo;//标本号 | |
33 | + private String collectDocterId;//采集医生 | |
34 | + private Date collectDate;//采集时间 | |
35 | + private String sendDocterId;//送检医生 | |
36 | + private Date sendDate;//送检日期 | |
37 | + private String collectHospitalId;//申请医院 | |
38 | + private Date created;//创建时间 | |
39 | + private Date modified;//修改时间 | |
40 | + private String status;//数据来源(1,申请过来的,2,自动流转过来) | |
41 | + | |
42 | + public String getId() { | |
43 | + return id; | |
44 | + } | |
45 | + | |
46 | + public void setId(String id) { | |
47 | + this.id = id; | |
48 | + } | |
49 | + | |
50 | + public String getHospitalId() { | |
51 | + return hospitalId; | |
52 | + } | |
53 | + | |
54 | + public void setHospitalId(String hospitalId) { | |
55 | + this.hospitalId = hospitalId; | |
56 | + } | |
57 | + | |
58 | + public String getParentId() { | |
59 | + return parentId; | |
60 | + } | |
61 | + | |
62 | + public void setParentId(String parentId) { | |
63 | + this.parentId = parentId; | |
64 | + } | |
65 | + | |
66 | + public String getName() { | |
67 | + return name; | |
68 | + } | |
69 | + | |
70 | + public void setName(String name) { | |
71 | + this.name = name; | |
72 | + } | |
73 | + | |
74 | + public String getIdCard() { | |
75 | + return cardNo; | |
76 | + } | |
77 | + | |
78 | + public void setIdCard(String cardNo) { | |
79 | + this.cardNo = cardNo; | |
80 | + } | |
81 | + | |
82 | + public String getAge() { | |
83 | + return age; | |
84 | + } | |
85 | + | |
86 | + public void setAge(String age) { | |
87 | + this.age = age; | |
88 | + } | |
89 | + | |
90 | + public String getDueWeek() { | |
91 | + return dueWeek; | |
92 | + } | |
93 | + | |
94 | + public void setDueWeek(String dueWeek) { | |
95 | + this.dueWeek = dueWeek; | |
96 | + } | |
97 | + | |
98 | + public Date getyChanQi() { | |
99 | + return yChanQi; | |
100 | + } | |
101 | + | |
102 | + public void setyChanQi(Date yChanQi) { | |
103 | + this.yChanQi = yChanQi; | |
104 | + } | |
105 | + | |
106 | + public String getPhone() { | |
107 | + return phone; | |
108 | + } | |
109 | + | |
110 | + public void setPhone(String phone) { | |
111 | + this.phone = phone; | |
112 | + } | |
113 | + | |
114 | + public String getDiaProject() { | |
115 | + return diaProject; | |
116 | + } | |
117 | + | |
118 | + public void setDiaProject(String diaProject) { | |
119 | + this.diaProject = diaProject; | |
120 | + } | |
121 | + | |
122 | + public Date getBirth() { | |
123 | + return birth; | |
124 | + } | |
125 | + | |
126 | + public void setBirth(Date birth) { | |
127 | + this.birth = birth; | |
128 | + } | |
129 | + | |
130 | + public String getWeight() { | |
131 | + return weight; | |
132 | + } | |
133 | + | |
134 | + public void setWeight(String weight) { | |
135 | + this.weight = weight; | |
136 | + } | |
137 | + | |
138 | + public Date getLastMenses() { | |
139 | + return lastMenses; | |
140 | + } | |
141 | + | |
142 | + public void setLastMenses(Date lastMenses) { | |
143 | + this.lastMenses = lastMenses; | |
144 | + } | |
145 | + | |
146 | + public String getMensStartDay() { | |
147 | + return mensStartDay; | |
148 | + } | |
149 | + | |
150 | + public void setMensStartDay(String mensStartDay) { | |
151 | + this.mensStartDay = mensStartDay; | |
152 | + } | |
153 | + | |
154 | + public String getMensEndDay() { | |
155 | + return mensEndDay; | |
156 | + } | |
157 | + | |
158 | + public void setMensEndDay(String mensEndDay) { | |
159 | + this.mensEndDay = mensEndDay; | |
160 | + } | |
161 | + | |
162 | + public String getMensStopStartDay() { | |
163 | + return mensStopStartDay; | |
164 | + } | |
165 | + | |
166 | + public void setMensStopStartDay(String mensStopStartDay) { | |
167 | + this.mensStopStartDay = mensStopStartDay; | |
168 | + } | |
169 | + | |
170 | + public String getMensStopEndDay() { | |
171 | + return mensStopEndDay; | |
172 | + } | |
173 | + | |
174 | + public void setMensStopEndDay(String mensStopEndDay) { | |
175 | + this.mensStopEndDay = mensStopEndDay; | |
176 | + } | |
177 | + | |
178 | + public String getSpecimenNo() { | |
179 | + return specimenNo; | |
180 | + } | |
181 | + | |
182 | + public void setSpecimenNo(String specimenNo) { | |
183 | + this.specimenNo = specimenNo; | |
184 | + } | |
185 | + | |
186 | + public String getCollectDocterId() { | |
187 | + return collectDocterId; | |
188 | + } | |
189 | + | |
190 | + public void setCollectDocterId(String collectDocterId) { | |
191 | + this.collectDocterId = collectDocterId; | |
192 | + } | |
193 | + | |
194 | + public Date getCollectDate() { | |
195 | + return collectDate; | |
196 | + } | |
197 | + | |
198 | + public void setCollectDate(Date collectDate) { | |
199 | + this.collectDate = collectDate; | |
200 | + } | |
201 | + | |
202 | + public String getSendDocterId() { | |
203 | + return sendDocterId; | |
204 | + } | |
205 | + | |
206 | + public void setSendDocterId(String sendDocterId) { | |
207 | + this.sendDocterId = sendDocterId; | |
208 | + } | |
209 | + | |
210 | + public Date getSendDate() { | |
211 | + return sendDate; | |
212 | + } | |
213 | + | |
214 | + public void setSendDate(Date sendDate) { | |
215 | + this.sendDate = sendDate; | |
216 | + } | |
217 | + | |
218 | + public String getCollectHospitalId() { | |
219 | + return collectHospitalId; | |
220 | + } | |
221 | + | |
222 | + public void setCollectHospitalId(String collectHospitalId) { | |
223 | + this.collectHospitalId = collectHospitalId; | |
224 | + } | |
225 | + | |
226 | + public Date getCreated() { | |
227 | + return created; | |
228 | + } | |
229 | + | |
230 | + public void setCreated(Date created) { | |
231 | + this.created = created; | |
232 | + } | |
233 | + | |
234 | + public Date getModified() { | |
235 | + return modified; | |
236 | + } | |
237 | + | |
238 | + public void setModified(Date modified) { | |
239 | + this.modified = modified; | |
240 | + } | |
241 | + | |
242 | + public String getStatus() { | |
243 | + return status; | |
244 | + } | |
245 | + | |
246 | + public void setStatus(String status) { | |
247 | + this.status = status; | |
248 | + } | |
249 | +} |
platform-dal/src/main/java/com/lyms/platform/query/DiagnosisQuery.java
View file @
0c2b842
1 | +package com.lyms.platform.query; | |
2 | + | |
3 | +import com.lyms.platform.common.base.IConvertToNativeQuery; | |
4 | +import com.lyms.platform.common.dao.BaseQuery; | |
5 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
6 | + | |
7 | +/** | |
8 | + * 新增产前诊断申请 | |
9 | + * Created by Administrator on 2018/9/10. | |
10 | + */ | |
11 | +public class DiagnosisQuery extends BaseQuery implements IConvertToNativeQuery { | |
12 | + | |
13 | + private String id; | |
14 | + private String parentId;//孕妇建档ID | |
15 | + private String queryNos;//查询号 | |
16 | + | |
17 | + | |
18 | + | |
19 | + | |
20 | + public MongoQuery convertToQuery() { | |
21 | + return null; | |
22 | + } | |
23 | +} |
platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdJbgwInterface.java
View file @
0c2b842
... | ... | @@ -194,9 +194,9 @@ |
194 | 194 | * @return |
195 | 195 | */ |
196 | 196 | public List<Map<String,String>> getChuZhen(String startDate,String endDate){ |
197 | - List<AntExChuModel> allList = null; | |
198 | - List<AntExChuModel> list = null; | |
199 | - List<AntExChuModel> list1 = null; | |
197 | + List<AntExChuModel> allList = new ArrayList<AntExChuModel>(); | |
198 | + List<AntExChuModel> list = new ArrayList<AntExChuModel>(); | |
199 | + List<AntExChuModel> list1 = new ArrayList<AntExChuModel>(); | |
200 | 200 | List<Map<String,String>> mList = new ArrayList<Map<String,String>>(); |
201 | 201 | AntExChuQuery antExChuQuery1 = new AntExChuQuery(); |
202 | 202 | antExChuQuery1.setCreatedTimeStart(DateUtil.parseYMDHMS(startDate)); |
... | ... | @@ -503,9 +503,9 @@ |
503 | 503 | * @return |
504 | 504 | */ |
505 | 505 | public List<Map<String,String>> getFuZhen(String startDate,String endDate){ |
506 | - List<AntenatalExaminationModel> allList = null; | |
507 | - List<AntenatalExaminationModel> list1 = null; | |
508 | - List<AntenatalExaminationModel> list = null; | |
506 | + List<AntenatalExaminationModel> allList = new ArrayList<AntenatalExaminationModel>(); | |
507 | + List<AntenatalExaminationModel> list1 = new ArrayList<AntenatalExaminationModel>(); | |
508 | + List<AntenatalExaminationModel> list = new ArrayList<AntenatalExaminationModel>(); | |
509 | 509 | List<Map<String,String>> mList = new ArrayList<Map<String,String>>(); |
510 | 510 | AntExQuery antExQuery1 = new AntExQuery(); |
511 | 511 | antExQuery1.setCreatedTimeStart(DateUtil.parseYMDHMS(startDate)); |
512 | 512 | |
513 | 513 | |
... | ... | @@ -593,20 +593,25 @@ |
593 | 593 | * @return |
594 | 594 | */ |
595 | 595 | public List<Map<String,String>> getFm(String startDate,String endDate){ |
596 | - List<MaternalDeliverModel> list = null; | |
596 | + List<MaternalDeliverModel> allList = new ArrayList<MaternalDeliverModel>(); | |
597 | + List<MaternalDeliverModel> list = new ArrayList<MaternalDeliverModel>(); | |
598 | + List<MaternalDeliverModel> list1 = new ArrayList<MaternalDeliverModel>(); | |
597 | 599 | List<Map<String,String>> mList = new ArrayList<Map<String,String>>(); |
598 | 600 | MatDeliverQuery deliverQuery1 = new MatDeliverQuery(); |
599 | 601 | deliverQuery1.setCreatedTimeStart(DateUtil.parseYMDHMS(startDate)); |
600 | 602 | deliverQuery1.setCreatedTimeEnd(DateUtil.parseYMDHMS(endDate)); |
601 | 603 | list = matDeliverService.query(deliverQuery1); |
602 | - if(null == list || list.size() == 0){ | |
603 | - MatDeliverQuery deliverQuery = new MatDeliverQuery(); | |
604 | - deliverQuery.setModifiedStart(DateUtil.parseYMDHMS(startDate)); | |
605 | - deliverQuery.setModifiedEnd(DateUtil.parseYMDHMS(endDate)); | |
606 | - list = matDeliverService.query(deliverQuery); | |
604 | + | |
605 | + MatDeliverQuery deliverQuery = new MatDeliverQuery(); | |
606 | + deliverQuery.setModifiedStart(DateUtil.parseYMDHMS(startDate)); | |
607 | + deliverQuery.setModifiedEnd(DateUtil.parseYMDHMS(endDate)); | |
608 | + list1 = matDeliverService.query(deliverQuery); | |
609 | + if((null != list && list.size() > 0) || (null != list1 && list1.size() > 0)){ | |
610 | + allList.addAll(list); | |
611 | + allList.addAll(list1); | |
607 | 612 | } |
608 | - if(list != null && list.size() > 0){ | |
609 | - for(MaternalDeliverModel data : list) { | |
613 | + if(allList != null && allList.size() > 0){ | |
614 | + for(MaternalDeliverModel data : allList) { | |
610 | 615 | Patients patients = patientsService.findOnePatientById(data.getParentId()); |
611 | 616 | if("2100001705".equals(patients.getHospitalId())){ |
612 | 617 | continue; |
... | ... | @@ -869,9 +874,9 @@ |
869 | 874 | * @return |
870 | 875 | */ |
871 | 876 | public List<Map<String,String>> getXse(String startDate,String endDate){ |
872 | - List<BabyModel> allModels = null; | |
873 | - List<BabyModel> models1 = null; | |
874 | - List<BabyModel> models = null; | |
877 | + List<BabyModel> allModels = new ArrayList<BabyModel>(); | |
878 | + List<BabyModel> models1 = new ArrayList<BabyModel>(); | |
879 | + List<BabyModel> models = new ArrayList<BabyModel>(); | |
875 | 880 | List<Map<String,String>> mList = new ArrayList<Map<String,String>>(); |
876 | 881 | BabyModelQuery babyQuery1 = new BabyModelQuery(); |
877 | 882 | babyQuery1.setCreatedTimeStart(DateUtil.parseYMDHMS(startDate)); |
... | ... | @@ -954,9 +959,9 @@ |
954 | 959 | * @return |
955 | 960 | */ |
956 | 961 | public List<Map<String,String>> getChfs(String startDate,String endDate){ |
957 | - List<MatdeliverFollowModel> allList = null; | |
958 | - List<MatdeliverFollowModel> list1 = null; | |
959 | - List<MatdeliverFollowModel> list = null; | |
962 | + List<MatdeliverFollowModel> allList = new ArrayList<MatdeliverFollowModel>(); | |
963 | + List<MatdeliverFollowModel> list1 = new ArrayList<MatdeliverFollowModel>(); | |
964 | + List<MatdeliverFollowModel> list = new ArrayList<MatdeliverFollowModel>(); | |
960 | 965 | List<Map<String,String>> mList = new ArrayList<Map<String,String>>(); |
961 | 966 | MatDeliverFollowQuery deliverQuery1 = new MatDeliverFollowQuery(); |
962 | 967 | deliverQuery1.setCreatedTimeStart(DateUtil.parseYMDHMS(startDate)); |
... | ... | @@ -1097,9 +1102,9 @@ |
1097 | 1102 | * @return |
1098 | 1103 | */ |
1099 | 1104 | public List<Map<String,String>> getCh42fs(String startDate,String endDate){ |
1100 | - List<PostReviewModel> allList = null; | |
1101 | - List<PostReviewModel> list1 = null; | |
1102 | - List<PostReviewModel> list = null; | |
1105 | + List<PostReviewModel> allList = new ArrayList<PostReviewModel>(); | |
1106 | + List<PostReviewModel> list1 = new ArrayList<PostReviewModel>(); | |
1107 | + List<PostReviewModel> list = new ArrayList<PostReviewModel>(); | |
1103 | 1108 | List<Map<String,String>> mList = new ArrayList<Map<String,String>>(); |
1104 | 1109 | PostReviewQuery mongoQuery1 = new PostReviewQuery(); |
1105 | 1110 | mongoQuery1.setCreatedTimeStart(DateUtil.parseYMDHMS(startDate)); |
... | ... | @@ -1548,9 +1553,9 @@ |
1548 | 1553 | * @return |
1549 | 1554 | */ |
1550 | 1555 | public List<Map<String,String>> getEb(String startDate,String endDate){ |
1551 | - List<BabyCheckModel> allList = null; | |
1552 | - List<BabyCheckModel> list1 = null; | |
1553 | - List<BabyCheckModel> list = null; | |
1556 | + List<BabyCheckModel> allList = new ArrayList<BabyCheckModel>(); | |
1557 | + List<BabyCheckModel> list1 = new ArrayList<BabyCheckModel>(); | |
1558 | + List<BabyCheckModel> list = new ArrayList<BabyCheckModel>(); | |
1554 | 1559 | List<Map<String, String>> mList = new ArrayList<Map<String, String>>(); |
1555 | 1560 | BabyCheckModelQuery babyQuery1 = new BabyCheckModelQuery(); |
1556 | 1561 | babyQuery1.setCreatedTimeStart(DateUtil.parseYMDHMS(startDate)); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/diagnosisFacaed.java
View file @
0c2b842
1 | +package com.lyms.platform.operate.web.facade; | |
2 | + | |
3 | +import com.lyms.platform.biz.service.DiagnosisService; | |
4 | +import com.lyms.platform.biz.service.PatientsService; | |
5 | +import com.lyms.platform.common.constants.ErrorCodeConstants; | |
6 | +import com.lyms.platform.common.enums.YnEnums; | |
7 | +import com.lyms.platform.common.result.BaseResponse; | |
8 | +import com.lyms.platform.operate.web.result.DiagnosisResult; | |
9 | +import com.lyms.platform.operate.web.result.HighScoreResult; | |
10 | +import com.lyms.platform.permission.model.PatientService; | |
11 | +import com.lyms.platform.pojo.Patients; | |
12 | +import com.lyms.platform.query.PatientsQuery; | |
13 | +import org.apache.commons.collections.CollectionUtils; | |
14 | +import org.apache.commons.lang.StringUtils; | |
15 | +import org.springframework.beans.factory.annotation.Autowired; | |
16 | +import org.springframework.stereotype.Component; | |
17 | + | |
18 | +import java.util.List; | |
19 | + | |
20 | +/** | |
21 | + * Created by Administrator on 2018/9/11. | |
22 | + */ | |
23 | +@Component | |
24 | +public class DiagnosisFacaed { | |
25 | + | |
26 | + @Autowired | |
27 | + private DiagnosisService diagnosisService; | |
28 | + @Autowired | |
29 | + private AutoMatchFacade autoMatchFacade; | |
30 | + @Autowired | |
31 | + private PatientsService patientsService; | |
32 | + @Autowired | |
33 | + private OrganizationGroupsFacade groupsFacade; | |
34 | + @Autowired | |
35 | + private AntenatalExaminationFacade antenatalExaminationFacade; | |
36 | + | |
37 | + | |
38 | + /** | |
39 | + * 产前诊断申请 | |
40 | + * @param cardNo | |
41 | + * @param vcCardNo | |
42 | + * @param userId | |
43 | + * @return | |
44 | + */ | |
45 | + public BaseResponse queryDiagnosis(String cardNo, String vcCardNo, Integer userId){ | |
46 | + String hospitalId = autoMatchFacade.getHospitalId(userId); | |
47 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
48 | + patientsQuery.setHospitalId(hospitalId); | |
49 | + patientsQuery.setYn(YnEnums.YES.getId()); | |
50 | + if (StringUtils.isNotEmpty(cardNo)) { | |
51 | + patientsQuery.setPhoneOrCert(cardNo); | |
52 | + } else if (StringUtils.isNotEmpty(vcCardNo)) { | |
53 | + patientsQuery.setVcCardNo(vcCardNo); | |
54 | + } | |
55 | + List<Patients> localPatients = patientsService.queryPatient(patientsQuery); | |
56 | + Patients pat = null; | |
57 | + if (CollectionUtils.isNotEmpty(localPatients)) { | |
58 | + pat = localPatients.get(0); | |
59 | + } else { | |
60 | + patientsQuery.setHospitalId(null); | |
61 | + List<Patients> areaPatients = patientsService.queryPatient(patientsQuery); | |
62 | + if (CollectionUtils.isNotEmpty(areaPatients)) { | |
63 | + pat = areaPatients.get(0); | |
64 | + if (StringUtils.isNotEmpty(groupsFacade.findByCurrentUserId(hospitalId))) { | |
65 | + //建立隐藏档案 | |
66 | + String id = antenatalExaminationFacade.handHideBuild(pat.getPid(), pat.getId(), userId, 1); | |
67 | + | |
68 | + pat = patientsService.findOnePatientById(id); | |
69 | + } else { | |
70 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("没有档案,请建档后申请产筛"); | |
71 | + } | |
72 | + }else{ | |
73 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("没有档案,请建档后申请产筛"); | |
74 | + } | |
75 | + } | |
76 | + | |
77 | + HighScoreResult highScoreResult = antenatalExaminationFacade.findLastRisk(pat.getPid(), false); | |
78 | + DiagnosisResult diagnosisResult = new DiagnosisResult(); | |
79 | + if(null != pat){ | |
80 | + | |
81 | + } | |
82 | + | |
83 | + | |
84 | + return null; | |
85 | + } | |
86 | + | |
87 | + | |
88 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/diagnosisResult.java
View file @
0c2b842
1 | +package com.lyms.platform.operate.web.result; | |
2 | + | |
3 | +import java.util.List; | |
4 | + | |
5 | +/** | |
6 | + * Created by Administrator on 2018/9/11. | |
7 | + */ | |
8 | +public class DiagnosisResult { | |
9 | + | |
10 | + private String id; | |
11 | + private String parentId;//孕妇ID | |
12 | + private String name;//姓名 | |
13 | + private Integer age;//年龄 | |
14 | + private String dueWeek;//孕周 | |
15 | + private String yChanQi;//预产期 | |
16 | + private String phone;//手机号 | |
17 | + private List riskFactor;//高危因素 | |
18 | + private String riskScore;//高危评分 | |
19 | + private String remarks;//备注 | |
20 | + private String lastMenses;//末次月经 | |
21 | + private String weight;//体重 | |
22 | + private String birth;//出生日期 | |
23 | + private String mensStartDay;//月经周期开始天数 | |
24 | + private String mensEndDay;//月经周期结束天数 | |
25 | + private String mensStopStartDay;//月经停留开始天数 | |
26 | + private String mensStopEndDay;//月经停留结束天数 | |
27 | + private String collectDocterId;//采集医生 | |
28 | + private String sendDocterId;//送检医生 | |
29 | + private String collectHospitalId;//申请医院 | |
30 | + private String isCqSieve;//是否申请了产前筛查 | |
31 | + private String sieveProject;//筛查项目 | |
32 | + private String ztfx;//整体风险 | |
33 | + | |
34 | + public String getId() { | |
35 | + return id; | |
36 | + } | |
37 | + | |
38 | + public void setId(String id) { | |
39 | + this.id = id; | |
40 | + } | |
41 | + | |
42 | + public String getParentId() { | |
43 | + return parentId; | |
44 | + } | |
45 | + | |
46 | + public void setParentId(String parentId) { | |
47 | + this.parentId = parentId; | |
48 | + } | |
49 | + | |
50 | + public String getName() { | |
51 | + return name; | |
52 | + } | |
53 | + | |
54 | + public void setName(String name) { | |
55 | + this.name = name; | |
56 | + } | |
57 | + | |
58 | + public Integer getAge() { | |
59 | + return age; | |
60 | + } | |
61 | + | |
62 | + public void setAge(Integer age) { | |
63 | + this.age = age; | |
64 | + } | |
65 | + | |
66 | + public String getDueWeek() { | |
67 | + return dueWeek; | |
68 | + } | |
69 | + | |
70 | + public void setDueWeek(String dueWeek) { | |
71 | + this.dueWeek = dueWeek; | |
72 | + } | |
73 | + | |
74 | + public String getyChanQi() { | |
75 | + return yChanQi; | |
76 | + } | |
77 | + | |
78 | + public void setyChanQi(String yChanQi) { | |
79 | + this.yChanQi = yChanQi; | |
80 | + } | |
81 | + | |
82 | + public String getPhone() { | |
83 | + return phone; | |
84 | + } | |
85 | + | |
86 | + public void setPhone(String phone) { | |
87 | + this.phone = phone; | |
88 | + } | |
89 | + | |
90 | + public List getRiskFactor() { | |
91 | + return riskFactor; | |
92 | + } | |
93 | + | |
94 | + public void setRiskFactor(List riskFactor) { | |
95 | + this.riskFactor = riskFactor; | |
96 | + } | |
97 | + | |
98 | + public String getRiskScore() { | |
99 | + return riskScore; | |
100 | + } | |
101 | + | |
102 | + public void setRiskScore(String riskScore) { | |
103 | + this.riskScore = riskScore; | |
104 | + } | |
105 | + | |
106 | + public String getRemarks() { | |
107 | + return remarks; | |
108 | + } | |
109 | + | |
110 | + public void setRemarks(String remarks) { | |
111 | + this.remarks = remarks; | |
112 | + } | |
113 | + | |
114 | + public String getLastMenses() { | |
115 | + return lastMenses; | |
116 | + } | |
117 | + | |
118 | + public void setLastMenses(String lastMenses) { | |
119 | + this.lastMenses = lastMenses; | |
120 | + } | |
121 | + | |
122 | + public String getWeight() { | |
123 | + return weight; | |
124 | + } | |
125 | + | |
126 | + public void setWeight(String weight) { | |
127 | + this.weight = weight; | |
128 | + } | |
129 | + | |
130 | + public String getBirth() { | |
131 | + return birth; | |
132 | + } | |
133 | + | |
134 | + public void setBirth(String birth) { | |
135 | + this.birth = birth; | |
136 | + } | |
137 | + | |
138 | + public String getMensStartDay() { | |
139 | + return mensStartDay; | |
140 | + } | |
141 | + | |
142 | + public void setMensStartDay(String mensStartDay) { | |
143 | + this.mensStartDay = mensStartDay; | |
144 | + } | |
145 | + | |
146 | + public String getMensEndDay() { | |
147 | + return mensEndDay; | |
148 | + } | |
149 | + | |
150 | + public void setMensEndDay(String mensEndDay) { | |
151 | + this.mensEndDay = mensEndDay; | |
152 | + } | |
153 | + | |
154 | + public String getMensStopStartDay() { | |
155 | + return mensStopStartDay; | |
156 | + } | |
157 | + | |
158 | + public void setMensStopStartDay(String mensStopStartDay) { | |
159 | + this.mensStopStartDay = mensStopStartDay; | |
160 | + } | |
161 | + | |
162 | + public String getMensStopEndDay() { | |
163 | + return mensStopEndDay; | |
164 | + } | |
165 | + | |
166 | + public void setMensStopEndDay(String mensStopEndDay) { | |
167 | + this.mensStopEndDay = mensStopEndDay; | |
168 | + } | |
169 | + | |
170 | + public String getCollectDocterId() { | |
171 | + return collectDocterId; | |
172 | + } | |
173 | + | |
174 | + public void setCollectDocterId(String collectDocterId) { | |
175 | + this.collectDocterId = collectDocterId; | |
176 | + } | |
177 | + | |
178 | + public String getSendDocterId() { | |
179 | + return sendDocterId; | |
180 | + } | |
181 | + | |
182 | + public void setSendDocterId(String sendDocterId) { | |
183 | + this.sendDocterId = sendDocterId; | |
184 | + } | |
185 | + | |
186 | + public String getCollectHospitalId() { | |
187 | + return collectHospitalId; | |
188 | + } | |
189 | + | |
190 | + public void setCollectHospitalId(String collectHospitalId) { | |
191 | + this.collectHospitalId = collectHospitalId; | |
192 | + } | |
193 | + | |
194 | + public String getIsCqSieve() { | |
195 | + return isCqSieve; | |
196 | + } | |
197 | + | |
198 | + public void setIsCqSieve(String isCqSieve) { | |
199 | + this.isCqSieve = isCqSieve; | |
200 | + } | |
201 | + | |
202 | + public String getSieveProject() { | |
203 | + return sieveProject; | |
204 | + } | |
205 | + | |
206 | + public void setSieveProject(String sieveProject) { | |
207 | + this.sieveProject = sieveProject; | |
208 | + } | |
209 | + | |
210 | + public String getZtfx() { | |
211 | + return ztfx; | |
212 | + } | |
213 | + | |
214 | + public void setZtfx(String ztfx) { | |
215 | + this.ztfx = ztfx; | |
216 | + } | |
217 | +} |