|
@@ -46,6 +46,11 @@ func DoctorApiRegistRouters() {
|
46
|
46
|
beego.Router("/api/patient/getinspectiondetail", &DoctorsApiController{}, "Get:GetInspectionDetailByProject")
|
47
|
47
|
beego.Router("/api/patient/getinspectionitemlist", &DoctorsApiController{}, "Get:GetInspectionItemlist")
|
48
|
48
|
beego.Router("/api/patient/getinitdatelist", &DoctorsApiController{}, "Get:GetInitDateList")
|
|
49
|
+ beego.Router("/api/patient/savecreationinspection", &DoctorsApiController{}, "Get:SaveCreationInspection")
|
|
50
|
+ beego.Router("/api/patient/getemlatesummarylist", &DoctorsApiController{}, "Get:GetTemplateSummaryList")
|
|
51
|
+ beego.Router("/api/patient/gettemplatesummarydetail", &DoctorsApiController{}, "Get:GetTemplateSummaryDetail")
|
|
52
|
+ beego.Router("/api/patient/gettemplatesummaryprintdetail", &DoctorsApiController{}, "Get:GetTemplateSummaryPrintDetail")
|
|
53
|
+ beego.Router("/api/patient/updatetemplatesummary", &DoctorsApiController{}, "Get:UpdateTempalteSummary")
|
49
|
54
|
}
|
50
|
55
|
|
51
|
56
|
func (c *DoctorsApiController) ScheduleAdvices() {
|
|
@@ -723,11 +728,238 @@ func (this *DoctorsApiController) GetInitDateList() {
|
723
|
728
|
|
724
|
729
|
prescription_list, _ := service.GetDialysisPrescriptionDataList(patient_id)
|
725
|
730
|
befor_list, err := service.GetDialysisBeforInitDateList(patient_id)
|
|
731
|
+ after_list, err := service.GetDialysisAssementAfter(patient_id)
|
|
732
|
+ //统计透析次数
|
|
733
|
+ modelist, err := service.GetDialysisDialysisMode(patient_id)
|
|
734
|
+ orgId := this.GetAdminUserInfo().CurrentOrgId
|
|
735
|
+ docList, _ := service.GetAllDoctorThree(orgId)
|
|
736
|
+ stockType, err := service.GetStockType(orgId)
|
726
|
737
|
|
|
738
|
+ summaryList, err := service.GetTemplateSummary(orgId)
|
|
739
|
+ planList, err := service.GetTemplatePlan(orgId)
|
727
|
740
|
if err == nil {
|
728
|
741
|
this.ServeSuccessJSON(map[string]interface{}{
|
729
|
742
|
"beforlist": befor_list,
|
730
|
743
|
"prescription_list": prescription_list,
|
|
744
|
+ "after_list": after_list,
|
|
745
|
+ "modelist": modelist,
|
|
746
|
+ "docList": docList,
|
|
747
|
+ "stockType": stockType,
|
|
748
|
+ "summaryList": summaryList,
|
|
749
|
+ "planList": planList,
|
|
750
|
+ })
|
|
751
|
+ return
|
|
752
|
+ }
|
|
753
|
+}
|
|
754
|
+
|
|
755
|
+func (this *DoctorsApiController) SaveCreationInspection() {
|
|
756
|
+
|
|
757
|
+ title := this.GetString("title")
|
|
758
|
+ dry_weight, _ := this.GetFloat("dry_weight")
|
|
759
|
+ fmt.Println("hhhhhhhhhhhhh", dry_weight)
|
|
760
|
+ dialysis_count, _ := this.GetInt64("dialysis_count")
|
|
761
|
+ hd_count, _ := this.GetInt64("hd_count")
|
|
762
|
+ hdf_count, _ := this.GetInt64("hdf_count")
|
|
763
|
+ hp_count, _ := this.GetInt64("hp_count")
|
|
764
|
+ other_count, _ := this.GetInt64("other_count")
|
|
765
|
+ dialzer_apparatus := this.GetString("dialzer_apparatus")
|
|
766
|
+ perfusion_apparatus := this.GetString("perfusion_apparatus")
|
|
767
|
+ anticoagulant, _ := this.GetInt64("anticoagulant")
|
|
768
|
+ fmt.Println(anticoagulant)
|
|
769
|
+ kalium, _ := this.GetFloat("kalium")
|
|
770
|
+ autunite, _ := this.GetFloat("autunite")
|
|
771
|
+ natrium, _ := this.GetFloat("natrium")
|
|
772
|
+ hour, _ := this.GetInt64("hour")
|
|
773
|
+ minute, _ := this.GetInt64("minute")
|
|
774
|
+ befor_weight, _ := this.GetFloat("befor_weight")
|
|
775
|
+ after_weight, _ := this.GetFloat("after_weight")
|
|
776
|
+ befor_pressure := this.GetString("befor_pressure")
|
|
777
|
+ template_summary_content := this.GetString("template_summary_content")
|
|
778
|
+ template_plan_content := this.GetString("template_plan_content")
|
|
779
|
+ template_inspection_content := this.GetString("template_inspection_content")
|
|
780
|
+ fmt.Println("hhhh232233232232332232323", template_inspection_content)
|
|
781
|
+ admin_user_id, _ := this.GetInt64("admin_user_id")
|
|
782
|
+ record_time := this.GetString("record_time")
|
|
783
|
+ timeLayout := "2006-01-02"
|
|
784
|
+ loc, _ := time.LoadLocation("Local")
|
|
785
|
+ recordTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", record_time+" 00:00:00", loc)
|
|
786
|
+ after_pressure := this.GetString("after_pressure")
|
|
787
|
+ template_summary_id, _ := this.GetInt64("template_summary_id")
|
|
788
|
+ template_plan_id, _ := this.GetInt64("template_plan_id")
|
|
789
|
+ template_inspection_id, _ := this.GetInt64("template_inspection_id")
|
|
790
|
+ patient_id, _ := this.GetInt64("patient_id")
|
|
791
|
+ fmt.Println("patient_id", patient_id)
|
|
792
|
+ orgId := this.GetAdminUserInfo().CurrentOrgId
|
|
793
|
+ summary := models.XtTemplateSummary{
|
|
794
|
+ StartYear: 0,
|
|
795
|
+ StartMonth: 0,
|
|
796
|
+ Radio: 0,
|
|
797
|
+ Quarter: 0,
|
|
798
|
+ DryWeight: dry_weight,
|
|
799
|
+ DialysisCount: dialysis_count,
|
|
800
|
+ HdCount: hd_count,
|
|
801
|
+ HdfCount: hdf_count,
|
|
802
|
+ HpCount: hp_count,
|
|
803
|
+ OtherCount: other_count,
|
|
804
|
+ DialzerApparatus: dialzer_apparatus,
|
|
805
|
+ PerfusionApparatus: perfusion_apparatus,
|
|
806
|
+ Anticoagulant: anticoagulant,
|
|
807
|
+ Kalium: kalium,
|
|
808
|
+ Autunite: autunite,
|
|
809
|
+ Natrium: natrium,
|
|
810
|
+ Hour: hour,
|
|
811
|
+ Minute: minute,
|
|
812
|
+ BeforWeight: befor_weight,
|
|
813
|
+ AfterWeight: after_weight,
|
|
814
|
+ BeforPressure: befor_pressure,
|
|
815
|
+ AfterPressure: after_pressure,
|
|
816
|
+ TemplateSummaryId: template_summary_id,
|
|
817
|
+ TemplateSummaryContent: template_summary_content,
|
|
818
|
+ TemplatePlanId: template_plan_id,
|
|
819
|
+ TemplatePlanContent: template_plan_content,
|
|
820
|
+ TemplateInspectionId: template_inspection_id,
|
|
821
|
+ TemplateInspectionContent: template_inspection_content,
|
|
822
|
+ AdminUserId: admin_user_id,
|
|
823
|
+ RecordTime: recordTime.Unix(),
|
|
824
|
+ PatientId: patient_id,
|
|
825
|
+ UserOrgId: orgId,
|
|
826
|
+ Status: 1,
|
|
827
|
+ Ctime: time.Now().Unix(),
|
|
828
|
+ Mtime: 0,
|
|
829
|
+ Title: title,
|
|
830
|
+ }
|
|
831
|
+
|
|
832
|
+ err := service.CreateSummary(&summary)
|
|
833
|
+ if err == nil {
|
|
834
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
835
|
+ "summary": summary,
|
|
836
|
+ })
|
|
837
|
+ return
|
|
838
|
+ }
|
|
839
|
+
|
|
840
|
+}
|
|
841
|
+
|
|
842
|
+func (this *DoctorsApiController) GetTemplateSummaryList() {
|
|
843
|
+ patient_id, _ := this.GetInt64("patient_id")
|
|
844
|
+ orgId := this.GetAdminUserInfo().CurrentOrgId
|
|
845
|
+ list, err := service.GetTemplateSummaryList(patient_id, orgId)
|
|
846
|
+ if err == nil {
|
|
847
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
848
|
+ "list": list,
|
|
849
|
+ })
|
|
850
|
+ return
|
|
851
|
+ }
|
|
852
|
+}
|
|
853
|
+
|
|
854
|
+func (this *DoctorsApiController) GetTemplateSummaryDetail() {
|
|
855
|
+
|
|
856
|
+ id, _ := this.GetInt64("id")
|
|
857
|
+ list, err := service.GetTemplateSummaryDetail(id)
|
|
858
|
+ if err == nil {
|
|
859
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
860
|
+ "list": list,
|
|
861
|
+ })
|
|
862
|
+ return
|
|
863
|
+ }
|
|
864
|
+}
|
|
865
|
+
|
|
866
|
+func (this *DoctorsApiController) GetTemplateSummaryPrintDetail() {
|
|
867
|
+
|
|
868
|
+ id, _ := this.GetInt64("id")
|
|
869
|
+ list, err := service.GetTemplateSummaryPrintDetail(id)
|
|
870
|
+ orgId := this.GetAdminUserInfo().CurrentOrgId
|
|
871
|
+ doctorList, _ := service.GetAllDoctorThree(orgId)
|
|
872
|
+ if err == nil {
|
|
873
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
874
|
+ "list": list,
|
|
875
|
+ "doctorList": doctorList,
|
|
876
|
+ })
|
|
877
|
+ return
|
|
878
|
+ }
|
|
879
|
+}
|
|
880
|
+
|
|
881
|
+func (this *DoctorsApiController) UpdateTempalteSummary() {
|
|
882
|
+
|
|
883
|
+ id, _ := this.GetInt64("id")
|
|
884
|
+ title := this.GetString("title")
|
|
885
|
+ dry_weight, _ := this.GetFloat("dry_weight")
|
|
886
|
+ fmt.Println("hhhhhhhhhhhhh", dry_weight)
|
|
887
|
+ dialysis_count, _ := this.GetInt64("dialysis_count")
|
|
888
|
+ hd_count, _ := this.GetInt64("hd_count")
|
|
889
|
+ hdf_count, _ := this.GetInt64("hdf_count")
|
|
890
|
+ hp_count, _ := this.GetInt64("hp_count")
|
|
891
|
+ other_count, _ := this.GetInt64("other_count")
|
|
892
|
+ dialzer_apparatus := this.GetString("dialzer_apparatus")
|
|
893
|
+ perfusion_apparatus := this.GetString("perfusion_apparatus")
|
|
894
|
+ anticoagulant, _ := this.GetInt64("anticoagulant")
|
|
895
|
+ fmt.Println(anticoagulant)
|
|
896
|
+ kalium, _ := this.GetFloat("kalium")
|
|
897
|
+ autunite, _ := this.GetFloat("autunite")
|
|
898
|
+ natrium, _ := this.GetFloat("natrium")
|
|
899
|
+ hour, _ := this.GetInt64("hour")
|
|
900
|
+ minute, _ := this.GetInt64("minute")
|
|
901
|
+ befor_weight, _ := this.GetFloat("befor_weight")
|
|
902
|
+ after_weight, _ := this.GetFloat("after_weight")
|
|
903
|
+ befor_pressure := this.GetString("befor_pressure")
|
|
904
|
+ template_summary_content := this.GetString("template_summary_content")
|
|
905
|
+ template_plan_content := this.GetString("template_plan_content")
|
|
906
|
+ template_inspection_content := this.GetString("template_inspection_content")
|
|
907
|
+ fmt.Println("hhhh232233232232332232323", template_inspection_content)
|
|
908
|
+ admin_user_id, _ := this.GetInt64("admin_user_id")
|
|
909
|
+ record_time := this.GetString("record_time")
|
|
910
|
+ timeLayout := "2006-01-02"
|
|
911
|
+ loc, _ := time.LoadLocation("Local")
|
|
912
|
+ recordTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", record_time+" 00:00:00", loc)
|
|
913
|
+ after_pressure := this.GetString("after_pressure")
|
|
914
|
+ template_summary_id, _ := this.GetInt64("template_summary_id")
|
|
915
|
+ template_plan_id, _ := this.GetInt64("template_plan_id")
|
|
916
|
+ template_inspection_id, _ := this.GetInt64("template_inspection_id")
|
|
917
|
+ patient_id, _ := this.GetInt64("patient_id")
|
|
918
|
+ fmt.Println("patient_id", patient_id)
|
|
919
|
+ orgId := this.GetAdminUserInfo().CurrentOrgId
|
|
920
|
+ summary := models.XtTemplateSummary{
|
|
921
|
+ ID: id,
|
|
922
|
+ StartYear: 0,
|
|
923
|
+ StartMonth: 0,
|
|
924
|
+ Radio: 0,
|
|
925
|
+ Quarter: 0,
|
|
926
|
+ DryWeight: dry_weight,
|
|
927
|
+ DialysisCount: dialysis_count,
|
|
928
|
+ HdCount: hd_count,
|
|
929
|
+ HdfCount: hdf_count,
|
|
930
|
+ HpCount: hp_count,
|
|
931
|
+ OtherCount: other_count,
|
|
932
|
+ DialzerApparatus: dialzer_apparatus,
|
|
933
|
+ PerfusionApparatus: perfusion_apparatus,
|
|
934
|
+ Anticoagulant: anticoagulant,
|
|
935
|
+ Kalium: kalium,
|
|
936
|
+ Autunite: autunite,
|
|
937
|
+ Natrium: natrium,
|
|
938
|
+ Hour: hour,
|
|
939
|
+ Minute: minute,
|
|
940
|
+ BeforWeight: befor_weight,
|
|
941
|
+ AfterWeight: after_weight,
|
|
942
|
+ BeforPressure: befor_pressure,
|
|
943
|
+ AfterPressure: after_pressure,
|
|
944
|
+ TemplateSummaryId: template_summary_id,
|
|
945
|
+ TemplateSummaryContent: template_summary_content,
|
|
946
|
+ TemplatePlanId: template_plan_id,
|
|
947
|
+ TemplatePlanContent: template_plan_content,
|
|
948
|
+ TemplateInspectionId: template_inspection_id,
|
|
949
|
+ TemplateInspectionContent: template_inspection_content,
|
|
950
|
+ AdminUserId: admin_user_id,
|
|
951
|
+ RecordTime: recordTime.Unix(),
|
|
952
|
+ PatientId: patient_id,
|
|
953
|
+ UserOrgId: orgId,
|
|
954
|
+ Status: 1,
|
|
955
|
+ Ctime: time.Now().Unix(),
|
|
956
|
+ Mtime: 0,
|
|
957
|
+ Title: title,
|
|
958
|
+ }
|
|
959
|
+ err := service.UpdateTempalteSummary(&summary)
|
|
960
|
+ if err == nil {
|
|
961
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
962
|
+ "list": summary,
|
731
|
963
|
})
|
732
|
964
|
return
|
733
|
965
|
}
|