Commit 8905aafc0a87310c10cb21bd96b79efa9ee5650c

Authored by yangfei
1 parent 45d128c904

转入转出高危列表加参数,回执单信息填写

Showing 10 changed files with 163 additions and 21 deletions

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IReferralApplyOrderDao.java View file @ 8905aaf
... ... @@ -2,7 +2,6 @@
2 2  
3 3 import com.lyms.platform.common.dao.operator.MongoQuery;
4 4 import com.lyms.platform.pojo.ReferralApplyOrderModel;
5   -import com.lyms.platform.query.ReferralApplyOrderQuery;
6 5  
7 6 import java.util.List;
8 7  
... ... @@ -27,6 +26,12 @@
27 26 * @return
28 27 */
29 28 List<ReferralApplyOrderModel> queryList(MongoQuery mongoQuery);
  29 + /**
  30 + * 根据id查询转账单
  31 + *
  32 + * @return
  33 + */
  34 + ReferralApplyOrderModel findById(String id);
30 35  
31 36 Integer count(MongoQuery mongoQuery);
32 37  
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/ReferralApplyOrderDaoImpl.java View file @ 8905aaf
... ... @@ -29,6 +29,11 @@
29 29 return find(mongoQuery.convertToMongoQuery());
30 30 }
31 31  
  32 + @Override
  33 + public ReferralApplyOrderModel findById(String id) {
  34 + return findById(id);
  35 + }
  36 +
32 37 public Integer count(MongoQuery mongoQuery) {
33 38 return (int) count(mongoQuery.convertToMongoQuery());
34 39 }
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/ApplyOrderService.java View file @ 8905aaf
... ... @@ -45,6 +45,10 @@
45 45 // return iReferralApplyOrderDao.queryList(babyQuery.convertToQuery());
46 46 }
47 47  
  48 + public ReferralApplyOrderModel findByIdReferralApplyOrder(String id) {
  49 + return iReferralApplyOrderDao.findById(id);
  50 + }
  51 +
48 52 public SieveApplyOrderModel addOneSieveApplyOrder(SieveApplyOrderModel obj) {
49 53 obj.setStatus(0);
50 54 return iSieveApplyOrderDao.addApplyOrder(obj);
platform-dal/src/main/java/com/lyms/platform/pojo/ReferralApplyOrderModel.java View file @ 8905aaf
... ... @@ -85,10 +85,31 @@
85 85 private Integer status;
86 86 //转诊类型 1 儿童 2 孕妇
87 87 private Integer type;
88   -
89 88 private Integer serviceType;
90 89 //操作人
91 90 private String operator;
  91 + //目前诊断
  92 + private String diagnosis;
  93 + //其他诊断
  94 + private String otherDiagn;
  95 +
  96 +
  97 +
  98 + public String getDiagnosis() {
  99 + return diagnosis;
  100 + }
  101 +
  102 + public void setDiagnosis(String diagnosis) {
  103 + this.diagnosis = diagnosis;
  104 + }
  105 +
  106 + public String getOtherDiagn() {
  107 + return otherDiagn;
  108 + }
  109 +
  110 + public void setOtherDiagn(String otherDiagn) {
  111 + this.otherDiagn = otherDiagn;
  112 + }
92 113  
93 114 public String getOperator() {
94 115 return operator;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ApplyOrderController.java View file @ 8905aaf
... ... @@ -6,10 +6,7 @@
6 6 import com.lyms.platform.common.constants.ErrorCodeConstants;
7 7 import com.lyms.platform.common.result.BaseResponse;
8 8 import com.lyms.platform.operate.web.facade.ApplyOrderFacade;
9   -import com.lyms.platform.operate.web.request.ApplyOrderQueryRequest;
10   -import com.lyms.platform.operate.web.request.ReferralApplyOrderAddRequest;
11   -import com.lyms.platform.operate.web.request.SieveApplyOrderAddRequest;
12   -import com.lyms.platform.operate.web.request.BabyApplyOrderQueryRequest;
  9 +import com.lyms.platform.operate.web.request.*;
13 10 import org.apache.commons.lang.StringUtils;
14 11 import org.springframework.beans.factory.annotation.Autowired;
15 12 import org.springframework.stereotype.Controller;
... ... @@ -42,6 +39,14 @@
42 39 return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("id不能为空.");
43 40 }
44 41 return applyOrderFacade.queryReferralApplyOrder(id);
  42 + }
  43 +
  44 + //增加或修改转诊单的回执信息
  45 + @RequestMapping(method = RequestMethod.POST,value = "/referralReceipt")
  46 + @ResponseBody
  47 + @TokenRequired
  48 + public BaseResponse addReferralReceipt(@Valid @RequestBody ReferralReceiptRequest referralReceiptRequest, HttpServletRequest request) {
  49 + return applyOrderFacade.addReferralReceipt(referralReceiptRequest);
45 50 }
46 51  
47 52 //增加儿童转诊申请单
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java View file @ 8905aaf
... ... @@ -8,10 +8,7 @@
8 8 import com.lyms.platform.common.result.BaseObjectResponse;
9 9 import com.lyms.platform.common.result.BaseResponse;
10 10 import com.lyms.platform.common.utils.*;
11   -import com.lyms.platform.operate.web.request.ApplyOrderQueryRequest;
12   -import com.lyms.platform.operate.web.request.BabyApplyOrderQueryRequest;
13   -import com.lyms.platform.operate.web.request.ReferralApplyOrderAddRequest;
14   -import com.lyms.platform.operate.web.request.SieveApplyOrderAddRequest;
  11 +import com.lyms.platform.operate.web.request.*;
