Commit 5a9180cb8cc69adc4392e4c1d3e8c95b7f559cf7

Authored by yangfei
1 parent 89dfd406c8

听力诊断模块

Showing 2 changed files with 236 additions and 86 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientMarkHospServiceFacade.java View file @ 5a9180c
... ... @@ -54,7 +54,7 @@
54 54 */
55 55 public BaseResponse patientMarkHospitalInit() {
56 56 Map map = new HashMap();
57   - map.put("makeType",MakeHospitalEnums.getMakeHospital());
  57 + map.put("makeType", MakeHospitalEnums.getMakeHospital());
58 58  
59 59 return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION).setData(map);
60 60 }
... ... @@ -62,6 +62,7 @@
62 62  
63 63 /**
64 64 * 根据id查询一条住院提醒记录
  65 + *
65 66 * @param id
66 67 * @return
67 68 */
... ... @@ -102,6 +103,8 @@
102 103  
103 104 ps.setId(UUID.randomUUID().toString().replace("-", ""));
104 105 ps.setHospitalId(hospitalId);
  106 + ps.setBackStatus(1);
  107 + ps.setInHospitStatus(1);
105 108 patientMarkHospitalService.addPatientMarkHospital(ps);
106 109  
107 110 BaseResponse baseResponse = new BaseResponse();
108 111  
109 112  
110 113  
111 114  
112 115  
113 116  
114 117  
115 118  
116 119  
117 120  
118 121  
... ... @@ -183,53 +186,84 @@
183 186 else if (patients.getType() == 3) {
184 187 result.setcDueWeek("已分娩");
185 188 }
  189 + result.setCardNo(patients.getCardNo());
  190 + result.setPhone(patients.getPhone());
  191 + result.setVcCardNo(patients.getVcCardNo());
186 192 result.setAge(DateUtil.getAge(patients.getBirth()) + "岁");
187 193 result.setName(patients.getUsername());
  194 + result.setDueDate(DateUtil.getyyyy_MM_dd(patients.getDueDate()));
