|
@@ -1113,14 +1113,14 @@ func (this *NewDialysisApiController) GetDoctorAdviceDetail() {
|
1113
|
1113
|
appid := adminUser.App.Id
|
1114
|
1114
|
id, _ := this.GetInt64("id")
|
1115
|
1115
|
doctorAdvicedetail, err := service.GetDoctorAdviceDetail(id, orgid)
|
1116
|
|
- doctor, err := service.GetAllDoctorTwo(orgid, appid)
|
|
1116
|
+ doctorDetail, err := service.GetAllDoctorTwo(orgid, appid)
|
1117
|
1117
|
if err != nil {
|
1118
|
1118
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
1119
|
1119
|
return
|
1120
|
1120
|
}
|
1121
|
1121
|
this.ServeSuccessJSON(map[string]interface{}{
|
1122
|
1122
|
"doctorAdvicedetail": doctorAdvicedetail,
|
1123
|
|
- "doctor": doctor,
|
|
1123
|
+ "doctorDetail": doctorDetail,
|
1124
|
1124
|
})
|
1125
|
1125
|
}
|
1126
|
1126
|
|
|
@@ -1396,3 +1396,61 @@ func (this *NewDialysisApiController) UpdatedPatient() {
|
1396
|
1396
|
})
|
1397
|
1397
|
}
|
1398
|
1398
|
}
|
|
1399
|
+
|
|
1400
|
+func (this *NewDialysisApiController) GetAllDoctor() {
|
|
1401
|
+ orgid := this.GetMobileAdminUserInfo().Org.Id
|
|
1402
|
+ id := this.GetMobileAdminUserInfo().App.Id
|
|
1403
|
+ doctor, err := service.GetAllDoctorTwo(orgid, id)
|
|
1404
|
+ if err != nil {
|
|
1405
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
1406
|
+ return
|
|
1407
|
+ }
|
|
1408
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
1409
|
+ "doctor": doctor,
|
|
1410
|
+ })
|
|
1411
|
+}
|
|
1412
|
+
|
|
1413
|
+func (this *NewDialysisApiController) GetAllInspection() {
|
|
1414
|
+
|
|
1415
|
+ inspection, err := service.GetAllInspection(0)
|
|
1416
|
+ if err != nil {
|
|
1417
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
1418
|
+ return
|
|
1419
|
+ }
|
|
1420
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
1421
|
+ "inspection": inspection,
|
|
1422
|
+ })
|
|
1423
|
+}
|
|
1424
|
+
|
|
1425
|
+func (this *NewDialysisApiController) GetInspection() {
|
|
1426
|
+ timeLayout := "2006-01-02"
|
|
1427
|
+ loc, _ := time.LoadLocation("Local")
|
|
1428
|
+ id, _ := this.GetInt64("id")
|
|
1429
|
+ fmt.Print("id", id)
|
|
1430
|
+ patient, _ := service.GetPatientDetailTwo(id)
|
|
1431
|
+ start := this.GetString("startime")
|
|
1432
|
+ startTimes, _ := time.ParseInLocation(timeLayout+" 15:04:05", start+" 00:00:00", loc)
|
|
1433
|
+ startime := startTimes.Unix()
|
|
1434
|
+ fmt.Print("startime", startime)
|
|
1435
|
+ end := this.GetString("endtime")
|
|
1436
|
+ endTimes, _ := time.ParseInLocation(timeLayout+" 15:04:05", end+" 00:00:00", loc)
|
|
1437
|
+ endtime := endTimes.Unix()
|
|
1438
|
+ fmt.Print("endtime", endtime)
|
|
1439
|
+ limit, _ := this.GetInt64("limit")
|
|
1440
|
+ fmt.Print("limit", limit)
|
|
1441
|
+ page, _ := this.GetInt64("page")
|
|
1442
|
+ fmt.Print("page", page)
|
|
1443
|
+ adminInfo := this.GetMobileAdminUserInfo()
|
|
1444
|
+ orgid := adminInfo.Org.Id
|
|
1445
|
+ fmt.Print("patient", patient)
|
|
1446
|
+ fmt.Print("orgid", orgid)
|
|
1447
|
+ inspection, total, err := service.GetInspection(patient.BloodId, startime, endtime, limit, page, orgid)
|
|
1448
|
+ if err != nil {
|
|
1449
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
1450
|
+ return
|
|
1451
|
+ }
|
|
1452
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
1453
|
+ "inspection": inspection,
|
|
1454
|
+ "total": total,
|
|
1455
|
+ })
|
|
1456
|
+}
|