|
@@ -573,3 +573,66 @@ func (this *CommonApiController) GetLastCheckList() {
|
573
|
573
|
"checkList": checkList,
|
574
|
574
|
})
|
575
|
575
|
}
|
|
576
|
+
|
|
577
|
+func (this *CommonApiController) GetDialysisDetailById() {
|
|
578
|
+ adminUser := this.GetAdminUserInfo()
|
|
579
|
+ orgId := adminUser.CurrentOrgId
|
|
580
|
+ id, _ := this.GetInt64("id")
|
|
581
|
+ fmt.Println("id", id)
|
|
582
|
+ startime := this.GetString("startime")
|
|
583
|
+ fmt.Println(startime)
|
|
584
|
+ endtime := this.GetString("endtime")
|
|
585
|
+ startDate, parseDateErr := utils.ParseTimeStringToTime("2006-01-02", startime)
|
|
586
|
+ fmt.Println("parseDateErr", parseDateErr)
|
|
587
|
+ statime := startDate.Unix()
|
|
588
|
+ fmt.Println("开始时间", statime)
|
|
589
|
+ endDate, _ := utils.ParseTimeStringToTime("2006-01-02", endtime)
|
|
590
|
+
|
|
591
|
+ entime := endDate.Unix()
|
|
592
|
+ fmt.Println("开始时间", statime)
|
|
593
|
+ fmt.Println(endtime)
|
|
594
|
+ limit, _ := this.GetInt64("limit")
|
|
595
|
+ fmt.Println("limit", limit)
|
|
596
|
+ page, _ := this.GetInt64("page")
|
|
597
|
+ fmt.Println("page", page)
|
|
598
|
+ patients, total, err := service.GetDialysisDetailById(id, orgId, statime, entime, limit, page)
|
|
599
|
+ if err != nil {
|
|
600
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
601
|
+ return
|
|
602
|
+ }
|
|
603
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
604
|
+ "patients": patients,
|
|
605
|
+ "total": total,
|
|
606
|
+ })
|
|
607
|
+}
|
|
608
|
+
|
|
609
|
+func (this *CommonApiController) GetPrescritionByName() {
|
|
610
|
+ adminUser := this.GetAdminUserInfo()
|
|
611
|
+ orgId := adminUser.CurrentOrgId
|
|
612
|
+ keyword := this.GetString("keyword")
|
|
613
|
+ startime := this.GetString("startime")
|
|
614
|
+ fmt.Println(startime)
|
|
615
|
+ endtime := this.GetString("endtime")
|
|
616
|
+ startDate, parseDateErr := utils.ParseTimeStringToTime("2006-01-02", startime)
|
|
617
|
+ fmt.Println("parseDateErr", parseDateErr)
|
|
618
|
+ statime := startDate.Unix()
|
|
619
|
+ fmt.Println("开始时间", statime)
|
|
620
|
+ endDate, _ := utils.ParseTimeStringToTime("2006-01-02", endtime)
|
|
621
|
+
|
|
622
|
+ entime := endDate.Unix()
|
|
623
|
+ fmt.Println("开始时间", statime)
|
|
624
|
+ fmt.Println(endtime)
|
|
625
|
+ limit, _ := this.GetInt64("limit")
|
|
626
|
+ fmt.Println("limit", limit)
|
|
627
|
+ page, _ := this.GetInt64("page")
|
|
628
|
+ fmt.Println("page", page)
|
|
629
|
+ patient, total, err := service.GetPrescritionByName(orgId, keyword, statime, entime, limit, page)
|
|
630
|
+ if err != nil {
|
|
631
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
632
|
+ return
|
|
633
|
+ }
|
|
634
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
635
|
+ "patient": patient,
|
|
636
|
+ "total": total,
|
|
637
|
+ })
|
|
638
|
+}
|