|
@@ -515,6 +515,8 @@ func (this *NewDialysisApiController) GetPatientDetail() {
|
515
|
515
|
id, _ := this.GetInt64("id")
|
516
|
516
|
|
517
|
517
|
detail, err := service.GetPatientDetailTwo(id)
|
|
518
|
+
|
|
519
|
+ diseases := service.GetPatientDiseasesTwo(detail.BloodId)
|
518
|
520
|
|
519
|
521
|
if err != nil {
|
520
|
522
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
@@ -522,6 +524,7 @@ func (this *NewDialysisApiController) GetPatientDetail() {
|
522
|
524
|
}
|
523
|
525
|
this.ServeSuccessJSON(map[string]interface{}{
|
524
|
526
|
"patientDetail": detail,
|
|
527
|
+ "diseases": diseases,
|
525
|
528
|
})
|
526
|
529
|
}
|
527
|
530
|
|
|
@@ -766,3 +769,98 @@ func (this *NewDialysisApiController) GetlongDialysisrecord() {
|
766
|
769
|
"total": total,
|
767
|
770
|
})
|
768
|
771
|
}
|
|
772
|
+
|
|
773
|
+func (this *NewDialysisApiController) GetRescuerecord() {
|
|
774
|
+ timeLayout := "2006-01-02"
|
|
775
|
+ loc, _ := time.LoadLocation("Local")
|
|
776
|
+ id, _ := this.GetInt64("id")
|
|
777
|
+ fmt.Print("id", id)
|
|
778
|
+ patient, _ := service.GetPatientDetailTwo(id)
|
|
779
|
+ start := this.GetString("startime")
|
|
780
|
+ startTimes, _ := time.ParseInLocation(timeLayout+" 15:04:05", start+" 00:00:00", loc)
|
|
781
|
+ startime := startTimes.Unix()
|
|
782
|
+ fmt.Print("startime", startime)
|
|
783
|
+ end := this.GetString("endtime")
|
|
784
|
+ endTimes, _ := time.ParseInLocation(timeLayout+" 15:04:05", end+" 00:00:00", loc)
|
|
785
|
+ endtime := endTimes.Unix()
|
|
786
|
+ fmt.Print("endtime", endtime)
|
|
787
|
+ limit, _ := this.GetInt64("limit")
|
|
788
|
+ fmt.Print("limit", limit)
|
|
789
|
+ page, _ := this.GetInt64("page")
|
|
790
|
+ fmt.Print("page", page)
|
|
791
|
+ adminInfo := this.GetMobileAdminUserInfo()
|
|
792
|
+ orgid := adminInfo.Org.Id
|
|
793
|
+ rescuerecord, total, err := service.GetRescuerecord(patient.BloodId, startime, endtime, limit, page, orgid)
|
|
794
|
+ if err != nil {
|
|
795
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
796
|
+ return
|
|
797
|
+ }
|
|
798
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
799
|
+ "rescuerecord": rescuerecord,
|
|
800
|
+ "total": total,
|
|
801
|
+ })
|
|
802
|
+}
|
|
803
|
+
|
|
804
|
+func (this *NewDialysisApiController) GetScheduling() {
|
|
805
|
+ timeLayout := "2006-01-02"
|
|
806
|
+ loc, _ := time.LoadLocation("Local")
|
|
807
|
+ id, _ := this.GetInt64("id")
|
|
808
|
+ fmt.Print("id", id)
|
|
809
|
+ patient, _ := service.GetPatientDetailTwo(id)
|
|
810
|
+ start := this.GetString("startime")
|
|
811
|
+ startTimes, _ := time.ParseInLocation(timeLayout+" 15:04:05", start+" 00:00:00", loc)
|
|
812
|
+ startime := startTimes.Unix()
|
|
813
|
+ fmt.Print("startime", startime)
|
|
814
|
+ end := this.GetString("endtime")
|
|
815
|
+ endTimes, _ := time.ParseInLocation(timeLayout+" 15:04:05", end+" 00:00:00", loc)
|
|
816
|
+ endtime := endTimes.Unix()
|
|
817
|
+ fmt.Print("endtime", endtime)
|
|
818
|
+ limit, _ := this.GetInt64("limit")
|
|
819
|
+ fmt.Print("limit", limit)
|
|
820
|
+ page, _ := this.GetInt64("page")
|
|
821
|
+ fmt.Print("page", page)
|
|
822
|
+ mode_type, _ := this.GetInt64("mode_types")
|
|
823
|
+ fmt.Print("透析模式", mode_type)
|
|
824
|
+ adminInfo := this.GetMobileAdminUserInfo()
|
|
825
|
+ orgid := adminInfo.Org.Id
|
|
826
|
+ scheduling, total, err := service.GetScheduling(patient.BloodId, startime, endtime, limit, page, orgid, mode_type)
|
|
827
|
+ if err != nil {
|
|
828
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
829
|
+ return
|
|
830
|
+ }
|
|
831
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
832
|
+ "scheduling": scheduling,
|
|
833
|
+ "total": total,
|
|
834
|
+ })
|
|
835
|
+}
|
|
836
|
+
|
|
837
|
+func (this *NewDialysisApiController) GetEducation() {
|
|
838
|
+ timeLayout := "2006-01-02"
|
|
839
|
+ loc, _ := time.LoadLocation("Local")
|
|
840
|
+ id, _ := this.GetInt64("id")
|
|
841
|
+ fmt.Print("id", id)
|
|
842
|
+ patient, _ := service.GetPatientDetailTwo(id)
|
|
843
|
+ start := this.GetString("startime")
|
|
844
|
+ startTimes, _ := time.ParseInLocation(timeLayout+" 15:04:05", start+" 00:00:00", loc)
|
|
845
|
+ startime := startTimes.Unix()
|
|
846
|
+ fmt.Print("startime", startime)
|
|
847
|
+ end := this.GetString("endtime")
|
|
848
|
+ endTimes, _ := time.ParseInLocation(timeLayout+" 15:04:05", end+" 00:00:00", loc)
|
|
849
|
+ endtime := endTimes.Unix()
|
|
850
|
+ fmt.Print("endtime", endtime)
|
|
851
|
+ limit, _ := this.GetInt64("limit")
|
|
852
|
+ fmt.Print("limit", limit)
|
|
853
|
+ page, _ := this.GetInt64("page")
|
|
854
|
+ fmt.Print("page", page)
|
|
855
|
+ adminInfo := this.GetMobileAdminUserInfo()
|
|
856
|
+ orgid := adminInfo.Org.Id
|
|
857
|
+ education, total, err := service.GetEducation(patient.BloodId, startime, endtime, limit, page, orgid)
|
|
858
|
+ if err != nil {
|
|
859
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
860
|
+ return
|
|
861
|
+ }
|
|
862
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
863
|
+ "education": education,
|
|
864
|
+ "total": total,
|
|
865
|
+ })
|
|
866
|
+}
|