|
@@ -739,3 +739,95 @@ func (this *NewCommonApiController) GetMobilePatientDetailCheck() {
|
739
|
739
|
"checkDetail": checkDetail,
|
740
|
740
|
})
|
741
|
741
|
}
|
|
742
|
+
|
|
743
|
+func (this *NewCommonApiController) GetMobilePatientControl() {
|
|
744
|
+ adminInfo := this.GetMobileAdminUserInfo()
|
|
745
|
+ orgid := adminInfo.Org.Id
|
|
746
|
+ lapstor, _ := this.GetInt64("lapstor")
|
|
747
|
+ fmt.Println("lapstor", lapstor)
|
|
748
|
+ startime := this.GetString("startime")
|
|
749
|
+ fmt.Println("开始时间", startime)
|
|
750
|
+ startimeStr, _ := utils.ParseTimeStringToTime("2006-01-02", startime)
|
|
751
|
+ startimeStrUnix := startimeStr.Unix()
|
|
752
|
+ fmt.Println("时间搓", startimeStrUnix)
|
|
753
|
+ endtime := this.GetString("endtime")
|
|
754
|
+ fmt.Println("结束时间", endtime)
|
|
755
|
+ endtimeStr := endtime + " 23:59:59"
|
|
756
|
+ endtimeStrs, _ := utils.ParseTimeStringToTime("2006-01-02 15:04:05", endtimeStr)
|
|
757
|
+ endtimeStrsUnix := endtimeStrs.Unix()
|
|
758
|
+ fmt.Println("结束时间搓", endtimeStrsUnix)
|
|
759
|
+ page, _ := this.GetInt64("page")
|
|
760
|
+ fmt.Println("page", page)
|
|
761
|
+ limit, _ := this.GetInt64("limit")
|
|
762
|
+ fmt.Println("limit", limit)
|
|
763
|
+ patients, total, err := service.GetPatientsControl(orgid, lapstor, startimeStrUnix, endtimeStrsUnix, page, limit)
|
|
764
|
+
|
|
765
|
+ control, err := service.GetLastPatientsControl(orgid, lapstor, startimeStrUnix, endtimeStrsUnix)
|
|
766
|
+ //获取最后一次数据
|
|
767
|
+
|
|
768
|
+ if err != nil {
|
|
769
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
770
|
+ return
|
|
771
|
+ }
|
|
772
|
+
|
|
773
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
774
|
+ "patients": patients,
|
|
775
|
+ "total": total,
|
|
776
|
+ "control": control,
|
|
777
|
+ })
|
|
778
|
+}
|
|
779
|
+
|
|
780
|
+func (this *NewCommonApiController) GetMobileCartogramlist() {
|
|
781
|
+ adminInfo := this.GetMobileAdminUserInfo()
|
|
782
|
+ orgid := adminInfo.Org.Id
|
|
783
|
+ lapstor, _ := this.GetInt64("lapstor")
|
|
784
|
+ fmt.Println("lapstor", lapstor)
|
|
785
|
+ startime := this.GetString("startime")
|
|
786
|
+ fmt.Println("开始时间", startime)
|
|
787
|
+ startimeStr, _ := utils.ParseTimeStringToTime("2006-01-02", startime)
|
|
788
|
+ startimeStrUnix := startimeStr.Unix()
|
|
789
|
+ fmt.Println("时间搓", startimeStrUnix)
|
|
790
|
+ endtime := this.GetString("endtime")
|
|
791
|
+ fmt.Println("结束时间", endtime)
|
|
792
|
+ endtimeStr := endtime + " 23:59:59"
|
|
793
|
+ endtimeStrs, _ := utils.ParseTimeStringToTime("2006-01-02 15:04:05", endtimeStr)
|
|
794
|
+ endtimeStrsUnix := endtimeStrs.Unix()
|
|
795
|
+ fmt.Println("结束时间搓", endtimeStrsUnix)
|
|
796
|
+ limit, _ := this.GetInt64("limit")
|
|
797
|
+ page, _ := this.GetInt64("page")
|
|
798
|
+ cartogramlist, err := service.GetLastPatientsControl(orgid, lapstor, startimeStrUnix, endtimeStrsUnix)
|
|
799
|
+ _, total, err := service.GetPatientsControl(orgid, lapstor, startimeStrUnix, endtimeStrsUnix, page, limit)
|
|
800
|
+ if err != nil {
|
|
801
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
802
|
+ return
|
|
803
|
+ }
|
|
804
|
+
|
|
805
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
806
|
+ "cartogramlist": cartogramlist,
|
|
807
|
+ "total": total,
|
|
808
|
+ })
|
|
809
|
+}
|
|
810
|
+
|
|
811
|
+func (this *NewCommonApiController) GetMobileQualityControl() {
|
|
812
|
+ adminInfo := this.GetMobileAdminUserInfo()
|
|
813
|
+ orgid := adminInfo.Org.Id
|
|
814
|
+ fmt.Println("orgd", orgid)
|
|
815
|
+ patientid, _ := this.GetInt64("patientid")
|
|
816
|
+ fmt.Println("patientid", patientid)
|
|
817
|
+ startime, _ := this.GetInt64("startime")
|
|
818
|
+ fmt.Println("startime", startime)
|
|
819
|
+ endtime, _ := this.GetInt64("endtime")
|
|
820
|
+ fmt.Println("endtime", endtime)
|
|
821
|
+ itemid, _ := this.GetInt64("itemid")
|
|
822
|
+ fmt.Println("itemid", itemid)
|
|
823
|
+ list, err := service.GetQualityControlById(orgid, patientid, startime, endtime, itemid)
|
|
824
|
+ if err != nil {
|
|
825
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
826
|
+ return
|
|
827
|
+ }
|
|
828
|
+
|
|
829
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
830
|
+
|
|
831
|
+ "list": list,
|
|
832
|
+ })
|
|
833
|
+}
|