Commit 3eae6cb8183c6c61be1dda03eb01d97f5942f1a0

Authored by jiangjiazhi
1 parent 6a46bbb20f

产妇增加字段

Showing 11 changed files with 614 additions and 65 deletions

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IAntExChuDao.java View file @ 3eae6cb
... ... @@ -48,5 +48,13 @@
48 48 * @return
49 49 */
50 50 List<AntExChuModel> query(MongoQuery query);
  51 +
  52 + /**
  53 + * 查询数据
  54 + *
  55 + * @param query
  56 + * @return
  57 + */
  58 + int count(MongoQuery query);
51 59 }
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/AntExChuDaoImpl.java View file @ 3eae6cb
... ... @@ -61,5 +61,14 @@
61 61 public List<AntExChuModel> query(MongoQuery query) {
62 62 return find(query.convertToMongoQuery());
63 63 }
  64 +
  65 + /**
  66 + * 查询条数
  67 + * @param query
  68 + * @return
  69 + */
  70 + public int count(MongoQuery query){
  71 + return (int)count(query.convertToMongoQuery());
  72 + }
64 73 }
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/AntenatalExaminationService.java View file @ 3eae6cb
... ... @@ -35,10 +35,18 @@
35 35 }
36 36  
37 37  
38   - public int queryVisitCount(VisitQuery visitQuery) {
39   - return iAntenatalExaminationDao.queryAntenatalExaminationCount(visitQuery.convertToQuery());
  38 + public int queryAntenatalExaminationCount(MongoQuery visitQuery) {
  39 + return iAntenatalExaminationDao.queryAntenatalExaminationCount(visitQuery);
40 40 }
41 41  
  42 + /**
  43 + * 查询条数
  44 + * @param query
  45 + * @return
  46 + */
  47 + public int queryAntExChuCount(MongoQuery query){
  48 + return (int)iAntExChuDao.count(query);
  49 + }
42 50 /**
43 51 * 按条件查询所有
44 52 *
platform-common/src/main/java/com/lyms/platform/common/enums/ServiceTypeEnums.java View file @ 3eae6cb
... ... @@ -30,7 +30,7 @@
30 30 public String getName() {
31 31 return name;
32 32 }
33   - public String getTitleById(int id){
  33 + public static String getTitleById(int id){
34 34 for(ServiceTypeEnums enums:values()){
35 35 if(id==enums.getId()){
36 36 return enums.getName();
platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java View file @ 3eae6cb
... ... @@ -322,7 +322,7 @@
322 322 //风险等级颜色
323 323 private String riskLevelId;
324 324 //高危评分值
325   - private String riskScore;
  325 + private Integer riskScore;
326 326 private Integer serviceType;
327 327 private Integer vip;
328 328 //最后一次检查医生名称
329 329  
... ... @@ -356,11 +356,11 @@
356 356 this.riskLevelId = riskLevelId;
357 357 }
358 358  
359   - public String getRiskScore() {
  359 + public Integer getRiskScore() {
360 360 return riskScore;
361 361 }
362 362  
363   - public void setRiskScore(String riskScore) {
  363 + public void setRiskScore(Integer riskScore) {
364 364 this.riskScore = riskScore;
365 365 }
366 366  
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java View file @ 3eae6cb
... ... @@ -27,6 +27,16 @@
27 27 */
28 28 private Boolean isNull;
29 29  
  30 + private Boolean isHighRisk;
  31 +
  32 + public Boolean getIsHighRisk() {
  33 + return isHighRisk;
  34 + }
  35 +
  36 + public void setIsHighRisk(Boolean isHighRisk) {
  37 + this.isHighRisk = isHighRisk;
  38 + }
  39 +
30 40 public Boolean getIsNull() {
31 41 return isNull;
32 42 }
... ... @@ -105,7 +115,7 @@
105 115 /**
106 116 * 高危评分
107 117 */
108   - private String hScore;
  118 + private Integer hScore;
109 119 /**
110 120 * 高危因素
111 121 */
112 122  
... ... @@ -185,11 +195,11 @@
185 195 this.areaIdOrRestId = areaIdOrRestId;
186 196 }
187 197  
188   - public String gethScore() {
  198 + public Integer gethScore() {
189 199 return hScore;
190 200 }
191 201  
192   - public void sethScore(String hScore) {
  202 + public void sethScore(Integer hScore) {
193 203 this.hScore = hScore;
194 204 }
195 205  
... ... @@ -307,6 +317,12 @@
307 317 if (null != communityId && !"-1".equals(communityId)) {
308 318 condition = condition.and("communityId", communityId, MongoOper.IS);
309 319 }
  320 +
  321 + if (null != hScore) {
  322 + condition = condition.and("riskScore", hScore, MongoOper.IS);
  323 + }else if(null!=isHighRisk){
  324 + condition=condition.and("riskScore",0,MongoOper.GT);
  325 + }
310 326 if (null != areaId) {
311 327 condition = condition.and("areaId", areaId, MongoOper.IS);
312 328 }
... ... @@ -351,10 +367,8 @@
351 367 if (null != rLevel) {
352 368 condition = condition.and("riskLevelId", rLevel, MongoOper.IS);
353 369 }
354   - if (null != hScore) {
355   - condition = condition.and("riskScore", hScore, MongoOper.IS);
356   - }
357   - if (null != hScore) {
  370 +
  371 + if (null != rFactor) {
358 372 condition = condition.and("riskFactorId", rFactor, MongoOper.ALL);
359 373 }
360 374 if (-1 != yn) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java View file @ 3eae6cb
1 1 package com.lyms.platform.operate.web.controller;
2 2  
3   -import javax.servlet.http.HttpServletRequest;
4   -import javax.validation.Valid;
5   -
6 3 import com.lyms.platform.common.annotation.TokenRequired;
7 4 import com.lyms.platform.common.base.BaseController;
8 5 import com.lyms.platform.common.base.LoginContext;
  6 +import com.lyms.platform.common.result.BaseListResponse;
  7 +import com.lyms.platform.common.result.BaseResponse;
9 8 import com.lyms.platform.operate.web.facade.PatientFacade;
  9 +import com.lyms.platform.operate.web.facade.PuerperaManagerFacade;
  10 +import com.lyms.platform.operate.web.request.PuerperaManagerQueryRequest;
10 11 import com.lyms.platform.operate.web.request.PuerperaMatcherCommunityRequest;
  12 +import com.lyms.platform.operate.web.request.RiskPatientsQueryRequest;
11 13 import org.springframework.beans.factory.annotation.Autowired;
12 14 import org.springframework.stereotype.Controller;
13 15 import org.springframework.web.bind.annotation.RequestMapping;
14 16  
... ... @@ -15,14 +17,12 @@
15 17 import org.springframework.web.bind.annotation.RequestParam;
16 18 import org.springframework.web.bind.annotation.ResponseBody;
17 19  
18   -import com.lyms.platform.common.result.BaseListResponse;
19   -import com.lyms.platform.common.result.BaseResponse;
20   -import com.lyms.platform.operate.web.facade.PuerperaManagerFacade;
21   -import com.lyms.platform.operate.web.request.PuerperaManagerQueryRequest;
  20 +import javax.servlet.http.HttpServletRequest;
  21 +import javax.validation.Valid;
22 22  
23 23 /**
24   - * 产妇管理接口
25   - *
  24 + * 孕产妇管理接口
  25 + *
26 26 * @author Administrator
27 27 */
28 28 @Controller
29 29  
30 30  
31 31  
32 32  
33 33  
34 34  
35 35  
36 36  
37 37  
38 38  
39 39  
40 40  
41 41  
... ... @@ -36,62 +36,66 @@
36 36  
37 37 /**
38 38 * 产妇管理查询接口
39   - *
  39 + *
40 40 * @param managerRequest
41 41 * @return
42 42 */
43 43 @RequestMapping(value = "/puerperamanage", method = RequestMethod.GET)
44 44 @ResponseBody
45 45 @TokenRequired
46   - public BaseListResponse queryPuerperaList(@Valid PuerperaManagerQueryRequest managerRequest,HttpServletRequest request) {
  46 + public BaseListResponse queryPuerperaList(@Valid PuerperaManagerQueryRequest managerRequest, HttpServletRequest request) {
47 47 LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
48   - return patientFacade.findPatientList(managerRequest,loginState.getId());
  48 + return patientFacade.findPatientList(managerRequest, loginState.getId());
49 49 }
50 50  
51 51 /**
52   - *
53 52 * 产妇管理删除接口
54   - *
  53 + *
55 54 * @param id 产妇id
56   - *
57 55 * @return 返回结果
58 56 */
59 57 @RequestMapping(value = "/puerperamanage", method = RequestMethod.DELETE)
60 58 @ResponseBody
61 59 @TokenRequired
62 60 public BaseResponse deleteOnePuerperaById(@RequestParam("id") String id) {
63   - //软删除数据
64   - return patientFacade.deleteOnePuerperaById(id, Boolean.TRUE);
  61 + //软删除数据
  62 + return patientFacade.deleteOnePuerperaById(id, Boolean.TRUE);
65 63 }
66 64  
67 65 /**
68   - *
69 66 * 产妇匹配社区
70 67 *
71 68 * @param puerperaMatcherCommunityRequest 产妇匹配社区接口
72   - *
73 69 * @return
74 70 */
75 71 @ResponseBody
76 72 @TokenRequired
77 73 @RequestMapping(value = "/matchpuerpera", method = RequestMethod.POST)
78   - public BaseResponse matchCommunity(@Valid PuerperaMatcherCommunityRequest puerperaMatcherCommunityRequest){
79   - return patientFacade.matchCommunity(puerperaMatcherCommunityRequest);
  74 + public BaseResponse matchCommunity(@Valid PuerperaMatcherCommunityRequest puerperaMatcherCommunityRequest) {
  75 + return patientFacade.matchCommunity(puerperaMatcherCommunityRequest);
80 76 }
  77 +
81 78 /**
82   - * 产妇管理修改
83   - *
84   - * @param id 产妇id
85   - *
86   - * @param puerperaManagerUpdateRequest 产妇管理修改接口
87   - *
  79 + * 高危孕妇管理
  80 + *
  81 + * @param patientsQueryRequest 产妇管理修改接口
88 82 * @return 返回结果
89 83 */
90   - /*
91   - * @RequestMapping(value = "/puerperamanage/{id}", method = RequestMethod.PUT)
92   - * @ResponseBody public BaseResponse updatePuerperaManager(@PathVariable("id") String id,@Valid PuerperaManagerUpdateRequest
93   - * puerperaManagerUpdateRequest) { puerperaManagerUpdateRequest.setId(id); return
94   - * puerperaManagerFacade.updateOnePuerperaData(puerperaManagerUpdateRequest); }
  84 + @RequestMapping(value = "/hPuer", method = RequestMethod.GET)
  85 + @ResponseBody
  86 + public BaseResponse queryHighRiskPuerpera(@Valid RiskPatientsQueryRequest patientsQueryRequest) {
  87 + return patientFacade.queryHighRisk(patientsQueryRequest,Boolean.TRUE);
  88 + }
  89 + /**
  90 + *全部孕妇管理
  91 + *
  92 + * @param patientsQueryRequest 全部孕妇管理查询 (因为请求参数一样同用一个对象)
  93 + * @return 返回结果
95 94 */
  95 + @RequestMapping(value = "/aPuer", method = RequestMethod.GET)
  96 + @ResponseBody
  97 + public BaseResponse queryAllPuerpera(@Valid RiskPatientsQueryRequest patientsQueryRequest) {
  98 + return patientFacade.queryHighRisk(patientsQueryRequest,null);
  99 + }
96 100 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java View file @ 3eae6cb
1 1 package com.lyms.platform.operate.web.facade;
2 2  
3   -import com.lyms.platform.biz.service.BabyService;
4   -import com.lyms.platform.biz.service.BasicConfigService;
5   -import com.lyms.platform.biz.service.CommunityConfigService;
6   -import com.lyms.platform.biz.service.PatientsService;
  3 +import com.lyms.platform.biz.service.*;
7 4 import com.lyms.platform.common.constants.ErrorCodeConstants;
8 5 import com.lyms.platform.common.enums.YnEnums;
9 6 import com.lyms.platform.common.result.BaseListResponse;
  7 +import com.lyms.platform.common.result.BaseObjectResponse;
10 8 import com.lyms.platform.common.result.BaseResponse;
11 9 import com.lyms.platform.common.utils.Assert;
12 10 import com.lyms.platform.common.utils.DateUtil;
13 11 import com.lyms.platform.operate.web.request.PuerperaManagerQueryRequest;
14 12 import com.lyms.platform.operate.web.request.PuerperaManagerUpdateRequest;
15 13 import com.lyms.platform.operate.web.request.PuerperaMatcherCommunityRequest;
  14 +import com.lyms.platform.operate.web.request.RiskPatientsQueryRequest;
16 15 import com.lyms.platform.operate.web.result.PuerperaResult;
  16 +import com.lyms.platform.operate.web.result.QuanPatientsResult;
  17 +import com.lyms.platform.operate.web.result.RiskPatientsResult;
17 18 import com.lyms.platform.operate.web.utils.CommonsHelper;
18 19 import com.lyms.platform.pojo.BabyModel;
19 20 import com.lyms.platform.pojo.CommunityConfig;
20 21 import com.lyms.platform.pojo.Patients;
  22 +import com.lyms.platform.query.AntExChuQuery;
  23 +import com.lyms.platform.query.AntExQuery;
21 24 import com.lyms.platform.query.BabyModelQuery;
22 25 import com.lyms.platform.query.PatientsQuery;
23 26 import org.apache.commons.collections.CollectionUtils;
... ... @@ -47,6 +50,8 @@
47 50 private BasicConfigService basicConfigService;
48 51 @Autowired
49 52 private AutoMatchFacade autoMatchFacade;
  53 + @Autowired
  54 + private AntenatalExaminationService antExService;
50 55  
51 56 /**
52 57 * 修改产妇的社区
... ... @@ -56,7 +61,7 @@
56 61 */
57 62 public BaseResponse matchCommunity(PuerperaMatcherCommunityRequest puerperaMatcherCommunityRequest) {
58 63  
59   - if(0==puerperaMatcherCommunityRequest.getT()){
  64 + if (0 == puerperaMatcherCommunityRequest.getT()) {
60 65 Patients puerperaModel = patientsService.findOnePatientById(puerperaMatcherCommunityRequest.getParentId());
61 66  
62 67 Assert.notNull(puerperaModel, "产妇信息不存在");
63 68  
... ... @@ -64,9 +69,9 @@
64 69 puerperaModel.setCommunityId(puerperaMatcherCommunityRequest.getCommunityId());
65 70 patientsService.updatePatient(puerperaModel);
66 71 //修改新生儿的社区信息
67   - updateBabyCommunity(puerperaModel.getId(),puerperaModel.getPhone(),puerperaMatcherCommunityRequest.getCommunityId(),Boolean.FALSE);
  72 + updateBabyCommunity(puerperaModel.getId(), puerperaModel.getPhone(), puerperaMatcherCommunityRequest.getCommunityId(), Boolean.FALSE);
68 73  
69   - }else{
  74 + } else {
70 75 updateBabyCommunity(puerperaMatcherCommunityRequest.getParentId(), null, puerperaMatcherCommunityRequest.getCommunityId(), Boolean.TRUE);
71 76 }
72 77  
73 78  
74 79  
75 80  
76 81  
... ... @@ -77,21 +82,21 @@
77 82 /**
78 83 * 修改新生儿的社区信息
79 84 */
80   - private void updateBabyCommunity(String parentId,String phone,String communityId,boolean isBaby){
  85 + private void updateBabyCommunity(String parentId, String phone, String communityId, boolean isBaby) {
81 86 BabyModelQuery babyModelQuery = new BabyModelQuery();
82 87 babyModelQuery.setYn(YnEnums.YES.getId());
83   - if(isBaby){
  88 + if (isBaby) {
84 89 babyModelQuery.setId(parentId);
85   - }else{
  90 + } else {
86 91 babyModelQuery.setParentId(parentId);
87 92 }
88 93  
89 94 BabyModel babyModel = new BabyModel();
90 95 babyModel.setCommunityId(communityId);
91   - if(StringUtils.isNotEmpty(phone)){
  96 + if (StringUtils.isNotEmpty(phone)) {
92 97 babyModel.setMphone(phone);
93 98 }
94   - babyService.findAndModify(babyModelQuery.convertToQuery(),babyModel);
  99 + babyService.findAndModify(babyModelQuery.convertToQuery(), babyModel);
95 100 }
96 101  
97 102 /**
... ... @@ -112,7 +117,7 @@
112 117 * @param managerRequest
113 118 * @return
114 119 */
115   - public BaseListResponse findPatientList(PuerperaManagerQueryRequest managerRequest,int userId) {
  120 + public BaseListResponse findPatientList(PuerperaManagerQueryRequest managerRequest, int userId) {
116 121 PatientsQuery puerperaQuery = new PatientsQuery();
117 122 puerperaQuery.setLimit(managerRequest.getLimit());
118 123 puerperaQuery.setPage(managerRequest.getPage());
... ... @@ -131,8 +136,8 @@
131 136 puerperaQuery.setType(3);
132 137 puerperaQuery.setNeed("1");
133 138 puerperaQuery.setYn(YnEnums.YES.getId());
134   - String areaid= autoMatchFacade.match(userId);
135   - if(StringUtils.isNotEmpty(areaid)){
  139 + String areaid = autoMatchFacade.match(userId);
  140 + if (StringUtils.isNotEmpty(areaid)) {
136 141 puerperaQuery.setAreaId(areaid);
137 142 }
138 143 // 调用service查询
... ... @@ -150,10 +155,10 @@
150 155 comm = communityConfig.getName();
151 156 }
152 157 }
153   - String tips = visitFacade.getFindTips(model.getId(),Boolean.TRUE);
154   - String addr= CommonsHelper.getFullAddress(model.getProvinceId(), model.getCityId(), model.getAreaId(), model.getAddress(), basicConfigService);
155   - String restAddr=CommonsHelper.getFullAddress(model.getProvincePostRestId(), model.getCityPostRestId(), model.getAreaPostRestId(), model.getAddressPostRest(), basicConfigService);
156   - data.add(result.convertToResult(model, comm, tips,addr,restAddr));
  158 + String tips = visitFacade.getFindTips(model.getId(), Boolean.TRUE);
  159 + String addr = CommonsHelper.getFullAddress(model.getProvinceId(), model.getCityId(), model.getAreaId(), model.getAddress(), basicConfigService);
  160 + String restAddr = CommonsHelper.getFullAddress(model.getProvincePostRestId(), model.getCityPostRestId(), model.getAreaPostRestId(), model.getAddressPostRest(), basicConfigService);
  161 + data.add(result.convertToResult(model, comm, tips, addr, restAddr));
157 162 }
158 163 }
159 164  
... ... @@ -175,6 +180,65 @@
175 180 patientsService.updatePatient(obj);
176 181 }
177 182 return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
  183 + }
  184 +
  185 + /**
  186 + * 查询高危孕妇
  187 + *
  188 + * @param riskPatientsQueryRequest
  189 + * @return
  190 + */
  191 + public BaseResponse queryHighRisk(RiskPatientsQueryRequest riskPatientsQueryRequest,Boolean isHighRisk) {
  192 + PatientsQuery patientsQuery = new PatientsQuery();
  193 + patientsQuery.setPhone(riskPatientsQueryRequest.getPhone());
  194 + patientsQuery.setCardNo(riskPatientsQueryRequest.getCardNo());
  195 + //设置为孕妇
  196 + patientsQuery.setType(1);
  197 + patientsQuery.setName(riskPatientsQueryRequest.getName());
  198 + patientsQuery.sethScore(riskPatientsQueryRequest.gethScore());
  199 + patientsQuery.setrFactor(riskPatientsQueryRequest.getrFactor());
  200 + patientsQuery.setServiceType(riskPatientsQueryRequest.getServiceType());
  201 + patientsQuery.setAge(riskPatientsQueryRequest.getAge());
  202 + patientsQuery.setLimit(riskPatientsQueryRequest.getLimit());
  203 + patientsQuery.setPage(riskPatientsQueryRequest.getPage());
  204 + patientsQuery.setIsHighRisk(isHighRisk);
  205 + //查询符合条件的孕妇
  206 + List<Patients> patientses = patientsService.queryPatient(patientsQuery);
  207 + List data = new ArrayList<>();
  208 + if (CollectionUtils.isNotEmpty(patientses)) {
  209 + AntExChuQuery antExChuQuery = new AntExChuQuery();
  210 + AntExQuery antExQuery = new AntExQuery();
  211 + //如果是查高危孕妇
  212 + if(null!=isHighRisk&&Boolean.TRUE.equals(isHighRisk)){
  213 + for (Patients patients : patientses) {
  214 + RiskPatientsResult riskPatientsResult = new RiskPatientsResult();
  215 + riskPatientsResult.convertToResult(patients);
  216 + //复诊次数
  217 + int i = antExService.queryAntenatalExaminationCount(antExQuery.convertToQuery());
  218 + antExChuQuery.setParentId(patients.getId());
  219 + antExChuQuery.setYn(YnEnums.YES.getId());
  220 + //初诊次数
  221 + int b = antExService.queryAntExChuCount(antExChuQuery.convertToQuery());
  222 + riskPatientsResult.setcTimes(i + b);
  223 + data.add(riskPatientsResult);
  224 + }
  225 + }else{
  226 + //处理全部产妇的情况
  227 + for (Patients patients : patientses) {
  228 + QuanPatientsResult quanPatientsResult = new QuanPatientsResult();
  229 + quanPatientsResult.convertToResult(patients);
  230 + //复诊次数
  231 + int i = antExService.queryAntenatalExaminationCount(antExQuery.convertToQuery());
  232 + antExChuQuery.setParentId(patients.getId());
  233 + antExChuQuery.setYn(YnEnums.YES.getId());
  234 + //初诊次数
  235 + int b = antExService.queryAntExChuCount(antExChuQuery.convertToQuery());
  236 + quanPatientsResult.setcTimes(i + b);
  237 + data.add(quanPatientsResult);
  238 + }
  239 + }
  240 + }
  241 + return new BaseObjectResponse().setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS).setData(data);
178 242 }
179 243 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/RiskPatientsQueryRequest.java View file @ 3eae6cb
  1 +package com.lyms.platform.operate.web.request;
  2 +
  3 +import com.lyms.platform.common.core.annotation.form.FormParam;
  4 +import com.lyms.platform.common.core.annotation.form.Form;
  5 +/**
  6 + * 高危孕妇管理查询
  7 + * <p>
  8 + * Created by Administrator on 2016/6/22 0022.
  9 + */
  10 +@Form
  11 +public class RiskPatientsQueryRequest extends BasePageQueryRequest {
  12 + @FormParam
  13 + //孕妇名字
  14 + private String name;
  15 + //孕妇身份证号
  16 + @FormParam
  17 + private String cardNo;
  18 + //服务类型
  19 + @FormParam
  20 + private String serviceType;
  21 + //孕周
  22 + @FormParam
  23 + private String dueWeek;
  24 + //年龄
  25 + @FormParam
  26 + private Integer age;
  27 + //风险等级
  28 + @FormParam
  29 + private String rLevel;
  30 + //高危评分
  31 + @FormParam
  32 + private Integer hScore;
  33 + //风险因素
  34 + @FormParam
  35 + private String rFactor;
  36 + //联系方式
  37 + @FormParam
  38 + private String phone;
  39 + //检查时间
  40 + @FormParam
  41 + private String cTime;
  42 +
  43 + public int getAge() {
  44 + return age;
  45 + }
  46 +
  47 + public void setAge(int age) {
  48 + this.age = age;
  49 + }
  50 +
  51 + public String getCardNo() {
  52 + return cardNo;
  53 + }
  54 +
  55 + public void setCardNo(String cardNo) {
  56 + this.cardNo = cardNo;
  57 + }
  58 +
  59 + public String getcTime() {
  60 + return cTime;
  61 + }
  62 +
  63 + public void setcTime(String cTime) {
  64 + this.cTime = cTime;
  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 int gethScore() {
  76 + return hScore;
  77 + }
  78 +
  79 + public void sethScore(int hScore) {
  80 + this.hScore = hScore;
  81 + }
  82 +
  83 + public String getName() {
  84 + return name;
  85 + }
  86 +
  87 + public void setName(String name) {
  88 + this.name = name;
  89 + }
  90 +
  91 + public String getPhone() {
  92 + return phone;
  93 + }
  94 +
  95 + public void setPhone(String phone) {
  96 + this.phone = phone;
  97 + }
  98 +
  99 + public String getrFactor() {
  100 + return rFactor;
  101 + }
  102 +
  103 + public void setrFactor(String rFactor) {
  104 + this.rFactor = rFactor;
  105 + }
  106 +
  107 + public String getrLevel() {
  108 + return rLevel;
  109 + }
  110 +
  111 + public void setrLevel(String rLevel) {
  112 + this.rLevel = rLevel;
  113 + }
  114 +
  115 + public String getServiceType() {
  116 + return serviceType;
  117 + }
  118 +
  119 + public void setServiceType(String serviceType) {
  120 + this.serviceType = serviceType;
  121 + }
  122 +}
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/QuanPatientsResult.java View file @ 3eae6cb
  1 +package com.lyms.platform.operate.web.result;
  2 +
  3 +import com.lyms.platform.common.base.IBasicResultConvert;
  4 +import com.lyms.platform.common.enums.ServiceTypeEnums;
  5 +import com.lyms.platform.common.utils.DateUtil;
  6 +import com.lyms.platform.common.utils.JsonUtil;
  7 +import com.lyms.platform.pojo.Patients;
  8 +
  9 +/**
  10 + * 全部孕妇管理
  11 + *
  12 + * Created by Administrator on 2016/6/23 0023.
  13 + */
  14 +public class QuanPatientsResult implements IBasicResultConvert<QuanPatientsResult, Patients> {
  15 + private String id;
  16 + //名称
  17 + private String name;
  18 + //年龄
  19 + private Integer age;
  20 + //孕周
  21 + private String dueWeek;
  22 + //风险等级
  23 + private String rLevel;
  24 +
  25 + //产检次数
  26 + private int cTimes;
  27 + //预产期
  28 + private String dueDate;
  29 + //产检医生
  30 + private String checkDoctor;
  31 + //登记人
  32 + private String lName;
  33 +
  34 + //联系方式
  35 + private String phone;
  36 + //预约产检时间
  37 + private String cTime;
  38 + //服务类型
  39 + private String serviceType;
  40 +
  41 + public Integer getAge() {
  42 + return age;
  43 + }
  44 +
  45 + public void setAge(Integer age) {
  46 + this.age = age;
  47 + }
  48 +
  49 + public String getCheckDoctor() {
  50 + return checkDoctor;
  51 + }
  52 +
  53 + public void setCheckDoctor(String checkDoctor) {
  54 + this.checkDoctor = checkDoctor;
  55 + }
  56 +
  57 + public String getcTime() {
  58 + return cTime;
  59 + }
  60 +
  61 + public void setcTime(String cTime) {
  62 + this.cTime = cTime;
  63 + }
  64 +
  65 + public int getcTimes() {
  66 + return cTimes;
  67 + }
  68 +
  69 + public void setcTimes(int cTimes) {
  70 + this.cTimes = cTimes;
  71 + }
  72 +
  73 + public String getDueDate() {
  74 + return dueDate;
  75 + }
  76 +
  77 + public void setDueDate(String dueDate) {
  78 + this.dueDate = dueDate;
  79 + }
  80 +
  81 + public String getDueWeek() {
  82 + return dueWeek;
  83 + }
  84 +
  85 + public void setDueWeek(String dueWeek) {
  86 + this.dueWeek = dueWeek;
  87 + }
  88 +
  89 + public String getId() {
  90 + return id;
  91 + }
  92 +
  93 + public void setId(String id) {
  94 + this.id = id;
  95 + }
  96 +
  97 + public String getlName() {
  98 + return lName;
  99 + }
  100 +
  101 + public void setlName(String lName) {
  102 + this.lName = lName;
  103 + }
  104 +
  105 + public String getName() {
  106 + return name;
  107 + }
  108 +
  109 + public void setName(String name) {
  110 + this.name = name;
  111 + }
  112 +
  113 + public String getPhone() {
  114 + return phone;
  115 + }
  116 +
  117 + public void setPhone(String phone) {
  118 + this.phone = phone;
  119 + }
  120 +
  121 + public String getrLevel() {
  122 + return rLevel;
  123 + }
  124 +
  125 + public void setrLevel(String rLevel) {
  126 + this.rLevel = rLevel;
  127 + }
  128 +
  129 + public String getServiceType() {
  130 + return serviceType;
  131 + }
  132 +
  133 + public void setServiceType(String serviceType) {
  134 + this.serviceType = serviceType;
  135 + }
  136 +
  137 + @Override
  138 + public QuanPatientsResult convertToResult(Patients destModel) {
  139 + setId(destModel.getId());
  140 + setName(destModel.getUsername());
  141 + setAge(destModel.getAge());
  142 + setDueWeek("孕周");
  143 + setrLevel(destModel.getRiskLevelId());
  144 + setcTime(DateUtil.getyyyy_MM_dd(destModel.getNextCheckTime()));
  145 + setDueDate(DateUtil.getyyyy_MM_dd(destModel.getDueDate()));
  146 + setPhone(destModel.getPhone());
  147 + setCheckDoctor(destModel.getLastReportDoctorName());
  148 + setlName("登记人");
  149 + setServiceType(ServiceTypeEnums.getTitleById(destModel.getServiceType()));
  150 + return this;
  151 + }
  152 +}
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/RiskPatientsResult.java View file @ 3eae6cb
  1 +package com.lyms.platform.operate.web.result;
  2 +
  3 +import com.lyms.platform.common.base.IBasicResultConvert;
  4 +import com.lyms.platform.common.core.annotation.form.Form;
  5 +import com.lyms.platform.common.core.annotation.form.FormParam;
  6 +import com.lyms.platform.common.utils.DateUtil;
  7 +import com.lyms.platform.common.utils.JsonUtil;
  8 +import com.lyms.platform.operate.web.request.BasePageQueryRequest;
  9 +import com.lyms.platform.pojo.Patients;
  10 +import com.lyms.platform.pojo.PuerperaModel;
  11 +
  12 +/**
  13 + * 高危孕妇管理查询
  14 + * <p>
  15 + * Created by Administrator on 2016/6/22 0022.
  16 + */
  17 +public class RiskPatientsResult implements IBasicResultConvert<RiskPatientsResult, Patients> {
  18 + //孕妇
  19 + private String id;
  20 + //孕妇名字
  21 + private String name;
  22 + //年龄
  23 + private int age;
  24 + //孕周
  25 + private String dueWeek;
  26 + //风险等级
  27 + private String rLevel;
  28 + //风险因素
  29 + private String rFactor;
  30 + //高危评分
  31 + private int hScore;
  32 + //产检次数
  33 + private int cTimes;
  34 + //预产期
  35 + private String dueDate;
  36 + //产检医生
  37 + private String checkDoctor;
  38 + //登记人
  39 + private String lName;
  40 +
  41 + //联系方式
  42 + private String phone;
  43 + //预约产检时间
  44 + private String cTime;
  45 +
  46 + public String getId() {
  47 + return id;
  48 + }
  49 +
  50 + public void setId(String id) {
  51 + this.id = id;
  52 + }
  53 +
  54 + public int getAge() {
  55 + return age;
  56 + }
  57 +
  58 + public void setAge(int age) {
  59 + this.age = age;
  60 + }
  61 +
  62 +
  63 +
  64 + public String getcTime() {
  65 + return cTime;
  66 + }
  67 +
  68 + public void setcTime(String cTime) {
  69 + this.cTime = cTime;
  70 + }
  71 +
  72 + public String getDueWeek() {
  73 + return dueWeek;
  74 + }
  75 +
  76 + public void setDueWeek(String dueWeek) {
  77 + this.dueWeek = dueWeek;
  78 + }
  79 +
  80 + public int gethScore() {
  81 + return hScore;
  82 + }
  83 +
  84 + public void sethScore(int hScore) {
  85 + this.hScore = hScore;
  86 + }
  87 +
  88 + public String getName() {
  89 + return name;
  90 + }
  91 +
  92 + public void setName(String name) {
  93 + this.name = name;
  94 + }
  95 +
  96 + public String getPhone() {
  97 + return phone;
  98 + }
  99 +
  100 + public void setPhone(String phone) {
  101 + this.phone = phone;
  102 + }
  103 +
  104 + public String getrFactor() {
  105 + return rFactor;
  106 + }
  107 +
  108 + public void setrFactor(String rFactor) {
  109 + this.rFactor = rFactor;
  110 + }
  111 +
  112 + public String getrLevel() {
  113 + return rLevel;
  114 + }
  115 +
  116 + public void setrLevel(String rLevel) {
  117 + this.rLevel = rLevel;
  118 + }
  119 +
  120 + public String getCheckDoctor() {
  121 + return checkDoctor;
  122 + }
  123 +
  124 + public void setCheckDoctor(String checkDoctor) {
  125 + this.checkDoctor = checkDoctor;
  126 + }
  127 +
  128 + public int getcTimes() {
  129 + return cTimes;
  130 + }
  131 +
  132 + public void setcTimes(int cTimes) {
  133 + this.cTimes = cTimes;
  134 + }
  135 +
  136 + public String getDueDate() {
  137 + return dueDate;
  138 + }
  139 +
  140 + public void setDueDate(String dueDate) {
  141 + this.dueDate = dueDate;
  142 + }
  143 +
  144 + public String getlName() {
  145 + return lName;
  146 + }
  147 +
  148 + public void setlName(String lName) {
  149 + this.lName = lName;
  150 + }
  151 +
  152 + @Override
  153 + public RiskPatientsResult convertToResult(Patients destModel) {
  154 + setId(destModel.getId());
  155 + setName(destModel.getUsername());
  156 + setAge(destModel.getAge());
  157 + setDueWeek("孕周");
  158 + setrLevel(destModel.getRiskLevelId());
  159 + setrFactor(JsonUtil.array2JsonString(destModel.getRiskFactorId()));
  160 + sethScore(destModel.getRiskScore());
  161 + setcTime(DateUtil.getyyyy_MM_dd(destModel.getNextCheckTime()));
  162 + setDueDate(DateUtil.getyyyy_MM_dd(destModel.getDueDate()));
  163 + setPhone(destModel.getPhone());
  164 + setCheckDoctor(destModel.getLastReportDoctorName());
  165 + setlName("登记人");
  166 + return this;
  167 + }
  168 +}