|
@@ -3080,12 +3080,12 @@ func (c *DialysisAPIController) GetSchedule() {
|
3080
|
3080
|
}
|
3081
|
3081
|
|
3082
|
3082
|
func (c *DialysisAPIController) GetPatientId() {
|
|
3083
|
+
|
3083
|
3084
|
id, _ := c.GetInt64("id")
|
3084
|
|
- fmt.Println("id223333444444", id)
|
|
3085
|
+
|
3085
|
3086
|
patientId, _ := service.GetPatientId(id)
|
3086
|
3087
|
//获取该患者的所有传染病
|
3087
|
|
- list, err := service.GetPatientInfectious(id)
|
3088
|
|
- fmt.Println("err222222222", err)
|
|
3088
|
+ list, _ := service.GetPatientInfectious(id)
|
3089
|
3089
|
c.ServeSuccessJSON(map[string]interface{}{
|
3090
|
3090
|
"patient": patientId,
|
3091
|
3091
|
"infectioulist": list,
|
|
@@ -4649,9 +4649,18 @@ func (c *DialysisAPIController) GetPatientDialysisRecord() {
|
4649
|
4649
|
|
4650
|
4650
|
id, _ := c.GetInt64("id")
|
4651
|
4651
|
fmt.Println(id)
|
4652
|
|
- start_time := time.Now().Format("2006-01-02 15:04")
|
4653
|
|
- fmt.Println("stat", start_time)
|
|
4652
|
+ timeLayout := "2006-01-02"
|
|
4653
|
+ loc, _ := time.LoadLocation("Local")
|
|
4654
|
+ start_time := time.Now().Format("2006-01-02")
|
|
4655
|
+ startime, _ := time.ParseInLocation(timeLayout+" 15:04:05", start_time+" 00:00:00", loc)
|
4654
|
4656
|
nowTime := time.Now()
|
4655
|
|
- endTime := nowTime.AddDate(-2, 0, 0)
|
4656
|
|
- fmt.Println(endTime)
|
|
4657
|
+ endTime := nowTime.AddDate(-1, 0, 0)
|
|
4658
|
+ endTimes := endTime.Format("2006-01-02")
|
|
4659
|
+ endtime, _ := time.ParseInLocation(timeLayout+" 15:04:05", endTimes+" 00:00:00", loc)
|
|
4660
|
+ adminUserInfo := c.GetAdminUserInfo()
|
|
4661
|
+ orgId := adminUserInfo.CurrentOrgId
|
|
4662
|
+ list, _ := service.GetPatientDialysisRecordList(id, startime.Unix(), endtime.Unix(), orgId)
|
|
4663
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
4664
|
+ "list": list,
|
|
4665
|
+ })
|
4657
|
4666
|
}
|