15 12 import com.lyms.platform.operate.web.result.*;
16 13 import com.lyms.platform.permission.model.Organization;
17 14 import com.lyms.platform.permission.model.OrganizationQuery;
... ... @@ -70,6 +67,20 @@
70 67 @Autowired
71 68 private CommonService commonService;
72 69  
  70 + public BaseResponse addReferralReceipt(ReferralReceiptRequest referralReceipt){
  71 +
  72 + ReferralApplyOrderModel referralApplyOrderModel = applyOrderService.findByIdReferralApplyOrder(referralReceipt.getId());
  73 + referralReceipt.convertToDataModel(referralApplyOrderModel);
  74 + if(StringUtils.isNotEmpty(referralApplyOrderModel.getId())){
  75 + ReferralApplyOrderQuery referralApplyOrderQuery1 = new ReferralApplyOrderQuery();
  76 + referralApplyOrderQuery1.setId(referralReceipt.getId());
  77 + applyOrderService.updateByParentId(referralApplyOrderQuery1,referralApplyOrderModel);
  78 + return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
  79 + }else{
  80 + return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("错误");
  81 + }
  82 + }
  83 +
73 84 /**
74 85 * 增加转诊申请
75 86 *
... ... @@ -204,7 +215,6 @@
204 215 }
205 216 }
206 217 } else {
207   -
208 218 BabyModel babyModel = babyService.getOneBabyById(referralApplyOrderModel.getParentId());
209 219 if (null != babyModel) {
210 220 id = babyModel.getId();
... ... @@ -439,7 +449,6 @@
439 449  
440 450 }
441 451 }
442   -
443 452 if (NumberUtils.isNumber(zhuanru)) {
444 453 try {
445 454 Organization zhuanc1 = organizationService.getOrganization(Integer.valueOf(zhuanru));
446 455  
... ... @@ -452,10 +461,8 @@
452 461  
453 462 }
454 463 }
455   -
456 464 referralApplyOrderResult.convertToResult(list.get(0), patients, zhuanCName, zhuanRname);
457 465 referralApplyOrderResult.setTransferredHospital(map1);
458   -
459 466 Map map = new HashMap();
460 467 if (StringUtils.isNotEmpty(list.get(0).getApplyDoctor())) {
461 468 Users users = usersService.getUsers(Integer.valueOf(list.get(0).getApplyDoctor()));
462 469  
... ... @@ -464,10 +471,7 @@
464 471 map.put("name", users.getName());
465 472 }
466 473 }
467   -
468 474 referralApplyOrderResult.setApplyDoctor(map);
469   -
470   -
471 475 List<Map<String, Object>> screenList = antenatalExaminationFacade.getscreenResult(patients.getScreenResult());
472 476 referralApplyOrderResult.setScreenResult(screenList);
473 477  
... ... @@ -589,7 +593,7 @@
589 593  
590 594 // List<String> diagnoseList = babyCheckFacade.getBabyLastDiagnose(applyOrderModel.getPid());
591 595  
592   - List<String> diagnoseList = applyOrderModel.getrRisk();
  596 +
593 597 if (NumberUtils.isNumber(zhuanchu)) {
594 598 try {
595 599 Organization zhuanc = organizationService.getOrganization(Integer.valueOf(zhuanchu));
... ... @@ -635,6 +639,7 @@
635 639 }
636 640  
637 641 String diagnose = "";
  642 + List<String> diagnoseList = applyOrderModel.getrRisk();
638 643 if (CollectionUtils.isNotEmpty(diagnoseList)) {
639 644 diagnose = "";
640 645 for (String obj : diagnoseList) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ReferralApplyOrderAddRequest.java View file @ 8905aaf
1 1 package com.lyms.platform.operate.web.request;
2 2  
3 3 import com.lyms.platform.common.base.IBasicRequestConvert;
4   -import com.lyms.platform.common.core.annotation.form.FormParam;
5 4 import com.lyms.platform.common.core.annotation.form.Form;
  5 +import com.lyms.platform.common.core.annotation.form.FormParam;
6 6 import com.lyms.platform.pojo.ReferralApplyOrderModel;
7 7  
8 8 /**
... ... @@ -32,7 +32,6 @@
32 32 private String transferMode;
33 33 @FormParam
34 34 private String applyDoctor;
35   -
36 35 public String getPid() {
37 36 return pid;
38 37 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ReferralReceiptRequest.java View file @ 8905aaf
  1 +package com.lyms.platform.operate.web.request;
  2 +
  3 +import com.lyms.platform.pojo.ReferralApplyOrderModel;
  4 +
  5 +import java.util.List;
  6 +
  7 +/**
  8 + * @auther yangfei
  9 + * @createTime 2018年05月28日 17时25分
  10 + * @discription 转诊单回执信息
  11 + */
  12 +public class ReferralReceiptRequest {
  13 + public String id;
  14 + //高危风险因素
  15 + private List<String> rRisk;
  16 + //目前诊断
  17 + private String diagnosis;
  18 + //其他诊断
  19 + private String otherDiagn;
  20 + //接收医生
  21 + private String recDoctor;
  22 +
  23 + public String getRecDoctor() {
  24 + return recDoctor;
  25 + }
  26 +
  27 + public void setRecDoctor(String recDoctor) {
  28 + this.recDoctor = recDoctor;
  29 + }
  30 +
  31 + public String getId() {
  32 + return id;
  33 + }
  34 +
  35 + public void setId(String id) {
  36 + this.id = id;
  37 + }
  38 +
  39 + public List<String> getrRisk() {
  40 + return rRisk;
  41 + }
  42 +
  43 + public void setrRisk(List<String> rRisk) {
  44 + this.rRisk = rRisk;
  45 + }
  46 +
  47 + public String getDiagnosis() {
  48 + return diagnosis;
  49 + }
  50 +
  51 + public void setDiagnosis(String diagnosis) {
  52 + this.diagnosis = diagnosis;
  53 + }
  54 +
  55 + public String getOtherDiagn() {
  56 + return otherDiagn;
  57 + }
  58 +
  59 + public void setOtherDiagn(String otherDiagn) {
  60 + this.otherDiagn = otherDiagn;
  61 + }
  62 +
  63 + /**
  64 + * 具体转换实现
  65 + *
  66 + * @return 转换后的model
  67 + */
  68 + public void convertToDataModel(ReferralApplyOrderModel referralApplyOrderModel) {
  69 + referralApplyOrderModel.setId(id);
  70 + referralApplyOrderModel.setrRisk(rRisk);
  71 + referralApplyOrderModel.setDiagnosis(diagnosis);
  72 + referralApplyOrderModel.setOtherDiagn(otherDiagn);
  73 + referralApplyOrderModel.setRecDoctor(recDoctor);
  74 + }
  75 +}
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/SieveApplyOrderAddRequest.java View file @ 8905aaf
... ... @@ -26,9 +26,10 @@
26 26 @FormParam
27 27 private String applyDoctor;
28 28 private String pid;
29   -
30 29 //申请时间
31 30 private String applyTime;
  31 +
  32 +
