|
@@ -63,7 +63,7 @@ func PatientApiRegistRouters() {
|
63
|
63
|
|
64
|
64
|
beego.Router("/api/remind/is_open", &PatientApiController{}, "Post:PostIsOpenRemind")
|
65
|
65
|
beego.Router("/api/patients/advices/getpatientschedules", &PatientApiController{}, "Get:GetPatientScheduleOne")
|
66
|
|
- beego.Router("/api/patients/advices/saveditadvices",&PatientApiController{},"Get:SaveEditAdvices")
|
|
66
|
+ beego.Router("/api/patients/advices/saveditadvices", &PatientApiController{}, "Get:SaveEditAdvices")
|
67
|
67
|
}
|
68
|
68
|
|
69
|
69
|
//GetPatientsList 取患者列表
|
|
@@ -235,7 +235,7 @@ func (c *PatientApiController) CreatePatient() {
|
235
|
235
|
// patient.Lapseto = 1
|
236
|
236
|
|
237
|
237
|
err := service.CreatePatient(&patient, contagions, diseases)
|
238
|
|
- fmt.Println("创建病人失败---------------------------------------------err")
|
|
238
|
+ fmt.Println("创建病人失败err")
|
239
|
239
|
if err != nil {
|
240
|
240
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeCreatePatient)
|
241
|
241
|
return
|
|
@@ -333,6 +333,7 @@ func (c *PatientApiController) CreatePatient() {
|
333
|
333
|
MemberPatienttype: 0,
|
334
|
334
|
MemberTreatement: 0,
|
335
|
335
|
EquitmentId: "",
|
|
336
|
+ UserSysBeforeCount: patient.UserSysBeforeCount,
|
336
|
337
|
}
|
337
|
338
|
|
338
|
339
|
err = service.CreatePatientsNew(&patientsNew)
|
|
@@ -3375,28 +3376,28 @@ func (c *PatientApiController) GetPatientScheduleOne() {
|
3375
|
3376
|
})
|
3376
|
3377
|
}
|
3377
|
3378
|
|
3378
|
|
-func (c *PatientApiController) SaveEditAdvices() {
|
3379
|
|
- adminInfo := c.GetAdminUserInfo()
|
3380
|
|
- orgid := adminInfo.CurrentOrgId
|
3381
|
|
- startTime := c.GetString("start_time")
|
3382
|
|
- fmt.Println("开始时间",startTime)
|
3383
|
|
- theTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", startTime)
|
3384
|
|
- fmt.Println(theTime.Unix())
|
3385
|
|
- groupno, _ := c.GetInt64("groupno")
|
3386
|
|
- fmt.Println("组",groupno)
|
3387
|
|
- date, _ := c.GetInt64("date")
|
3388
|
|
- fmt.Println("date",date)
|
3389
|
|
- patient_id, _ := c.GetInt64("patient_id")
|
3390
|
|
- fmt.Println("paitent_id",patient_id)
|
3391
|
|
- advice := models.XtDoctorAdvice{
|
3392
|
|
- StartTime: theTime.Unix(),
|
3393
|
|
- }
|
3394
|
|
- err := service.UpdateDoctorEditAdvice(advice, orgid, groupno, date, patient_id)
|
3395
|
|
- if err != nil {
|
3396
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
3397
|
|
- return
|
3398
|
|
- }
|
3399
|
|
- c.ServeSuccessJSON(map[string]interface{}{
|
3400
|
|
- "advice": advice,
|
3401
|
|
- })
|
|
3379
|
+func (c *PatientApiController) SaveEditAdvices() {
|
|
3380
|
+ adminInfo := c.GetAdminUserInfo()
|
|
3381
|
+ orgid := adminInfo.CurrentOrgId
|
|
3382
|
+ startTime := c.GetString("start_time")
|
|
3383
|
+ fmt.Println("开始时间", startTime)
|
|
3384
|
+ theTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", startTime)
|
|
3385
|
+ fmt.Println(theTime.Unix())
|
|
3386
|
+ groupno, _ := c.GetInt64("groupno")
|
|
3387
|
+ fmt.Println("组", groupno)
|
|
3388
|
+ date, _ := c.GetInt64("date")
|
|
3389
|
+ fmt.Println("date", date)
|
|
3390
|
+ patient_id, _ := c.GetInt64("patient_id")
|
|
3391
|
+ fmt.Println("paitent_id", patient_id)
|
|
3392
|
+ advice := models.XtDoctorAdvice{
|
|
3393
|
+ StartTime: theTime.Unix(),
|
|
3394
|
+ }
|
|
3395
|
+ err := service.UpdateDoctorEditAdvice(advice, orgid, groupno, date, patient_id)
|
|
3396
|
+ if err != nil {
|
|
3397
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
3398
|
+ return
|
|
3399
|
+ }
|
|
3400
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
3401
|
+ "advice": advice,
|
|
3402
|
+ })
|
3402
|
3403
|
}
|