188 195 }
189   - result.setBackStatus(ps.getBackStatus() == 1 ? "待提醒" : "已提醒");
190   - result.setBackResult(ps.getBackResult() == 1 ? "成功" : "失败");
191   - Users users = usersService.getUsers(Integer.parseInt(ps.getBackDoctor()));
192   - if (users != null) {
193   - result.setBackDoctor(users.getName());
194   - } else {
195   - result.setBackDoctor("产检医生");
  196 + result.setBackStatus(ps.getBackStatus());
  197 +
  198 + result.setBackStatusStr(ps.getBackStatus() == 1 ? "待提醒" : "已提醒");
  199 + result.setBackResult(ps.getBackResult());
  200 + if (ps.getBackResult() != null) {
  201 + result.setBackResultStr(ps.getBackResult() == 1 ? "成功" : "失败");
196 202 }
  203 + if (ps.getBackDoctor() != null) {
  204 + Users users = usersService.getUsers(Integer.parseInt(ps.getBackDoctor()));
  205 + if (users != null) {
  206 + result.setBackDoctor(users.getName());
  207 + } else {
  208 + result.setBackDoctor("产检医生");
  209 + }
  210 + }
197 211 result.setBackDate(DateUtil.getyyyy_MM_dd(ps.getBackDate()));
198 212 result.setBackMakeDate(DateUtil.getyyyy_MM_dd(ps.getBackMakeDate()));
199 213 result.setBackRemark(ps.getBackRemark());
200   - if(ps.getBackFailure()!=null){
201   - result.setBackFailure(MakeHospitalEnums.getTitle(ps.getBackFailure()));
  214 + if (ps.getBackFailure() != null) {
  215 + result.setBackFailure(ps.getBackFailure());
  216 + result.setBackFailureStr(MakeHospitalEnums.getTitle(ps.getBackFailure()));
202 217 }
203   - result.setInHospitStatus(ps.getInHospitStatus() == 1 ? "待提醒" : "已提醒");
204   - result.setInHospitResult(ps.getInHospitResult() == 1 ? "成功" : "失败");
205   - users = usersService.getUsers(Integer.parseInt(ps.getInHospitDoctor()));
206   - if (users != null) {
207   - result.setInHospitDoctor(users.getName());
208   - } else {
209   - result.setInHospitDoctor("产检医生");
  218 + if (ps.getInHospitStatus() != null) {
  219 + result.setInHospitStatus(ps.getInHospitStatus());
  220 + result.setInHospitStatusStr(ps.getInHospitStatus() == 1 ? "待提醒" : "已提醒");
210 221 }
  222 + if (ps.getInHospitResult() != null) {
  223 + result.setInHospitResult(ps.getInHospitResult());
  224 + result.setInHospitResultStr(ps.getInHospitResult() == 1 ? "成功" : "失败");
  225 +
  226 + }
  227 + if(ps.getInHospitDoctor()!=null){
  228 + Users users = usersService.getUsers(Integer.parseInt(ps.getInHospitDoctor()));
  229 + if (users != null) {
  230 + result.setInHospitDoctor(users.getName());
  231 + } else {
  232 + result.setInHospitDoctor("产检医生");
  233 + }
  234 + }
  235 +
211 236 result.setInHospitDate(DateUtil.getyyyy_MM_dd(ps.getInHospitDate()));
212 237 result.setInHospitMakeDate(DateUtil.getyyyy_MM_dd(ps.getInHospitMakeDate()));
213 238 result.setInHospitRemark(ps.getInHospitRemark());
214   - result.setInHospitFailure(MakeHospitalEnums.getTitle(ps.getInHospitFailure()));
  239 + if (ps.getInHospitFailure() != null) {
  240 + result.setInHospitFailure(ps.getInHospitFailure());
  241 + result.setInHospitFailureStr(MakeHospitalEnums.getTitle(ps.getInHospitFailure()));
  242 + }
  243 +
  244 + if (ps.getHospitStatus() != null) {
  245 + result.setConfirmStatus(ps.getHospitStatus());
  246 + result.setConfirmStatusStr(ps.getHospitStatus() == 1 ? "待住院" : "已住院");
  247 + }
  248 + result.setConfirmDate(DateUtil.getyyyy_MM_dd(ps.getHospitDate()));
  249 + if (ps.getHospitType() != null) {
  250 + result.setConfirmType(ps.getHospitType() == 1 ? "分娩住院" : "其他住院");
  251 + }
215 252 result.setMakeInHospitDate(DateUtil.getyyyy_MM_dd(ps.getMakeInHospitDate()));
216 253 result.setMakeDate(DateUtil.getyyyy_MM_dd(ps.getMakeDate()));
217   - users = usersService.getUsers(Integer.parseInt(ps.getMakeDoctor()));
218   - if (users != null) {
219   - result.setMakeDoctor(users.getName());
220   - } else {
221   - result.setMakeDoctor("产检医生");
  254 + if(ps.getMakeDoctor()!=null){
  255 + Users users = usersService.getUsers(Integer.parseInt(ps.getMakeDoctor()));
  256 + if (users != null) {
  257 + result.setMakeDoctor(users.getName());
  258 + } else {
  259 + result.setMakeDoctor("产检医生");
  260 + }
222 261 }
223   - result.setMakeRemark(ps.getMakeRemark());
224 262  
  263 + result.setMakeRemark(ps.getMakeRemark());
225 264 result.setPatientId(ps.getPatientId());
226 265 result.setpId(ps.getPid());
227   - users = usersService.getUsers(Integer.parseInt(ps.getInHospitDoctor()));
228   - if (users != null) {
229   - result.setInHospitDoctor(users.getName());
230   - } else {
231   - result.setInHospitDoctor("产检医生");
232   - }
  266 +
233 267 return result;
234 268 }
235 269  
... ... @@ -308,7 +342,7 @@
308 342 /**
309 343 * 同步查询乐陵住院数据
310 344 */
311   - public void synLlHisData(int offset,int page){
  345 + public void synLlHisData(int offset, int page) {
312 346  
313 347 PatientMarkHospitalQuery patientMarkHospQuery = new PatientMarkHospitalQuery();
314 348 patientMarkHospQuery.setSort("hospit_date");
315 349  
316 350  
317 351  
318 352  
319 353  
320 354  
... ... @@ -319,32 +353,33 @@
319 353  
320 354 List<PatientMarkHospital> patientMarkHospitals = patientMarkHospitalService.queryPatientMarkHospital(patientMarkHospQuery);
321 355 for (PatientMarkHospital ps : patientMarkHospitals) {
322   - if(ps.getHospitType() == 1){//分娩住院跳过
  356 + if (ps.getHospitType() == 1) {//分娩住院跳过
323 357 continue;
324 358 }
325 359 synUpdateHisData(ps);
326 360 }
327   - if(patientMarkHospQuery.getCount()>page*100){
328   - synLlHisData((page+1)*100,page+1);
  361 + if (patientMarkHospQuery.getCount() > page * 100) {
  362 + synLlHisData((page + 1) * 100, page + 1);
329 363 }
330 364 }
331 365  
332 366 /**
333 367 * 同步更新数据库
  368 + *
334 369 * @param ps
335 370 */
336   - public void synUpdateHisData(PatientMarkHospital ps){
  371 + public void synUpdateHisData(PatientMarkHospital ps) {
337 372 Patients patients = patientsService.findOnePatientById(ps.getPatientId());
338 373 if (null != patients) {
339   - List<Map<String,String>> makePatients = llfyHisService.getPatientInfo(patients,DateUtil.getyyyy_MM_dd(ps.getMakeDate()),DateUtil.getyyyy_MM_dd(new Date()));
340   - if(CollectionUtils.isNotEmpty(makePatients)){
341   - for(Map<String,String> map : makePatients){
  374 + List<Map<String, String>> makePatients = llfyHisService.getPatientInfo(patients, DateUtil.getyyyy_MM_dd(ps.getMakeDate()), DateUtil.getyyyy_MM_dd(new Date()));
  375 + if (CollectionUtils.isNotEmpty(makePatients)) {
  376 + for (Map<String, String> map : makePatients) {
342 377 String inHospDiagn = map.get("inHospDiagn");
343 378 int hospType = getHospitType(inHospDiagn);
344 379 ps.setHospitStatus(2);
345   - if(ps.getHospitStatus()==null){
  380 + if (ps.getHospitStatus() == null) {
346 381 ps.setHospitType(hospType);
347   - }else if(hospType==1){//当住院方式为分娩方式时
  382 + } else if (hospType == 1) {//当住院方式为分娩方式时
348 383 ps.setHospitType(hospType);
349 384 }
350 385 }
... ... @@ -355,6 +390,7 @@
355 390  
356 391 /**
357 392 * 根据入院诊断返回入院方式
  393 + *
358 394 * @param intHospDesc 入院诊断编码
359 395 * @return
360 396 */
361 397  
... ... @@ -444,9 +480,9 @@
444 480 map.put("ysydwr", 1);
445 481 map.put("zyxye", 1);
446 482 Integer hospType = map.get(intHospDesc);
447   - if(hospType==null){
  483 + if (hospType == null) {
448 484 return 2;
449   - }else {
  485 + } else {
450 486 return 1;
451 487 }
452 488 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatienMarkHospResult.java View file @ 5a9180c
... ... @@ -21,6 +21,18 @@
21 21  
22 22 private String name;
23 23 /**
  24 + * 就诊卡号
  25 + */
  26 + private String vcCardNo;
  27 + /**
  28 + * 身份证号
  29 + */
  30 + private String cardNo;
  31 + /**
  32 + * 手机号
  33 + */
  34 + private String phone;
  35 + /**
24 36 * 孕妇年龄
25 37 */
26 38 private String age;
27 39  
28 40  
... ... @@ -28,15 +40,22 @@
28 40 * 当前孕周
29 41 */
30 42 private String cDueWeek;
  43 + /**
  44 + * 预产期
  45 + */
  46 + private String dueDate;
31 47  
32 48 /**
33 49 * 回院是否提醒(1-待提醒、2-已提醒)
34 50 */
35   - private String backStatus;
  51 + private Integer backStatus;
  52 + private String backStatusStr;
36 53 /**
37 54 * 回院提醒结果(1-成功、2-失败)
38 55 */
39   - private String backResult;
  56 + private Integer backResult;
  57 + private String backResultStr;
  58 +
40 59 /**
41 60 * 回院操作员id
42 61 */
43 62  
44 63  
... ... @@ -56,15 +75,18 @@
56 75 /**
57 76 * 回院失败原因(1-电话无人接听、2-他院已办理住院、3-暂时未确定、4-其他)
58 77 */
59   - private String backFailure;
  78 + private Integer backFailure;
  79 + private String backFailureStr;
60 80 /**
61 81 * 住院是否提醒(1-待提醒、2-已提醒)
62 82 */
63   - private String inHospitStatus;
  83 + private Integer inHospitStatus;
  84 + private String inHospitStatusStr;
64 85 /**
65 86 * 住院提醒结果(1-成功、2-失败)
66 87 */
67   - private String inHospitResult;
  88 + private Integer inHospitResult;
  89 + private String inHospitResultStr;
68 90 /**
69 91 * 住院操作员id
70 92 */
... ... @@ -84,7 +106,8 @@
84 106 /**
85 107 * 住院失败原因(1-电话无人接听、2-他院已办理住院、3-暂时未确定、4-其他)2
86 108 */
87   - private String inHospitFailure;
  109 + private Integer inHospitFailure;
  110 + private String inHospitFailureStr;
88 111 /**
89 112 * 预约住院时间(初始录入)
90 113 */
91 114  
... ... @@ -102,9 +125,10 @@
102 125 */
103 126 private String makeRemark;
104 127 /**
105   - * 住院状态
  128 + * 住院状态 1-待住院、2-已住院
106 129 */
107   - private String confirmStatus;
  130 + private Integer confirmStatus;
  131 + private String confirmStatusStr;
108 132 /**
109 133 * 住院时间
110 134 */
111 135  
... ... @@ -114,34 +138,11 @@
114 138 */
115 139 private String confirmType;
116 140  
117   - public String getConfirmStatus() {
118   - return confirmStatus;
119   - }
120   -
121   - public void setConfirmStatus(String confirmStatus) {
122   - this.confirmStatus = confirmStatus;
123   - }
124   -
125   - public String getConfirmDate() {
126   - return confirmDate;
127   - }
128   -
129   - public void setConfirmDate(String confirmDate) {
130   - this.confirmDate = confirmDate;
131   - }
132   -
133   - public String getConfirmType() {
134   - return confirmType;
135   - }
136   -
137   - public void setConfirmType(String confirmType) {
138   - this.confirmType = confirmType;
139   - }
140   -
141 141 public String getId() {
142 142 return id;
143 143 }
144 144  
  145 +
145 146 public void setId(String id) {
146 147 this.id = id;
147 148 }
148 149  
149 150  
150 151  
151 152  
... ... @@ -186,22 +187,38 @@
186 187 this.cDueWeek = cDueWeek;
187 188 }
188 189  
189   - public String getBackStatus() {
  190 + public Integer getBackStatus() {
190 191 return backStatus;
191 192 }
192 193  
193   - public void setBackStatus(String backStatus) {
  194 + public void setBackStatus(Integer backStatus) {
194 195 this.backStatus = backStatus;
195 196 }
196 197  
197   - public String getBackResult() {
  198 + public String getBackStatusStr() {
  199 + return backStatusStr;
  200 + }
  201 +
  202 + public void setBackStatusStr(String backStatusStr) {
  203 + this.backStatusStr = backStatusStr;
  204 + }
  205 +
  206 + public Integer getBackResult() {
198 207 return backResult;
199 208 }
200 209  
201   - public void setBackResult(String backResult) {
  210 + public void setBackResult(Integer backResult) {
202 211 this.backResult = backResult;
203 212 }
204 213  
  214 + public String getBackResultStr() {
  215 + return backResultStr;
  216 + }
  217 +
  218 + public void setBackResultStr(String backResultStr) {
  219 + this.backResultStr = backResultStr;
  220 + }
  221 +
205 222 public String getBackDoctor() {
206 223 return backDoctor;
207 224 }
208 225  
209 226  
210 227  
211 228  
212 229  
213 230  
... ... @@ -234,30 +251,54 @@
234 251 this.backRemark = backRemark;
235 252 }
236 253  
237   - public String getBackFailure() {
  254 + public Integer getBackFailure() {
238 255 return backFailure;
239 256 }
240 257  
241   - public void setBackFailure(String backFailure) {
  258 + public void setBackFailure(Integer backFailure) {
242 259 this.backFailure = backFailure;
243 260 }
244 261  
245   - public String getInHospitStatus() {
  262 + public String getBackFailureStr() {
  263 + return backFailureStr;
  264 + }
  265 +
  266 + public void setBackFailureStr(String backFailureStr) {
  267 + this.backFailureStr = backFailureStr;
  268 + }
  269 +
  270 + public Integer getInHospitStatus() {
246 271 return inHospitStatus;
247 272 }
248 273  
249   - public void setInHospitStatus(String inHospitStatus) {
  274 + public void setInHospitStatus(Integer inHospitStatus) {
250 275 this.inHospitStatus = inHospitStatus;
251 276 }
252 277  
253   - public String getInHospitResult() {
  278 + public String getInHospitStatusStr() {
  279 + return inHospitStatusStr;
  280 + }
  281 +
  282 + public void setInHospitStatusStr(String inHospitStatusStr) {
  283 + this.inHospitStatusStr = inHospitStatusStr;
  284 + }
  285 +
  286 + public Integer getInHospitResult() {
254 287 return inHospitResult;
255 288 }
256 289  
257   - public void setInHospitResult(String inHospitResult) {
  290 + public void setInHospitResult(Integer inHospitResult) {
258 291 this.inHospitResult = inHospitResult;
259 292 }
260 293  
  294 + public String getInHospitResultStr() {
  295 + return inHospitResultStr;
  296 + }
  297 +
  298 + public void setInHospitResultStr(String inHospitResultStr) {
  299 + this.inHospitResultStr = inHospitResultStr;
  300 + }
  301 +
261 302 public String getInHospitDoctor() {
262 303 return inHospitDoctor;
263 304 }
264 305  
265 306  
... ... @@ -290,14 +331,22 @@
290 331 this.inHospitRemark = inHospitRemark;
291 332 }
292 333  
293   - public String getInHospitFailure() {
  334 + public Integer getInHospitFailure() {
294 335 return inHospitFailure;
295 336 }
296 337  
297   - public void setInHospitFailure(String inHospitFailure) {
  338 + public void setInHospitFailure(Integer inHospitFailure) {
298 339 this.inHospitFailure = inHospitFailure;
299 340 }
300 341  
  342 + public String getInHospitFailureStr() {
  343 + return inHospitFailureStr;
  344 + }
  345 +
  346 + public void setInHospitFailureStr(String inHospitFailureStr) {
  347 + this.inHospitFailureStr = inHospitFailureStr;
  348 + }
  349 +
301 350 public String getMakeInHospitDate() {
302 351 return makeInHospitDate;
303 352 }
... ... @@ -329,5 +378,70 @@
329 378 public void setMakeRemark(String makeRemark) {
330 379 this.makeRemark = makeRemark;
331 380 }
  381 +
  382 + public Integer getConfirmStatus() {
  383 + return confirmStatus;
  384 + }
  385 +
  386 + public void setConfirmStatus(Integer confirmStatus) {
  387 + this.confirmStatus = confirmStatus;
  388 + }
  389 +
  390 + public String getConfirmStatusStr() {
  391 + return confirmStatusStr;
  392 + }
  393 +
  394 + public void setConfirmStatusStr(String confirmStatusStr) {
  395 + this.confirmStatusStr = confirmStatusStr;
  396 + }
  397 +
  398 + public String getConfirmDate() {
  399 + return confirmDate;
  400 + }
  401 +
  402 + public void setConfirmDate(String confirmDate) {
  403 + this.confirmDate = confirmDate;
  404 + }
  405 +
  406 + public String getConfirmType() {
  407 + return confirmType;
  408 + }
  409 +
  410 + public void setConfirmType(String confirmType) {
  411 + this.confirmType = confirmType;
  412 + }
  413 +
  414 + public String getDueDate() {
  415 + return dueDate;
  416 + }
  417 +
  418 + public void setDueDate(String dueDate) {
  419 + this.dueDate = dueDate;
  420 + }
  421 +
  422 + public String getVcCardNo() {
  423 + return vcCardNo;
  424 + }
  425 +
  426 + public void setVcCardNo(String vcCardNo) {
  427 + this.vcCardNo = vcCardNo;
  428 + }
  429 +
  430 + public String getCardNo() {
  431 + return cardNo;
  432 + }
  433 +
  434 + public void setCardNo(String cardNo) {
  435 + this.cardNo = cardNo;
  436 + }
  437 +
  438 + public String getPhone() {
  439 + return phone;
  440 + }
  441 +
  442 + public void setPhone(String phone) {
  443 + this.phone = phone;
  444 + }
  445 +
332 446 }