Commit c07e3346c8e106c7a0591fa801c93e8cd312ca2f

Authored by zhangchao
1 parent 02169c66e0
Exists in dev

#fix:新增大同RIS和分娩数据同步接口

Showing 10 changed files with 252 additions and 148 deletions

platform-biz-service/src/main/java/com/lyms/platform/permission/model/RisReportModel.java View file @ c07e334
1 1 package com.lyms.platform.permission.model;
2 2  
  3 +
3 4 public class RisReportModel {
4 5 private Integer id;
5   - private String R_ID;
6   - private String TITLE;
7   - private String TYPE;
8   - private String VCCARDNO;
9   - private String NAME;
10   - private String PHONE;
11   - private String BHNUM;
12   - private String AGE;
13   - private String SEX;
14   - private String IMGS;//影像图片
15   - private String ITEM_FINDING;//影像所见
16   - private String ITEM_DIAGNOSIS;//诊断意见
17   - private String ITEM_RESULT;//检验结果
18   - private String APPLY_TIME;//送检日期
19   - private String CHECK_TIME;//检验时间
20   - private String PUBLISH_TIME;//报告发布时间
21   - private String APPLY_DOCTOR;//送检医生
22   - private String APPLY_DEPT;//送检科室
23   - private String CHECKER;//检验员
24   - private String MODIFIED;//最后修改时间
25   - private String CREATED;//创建时间
26   - private String HOSPITAL_ID;
27   - private String ITEM_JSON;
  6 + private String r_id;
  7 + private String title;
  8 + private String type;
  9 + private String vccardno;
  10 + private String name;
  11 + private String phone;
  12 + private String bhnum;
  13 + private String age;
  14 + private String sex;
  15 + private String imgs;//影像图片
  16 + private String item_finding;//影像所见
  17 + private String item_diagnosis;//诊断意见
  18 + private String item_result;//检验结果
  19 + private String apply_time;//送检日期
  20 + private String check_time;//检验时间
  21 + private String publish_time;//报告发布时间
  22 + private String apply_doctor;//送检医生
  23 + private String apply_dept;//送检科室
  24 + private String checker;//检验员
  25 + private String modified;//最后修改时间
  26 + private String created;//创建时间
  27 + private String hospital_id;
  28 + private String item_json;
28 29  
29 30  
30 31 public Integer getId() {
31 32  
32 33  
33 34  
34 35  
35 36  
36 37  
37 38  
38 39  
39 40  
40 41  
41 42  
42 43  
43 44  
44 45  
45 46  
46 47  
47 48  
48 49  
49 50  
50 51  
51 52  
52 53  
53 54  
54 55  
55 56  
56 57  
57 58  
58 59  
59 60  
60 61  
61 62  
62 63  
63 64  
64 65  
65 66  
66 67  
67 68  
68 69  
69 70  
70 71  
71 72  
72 73  
73 74  
74 75  
75 76  
76 77  
... ... @@ -35,188 +36,223 @@
35 36 this.id = id;
36 37 }
37 38  
38   - public String getR_ID() {
39   - return R_ID;
  39 + public String getR_id() {
  40 + return r_id;
40 41 }
41 42  
42   - public void setR_ID(String r_ID) {
43   - R_ID = r_ID;
  43 + public void setR_id(String r_id) {
  44 + this.r_id = r_id;
44 45 }
45 46  
46   - public String getTITLE() {
47   - return TITLE;
  47 + public String getTitle() {
  48 + return title;
48 49 }
49 50  
50   - public void setTITLE(String TITLE) {
51   - this.TITLE = TITLE;
  51 + public void setTitle(String title) {
  52 + this.title = title;
52 53 }
53 54  
54   - public String getTYPE() {
55   - return TYPE;
  55 + public String getType() {
  56 + return type;
56 57 }
57 58  
58   - public void setTYPE(String TYPE) {
59   - this.TYPE = TYPE;
  59 + public void setType(String type) {
  60 + this.type = type;
60 61 }
61 62  
62   - public String getVCCARDNO() {
63   - return VCCARDNO;
  63 + public String getVccardno() {
  64 + return vccardno;
64 65 }
65 66  
66   - public void setVCCARDNO(String VCCARDNO) {
67   - this.VCCARDNO = VCCARDNO;
  67 + public void setVccardno(String vccardno) {
  68 + this.vccardno = vccardno;
68 69 }
69 70  
70   - public String getNAME() {
71   - return NAME;
  71 + public String getName() {
  72 + return name;
72 73 }
73 74  
74   - public void setNAME(String NAME) {
75   - this.NAME = NAME;
  75 + public void setName(String name) {
  76 + this.name = name;
76 77 }
77 78  
78   - public String getPHONE() {
79   - return PHONE;
  79 + public String getPhone() {
  80 + return phone;
80 81 }
81 82  
82   - public void setPHONE(String PHONE) {
83   - this.PHONE = PHONE;
  83 + public void setPhone(String phone) {
  84 + this.phone = phone;
84 85 }
85 86  
86   - public String getBHNUM() {
87   - return BHNUM;
  87 + public String getBhnum() {
  88 + return bhnum;
88 89 }
89 90  
90   - public void setBHNUM(String BHNUM) {
91   - this.BHNUM = BHNUM;
  91 + public void setBhnum(String bhnum) {
  92 + this.bhnum = bhnum;
92 93 }
93 94  
94   - public String getAGE() {
95   - return AGE;
  95 + public String getAge() {
  96 + return age;
96 97 }
97 98  
98   - public void setAGE(String AGE) {
99   - this.AGE = AGE;
  99 + public void setAge(String age) {
  100 + this.age = age;
100 101 }
101 102  
102   - public String getSEX() {
103   - return SEX;
  103 + public String getSex() {
  104 + return sex;
104 105 }
105 106  
106   - public void setSEX(String SEX) {
107   - this.SEX = SEX;
  107 + public void setSex(String sex) {
  108 + this.sex = sex;
108 109 }
109 110  
110   - public String getIMGS() {
111   - return IMGS;
  111 + public String getImgs() {
  112 + return imgs;
112 113 }
113 114  
114   - public void setIMGS(String IMGS) {
115   - this.IMGS = IMGS;
  115 + public void setImgs(String imgs) {
  116 + this.imgs = imgs;
116 117 }
117 118  
118   - public String getITEM_FINDING() {
119   - return ITEM_FINDING;
  119 + public String getItem_finding() {
  120 + return item_finding;
120 121 }
121 122  
122   - public void setITEM_FINDING(String ITEM_FINDING) {
123   - this.ITEM_FINDING = ITEM_FINDING;
  123 + public void setItem_finding(String item_finding) {
  124 + this.item_finding = item_finding;
124 125 }
125 126  
126   - public String getITEM_DIAGNOSIS() {
127   - return ITEM_DIAGNOSIS;
  127 + public String getItem_diagnosis() {
  128 + return item_diagnosis;
128 129 }
129 130  
130   - public void setITEM_DIAGNOSIS(String ITEM_DIAGNOSIS) {
131   - this.ITEM_DIAGNOSIS = ITEM_DIAGNOSIS;
  131 + public void setItem_diagnosis(String item_diagnosis) {
  132 + this.item_diagnosis = item_diagnosis;
132 133 }
133 134  
134   - public String getITEM_RESULT() {
135   - return ITEM_RESULT;
  135 + public String getItem_result() {
  136 + return item_result;
136 137 }
137 138  
138   - public void setITEM_RESULT(String ITEM_RESULT) {
139   - this.ITEM_RESULT = ITEM_RESULT;
  139 + public void setItem_result(String item_result) {
  140 + this.item_result = item_result;
140 141 }
141 142  
142   - public String getAPPLY_TIME() {
143   - return APPLY_TIME;
  143 + public String getApply_time() {
  144 + return apply_time;
144 145 }
145 146  
146   - public void setAPPLY_TIME(String APPLY_TIME) {
147   - this.APPLY_TIME = APPLY_TIME;
  147 + public void setApply_time(String apply_time) {
  148 + this.apply_time = apply_time;
148 149 }
149 150  
150   - public String getCHECK_TIME() {
151   - return CHECK_TIME;
  151 + public String getCheck_time() {
  152 + return check_time;
152 153 }
153 154  
154   - public void setCHECK_TIME(String CHECK_TIME) {
155   - this.CHECK_TIME = CHECK_TIME;
  155 + public void setCheck_time(String check_time) {
  156 + this.check_time = check_time;
156 157 }
157 158  
158   - public String getPUBLISH_TIME() {
159   - return PUBLISH_TIME;
  159 + public String getPublish_time() {
  160 + return publish_time;
160 161 }
161 162  
162   - public void setPUBLISH_TIME(String PUBLISH_TIME) {
163   - this.PUBLISH_TIME = PUBLISH_TIME;
  163 + public void setPublish_time(String publish_time) {
  164 + this.publish_time = publish_time;
164 165 }
165 166  
166   - public String getAPPLY_DOCTOR() {
167   - return APPLY_DOCTOR;
  167 + public String getApply_doctor() {
  168 + return apply_doctor;
168 169 }
169 170  
170   - public void setAPPLY_DOCTOR(String APPLY_DOCTOR) {
171   - this.APPLY_DOCTOR = APPLY_DOCTOR;
  171 + public void setApply_doctor(String apply_doctor) {
  172 + this.apply_doctor = apply_doctor;
172 173 }
173 174  
174   - public String getAPPLY_DEPT() {
175   - return APPLY_DEPT;
  175 + public String getApply_dept() {
  176 + return apply_dept;
176 177 }
177 178  
178   - public void setAPPLY_DEPT(String APPLY_DEPT) {
179   - this.APPLY_DEPT = APPLY_DEPT;
  179 + public void setApply_dept(String apply_dept) {
  180 + this.apply_dept = apply_dept;
180 181 }
181 182  
182   - public String getCHECKER() {
183   - return CHECKER;
  183 + public String getChecker() {
  184 + return checker;
184 185 }
185 186  
186   - public void setCHECKER(String CHECKER) {
187   - this.CHECKER = CHECKER;
  187 + public void setChecker(String checker) {
  188 + this.checker = checker;
188 189 }
189 190  
190   - public String getMODIFIED() {
191   - return MODIFIED;
  191 + public String getModified() {
  192 + return modified;
192 193 }
193 194  
194   - public void setMODIFIED(String MODIFIED) {
195   - this.MODIFIED = MODIFIED;
  195 + public void setModified(String modified) {
  196 + this.modified = modified;
196 197 }
197 198  
198   - public String getCREATED() {
199   - return CREATED;
  199 + public String getCreated() {
  200 + return created;
200 201 }
201 202  
202   - public void setCREATED(String CREATED) {
203   - this.CREATED = CREATED;
  203 + public void setCreated(String created) {
  204 + this.created = created;
204 205 }
205 206  
206   - public String getHOSPITAL_ID() {
207   - return HOSPITAL_ID;
  207 + public String getHospital_id() {
  208 + return hospital_id;
208 209 }
209 210  
210   - public void setHOSPITAL_ID(String HOSPITAL_ID) {
211   - this.HOSPITAL_ID = HOSPITAL_ID;
  211 + public void setHospital_id(String hospital_id) {
  212 + this.hospital_id = hospital_id;
212 213 }
213 214  
214   - public String getITEM_JSON() {
215   - return ITEM_JSON;
  215 + public String getItem_json() {
  216 + return item_json;
216 217 }
217 218  
218   - public void setITEM_JSON(String ITEM_JSON) {
219   - this.ITEM_JSON = ITEM_JSON;
  219 + public void setItem_json(String item_json) {
  220 + this.item_json = item_json;
220 221 }
  222 +
  223 + @Override
  224 + public String toString() {
  225 + return "RisReportModel{" +
  226 + "id=" + id +
  227 + ", r_id='" + r_id + '\'' +
  228 + ", title='" + title + '\'' +
  229 + ", type='" + type + '\'' +
  230 + ", vccardno='" + vccardno + '\'' +
  231 + ", name='" + name + '\'' +
  232 + ", phone='" + phone + '\'' +
  233 + ", bhnum='" + bhnum + '\'' +
  234 + ", age='" + age + '\'' +
  235 + ", sex='" + sex + '\'' +
  236 + ", imgs='" + imgs + '\'' +
  237 + ", item_finding='" + item_finding + '\'' +
  238 + ", item_diagnosis='" + item_diagnosis + '\'' +
  239 + ", item_result='" + item_result + '\'' +
  240 + ", apply_time='" + apply_time + '\'' +
  241 + ", check_time='" + check_time + '\'' +
  242 + ", publish_time='" + publish_time + '\'' +
  243 + ", apply_doctor='" + apply_doctor + '\'' +
  244 + ", apply_dept='" + apply_dept + '\'' +
  245 + ", checker='" + checker + '\'' +
  246 + ", modified='" + modified + '\'' +
  247 + ", created='" + created + '\'' +
  248 + ", hospital_id='" + hospital_id + '\'' +
  249 + ", item_json='" + item_json + '\'' +
  250 + '}';
  251 + }
  252 +
  253 + public static void main(String[] args) {
  254 + String str="33.00岁 ";
  255 + System.out.println(str.trim()+"1111");
  256 + }
221 257 }
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/RisServiceImpl.java View file @ c07e334
... ... @@ -2,6 +2,8 @@
2 2  
3 3 import com.lyms.platform.common.constants.ErrorCodeConstants;
4 4 import com.lyms.platform.common.result.BaseResponse;
  5 +import com.lyms.platform.common.utils.JsonUtil;
  6 +import com.lyms.platform.common.utils.StringUtils;
5 7 import com.lyms.platform.permission.dao.master.MasterLisMapper;
6 8 import com.lyms.platform.permission.dao.master.MasterRisMapper;
7 9 import com.lyms.platform.permission.model.LisReportModel;
... ... @@ -69,7 +71,16 @@
69 71 try {
70 72 for (RisReportModel model : lisList) {
71 73 try {
72   - masterRisMapper.deleteRisData(model);
  74 + if (StringUtils.isNotEmpty(model.getItem_json()))
  75 + {
  76 + model.setItem_json(JsonUtil.array2JsonString(model.getItem_json()));
  77 + }
  78 + System.out.println(model.getAge().trim());
  79 + model.setAge(model.getAge().trim());
  80 + model.setItem_finding(model.getItem_finding().trim());
  81 + model.setItem_diagnosis(model.getItem_diagnosis().trim());
  82 + System.out.println("resivce = " + model.toString());
  83 + // masterRisMapper.deleteRisData(model);
73 84 masterRisMapper.saveRisData(model);
74 85 } catch (Exception e) {
75 86 continue;
platform-biz-service/src/main/resources/mainOrm/master/MasterRis.xml View file @ c07e334
... ... @@ -28,29 +28,29 @@
28 28 HOSPITAL_ID,
29 29 ITEM_JSON
30 30 ) VALUES (
31   - ${R_ID},
32   - ${TITLE},
33   - ${TYPE},
34   - ${VCCARDNO},
35   - ${NAME},
36   - ${BHNUM},
37   - ${PHONE},
38   - ${AGE},
39   - ${SEX},
40   - ${IMGS},
41   - ${ITEM_FINDING},
42   - ${ITEM_DIAGNOSIS},
43   - ${ITEM_RESULT},
44   - ${APPLY_TIME},
45   - ${CHECK_TIME},
46   - ${PUBLISH_TIME},
47   - ${APPLY_DOCTOR},
48   - ${APPLY_DEPT},
49   - ${CHECKER},
50   - ${MODIFIED},
51   - ${CREATED},
52   - ${HOSPITAL_ID},
53   - ${ITEM_JSON}
  31 + ${r_id},
  32 + ${title},
  33 + ${type},
  34 + ${vccardno},
  35 + ${name},
  36 + ${bhnum},
  37 + ${phone},
  38 + ${age},
  39 + ${sex},
  40 + ${imgs},
  41 + ${item_finding},
  42 + ${item_diagnosis},
  43 + ${item_result},
  44 + ${apply_time},
  45 + ${check_time},
  46 + ${publish_time},
  47 + ${apply_doctor},
  48 + ${apply_dept},
  49 + ${checker},
  50 + ${modified},
  51 + ${created},
  52 + ${hospital_id},
  53 + ${item_json}
54 54 )
55 55  
56 56 </insert>
platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java View file @ c07e334
... ... @@ -487,6 +487,14 @@
487 487 private String buildingManualCode;
488 488 private Integer isComplete;
489 489  
  490 + /**
  491 + * 大同需求
  492 + */
  493 + //问诊次数 (建档一个月内)
  494 + private Integer visitsNum;
  495 + //his病人ID
  496 + private String patientHId;
  497 +
490 498 public String getVillageId() {
491 499 return villageId;
492 500 }
... ... @@ -1995,6 +2003,22 @@
1995 2003  
1996 2004 public void setSendCoupon(Boolean sendCoupon) {
1997 2005 isSendCoupon = sendCoupon;
  2006 + }
  2007 +
  2008 + public Integer getVisitsNum() {
  2009 + return visitsNum;
  2010 + }
  2011 +
  2012 + public void setVisitsNum(Integer visitsNum) {
  2013 + this.visitsNum = visitsNum;
  2014 + }
  2015 +
  2016 + public String getPatientHId() {
  2017 + return patientHId;
  2018 + }
  2019 +
  2020 + public void setPatientHId(String patientHId) {
  2021 + this.patientHId = patientHId;
1998 2022 }
1999 2023  
2000 2024 public TrackDownRecord build() {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FmController.java View file @ c07e334
... ... @@ -60,6 +60,5 @@
60 60 return JsonUtil.array2JsonString(models);
61 61 }
62 62  
63   -
64 63 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientController.java View file @ c07e334
  1 +package com.lyms.platform.operate.web.controller;
  2 +
  3 +import com.lyms.platform.biz.service.PatientsService;
  4 +import com.lyms.platform.common.constants.ErrorCodeConstants;
  5 +import com.lyms.platform.common.result.BaseResponse;
  6 +import com.lyms.platform.pojo.Patients;
  7 +import com.lyms.platform.query.PatientsQuery;
  8 +import org.springframework.beans.factory.annotation.Autowired;
  9 +import org.springframework.stereotype.Controller;
  10 +import org.springframework.web.bind.annotation.RequestMapping;
  11 +import org.springframework.web.bind.annotation.RequestMethod;
  12 +import org.springframework.web.bind.annotation.ResponseBody;
  13 +
  14 +import java.util.List;
  15 +
  16 +@Controller("/patient")
  17 +public class PatientController {
  18 + @Autowired
  19 + private PatientsService patientsService;
  20 + //http://112.112.112.183:8085/viewhip-etyy/view/commView/layout.jsp?patientId=病人ID
  21 +
  22 + @RequestMapping(method = RequestMethod.GET, value = "/getPatients")
  23 + @ResponseBody
  24 + public BaseResponse getPatients(){
  25 + BaseResponse baseResponse=new BaseResponse();
  26 + PatientsQuery patientsQuery =new PatientsQuery();
  27 + patientsQuery.setYn(1);
  28 + patientsQuery.setHospitalId("2100002419");
  29 + List<Patients> patientsList= patientsService.queryPatient(patientsQuery);
  30 + baseResponse.setObject(patientsList);
  31 + return baseResponse.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
  32 + }
  33 +}
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/RisController.java View file @ c07e334
... ... @@ -43,7 +43,7 @@
43 43 */
44 44 @RequestMapping(method = RequestMethod.POST, value = "/saveRisData")
45 45 @ResponseBody
46   - public BaseResponse saveLisData(@RequestBody List<RisReportModel> models,
  46 + public BaseResponse saveRisData(@RequestBody List<RisReportModel> models,
47 47 HttpServletRequest httpServletRequest) {
48 48  
49 49 System.out.println("resivce size = " + models.size());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java View file @ c07e334
... ... @@ -6877,7 +6877,7 @@
6877 6877 babyDiagnoseModel.setBlh(hisNewbornRequest.getBHNUM());
6878 6878 babyDiagnoseModel.setCyzdmc(hisNewbornRequest.getDIAGNOSE());
6879 6879 babyDiagnoseModel.setLxdh(hisNewbornRequest.getPhone());
6880   - babyDiagnoseModel.setCyrq(hisNewbornRequest.getCreated());
  6880 + babyDiagnoseModel.setCyrq(DateUtil.parseYMDHMS(hisNewbornRequest.getCreated()));
6881 6881 babyModelQuery.setName(hisNewbornRequest.getName());
6882 6882  
6883 6883 List<BabyModel> modelList= babyService.queryBabyWithQuery(babyModelQuery);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/HisNewbornRequest.java View file @ c07e334
... ... @@ -17,9 +17,9 @@
17 17 private String DIAGNOSE;
18 18  
19 19 //修改时间
20   - private Date modified;
  20 + private String modified;
21 21 //创建时间
22   - private Date created;
  22 + private String created;
23 23  
24 24 public String getId() {
25 25 return id;
26 26  
27 27  
28 28  
... ... @@ -61,19 +61,19 @@
61 61 this.DIAGNOSE = DIAGNOSE;
62 62 }
63 63  
64   - public Date getModified() {
  64 + public String getModified() {
65 65 return modified;
66 66 }
67 67  
68   - public void setModified(Date modified) {
  68 + public void setModified(String modified) {
69 69 this.modified = modified;
70 70 }
71 71  
72   - public Date getCreated() {
  72 + public String getCreated() {
73 73 return created;
74 74 }
75 75  
76   - public void setCreated(Date created) {
  76 + public void setCreated(String created) {
77 77 this.created = created;
78 78 }
79 79 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/SyncDataTaskService.java View file @ c07e334
... ... @@ -60,6 +60,7 @@
60 60 //urls.put("area-zhucheng-api.healthbaby.com.cn:12356","诸城市妇幼保健院");
61 61 //urls.put("area-weihai-api.healthbaby.com.cn:12356","威海市妇幼");
62 62 urls.put("area-chengde-api.healthbaby.com.cn:12356","承德");
  63 + urls.put("area-dt-api.healthbaby.com.cn:12356","大同");
63 64 //urls.put("area-lingcheng-api.healthbaby.com.cn:12356","陵城");
64 65 }
65 66