Commit b4baf22bbc8ecc63790a28e585f54649c222e404
1 parent
7b38f16b35
Exists in
master
and in
6 other branches
追访查询接口和新增接口
Showing 6 changed files with 351 additions and 0 deletions
- platform-operate-api/src/main/java/com/lyms/hospitalapi/pojo/AfterVisitRecord.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientAfterVisitController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientAfterVisitFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AfterVisitRequert.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/AfterVisitRecordService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/AfterVisitRecordServiceImpl.java
platform-operate-api/src/main/java/com/lyms/hospitalapi/pojo/AfterVisitRecord.java
View file @
b4baf22
1 | +package com.lyms.hospitalapi.pojo; | |
2 | + | |
3 | +import java.util.Date; | |
4 | + | |
5 | +/** | |
6 | + * 追访记录 | |
7 | + * @author wyp 2017/12/08 | |
8 | + */ | |
9 | +public class AfterVisitRecord { | |
10 | + | |
11 | + //被追访人 | |
12 | + private String patientId; | |
13 | + //医院id | |
14 | + private String hospitalId; | |
15 | + //追访时间 | |
16 | + private Date afterVisitTime; | |
17 | + //追访人 | |
18 | + private String afterVisitMan; | |
19 | + //追访方式 | |
20 | + private byte afterVisitType; | |
21 | + //追访结果 | |
22 | + private String afterVisitResult; | |
23 | + //预约时间 | |
24 | + private Date appointmentTime; | |
25 | + | |
26 | + | |
27 | + public Date getAfterVisitTime() { | |
28 | + return afterVisitTime; | |
29 | + } | |
30 | + | |
31 | + public void setAfterVisitTime(Date afterVisitTime) { | |
32 | + this.afterVisitTime = afterVisitTime; | |
33 | + } | |
34 | + | |
35 | + public String getAfterVisitMan() { | |
36 | + return afterVisitMan; | |
37 | + } | |
38 | + | |
39 | + public void setAfterVisitMan(String afterVisitMan) { | |
40 | + this.afterVisitMan = afterVisitMan; | |
41 | + } | |
42 | + | |
43 | + public byte getAfterVisitType() { | |
44 | + return afterVisitType; | |
45 | + } | |
46 | + | |
47 | + public void setAfterVisitType(byte afterVisitType) { | |
48 | + this.afterVisitType = afterVisitType; | |
49 | + } | |
50 | + | |
51 | + public String getAfterVisitResult() { | |
52 | + return afterVisitResult; | |
53 | + } | |
54 | + | |
55 | + public void setAfterVisitResult(String afterVisitResult) { | |
56 | + this.afterVisitResult = afterVisitResult; | |
57 | + } | |
58 | + | |
59 | + public Date getAppointmentTime() { | |
60 | + return appointmentTime; | |
61 | + } | |
62 | + | |
63 | + public void setAppointmentTime(Date appointmentTime) { | |
64 | + this.appointmentTime = appointmentTime; | |
65 | + } | |
66 | + | |
67 | + public String getPatientId() { | |
68 | + return patientId; | |
69 | + } | |
70 | + | |
71 | + public void setPatientId(String patientId) { | |
72 | + this.patientId = patientId; | |
73 | + } | |
74 | + | |
75 | + public String getHospitalId() { | |
76 | + return hospitalId; | |
77 | + } | |
78 | + | |
79 | + public void setHospitalId(String hospitalId) { | |
80 | + this.hospitalId = hospitalId; | |
81 | + } | |
82 | + | |
83 | + | |
84 | + @Override | |
85 | + public String toString() { | |
86 | + return "AfterVisitRecord{" + | |
87 | + "patientId='" + patientId + '\'' + | |
88 | + ", hospitalId='" + hospitalId + '\'' + | |
89 | + ", afterVisitTime=" + afterVisitTime + | |
90 | + ", afterVisitMan='" + afterVisitMan + '\'' + | |
91 | + ", afterVisitType=" + afterVisitType + | |
92 | + ", afterVisitResult='" + afterVisitResult + '\'' + | |
93 | + ", appointmentTime=" + appointmentTime + | |
94 | + '}'; | |
95 | + } | |
96 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientAfterVisitController.java
View file @
b4baf22
1 | +package com.lyms.platform.operate.web.controller; | |
2 | + | |
3 | +import com.lyms.hospitalapi.pojo.AfterVisitRecord; | |
4 | +import com.lyms.platform.common.base.BaseController; | |
5 | +import com.lyms.platform.common.result.BaseResponse; | |
6 | +import com.lyms.platform.common.utils.StringUtils; | |
7 | +import com.lyms.platform.operate.web.facade.PatientAfterVisitFacade; | |
8 | +import com.lyms.platform.operate.web.request.AfterVisitRequert; | |
9 | +import com.lyms.platform.pojo.Patients; | |
10 | +import org.springframework.beans.factory.annotation.Autowired; | |
11 | +import org.springframework.stereotype.Controller; | |
12 | +import org.springframework.web.bind.annotation.*; | |
13 | +import scala.util.regexp.Base; | |
14 | + | |
15 | +import java.util.List; | |
16 | + | |
17 | +/** | |
18 | + * 追访相关业务 | |
19 | + */ | |
20 | +@Controller | |
21 | +@RequestMapping("/patientAfterVisit") | |
22 | +public class PatientAfterVisitController extends BaseController { | |
23 | + | |
24 | + @Autowired | |
25 | + PatientAfterVisitFacade patientAfterVisitFacade; | |
26 | + | |
27 | + /** | |
28 | + * 根据医院查询所有建档数据 | |
29 | + * @return | |
30 | + */ | |
31 | + @ResponseBody | |
32 | + @RequestMapping(value = "/query",method = RequestMethod.GET) | |
33 | + public BaseResponse queryAfterVisitRecord(@RequestBody AfterVisitRequert afterVisitRequert){ | |
34 | + //根据当前医院查询需要追访的记录 | |
35 | + BaseResponse result = new BaseResponse(); | |
36 | + List<Patients> list = null; | |
37 | + if (StringUtils.isNotEmpty(afterVisitRequert.getHospitalId())) { | |
38 | + | |
39 | + list = patientAfterVisitFacade.queryPatientAfterVisitRecord(afterVisitRequert.getHospitalId()); | |
40 | + result.setErrorcode(0); | |
41 | + result.setErrormsg("查询成功"); | |
42 | + result.setObject(list); | |
43 | + } | |
44 | + | |
45 | + return result; | |
46 | + | |
47 | + } | |
48 | + | |
49 | + /** | |
50 | + * 添加追访记录 | |
51 | + * @param afterVisitRecord | |
52 | + * @return | |
53 | + */ | |
54 | + @ResponseBody | |
55 | + @RequestMapping(value = "/add",method = RequestMethod.POST) | |
56 | + public BaseResponse addAfterVisitRecord(@RequestBody AfterVisitRecord afterVisitRecord){ | |
57 | + BaseResponse result = new BaseResponse(); | |
58 | + if(afterVisitRecord!= null){ | |
59 | + patientAfterVisitFacade.addPatientAfterVisitRecord(afterVisitRecord); | |
60 | + result.setErrorcode(0); | |
61 | + result.setErrormsg("添加成功"); | |
62 | + | |
63 | + } | |
64 | + | |
65 | + return result; | |
66 | + | |
67 | + } | |
68 | + | |
69 | + | |
70 | + | |
71 | + | |
72 | + | |
73 | + | |
74 | + | |
75 | + | |
76 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientAfterVisitFacade.java
View file @
b4baf22
1 | +package com.lyms.platform.operate.web.facade; | |
2 | + | |
3 | +import com.lyms.hospitalapi.pojo.AfterVisitRecord; | |
4 | +import com.lyms.platform.biz.service.PatientsService; | |
5 | +import com.lyms.platform.operate.web.service.AfterVisitRecordService; | |
6 | +import com.lyms.platform.pojo.Patients; | |
7 | +import com.lyms.platform.query.PatientsQuery; | |
8 | +import org.springframework.beans.factory.annotation.Autowired; | |
9 | +import org.springframework.stereotype.Component; | |
10 | + | |
11 | +import java.util.ArrayList; | |
12 | +import java.util.List; | |
13 | + | |
14 | +/** | |
15 | + * 追访 | |
16 | + */ | |
17 | +@Component | |
18 | +public class PatientAfterVisitFacade { | |
19 | + @Autowired | |
20 | + private PatientsService patientsService; | |
21 | + @Autowired | |
22 | + private AfterVisitRecordService afterVisitRecordService; | |
23 | + | |
24 | + /** | |
25 | + * 查询追访概况 | |
26 | + * @param hospitalId | |
27 | + * @return | |
28 | + */ | |
29 | + public List<Patients> queryPatientAfterVisitRecord(String hospitalId){ | |
30 | + List<Patients> list = new ArrayList<Patients>(); | |
31 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
32 | + patientsQuery.setHospitalId(hospitalId); | |
33 | + list = patientsService.queryPatient(patientsQuery); | |
34 | + return list; | |
35 | + } | |
36 | + | |
37 | + /** | |
38 | + * 添加追访记录 | |
39 | + * @param afterVisitRecord | |
40 | + */ | |
41 | + public void addPatientAfterVisitRecord(AfterVisitRecord afterVisitRecord){ | |
42 | + AfterVisitRecord afterVisit = new AfterVisitRecord(); | |
43 | + afterVisit.setHospitalId(afterVisitRecord.getHospitalId()); | |
44 | + afterVisit.setPatientId(afterVisitRecord.getPatientId()); | |
45 | + afterVisit.setAfterVisitMan(afterVisitRecord.getAfterVisitMan()); | |
46 | + afterVisit.setAfterVisitResult(afterVisitRecord.getAfterVisitResult()); | |
47 | + afterVisit.setAfterVisitTime(afterVisitRecord.getAfterVisitTime()); | |
48 | + afterVisit.setAfterVisitType(afterVisitRecord.getAfterVisitType()); | |
49 | + afterVisit.setAppointmentTime(afterVisitRecord.getAppointmentTime()); | |
50 | + afterVisitRecordService.addAfterVisitRecord(afterVisit); | |
51 | + | |
52 | + } | |
53 | + | |
54 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AfterVisitRequert.java
View file @
b4baf22
1 | +package com.lyms.platform.operate.web.request; | |
2 | + | |
3 | +public class AfterVisitRequert { | |
4 | + | |
5 | + //医院id | |
6 | + String hospitalId; | |
7 | + //妇女建档起始时间 | |
8 | + String womenBiuldStartTime; | |
9 | + //妇女建档结束时间 | |
10 | + String womenBiuldEndTime; | |
11 | + //产检建档起始时间 | |
12 | + String antenataBiuldStartTime; | |
13 | + //产检建档结束时间 | |
14 | + String antenataBiuldEndTime; | |
15 | + //分娩起始时间 | |
16 | + String deliveStartTime; | |
17 | + //分娩结束时间 | |
18 | + String deliveEndTime; | |
19 | + //查询号:姓名/证件号/联系方式 | |
20 | + String queryNum; | |
21 | + | |
22 | + | |
23 | + public String getHospitalId() { | |
24 | + return hospitalId; | |
25 | + } | |
26 | + | |
27 | + public void setHospitalId(String hospitalId) { | |
28 | + this.hospitalId = hospitalId; | |
29 | + } | |
30 | + | |
31 | + public String getWomenBiuldStartTime() { | |
32 | + return womenBiuldStartTime; | |
33 | + } | |
34 | + | |
35 | + public void setWomenBiuldStartTime(String womenBiuldStartTime) { | |
36 | + this.womenBiuldStartTime = womenBiuldStartTime; | |
37 | + } | |
38 | + | |
39 | + public String getWomenBiuldEndTime() { | |
40 | + return womenBiuldEndTime; | |
41 | + } | |
42 | + | |
43 | + public void setWomenBiuldEndTime(String womenBiuldEndTime) { | |
44 | + this.womenBiuldEndTime = womenBiuldEndTime; | |
45 | + } | |
46 | + | |
47 | + public String getAntenataBiuldStartTime() { | |
48 | + return antenataBiuldStartTime; | |
49 | + } | |
50 | + | |
51 | + public void setAntenataBiuldStartTime(String antenataBiuldStartTime) { | |
52 | + this.antenataBiuldStartTime = antenataBiuldStartTime; | |
53 | + } | |
54 | + | |
55 | + public String getAntenataBiuldEndTime() { | |
56 | + return antenataBiuldEndTime; | |
57 | + } | |
58 | + | |
59 | + public void setAntenataBiuldEndTime(String antenataBiuldEndTime) { | |
60 | + this.antenataBiuldEndTime = antenataBiuldEndTime; | |
61 | + } | |
62 | + | |
63 | + public String getDeliveStartTime() { | |
64 | + return deliveStartTime; | |
65 | + } | |
66 | + | |
67 | + public void setDeliveStartTime(String deliveStartTime) { | |
68 | + this.deliveStartTime = deliveStartTime; | |
69 | + } | |
70 | + | |
71 | + public String getDeliveEndTime() { | |
72 | + return deliveEndTime; | |
73 | + } | |
74 | + | |
75 | + public void setDeliveEndTime(String deliveEndTime) { | |
76 | + this.deliveEndTime = deliveEndTime; | |
77 | + } | |
78 | + | |
79 | + public String getQueryNum() { | |
80 | + return queryNum; | |
81 | + } | |
82 | + | |
83 | + public void setQueryNum(String queryNum) { | |
84 | + this.queryNum = queryNum; | |
85 | + } | |
86 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/AfterVisitRecordService.java
View file @
b4baf22
1 | +package com.lyms.platform.operate.web.service; | |
2 | + | |
3 | +import com.lyms.hospitalapi.pojo.AfterVisitRecord; | |
4 | + | |
5 | +/** | |
6 | + * 追访记录服务 | |
7 | + */ | |
8 | +public interface AfterVisitRecordService { | |
9 | + | |
10 | + | |
11 | + /** | |
12 | + * 添加追访记录 | |
13 | + * @param afterVisitRecord | |
14 | + */ | |
15 | + void addAfterVisitRecord(AfterVisitRecord afterVisitRecord); | |
16 | + | |
17 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/AfterVisitRecordServiceImpl.java
View file @
b4baf22
1 | +package com.lyms.platform.operate.web.service.impl; | |
2 | + | |
3 | +import com.lyms.hospitalapi.pojo.AfterVisitRecord; | |
4 | +import com.lyms.platform.operate.web.service.AfterVisitRecordService; | |
5 | +import org.springframework.beans.factory.annotation.Autowired; | |
6 | +import org.springframework.data.mongodb.core.MongoTemplate; | |
7 | +import org.springframework.stereotype.Service; | |
8 | + | |
9 | +/** | |
10 | + * 追访服务实现类 | |
11 | + */ | |
12 | +@Service | |
13 | +public class AfterVisitRecordServiceImpl implements AfterVisitRecordService{ | |
14 | + | |
15 | + @Autowired | |
16 | + MongoTemplate mongoTemplate; | |
17 | + | |
18 | + @Override | |
19 | + public void addAfterVisitRecord(AfterVisitRecord afterVisitRecord) { | |
20 | + mongoTemplate.save(afterVisitRecord); | |
21 | + } | |
22 | +} |