Commit c4926b19aa6aa609673233ed9c0cd81675acbe35

Authored by jiangjiazhi
1 parent 8447518f47

增加是否通知

Showing 6 changed files with 414 additions and 6 deletions

platform-dal/src/main/java/com/lyms/platform/pojo/ReferralApplyOrderModel.java View file @ c4926b1
... ... @@ -18,12 +18,18 @@
18 18 private String parentId;
19 19 //患者名字
20 20 private String name;
  21 + private String mname;
21 22 //患者年龄
22 23 private Integer age;
23   - //孕周
24   -// private String dueWeek;
  24 + //联系方式
  25 + private String phone;
  26 + //生日
  27 + private Date birth;
  28 +
25 29 //身份证号
26 30 private String cardNo;
  31 + //母亲身份证号
  32 + private String mCardNo;
27 33 //预产期
28 34 private Date dueDate;
29 35 //高危分级
... ... @@ -58,6 +64,30 @@
58 64 //转诊类型 1 儿童 2 孕妇
59 65 private Integer type;
60 66  
  67 + public String getMname() {
  68 + return mname;
  69 + }
  70 +
  71 + public String getPhone() {
  72 + return phone;
  73 + }
  74 +
  75 + public Date getBirth() {
  76 + return birth;
  77 + }
  78 +
  79 + public void setBirth(Date birth) {
  80 + this.birth = birth;
  81 + }
  82 +
  83 + public void setPhone(String phone) {
  84 + this.phone = phone;
  85 + }
  86 +
  87 + public void setMname(String mname) {
  88 + this.mname = mname;
  89 + }
  90 +
61 91 public Integer getType() {
62 92 return type;
63 93 }
... ... @@ -98,6 +128,13 @@
98 128 this.dueDate = dueDate;
99 129 }
100 130  
  131 + public String getmCardNo() {
  132 + return mCardNo;
  133 + }
  134 +
  135 + public void setmCardNo(String mCardNo) {
  136 + this.mCardNo = mCardNo;
  137 + }
101 138  
102 139 public String getName() {
103 140 return name;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ApplyOrderController.java View file @ c4926b1
... ... @@ -4,12 +4,12 @@
4 4 import com.lyms.platform.common.base.BaseController;
5 5 import com.lyms.platform.common.base.LoginContext;
6 6 import com.lyms.platform.common.constants.ErrorCodeConstants;
7   -import com.lyms.platform.common.result.BaseListResponse;
8 7 import com.lyms.platform.common.result.BaseResponse;
9 8 import com.lyms.platform.operate.web.facade.ApplyOrderFacade;
10 9 import com.lyms.platform.operate.web.request.ApplyOrderQueryRequest;
11 10 import com.lyms.platform.operate.web.request.ReferralApplyOrderAddRequest;
12 11 import com.lyms.platform.operate.web.request.SieveApplyOrderAddRequest;
  12 +import com.lyms.platform.operate.web.request.BabyApplyOrderQueryRequest;
13 13 import org.apache.commons.lang.StringUtils;
14 14 import org.springframework.beans.factory.annotation.Autowired;
15 15 import org.springframework.stereotype.Controller;
... ... @@ -48,7 +48,7 @@
48 48 @TokenRequired
49 49 public BaseResponse addReferralApplyOrder(@Valid @RequestBody ReferralApplyOrderAddRequest applyOrderAddRequest,HttpServletRequest request) {
50 50 LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
51   - return applyOrderFacade.addOneReferralApplyOrder(applyOrderAddRequest, loginState.getId(),2);
  51 + return applyOrderFacade.addOneReferralApplyOrder(applyOrderAddRequest, loginState.getId(), 2);
52 52 }
53 53  
54 54 //增加转诊申请单
... ... @@ -89,6 +89,22 @@
89 89 LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
90 90 return applyOrderFacade.queryApplyOrder(orderQueryRequest, loginState.getId());
91 91 }
  92 +
  93 +
  94 + /**
  95 + * 高危转诊
  96 + *
  97 + * @param orderQueryRequest
  98 + * @return
  99 + */
  100 + @RequestMapping(method = RequestMethod.GET,value = "/applybabyorder")
  101 + @ResponseBody
  102 + @TokenRequired
  103 + public BaseResponse queryBabyApplyOrder(@Valid BabyApplyOrderQueryRequest orderQueryRequest,HttpServletRequest request){
  104 + LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
  105 + return applyOrderFacade.queryBabyApplyOrder(orderQueryRequest, loginState.getId());
  106 + }
  107 +
