Commit 80c377a137677da365121fb7eafaeec9b8ed4035
1 parent
a3470bb451
Exists in
master
and in
1 other branch
1
Showing 9 changed files with 1266 additions and 0 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IPostReviewDao.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/PostReviewDaoImpl.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PostReviewService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PostReviewController.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/request/PostReviewQueryRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/PostReviewRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PostReviewListResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PostReviewResult.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IPostReviewDao.java
View file @
80c377a
1 | +package com.lyms.platform.biz.dal; | |
2 | + | |
3 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
4 | +import com.lyms.platform.pojo.PostReviewModel; | |
5 | + | |
6 | +import java.util.List; | |
7 | + | |
8 | +/** | |
9 | + * 产后复查dao | |
10 | + * | |
11 | + * Created by Administrator on 2016/6/28 0028. | |
12 | + */ | |
13 | +public interface IPostReviewDao { | |
14 | + | |
15 | + /** | |
16 | + * 增加产后复查信息 | |
17 | + * | |
18 | + * @param postReviewModel | |
19 | + * @return | |
20 | + */ | |
21 | + PostReviewModel addPostReview(PostReviewModel postReviewModel); | |
22 | + | |
23 | + /** | |
24 | + * 根据id获取一个产后复查信息 | |
25 | + * | |
26 | + * @param id | |
27 | + * @return | |
28 | + */ | |
29 | + PostReviewModel findOneById(String id); | |
30 | + | |
31 | + /** | |
32 | + * 查询批量的产后复查 | |
33 | + * | |
34 | + * @param mongoQuery | |
35 | + * @return | |
36 | + */ | |
37 | + List<PostReviewModel> findWithList(MongoQuery mongoQuery); | |
38 | + | |
39 | + /** | |
40 | + * 修改一条数据 | |
41 | + * | |
42 | + * @param postReviewModel | |
43 | + * @param id | |
44 | + */ | |
45 | + void updatePostById(PostReviewModel postReviewModel,String id); | |
46 | + | |
47 | + /** | |
48 | + * 删除一条数据 | |
49 | + * | |
50 | + * @param id | |
51 | + */ | |
52 | + void deleteOneById(String id); | |
53 | + | |
54 | + int queryCount(MongoQuery query); | |
55 | +} |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/PostReviewDaoImpl.java
View file @
80c377a
1 | +package com.lyms.platform.biz.dal.impl; | |
2 | + | |
3 | +import com.lyms.platform.biz.dal.IPostReviewDao; | |
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.PostReviewModel; | |
9 | +import org.bson.types.ObjectId; | |
10 | +import org.springframework.stereotype.Repository; | |
11 | + | |
12 | +import java.util.List; | |
13 | + | |
14 | +/** | |
15 | + * 产后复查 | |
16 | + * | |
17 | + * Created by Administrator on 2016/6/28 0028. | |
18 | + */ | |
19 | +@Repository("postReviewDao") | |
20 | +public class PostReviewDaoImpl extends BaseMongoDAOImpl<PostReviewModel> implements IPostReviewDao { | |
21 | + /** | |
22 | + * 增加产后复查信息 | |
23 | + * | |
24 | + * @param postReviewModel | |
25 | + * @return | |
26 | + */ | |
27 | + public PostReviewModel addPostReview(PostReviewModel postReviewModel) { | |
28 | + return save(postReviewModel); | |
29 | + } | |
30 | + | |
31 | + /** | |
32 | + * 根据id获取一个产后复查信息 | |
33 | + * | |
34 | + * @param id | |
35 | + * @return | |
36 | + */ | |
37 | + public PostReviewModel findOneById(String id) { | |
38 | + return findById(id); | |
39 | + } | |
40 | + | |
41 | + /** | |
42 | + * 查询批量的产后复查 | |
43 | + * | |
44 | + * @param mongoQuery | |
45 | + * @return | |
46 | + */ | |
47 | + public List<PostReviewModel> findWithList(MongoQuery mongoQuery) { | |
48 | + return find(mongoQuery.convertToMongoQuery()); | |
49 | + } | |
50 | + | |
51 | + /** | |
52 | + * 修改一条数据 | |
53 | + * | |
54 | + * @param postReviewModel | |
55 | + * @param id | |
56 | + */ | |
57 | + public void updatePostById(PostReviewModel postReviewModel, String id) { | |
58 | + update(new MongoQuery(new MongoCondition("id", id, MongoOper.IS)).convertToMongoQuery(), postReviewModel); | |
59 | + } | |
60 | + | |
61 | + /** | |
62 | + * 删除一条数据 | |
63 | + * | |
64 | + * @param id | |
65 | + */ | |
66 | + public void deleteOneById(String id) { | |
67 | + delete(new MongoQuery(new MongoCondition("id", new ObjectId(id), MongoOper.IS)).convertToMongoQuery()); | |
68 | + } | |
69 | + public int queryCount(MongoQuery query){ | |
70 | + return (int)count(query.convertToMongoQuery()); | |
71 | + } | |
72 | +} |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PostReviewService.java
View file @
80c377a
1 | +package com.lyms.platform.biz.service; | |
2 | + | |
3 | +import com.lyms.platform.biz.dal.IPostReviewDao; | |
4 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
5 | +import com.lyms.platform.common.enums.YnEnums; | |
6 | +import com.lyms.platform.pojo.PostReviewModel; | |
7 | +import com.lyms.platform.query.PostReviewQuery; | |
8 | +import org.apache.commons.lang.StringUtils; | |
9 | +import org.springframework.beans.factory.annotation.Autowired; | |
10 | +import org.springframework.data.domain.Sort; | |
11 | +import org.springframework.stereotype.Service; | |
12 | + | |
13 | +import java.util.Date; | |
14 | +import java.util.List; | |
15 | + | |
16 | +/** | |
17 | + * 产后复查服务 | |
18 | + * <p> | |
19 | + * Created by Administrator on 2016/6/28 0028. | |
20 | + */ | |
21 | +@Service | |
22 | +public class PostReviewService { | |
23 | + @Autowired | |
24 | + private IPostReviewDao postReviewDao; | |
25 | + | |
26 | + /** | |
27 | + * 增加产后复查 | |
28 | + * | |
29 | + * @param postReviewModel | |
30 | + * @return | |
31 | + */ | |
32 | + public PostReviewModel addPostReview(PostReviewModel postReviewModel) { | |
33 | + postReviewModel.setYn(YnEnums.YES.getId()); | |
34 | + postReviewModel.setCreated(new Date()); | |
35 | + postReviewModel.setModified(new Date()); | |
36 | + return postReviewDao.addPostReview(postReviewModel); | |
37 | + } | |
38 | + | |
39 | + | |
40 | + | |
41 | + /** | |
42 | + * 根据id获取一个产后复查信息 | |
43 | + * | |
44 | + * @param id | |
45 | + * @return | |
46 | + */ | |
47 | + public PostReviewModel findOneById(String id) { | |
48 | + return postReviewDao.findOneById(id); | |
49 | + } | |
50 | + | |
51 | + /** | |
52 | + * 查询批量的产后复查 | |
53 | + * | |
54 | + * @param mongoQuery | |
55 | + * @return | |
56 | + */ | |
57 | + public List<PostReviewModel> findWithList(PostReviewQuery mongoQuery) { | |
58 | + MongoQuery query = mongoQuery.convertToQuery(); | |
59 | + if (StringUtils.isNotEmpty(mongoQuery.getNeed())) { | |
60 | + mongoQuery.mysqlBuild(postReviewDao.queryCount(query)); | |
61 | + query.start(mongoQuery.getOffset()).end(mongoQuery.getLimit()); | |
62 | + } | |
63 | + return postReviewDao.findWithList(query.addOrder(Sort.Direction.DESC, "id")); | |
64 | + } | |
65 | + | |
66 | + /** | |
67 | + * 修改一条数据 | |
68 | + * | |
69 | + * @param postReviewModel | |
70 | + * @param id | |
71 | + */ | |
72 | + public void updatePostById(PostReviewModel postReviewModel, String id) { | |
73 | + postReviewModel.setModified(new Date()); | |
74 | + postReviewDao.updatePostById(postReviewModel, id); | |
75 | + } | |
76 | + | |
77 | + /** | |
78 | + * 删除一条数据 | |
79 | + * | |
80 | + * @param id | |
81 | + */ | |
82 | + public void deleteOneById(String id) { | |
83 | + postReviewDao.deleteOneById(id); | |
84 | + } | |
85 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PostReviewController.java
View file @
80c377a
1 | +package com.lyms.platform.operate.web.controller; | |
2 | + | |
3 | +import com.lyms.platform.common.base.BaseController; | |
4 | +import com.lyms.platform.common.constants.ErrorCodeConstants; | |
5 | +import com.lyms.platform.common.result.BaseResponse; | |
6 | +import com.lyms.platform.operate.web.facade.PostReviewFacade; | |
7 | +import com.lyms.platform.operate.web.request.PostReviewQueryRequest; | |
8 | +import com.lyms.platform.operate.web.request.PostReviewRequest; | |
9 | +import org.apache.commons.lang.StringUtils; | |
10 | +import org.springframework.beans.factory.annotation.Autowired; | |
11 | +import org.springframework.stereotype.Controller; | |
12 | +import org.springframework.web.bind.annotation.RequestMapping; | |
13 | +import org.springframework.web.bind.annotation.RequestMethod; | |
14 | +import org.springframework.web.bind.annotation.RequestParam; | |
15 | +import org.springframework.web.bind.annotation.ResponseBody; | |
16 | + | |
17 | +import javax.validation.Valid; | |
18 | + | |
19 | +/** | |
20 | + * | |
21 | + * 产后复查 | |
22 | + * | |
23 | + * Created by Administrator on 2016/6/28 0028. | |
24 | + */ | |
25 | +@Controller | |
26 | +public class PostReviewController extends BaseController { | |
27 | + | |
28 | + @Autowired | |
29 | + private PostReviewFacade postReviewFacade; | |
30 | + | |
31 | + /** | |
32 | + * 新增产后复查 | |
33 | + * | |
34 | + * @return | |
35 | + */ | |
36 | + public BaseResponse addPostReview(@Valid PostReviewRequest postReviewRequest){ | |
37 | + return postReviewFacade.addPostReview(postReviewRequest); | |
38 | + } | |
39 | + | |
40 | + /** | |
41 | + * 查询产后复查 | |
42 | + * | |
43 | + * @param postReviewQueryRequest 产后复查查询请求对象 | |
44 | + * | |
45 | + * @return | |
46 | + */ | |
47 | + public BaseResponse queryPostReviewList(@Valid PostReviewQueryRequest postReviewQueryRequest){ | |
48 | + return postReviewFacade.queryPostList(postReviewQueryRequest); | |
49 | + } | |
50 | + | |
51 | + /** | |
52 | + * | |
53 | + * 查询产后复查对象 | |
54 | + * | |
55 | + * @param id | |
56 | + * | |
57 | + * @return | |
58 | + */ | |
59 | + @RequestMapping(method = RequestMethod.GET,value = "/postreview") | |
60 | + @ResponseBody | |
61 | + public BaseResponse queryPostReview(@RequestParam("id") String id) { | |
62 | + if(StringUtils.isEmpty(id)){ | |
63 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("id不能为空."); | |
64 | + } | |
65 | + return postReviewFacade.findById(id); | |
66 | + } | |
67 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PostReviewFacade.java
View file @
80c377a
1 | +package com.lyms.platform.operate.web.facade; | |
2 | + | |
3 | +import com.lyms.platform.biz.service.PatientsService; | |
4 | +import com.lyms.platform.biz.service.PostReviewService; | |
5 | +import com.lyms.platform.common.constants.ErrorCodeConstants; | |
6 | +import com.lyms.platform.common.enums.YnEnums; | |
7 | +import com.lyms.platform.common.result.BaseObjectResponse; | |
8 | +import com.lyms.platform.common.result.BaseResponse; | |
9 | +import com.lyms.platform.common.utils.Assert; | |
10 | +import com.lyms.platform.operate.web.request.PostReviewQueryRequest; | |
11 | +import com.lyms.platform.operate.web.request.PostReviewRequest; | |
12 | +import com.lyms.platform.operate.web.result.PostReviewListResult; | |
13 | +import com.lyms.platform.operate.web.result.PostReviewResult; | |
14 | +import com.lyms.platform.pojo.Patients; | |
15 | +import com.lyms.platform.pojo.PostReviewModel; | |
16 | +import com.lyms.platform.query.PatientsQuery; | |
17 | +import com.lyms.platform.query.PostReviewQuery; | |
18 | +import org.apache.commons.lang.StringUtils; | |
19 | +import org.springframework.beans.factory.annotation.Autowired; | |
20 | +import org.springframework.stereotype.Component; | |
21 | + | |
22 | +import java.util.List; | |
23 | + | |
24 | +/** | |
25 | + * 产后复查门面 | |
26 | + * <p> | |
27 | + * Created by Administrator on 2016/6/28 0028. | |
28 | + */ | |
29 | +@Component | |
30 | +public class PostReviewFacade { | |
31 | + | |
32 | + @Autowired | |
33 | + private PostReviewService postReviewService; | |
34 | + @Autowired | |
35 | + private PatientsService patientsService; | |
36 | + | |
37 | + public BaseResponse addPostReview(PostReviewRequest postReviewRequest) { | |
38 | + if(StringUtils.isEmpty(postReviewRequest.getId())){ | |
39 | + postReviewService.addPostReview(postReviewRequest.convertToDataModel()); | |
40 | + }else{ | |
41 | + postReviewService.updatePostById(postReviewRequest.convertToDataModel(),postReviewRequest.getId()); | |
42 | + } | |
43 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
44 | + } | |
45 | + | |
46 | + public BaseResponse queryPostList(PostReviewQueryRequest postReviewQueryRequest) { | |
47 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
48 | + patientsQuery.setYn(YnEnums.YES.getId()); | |
49 | + patientsQuery.setCardNo(postReviewQueryRequest.getCardNo()); | |
50 | + patientsQuery.setVcCardNo(postReviewQueryRequest.getVcCardNo()); | |
51 | + Patients patientsList = patientsService.findOnePatientByCardNo(patientsQuery); | |
52 | + PostReviewListResult postReviewListResult = new PostReviewListResult(); | |
53 | + if (null != patientsList) { | |
54 | + PostReviewQuery postReviewQuery = new PostReviewQuery(); | |
55 | + postReviewQuery.setParentId(patientsList.getId()); | |
56 | + postReviewQuery.setYn(YnEnums.YES.getId()); | |
57 | + List<PostReviewModel> postReviewModels = postReviewService.findWithList(postReviewQuery); | |
58 | + if (null != postReviewModels) { | |
59 | + postReviewListResult.convertToResult(postReviewModels, patientsList); | |
60 | + } | |
61 | + } | |
62 | + return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(postReviewListResult); | |
63 | + } | |
64 | + | |
65 | + /** | |
66 | + * 根据id 获取产后记录 | |
67 | + * | |
68 | + * @param id | |
69 | + * @return | |
70 | + */ | |
71 | + public BaseResponse findById(String id) { | |
72 | + PostReviewModel postReviewModel = postReviewService.findOneById(id); | |
73 | + Assert.notNull(postReviewModel, "没有对应的数据."); | |
74 | + PostReviewResult postReviewResult = new PostReviewResult(); | |
75 | + postReviewResult.convertToResult(postReviewModel); | |
76 | + return new BaseObjectResponse().setData(postReviewResult).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
77 | + } | |
78 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/PostReviewQueryRequest.java
View file @
80c377a
1 | +package com.lyms.platform.operate.web.request; | |
2 | + | |
3 | +import com.lyms.platform.common.core.annotation.form.Form; | |
4 | +import com.lyms.platform.common.core.annotation.form.FormParam; | |
5 | + | |
6 | +/** | |
7 | + * | |
8 | + * 产后复查查询对象 | |
9 | + * | |
10 | + * Created by Administrator on 2016/6/15 0015. | |
11 | + */ | |
12 | +@Form | |
13 | +public class PostReviewQueryRequest { | |
14 | + /** | |
15 | + * 身份证号 | |
16 | + */ | |
17 | + @FormParam | |
18 | + private String cardNo; | |
19 | + /** | |
20 | + * 就诊卡号 | |
21 | + */ | |
22 | + @FormParam | |
23 | + private String vcCardNo; | |
24 | + | |
25 | + private String patientId; | |
26 | + | |
27 | + public String getPatientId() { | |
28 | + return patientId; | |
29 | + } | |
30 | + | |
31 | + public void setPatientId(String patientId) { | |
32 | + this.patientId = patientId; | |
33 | + } | |
34 | + | |
35 | + public String getCardNo() { | |
36 | + return cardNo; | |
37 | + } | |
38 | + | |
39 | + public void setCardNo(String cardNo) { | |
40 | + this.cardNo = cardNo; | |
41 | + } | |
42 | + | |
43 | + public String getVcCardNo() { | |
44 | + return vcCardNo; | |
45 | + } | |
46 | + | |
47 | + public void setVcCardNo(String vcCardNo) { | |
48 | + this.vcCardNo = vcCardNo; | |
49 | + } | |
50 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/PostReviewRequest.java
View file @
80c377a
1 | +package com.lyms.platform.operate.web.request; | |
2 | + | |
3 | +import com.lyms.platform.common.base.IBasicRequestConvert; | |
4 | +import com.lyms.platform.common.core.annotation.form.FormParam; | |
5 | +import com.lyms.platform.common.core.annotation.form.Form; | |
6 | +import com.lyms.platform.common.utils.JsonUtil; | |
7 | +import com.lyms.platform.pojo.PostReviewModel; | |
8 | +import org.hibernate.validator.constraints.NotEmpty; | |
9 | + | |
10 | +import java.io.Serializable; | |
11 | +import java.util.Map; | |
12 | + | |
13 | +/** | |
14 | + * | |
15 | + * 产后复查模型 | |
16 | + * | |
17 | + * Created by Administrator on 2016/6/28 0028. | |
18 | + */ | |
19 | +@Form | |
20 | +public class PostReviewRequest implements IBasicRequestConvert<PostReviewModel> { | |
21 | + private String id; | |
22 | + //产妇id | |
23 | + @FormParam | |
24 | + @NotEmpty(message = "产妇id不能为空") | |
25 | + private String parentId; | |
26 | + | |
27 | + //分娩天数 | |
28 | + private String day; | |
29 | + //健康情况 | |
30 | + private String healthStatus; | |
31 | + //心理状态 | |
32 | + private String psychology; | |
33 | + //体重 | |
34 | + private double weight; | |
35 | + //血压 | |
36 | + private Map bp; | |
37 | + /** | |
38 | + * 乳房 | |
39 | + */ | |
40 | + private String breast; | |
41 | + /** | |
42 | + * 恶露 | |
43 | + */ | |
44 | + private String lochia; | |
45 | + /** | |
46 | + * 外阴 | |
47 | + */ | |
48 | + private String vulva; | |
49 | + /** | |
50 | + * 阴道 | |
51 | + */ | |
52 | + private String vagina; | |
53 | + //宫颈 | |
54 | + private String cervixUteri; | |
55 | + /** | |
56 | + * 子宫 | |
57 | + */ | |
58 | + private String matrix; | |
59 | + | |
60 | + /** | |
61 | + * 伤口 | |
62 | + */ | |
63 | + private String wound; | |
64 | + /** | |
65 | + * 其他 | |
66 | + */ | |
67 | + private String other; | |
68 | + //附件 | |
69 | + private String fujian; | |
70 | + | |
71 | + //盆地检查 | |
72 | + private String basin; | |
73 | + //微量元素检查 | |
74 | + private String traceElement; | |
75 | + //骨密度检查 | |
76 | + private String boneDensity; | |
77 | + //超声检查 | |
78 | + private String ultrasonicExamination; | |
79 | + // 诊断 | |
80 | + private String diagnosis; | |
81 | + //处理意见 | |
82 | + private String treatOpinion; | |
83 | + | |
84 | + //指导意见 | |
85 | + private String dirOpinion; | |
86 | + //产检 医生 | |
87 | + private String prodDoctor; | |
88 | + //产检日期 | |
89 | + private String checkTime; | |
90 | + //下次产检时间 | |
91 | + private String nextCheckTime; | |
92 | + | |
93 | + | |
94 | + | |
95 | + | |
96 | + public String getBasin() { | |
97 | + return basin; | |
98 | + } | |
99 | + | |
100 | + public void setBasin(String basin) { | |
101 | + this.basin = basin; | |
102 | + } | |
103 | + | |
104 | + public String getBoneDensity() { | |
105 | + return boneDensity; | |
106 | + } | |
107 | + | |
108 | + public void setBoneDensity(String boneDensity) { | |
109 | + this.boneDensity = boneDensity; | |
110 | + } | |
111 | + | |
112 | + public Map getBp() { | |
113 | + return bp; | |
114 | + } | |
115 | + | |
116 | + public void setBp(Map bp) { | |
117 | + this.bp = bp; | |
118 | + } | |
119 | + | |
120 | + public String getCheckTime() { | |
121 | + return checkTime; | |
122 | + } | |
123 | + | |
124 | + public void setCheckTime(String checkTime) { | |
125 | + this.checkTime = checkTime; | |
126 | + } | |
127 | + | |
128 | + public String getDiagnosis() { | |
129 | + return diagnosis; | |
130 | + } | |
131 | + | |
132 | + public void setDiagnosis(String diagnosis) { | |
133 | + this.diagnosis = diagnosis; | |
134 | + } | |
135 | + | |
136 | + public String getDirOpinion() { | |
137 | + return dirOpinion; | |
138 | + } | |
139 | + | |
140 | + public void setDirOpinion(String dirOpinion) { | |
141 | + this.dirOpinion = dirOpinion; | |
142 | + } | |
143 | + | |
144 | + public String getNextCheckTime() { | |
145 | + return nextCheckTime; | |
146 | + } | |
147 | + | |
148 | + public void setNextCheckTime(String nextCheckTime) { | |
149 | + this.nextCheckTime = nextCheckTime; | |
150 | + } | |
151 | + | |
152 | + public String getProdDoctor() { | |
153 | + return prodDoctor; | |
154 | + } | |
155 | + | |
156 | + public void setProdDoctor(String prodDoctor) { | |
157 | + this.prodDoctor = prodDoctor; | |
158 | + } | |
159 | + | |
160 | + public String getTraceElement() { | |
161 | + return traceElement; | |
162 | + } | |
163 | + | |
164 | + public void setTraceElement(String traceElement) { | |
165 | + this.traceElement = traceElement; | |
166 | + } | |
167 | + | |
168 | + public String getTreatOpinion() { | |
169 | + return treatOpinion; | |
170 | + } | |
171 | + | |
172 | + public void setTreatOpinion(String treatOpinion) { | |
173 | + this.treatOpinion = treatOpinion; | |
174 | + } | |
175 | + | |
176 | + public String getUltrasonicExamination() { | |
177 | + return ultrasonicExamination; | |
178 | + } | |
179 | + | |
180 | + public void setUltrasonicExamination(String ultrasonicExamination) { | |
181 | + this.ultrasonicExamination = ultrasonicExamination; | |
182 | + } | |
183 | + | |
184 | + public String getBreast() { | |
185 | + return breast; | |
186 | + } | |
187 | + | |
188 | + public void setBreast(String breast) { | |
189 | + this.breast = breast; | |
190 | + } | |
191 | + | |
192 | + public String getCervixUteri() { | |
193 | + return cervixUteri; | |
194 | + } | |
195 | + | |
196 | + public void setCervixUteri(String cervixUteri) { | |
197 | + this.cervixUteri = cervixUteri; | |
198 | + } | |
199 | + | |
200 | + public String getDay() { | |
201 | + return day; | |
202 | + } | |
203 | + | |
204 | + public void setDay(String day) { | |
205 | + this.day = day; | |
206 | + } | |
207 | + | |
208 | + public String getFujian() { | |
209 | + return fujian; | |
210 | + } | |
211 | + | |
212 | + public void setFujian(String fujian) { | |
213 | + this.fujian = fujian; | |
214 | + } | |
215 | + | |
216 | + public String getHealthStatus() { | |
217 | + return healthStatus; | |
218 | + } | |
219 | + | |
220 | + public void setHealthStatus(String healthStatus) { | |
221 | + this.healthStatus = healthStatus; | |
222 | + } | |
223 | + | |
224 | + public String getId() { | |
225 | + return id; | |
226 | + } | |
227 | + | |
228 | + public void setId(String id) { | |
229 | + this.id = id; | |
230 | + } | |
231 | + | |
232 | + public String getLochia() { | |
233 | + return lochia; | |
234 | + } | |
235 | + | |
236 | + public void setLochia(String lochia) { | |
237 | + this.lochia = lochia; | |
238 | + } | |
239 | + | |
240 | + public String getMatrix() { | |
241 | + return matrix; | |
242 | + } | |
243 | + | |
244 | + public void setMatrix(String matrix) { | |
245 | + this.matrix = matrix; | |
246 | + } | |
247 | + | |
248 | + public String getOther() { | |
249 | + return other; | |
250 | + } | |
251 | + | |
252 | + public void setOther(String other) { | |
253 | + this.other = other; | |
254 | + } | |
255 | + | |
256 | + public String getParentId() { | |
257 | + return parentId; | |
258 | + } | |
259 | + | |
260 | + public void setParentId(String parentId) { | |
261 | + this.parentId = parentId; | |
262 | + } | |
263 | + | |
264 | + public String getPsychology() { | |
265 | + return psychology; | |
266 | + } | |
267 | + | |
268 | + public void setPsychology(String psychology) { | |
269 | + this.psychology = psychology; | |
270 | + } | |
271 | + | |
272 | + public String getVagina() { | |
273 | + return vagina; | |
274 | + } | |
275 | + | |
276 | + public void setVagina(String vagina) { | |
277 | + this.vagina = vagina; | |
278 | + } | |
279 | + | |
280 | + public String getVulva() { | |
281 | + return vulva; | |
282 | + } | |
283 | + | |
284 | + public void setVulva(String vulva) { | |
285 | + this.vulva = vulva; | |
286 | + } | |
287 | + | |
288 | + public double getWeight() { | |
289 | + return weight; | |
290 | + } | |
291 | + | |
292 | + public void setWeight(double weight) { | |
293 | + this.weight = weight; | |
294 | + } | |
295 | + | |
296 | + public String getWound() { | |
297 | + return wound; | |
298 | + } | |
299 | + | |
300 | + public void setWound(String wound) { | |
301 | + this.wound = wound; | |
302 | + } | |
303 | + | |
304 | + @Override | |
305 | + public PostReviewModel convertToDataModel() { | |
306 | + PostReviewModel postReviewModel=new PostReviewModel(); | |
307 | + postReviewModel.setId(id); | |
308 | + postReviewModel.setParentId(parentId); | |
309 | + postReviewModel.setDay(day); | |
310 | + postReviewModel.setHealthStatus(healthStatus); | |
311 | + postReviewModel.setPsychology(psychology); | |
312 | + postReviewModel.setWeight(weight); | |
313 | + postReviewModel.setBp(JsonUtil.obj2JsonString(bp)); | |
314 | + postReviewModel.setBreast(breast); | |
315 | + postReviewModel.setLochia(lochia); | |
316 | + postReviewModel.setVulva(vulva); | |
317 | + postReviewModel.setVagina(vagina); | |
318 | + postReviewModel.setCervixUteri(cervixUteri); | |
319 | + postReviewModel.setMatrix(matrix); | |
320 | + postReviewModel.setWound(wound); | |
321 | + postReviewModel.setOther(other); | |
322 | + postReviewModel.setFujian(fujian); | |
323 | + postReviewModel.setBasin(basin); | |
324 | + postReviewModel.setTraceElement(traceElement); | |
325 | + postReviewModel.setBoneDensity(boneDensity); | |
326 | + postReviewModel.setUltrasonicExamination(ultrasonicExamination); | |
327 | + postReviewModel.setDiagnosis(diagnosis); | |
328 | + postReviewModel.setTreatOpinion(treatOpinion); | |
329 | + postReviewModel.setDirOpinion(dirOpinion); | |
330 | + postReviewModel.setProdDoctor(prodDoctor); | |
331 | + postReviewModel.setCheckTime(checkTime); | |
332 | + postReviewModel.setNextCheckTime(nextCheckTime); | |
333 | + return postReviewModel; | |
334 | + } | |
335 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PostReviewListResult.java
View file @
80c377a
1 | +package com.lyms.platform.operate.web.result; | |
2 | + | |
3 | +import com.lyms.platform.common.utils.DateUtil; | |
4 | +import com.lyms.platform.pojo.AntExChuModel; | |
5 | +import com.lyms.platform.pojo.AntenatalExaminationModel; | |
6 | +import com.lyms.platform.pojo.Patients; | |
7 | +import com.lyms.platform.pojo.PostReviewModel; | |
8 | +import org.apache.commons.collections.CollectionUtils; | |
9 | + | |
10 | +import java.util.ArrayList; | |
11 | +import java.util.Date; | |
12 | +import java.util.List; | |
13 | + | |
14 | +/** | |
15 | + * | |
16 | + * 产后复查记录 | |
17 | + * | |
18 | + * Created by Administrator on 2016/6/28 0028. | |
19 | + */ | |
20 | +public class PostReviewListResult { | |
21 | + private String id; | |
22 | + //名字 | |
23 | + private String name; | |
24 | + //年龄 | |
25 | + private Integer age; | |
26 | + //孕周 | |
27 | + private String dueWeek; | |
28 | + //预产期 | |
29 | + private String yChanQi; | |
30 | + //手机号 | |
31 | + private String phone; | |
32 | + //高危因素 | |
33 | + private List riskFactor; | |
34 | + //高危评分 | |
35 | + private String riskScore; | |
36 | + //备注 | |
37 | + private String remarks; | |
38 | + //末次月经 | |
39 | + private String lastMenses; | |
40 | + //<!---------基本信息-----------> | |
41 | + private List data = new ArrayList(); | |
42 | + | |
43 | + public List getRiskFactor() { | |
44 | + return riskFactor; | |
45 | + } | |
46 | + | |
47 | + public void setRiskFactor(List riskFactor) { | |
48 | + this.riskFactor = riskFactor; | |
49 | + } | |
50 | + | |
51 | + public Integer getAge() { | |
52 | + return age; | |
53 | + } | |
54 | + | |
55 | + public void setAge(Integer age) { | |
56 | + this.age = age; | |
57 | + } | |
58 | + | |
59 | + public List getData() { | |
60 | + return data; | |
61 | + } | |
62 | + | |
63 | + public void setData(List data) { | |
64 | + this.data = data; | |
65 | + } | |
66 | + | |
67 | + public String getDueWeek() { | |
68 | + return dueWeek; | |
69 | + } | |
70 | + | |
71 | + public void setDueWeek(String dueWeek) { | |
72 | + this.dueWeek = dueWeek; | |
73 | + } | |
74 | + | |
75 | + public String getId() { | |
76 | + return id; | |
77 | + } | |
78 | + | |
79 | + public void setId(String id) { | |
80 | + this.id = id; | |
81 | + } | |
82 | + | |
83 | + public String getLastMenses() { | |
84 | + return lastMenses; | |
85 | + } | |
86 | + | |
87 | + public void setLastMenses(String lastMenses) { | |
88 | + this.lastMenses = lastMenses; | |
89 | + } | |
90 | + | |
91 | + public String getName() { | |
92 | + return name; | |
93 | + } | |
94 | + | |
95 | + public void setName(String name) { | |
96 | + this.name = name; | |
97 | + } | |
98 | + | |
99 | + public String getPhone() { | |
100 | + return phone; | |
101 | + } | |
102 | + | |
103 | + public void setPhone(String phone) { | |
104 | + this.phone = phone; | |
105 | + } | |
106 | + | |
107 | + public String getRemarks() { | |
108 | + return remarks; | |
109 | + } | |
110 | + | |
111 | + public void setRemarks(String remarks) { | |
112 | + this.remarks = remarks; | |
113 | + } | |
114 | + | |
115 | + public String getRiskScore() { | |
116 | + return riskScore; | |
117 | + } | |
118 | + | |
119 | + public void setRiskScore(String riskScore) { | |
120 | + this.riskScore = riskScore; | |
121 | + } | |
122 | + | |
123 | + public String getyChanQi() { | |
124 | + return yChanQi; | |
125 | + } | |
126 | + | |
127 | + public void setyChanQi(String yChanQi) { | |
128 | + this.yChanQi = yChanQi; | |
129 | + } | |
130 | + | |
131 | + public PostReviewListResult convertToResult(List<PostReviewModel> destModel,Patients patients) { | |
132 | + setId(patients.getId()); | |
133 | + try { | |
134 | + if(null!=patients.getBirth()){ | |
135 | + setAge(DateUtil.getAge(patients.getBirth())); | |
136 | + } | |
137 | + }catch (Exception e){ | |
138 | + } | |
139 | + setName(patients.getUsername()); | |
140 | + setPhone(patients.getPhone()); | |
141 | + setRemarks(patients.getMremark()); | |
142 | + setRiskScore("60"); | |
143 | + | |
144 | + int days= DateUtil.daysBetween(patients.getLastMenses(),new Date()); | |
145 | + String week= (days/7)+""; | |
146 | + int day = (days%7); | |
147 | + this.dueWeek="孕"+week+"周" +(day>0?"+"+day+"天":""); | |
148 | + if(null!=patients.getLastMenses()){ | |
149 | + setLastMenses(DateUtil.getyyyy_MM_dd(patients.getLastMenses())); | |
150 | + } | |
151 | + List<AntData> dataList = new ArrayList<>(); | |
152 | + if(CollectionUtils.isNotEmpty(destModel)){ | |
153 | + for(PostReviewModel model:destModel){ | |
154 | + dataList.add(new AntData(model)); | |
155 | + } | |
156 | + } | |
157 | + setData(dataList); | |
158 | + return this; | |
159 | + } | |
160 | + private class AntData{ | |
161 | + private String dueWeek; | |
162 | + private String id; | |
163 | + private String checkTime; | |
164 | + | |
165 | + | |
166 | + public AntData(PostReviewModel model){ | |
167 | + this.id=model.getId(); | |
168 | + this.dueWeek="产后"+model.getDay()+"天"; | |
169 | + this.checkTime=model.getCheckTime(); | |
170 | + } | |
171 | + public String getCheckTime() { | |
172 | + return checkTime; | |
173 | + } | |
174 | + | |
175 | + public void setCheckTime(String checkTime) { | |
176 | + this.checkTime = checkTime; | |
177 | + } | |
178 | + | |
179 | + public String getDueWeek() { | |
180 | + return dueWeek; | |
181 | + } | |
182 | + | |
183 | + public void setDueWeek(String dueWeek) { | |
184 | + this.dueWeek = dueWeek; | |
185 | + } | |
186 | + | |
187 | + public String getId() { | |
188 | + return id; | |
189 | + } | |
190 | + | |
191 | + public void setId(String id) { | |
192 | + this.id = id; | |
193 | + } | |
194 | + } | |
195 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PostReviewResult.java
View file @
80c377a
1 | +package com.lyms.platform.operate.web.result; | |
2 | + | |
3 | +import com.lyms.platform.common.utils.JsonUtil; | |
4 | +import com.lyms.platform.pojo.MaternalDeliverModel; | |
5 | +import com.lyms.platform.pojo.Patients; | |
6 | +import com.lyms.platform.pojo.PostReviewModel; | |
7 | + | |
8 | +import java.io.Serializable; | |
9 | +import java.util.Date; | |
10 | +import java.util.List; | |
11 | +import java.util.Map; | |
12 | + | |
13 | +/** | |
14 | + * | |
15 | + * 产后复查模型 | |
16 | + * | |
17 | + * Created by Administrator on 2016/6/28 0028. | |
18 | + */ | |
19 | +public class PostReviewResult implements Serializable{ | |
20 | + private String id; | |
21 | + //产妇id | |
22 | + private String parentId; | |
23 | + | |
24 | + //分娩天数 | |
25 | + private String day; | |
26 | + //健康情况 | |
27 | + private String healthStatus; | |
28 | + //心理状态 | |
29 | + private String psychology; | |
30 | + //体重 | |
31 | + private double weight; | |
32 | + //血压 | |
33 | + private Map bp; | |
34 | + /** | |
35 | + * 乳房 | |
36 | + */ | |
37 | + private String breast; | |
38 | + /** | |
39 | + * 恶露 | |
40 | + */ | |
41 | + private String lochia; | |
42 | + /** | |
43 | + * 外阴 | |
44 | + */ | |
45 | + private String vulva; | |
46 | + /** | |
47 | + * 阴道 | |
48 | + */ | |
49 | + private String vagina; | |
50 | + //宫颈 | |
51 | + private String cervixUteri; | |
52 | + /** | |
53 | + * 子宫 | |
54 | + */ | |
55 | + private String matrix; | |
56 | + | |
57 | + /** | |
58 | + * 伤口 | |
59 | + */ | |
60 | + private String wound; | |
61 | + /** | |
62 | + * 其他 | |
63 | + */ | |
64 | + private String other; | |
65 | + //附件 | |
66 | + private String fujian; | |
67 | + | |
68 | + //盆地检查 | |
69 | + private String basin; | |
70 | + //微量元素检查 | |
71 | + private String traceElement; | |
72 | + //骨密度检查 | |
73 | + private String boneDensity; | |
74 | + //超声检查 | |
75 | + private String ultrasonicExamination; | |
76 | + // 诊断 | |
77 | + private String diagnosis; | |
78 | + //处理意见 | |
79 | + private String treatOpinion; | |
80 | + | |
81 | + //指导意见 | |
82 | + private String dirOpinion; | |
83 | + //产检 医生 | |
84 | + private String prodDoctor; | |
85 | + //产检日期 | |
86 | + private String checkTime; | |
87 | + //下次产检时间 | |
88 | + private String nextCheckTime; | |
89 | + | |
90 | + | |
91 | + public PostReviewResult convertToResult(PostReviewModel postReviewModel) { | |
92 | + setId(postReviewModel.getId()); | |
93 | + setParentId(postReviewModel.getParentId()); | |
94 | + setDay("产后" + postReviewModel.getDay() + "天"); | |
95 | + setHealthStatus(postReviewModel.getHealthStatus()); | |
96 | + setPsychology(postReviewModel.getPsychology()); | |
97 | + setWeight(postReviewModel.getWeight()); | |
98 | + setBp(JsonUtil.str2Obj(postReviewModel.getBp(), Map.class)); | |
99 | + setBreast(postReviewModel.getBreast()); | |
100 | + setLochia(postReviewModel.getLochia()); | |
101 | + setVagina(postReviewModel.getVagina()); | |
102 | + setVulva(postReviewModel.getVulva()); | |
103 | + setCervixUteri(postReviewModel.getCervixUteri()); | |
104 | + setMatrix(postReviewModel.getMatrix()); | |
105 | + setWound(postReviewModel.getWound()); | |
106 | + setOther(postReviewModel.getOther()); | |
107 | + setFujian(postReviewModel.getFujian()); | |
108 | + setBasin(postReviewModel.getBasin()); | |
109 | + setTraceElement(postReviewModel.getTraceElement()); | |
110 | + setBoneDensity(postReviewModel.getBoneDensity()); | |
111 | + setUltrasonicExamination(postReviewModel.getUltrasonicExamination()); | |
112 | + setDiagnosis(postReviewModel.getDiagnosis()); | |
113 | + setTreatOpinion(postReviewModel.getTreatOpinion()); | |
114 | + setDirOpinion(postReviewModel.getDirOpinion()); | |
115 | + setProdDoctor(postReviewModel.getProdDoctor()); | |
116 | + setCheckTime(postReviewModel.getCheckTime()); | |
117 | + setNextCheckTime(postReviewModel.getNextCheckTime()); | |
118 | + return this; | |
119 | + } | |
120 | + | |
121 | + | |
122 | + public String getBasin() { | |
123 | + return basin; | |
124 | + } | |
125 | + | |
126 | + public void setBasin(String basin) { | |
127 | + this.basin = basin; | |
128 | + } | |
129 | + | |
130 | + public String getBoneDensity() { | |
131 | + return boneDensity; | |
132 | + } | |
133 | + | |
134 | + public void setBoneDensity(String boneDensity) { | |
135 | + this.boneDensity = boneDensity; | |
136 | + } | |
137 | + | |
138 | + public Map getBp() { | |
139 | + return bp; | |
140 | + } | |
141 | + | |
142 | + public void setBp(Map bp) { | |
143 | + this.bp = bp; | |
144 | + } | |
145 | + | |
146 | + public String getCheckTime() { | |
147 | + return checkTime; | |
148 | + } | |
149 | + | |
150 | + public void setCheckTime(String checkTime) { | |
151 | + this.checkTime = checkTime; | |
152 | + } | |
153 | + | |
154 | + public String getDiagnosis() { | |
155 | + return diagnosis; | |
156 | + } | |
157 | + | |
158 | + public void setDiagnosis(String diagnosis) { | |
159 | + this.diagnosis = diagnosis; | |
160 | + } | |
161 | + | |
162 | + public String getDirOpinion() { | |
163 | + return dirOpinion; | |
164 | + } | |
165 | + | |
166 | + public void setDirOpinion(String dirOpinion) { | |
167 | + this.dirOpinion = dirOpinion; | |
168 | + } | |
169 | + | |
170 | + public String getNextCheckTime() { | |
171 | + return nextCheckTime; | |
172 | + } | |
173 | + | |
174 | + public void setNextCheckTime(String nextCheckTime) { | |
175 | + this.nextCheckTime = nextCheckTime; | |
176 | + } | |
177 | + | |
178 | + public String getProdDoctor() { | |
179 | + return prodDoctor; | |
180 | + } | |
181 | + | |
182 | + public void setProdDoctor(String prodDoctor) { | |
183 | + this.prodDoctor = prodDoctor; | |
184 | + } | |
185 | + | |
186 | + public String getTraceElement() { | |
187 | + return traceElement; | |
188 | + } | |
189 | + | |
190 | + public void setTraceElement(String traceElement) { | |
191 | + this.traceElement = traceElement; | |
192 | + } | |
193 | + | |
194 | + public String getTreatOpinion() { | |
195 | + return treatOpinion; | |
196 | + } | |
197 | + | |
198 | + public void setTreatOpinion(String treatOpinion) { | |
199 | + this.treatOpinion = treatOpinion; | |
200 | + } | |
201 | + | |
202 | + public String getUltrasonicExamination() { | |
203 | + return ultrasonicExamination; | |
204 | + } | |
205 | + | |
206 | + public void setUltrasonicExamination(String ultrasonicExamination) { | |
207 | + this.ultrasonicExamination = ultrasonicExamination; | |
208 | + } | |
209 | + | |
210 | + public String getBreast() { | |
211 | + return breast; | |
212 | + } | |
213 | + | |
214 | + public void setBreast(String breast) { | |
215 | + this.breast = breast; | |
216 | + } | |
217 | + | |
218 | + public String getCervixUteri() { | |
219 | + return cervixUteri; | |
220 | + } | |
221 | + | |
222 | + public void setCervixUteri(String cervixUteri) { | |
223 | + this.cervixUteri = cervixUteri; | |
224 | + } | |
225 | + | |
226 | + public String getDay() { | |
227 | + return day; | |
228 | + } | |
229 | + | |
230 | + public void setDay(String day) { | |
231 | + this.day = day; | |
232 | + } | |
233 | + | |
234 | + public String getFujian() { | |
235 | + return fujian; | |
236 | + } | |
237 | + | |
238 | + public void setFujian(String fujian) { | |
239 | + this.fujian = fujian; | |
240 | + } | |
241 | + | |
242 | + public String getHealthStatus() { | |
243 | + return healthStatus; | |
244 | + } | |
245 | + | |
246 | + public void setHealthStatus(String healthStatus) { | |
247 | + this.healthStatus = healthStatus; | |
248 | + } | |
249 | + | |
250 | + public String getId() { | |
251 | + return id; | |
252 | + } | |
253 | + | |
254 | + public void setId(String id) { | |
255 | + this.id = id; | |
256 | + } | |
257 | + | |
258 | + public String getLochia() { | |
259 | + return lochia; | |
260 | + } | |
261 | + | |
262 | + public void setLochia(String lochia) { | |
263 | + this.lochia = lochia; | |
264 | + } | |
265 | + | |
266 | + public String getMatrix() { | |
267 | + return matrix; | |
268 | + } | |
269 | + | |
270 | + public void setMatrix(String matrix) { | |
271 | + this.matrix = matrix; | |
272 | + } | |
273 | + | |
274 | + public String getOther() { | |
275 | + return other; | |
276 | + } | |
277 | + | |
278 | + public void setOther(String other) { | |
279 | + this.other = other; | |
280 | + } | |
281 | + | |
282 | + public String getParentId() { | |
283 | + return parentId; | |
284 | + } | |
285 | + | |
286 | + public void setParentId(String parentId) { | |
287 | + this.parentId = parentId; | |
288 | + } | |
289 | + | |
290 | + public String getPsychology() { | |
291 | + return psychology; | |
292 | + } | |
293 | + | |
294 | + public void setPsychology(String psychology) { | |
295 | + this.psychology = psychology; | |
296 | + } | |
297 | + | |
298 | + public String getVagina() { | |
299 | + return vagina; | |
300 | + } | |
301 | + | |
302 | + public void setVagina(String vagina) { | |
303 | + this.vagina = vagina; | |
304 | + } | |
305 | + | |
306 | + public String getVulva() { | |
307 | + return vulva; | |
308 | + } | |
309 | + | |
310 | + public void setVulva(String vulva) { | |
311 | + this.vulva = vulva; | |
312 | + } | |
313 | + | |
314 | + public double getWeight() { | |
315 | + return weight; | |
316 | + } | |
317 | + | |
318 | + public void setWeight(double weight) { | |
319 | + this.weight = weight; | |
320 | + } | |
321 | + | |
322 | + public String getWound() { | |
323 | + return wound; | |
324 | + } | |
325 | + | |
326 | + public void setWound(String wound) { | |
327 | + this.wound = wound; | |
328 | + } | |
329 | +} |