|
@@ -28,6 +28,8 @@ func DoctorApiRegistRouters() {
|
28
|
28
|
beego.Router("/api/patient/deletedryweight", &DoctorsApiController{}, "Delete:DeleteDryWeight")
|
29
|
29
|
beego.Router("/api/schedule/advices", &DoctorsApiController{}, "Get:ScheduleAdvices")
|
30
|
30
|
beego.Router("/api/schedule/getdoctoradvicecount", &DoctorsApiController{}, "Get:GetDoctorAdviceCount")
|
|
31
|
+ beego.Router("/api/patient/savevasularaccess", &DoctorsApiController{}, "Get:SaveVasularAccess")
|
|
32
|
+ beego.Router("/api/patient/getallvascualraccesslist", &DoctorsApiController{}, "Get:GetAllVacualAccessList")
|
31
|
33
|
}
|
32
|
34
|
|
33
|
35
|
func (c *DoctorsApiController) ScheduleAdvices() {
|
|
@@ -311,3 +313,60 @@ func (c *DoctorsApiController) GetDoctorAdviceCount() {
|
311
|
313
|
}
|
312
|
314
|
|
313
|
315
|
}
|
|
316
|
+
|
|
317
|
+func (this *DoctorsApiController) SaveVasularAccess() {
|
|
318
|
+
|
|
319
|
+ access_project, _ := this.GetInt64("access_project")
|
|
320
|
+ blood_access_part_id := this.GetString("blood_access_part_id")
|
|
321
|
+ blood_access_part_opera_id := this.GetString("blood_access_part_opera_id")
|
|
322
|
+ first_start_time := this.GetString("first_start_time")
|
|
323
|
+ timeLayout := "2006-01-02"
|
|
324
|
+ loc, _ := time.LoadLocation("Local")
|
|
325
|
+ firstStartTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", first_start_time+" 00:00:00", loc)
|
|
326
|
+ inflow_pass := this.GetString("inflow_pass")
|
|
327
|
+ remark := this.GetString("remark")
|
|
328
|
+ start_time := this.GetString("start_time")
|
|
329
|
+ startTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", start_time+" 00:00:00", loc)
|
|
330
|
+ stop_reason := this.GetString("stop_reason")
|
|
331
|
+ user_status, _ := this.GetInt64("user_status")
|
|
332
|
+ adminUserInfo := this.GetAdminUserInfo()
|
|
333
|
+ orgId := adminUserInfo.CurrentOrgId
|
|
334
|
+ creator := adminUserInfo.AdminUser.Id
|
|
335
|
+ access := models.XtPatientVascularAccess{
|
|
336
|
+ AccessProject: access_project,
|
|
337
|
+ BloodAccessPartId: blood_access_part_id,
|
|
338
|
+ BloodAccessPartOperaId: blood_access_part_opera_id,
|
|
339
|
+ FirstStartTime: firstStartTime.Unix(),
|
|
340
|
+ InflowPass: inflow_pass,
|
|
341
|
+ Remark: remark,
|
|
342
|
+ StartTime: startTime.Unix(),
|
|
343
|
+ StopReason: stop_reason,
|
|
344
|
+ UserStatus: user_status,
|
|
345
|
+ Creator: creator,
|
|
346
|
+ UserOrgId: orgId,
|
|
347
|
+ Status: 1,
|
|
348
|
+ Ctime: time.Now().Unix(),
|
|
349
|
+ }
|
|
350
|
+ err := service.SaveVascularAccess(&access)
|
|
351
|
+ if err == nil {
|
|
352
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
353
|
+ "access": access,
|
|
354
|
+ })
|
|
355
|
+ return
|
|
356
|
+ }
|
|
357
|
+}
|
|
358
|
+
|
|
359
|
+func (this *DoctorsApiController) GetAllVacualAccessList() {
|
|
360
|
+
|
|
361
|
+ limit, _ := this.GetInt64("limit")
|
|
362
|
+ page, _ := this.GetInt64("page")
|
|
363
|
+ orgId := this.GetAdminUserInfo().CurrentOrgId
|
|
364
|
+ list, total, err := service.GetAllVacualAccessList(orgId, limit, page)
|
|
365
|
+ if err == nil {
|
|
366
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
367
|
+ "list": list,
|
|
368
|
+ "total": total,
|
|
369
|
+ })
|
|
370
|
+ return
|
|
371
|
+ }
|
|
372
|
+}
|