|
@@ -14,6 +14,7 @@ type HisSummaryApiController struct {
|
14
|
14
|
func HisSummaryApiRegistRouters() {
|
15
|
15
|
|
16
|
16
|
beego.Router("/api/gethissummarydetaillist", &HisSummaryApiController{}, "Get:GetHisSummaryDetailList")
|
|
17
|
+ beego.Router("/api/his/getgatherdetailist", &HisSummaryApiController{}, "Get:GetGatherDetaiList")
|
17
|
18
|
|
18
|
19
|
}
|
19
|
20
|
|
|
@@ -52,3 +53,42 @@ func (this *HisSummaryApiController) GetHisSummaryDetailList() {
|
52
|
53
|
|
53
|
54
|
}
|
54
|
55
|
}
|
|
56
|
+
|
|
57
|
+func (this *HisSummaryApiController) GetGatherDetaiList() {
|
|
58
|
+
|
|
59
|
+ start_time := this.GetString("start_time")
|
|
60
|
+ end_time := this.GetString("end_time")
|
|
61
|
+ keyword := this.GetString("keyword")
|
|
62
|
+ item_type, _ := this.GetInt64("type")
|
|
63
|
+ patient_id, _ := this.GetInt64("patient_id")
|
|
64
|
+ adminUser := this.GetAdminUserInfo()
|
|
65
|
+
|
|
66
|
+ timeLayout := "2006-01-02"
|
|
67
|
+ loc, _ := time.LoadLocation("Local")
|
|
68
|
+ startTime, err := time.ParseInLocation(timeLayout+" 15:04:05", start_time+" 00:00:00", loc)
|
|
69
|
+ if err != nil {
|
|
70
|
+
|
|
71
|
+ }
|
|
72
|
+ startRecordDateTime := startTime.Unix()
|
|
73
|
+
|
|
74
|
+ endTime, err := time.ParseInLocation(timeLayout+" 15:04:05", end_time+" 23:59:59", loc)
|
|
75
|
+ if err != nil {
|
|
76
|
+
|
|
77
|
+ }
|
|
78
|
+ endRecordDateTime := endTime.Unix()
|
|
79
|
+
|
|
80
|
+ list, err := service.GetAdviceGatherDetaiList(keyword, item_type, patient_id, adminUser.CurrentOrgId, startRecordDateTime, endRecordDateTime)
|
|
81
|
+
|
|
82
|
+ detailList, _ := service.GetProjectGatherDetailList(keyword, item_type, patient_id, adminUser.CurrentOrgId, startRecordDateTime, endRecordDateTime)
|
|
83
|
+ if err == nil {
|
|
84
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
85
|
+ "detailList": detailList,
|
|
86
|
+ "list": list,
|
|
87
|
+ })
|
|
88
|
+ return
|
|
89
|
+ } else {
|
|
90
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
91
|
+ return
|
|
92
|
+
|
|
93
|
+ }
|
|
94
|
+}
|