32 33  
33 34 public String getPid() {
34 35 return pid;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ReferralApplyOrderResult.java View file @ 8905aaf
... ... @@ -68,7 +68,27 @@
68 68 private String zhuanCName;
69 69 //转入医院
70 70 private String zhuanRname;
  71 + //目前诊断
  72 + private String diagnosis;
  73 + //其他诊断
  74 + private String otherDiagn;
71 75  
  76 + public String getDiagnosis() {
  77 + return diagnosis;
  78 + }
  79 +
  80 + public void setDiagnosis(String diagnosis) {
  81 + this.diagnosis = diagnosis;
  82 + }
  83 +
  84 + public String getOtherDiagn() {
  85 + return otherDiagn;
  86 + }
  87 +
  88 + public void setOtherDiagn(String otherDiagn) {
  89 + this.otherDiagn = otherDiagn;
  90 + }
  91 +
72 92 public List<Map<String, Object>> getScreenResult() {
73 93 return screenResult;
74 94 }
... ... @@ -247,6 +267,8 @@
247 267  
248 268 public ReferralApplyOrderResult convertToResult(ReferralApplyOrderModel destModel,Patients patients,String zhuanCName ,String zhuanRname) {
249 269 setId(destModel.getId());
  270 + setDiagnosis(destModel.getDiagnosis());
  271 + setDiseaseDesc(destModel.getDiseaseDesc());
250 272 setParentId(destModel.getParentId());
251 273 setName(destModel.getName());
252 274 setAge(destModel.getAge());