92 108  
93 109 @RequestMapping(method = RequestMethod.GET,value = "/applyorderEnums")
94 110 @ResponseBody
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java View file @ c4926b1
... ... @@ -15,6 +15,8 @@
15 15 import com.lyms.platform.operate.web.request.ReferralApplyOrderAddRequest;
16 16 import com.lyms.platform.operate.web.request.SieveApplyOrderAddRequest;
17 17 import com.lyms.platform.operate.web.result.ApplyOrderOutResult;
  18 +import com.lyms.platform.operate.web.request.BabyApplyOrderQueryRequest;
  19 +import com.lyms.platform.operate.web.result.BabyApplyOrderResult;
18 20 import com.lyms.platform.operate.web.result.ReferralApplyOrderResult;
19 21 import com.lyms.platform.operate.web.result.SieveApplyOrderResult;
20 22 import com.lyms.platform.permission.model.Organization;
... ... @@ -143,7 +145,7 @@
143 145 if(null!=zhuanc1){
144 146 zhuanRname =zhuanc1.getName();
145 147 }
146   - referralApplyOrderResult.convertToResult(list.get(0), patients,zhuanCName,zhuanRname);
  148 + referralApplyOrderResult.convertToResult(list.get(0), patients, zhuanCName, zhuanRname);
147 149 }
148 150 return new BaseObjectResponse().setData(referralApplyOrderResult).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
149 151 }
150 152  
... ... @@ -168,7 +170,38 @@
168 170 }
169 171 return new BaseObjectResponse().setData(sieveApplyOrderResult).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
170 172 }
  173 + /**
  174 + * 查询儿童的转诊申请
  175 + *
  176 + */
  177 + public BaseListResponse queryBabyApplyOrder(BabyApplyOrderQueryRequest applyOrderQueryRequest, Integer userId){
  178 + ReferralApplyOrderQuery referralApplyOrderQuery=new ReferralApplyOrderQuery();
  179 + referralApplyOrderQuery.setType(2);
  180 + List<BabyApplyOrderResult> babyApplyOrderResults=new ArrayList<>();
171 181  
  182 + //1 转入 0转出
  183 + if ("1".equals(applyOrderQueryRequest.getAction())) {
  184 + List data = autoMatchFacade.matchOrgId(userId);
  185 + if (CollectionUtils.isNotEmpty(data)) {
  186 + referralApplyOrderQuery.setTransferredHospital(data.get(0) + "");
  187 + }
  188 + } else if ("0".equals(applyOrderQueryRequest.getAction())) {
  189 + List data = autoMatchFacade.matchOrgId(userId);
  190 + if (CollectionUtils.isNotEmpty(data)) {
  191 + referralApplyOrderQuery.setOutHospitalId(data.get(0) + "");
  192 + }
  193 + }
  194 +
  195 + List<ReferralApplyOrderModel> orderModels = applyOrderService.queryReferralApplyOrderWithQuery(referralApplyOrderQuery);
  196 + if(CollectionUtils.isNotEmpty(orderModels)){
  197 + for(ReferralApplyOrderModel applyOrderModel:orderModels){
  198 + BabyApplyOrderResult babyApplyOrderResult=new BabyApplyOrderResult();
  199 + babyApplyOrderResult.convert(applyOrderModel);
  200 + babyApplyOrderResults.add(babyApplyOrderResult);
  201 + }
  202 + }
  203 + return new BaseListResponse().setData(babyApplyOrderResults).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
  204 + }
172 205 /**
173 206 * 高危转诊列表
174 207 *
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyApplyOrderQueryRequest.java View file @ c4926b1
  1 +package com.lyms.platform.operate.web.request;
  2 +
  3 +/**
  4 + *
  5 + * 儿童高危转诊查询
  6 + *
  7 + * Created by Administrator on 2016/7/14 0014.
  8 + */
  9 +public class BabyApplyOrderQueryRequest {
  10 +
  11 + //母亲身份证号
  12 + private String mCardNo;
  13 + //儿童身份证号
  14 + private String cardNo;
  15 + //儿童姓名
  16 + private String name;
  17 + //联系方式
  18 + private String phone;
  19 + //月龄开始
  20 + private String ylStart;
  21 + //月龄结束
  22 + private String ylEnd;
  23 + //高危id
  24 + private String highRisk;
  25 + //预约检查日期
  26 + private String nextCheckTime;
  27 + //生日
  28 + private String birth;
  29 + //服务类型
  30 + private Integer serviceType;
  31 + //接受日期
  32 + private String reviced;
  33 + //转出日期
  34 + private String transferred;
  35 + //体验会员
  36 + private String tyVip;
  37 + //0转入 1 转出
  38 + private String action;
  39 +
  40 + public String getAction() {
  41 + return action;
  42 + }
  43 +
  44 + public void setAction(String action) {
  45 + this.action = action;
  46 + }
  47 +
  48 + public String getBirth() {
  49 + return birth;
  50 + }
  51 +
  52 + public void setBirth(String birth) {
  53 + this.birth = birth;
  54 + }
  55 +
  56 + public String getCardNo() {
  57 + return cardNo;
  58 + }
  59 +
  60 + public void setCardNo(String cardNo) {
  61 + this.cardNo = cardNo;
  62 + }
  63 +
  64 + public String getHighRisk() {
  65 + return highRisk;
  66 + }
  67 +
  68 + public void setHighRisk(String highRisk) {
  69 + this.highRisk = highRisk;
  70 + }
  71 +
  72 + public String getmCardNo() {
  73 + return mCardNo;
  74 + }
  75 +
  76 + public void setmCardNo(String mCardNo) {
  77 + this.mCardNo = mCardNo;
  78 + }
  79 +
  80 + public String getName() {
  81 + return name;
  82 + }
  83 +
  84 + public void setName(String name) {
  85 + this.name = name;
  86 + }
  87 +
  88 + public String getNextCheckTime() {
  89 + return nextCheckTime;
  90 + }
  91 +
  92 + public void setNextCheckTime(String nextCheckTime) {
  93 + this.nextCheckTime = nextCheckTime;
  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 getReviced() {
  105 + return reviced;
  106 + }
  107 +
  108 + public void setReviced(String reviced) {
  109 + this.reviced = reviced;
  110 + }
  111 +
  112 + public Integer getServiceType() {
  113 + return serviceType;
  114 + }
  115 +
  116 + public void setServiceType(Integer serviceType) {
  117 + this.serviceType = serviceType;
  118 + }
  119 +
  120 + public String getTransferred() {
  121 + return transferred;
  122 + }
  123 +
  124 + public void setTransferred(String transferred) {
  125 + this.transferred = transferred;
  126 + }
  127 +
  128 + public String getTyVip() {
  129 + return tyVip;
  130 + }
  131 +
  132 + public void setTyVip(String tyVip) {
  133 + this.tyVip = tyVip;
  134 + }
  135 +
  136 + public String getYlEnd() {
  137 + return ylEnd;
  138 + }
  139 +
  140 + public void setYlEnd(String ylEnd) {
  141 + this.ylEnd = ylEnd;
  142 + }
  143 +
  144 + public String getYlStart() {
  145 + return ylStart;
  146 + }
  147 +
  148 + public void setYlStart(String ylStart) {
  149 + this.ylStart = ylStart;
  150 + }
  151 +}
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ApplyOrderOutResult.java View file @ c4926b1
... ... @@ -41,11 +41,20 @@
41 41 //接收日期
42 42 private String received;
43 43 private String cardNo;
44   -
  44 + //联系方式
  45 + private String phone;
45 46 //创建时间
46 47 private String created;
47 48 private String status;
48 49  
  50 + public String getPhone() {
  51 + return phone;
  52 + }
  53 +
  54 + public void setPhone(String phone) {
  55 + this.phone = phone;
  56 + }
  57 +
49 58 public String getCardNo() {
50 59 return cardNo;
51 60 }
... ... @@ -214,6 +223,7 @@
214 223 setTransferredHospital(destModel.getTransferredHospital());
215 224 setAge(destModel.getAge());
216 225 setCardNo(destModel.getCardNo());
  226 + setPhone(destModel.getPhone());
217 227 return this;
218 228 }
219 229 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyApplyOrderResult.java View file @ c4926b1
  1 +package com.lyms.platform.operate.web.result;
  2 +
  3 +import com.lyms.platform.pojo.ReferralApplyOrderModel;
  4 +
  5 +/**
  6 + * 儿童高危转诊列表
  7 + * <p>
  8 + * Created by Administrator on 2016/7/14 0014.
  9 + */
  10 +public class BabyApplyOrderResult {
  11 + private String id;
  12 + //名字
  13 + private String name;
  14 + //高危转诊
  15 + private String hRisk;
  16 + //性别
  17 + private String sex;
  18 + //月龄
  19 + private String yl;
  20 + //生日
  21 + private String birth;
  22 + //母亲姓名
  23 + private String mName;
  24 +
  25 + //转入医院
  26 + private String transferredHospital;
  27 +
  28 + //转出时间
  29 + private String created;
  30 + //转院必要性
  31 + private String transferredDisease;
  32 + //潜在风险
  33 + private String potentialRisk;
  34 + //申请医生
  35 + private String applyDoctor;
  36 + //接收日期
  37 + private String received;
  38 + private String phone;
  39 +
  40 +
  41 + public BabyApplyOrderResult convert(ReferralApplyOrderModel referralApplyOrderModel) {
  42 + setId(referralApplyOrderModel.getId());
  43 + setName(referralApplyOrderModel.getName());
  44 + setmName(referralApplyOrderModel.getMname());
  45 + setSex("女");
  46 + setPhone(referralApplyOrderModel.getPhone());
  47 + return this;
  48 + }
  49 +
  50 + public String getApplyDoctor() {
  51 + return applyDoctor;
  52 + }
  53 +
  54 + public void setApplyDoctor(String applyDoctor) {
  55 + this.applyDoctor = applyDoctor;
  56 + }
  57 +
  58 + public String getBirth() {
  59 + return birth;
  60 + }
  61 +
  62 + public void setBirth(String birth) {
  63 + this.birth = birth;
  64 + }
  65 +
  66 + public String getCreated() {
  67 + return created;
  68 + }
  69 +
  70 + public void setCreated(String created) {
  71 + this.created = created;
  72 + }
  73 +
  74 + public String gethRisk() {
  75 + return hRisk;
  76 + }
  77 +
  78 + public void sethRisk(String hRisk) {
  79 + this.hRisk = hRisk;
  80 + }
  81 +
  82 + public String getId() {
  83 + return id;
  84 + }
  85 +
  86 + public void setId(String id) {
  87 + this.id = id;
  88 + }
  89 +
  90 + public String getmName() {
  91 + return mName;
  92 + }
  93 +
  94 + public void setmName(String mName) {
  95 + this.mName = mName;
  96 + }
  97 +
  98 + public String getName() {
  99 + return name;
  100 + }
  101 +
  102 + public void setName(String name) {
  103 + this.name = name;
  104 + }
  105 +
  106 + public String getPhone() {
  107 + return phone;
  108 + }
  109 +
  110 + public void setPhone(String phone) {
  111 + this.phone = phone;
  112 + }
  113 +
  114 + public String getPotentialRisk() {
  115 + return potentialRisk;
  116 + }
  117 +
  118 + public void setPotentialRisk(String potentialRisk) {
  119 + this.potentialRisk = potentialRisk;
  120 + }
  121 +
  122 + public String getReceived() {
  123 + return received;
  124 + }
  125 +
  126 + public void setReceived(String received) {
  127 + this.received = received;
  128 + }
  129 +
  130 + public String getSex() {
  131 + return sex;
  132 + }
  133 +
  134 + public void setSex(String sex) {
  135 + this.sex = sex;
  136 + }
  137 +
  138 + public String getTransferredDisease() {
  139 + return transferredDisease;
  140 + }
  141 +
  142 + public void setTransferredDisease(String transferredDisease) {
  143 + this.transferredDisease = transferredDisease;
  144 + }
  145 +
  146 + public String getTransferredHospital() {
  147 + return transferredHospital;
  148 + }
  149 +
  150 + public void setTransferredHospital(String transferredHospital) {
  151 + this.transferredHospital = transferredHospital;
  152 + }
  153 +
  154 + public String getYl() {
  155 + return yl;
  156 + }
  157 +
  158 + public void setYl(String yl) {
  159 + this.yl = yl;
  160 + }
  161 +}