|
@@ -725,13 +725,20 @@ func (this *DoctorsApiController) GetInspectionItemlist() {
|
725
|
725
|
|
726
|
726
|
func (this *DoctorsApiController) GetInitDateList() {
|
727
|
727
|
patient_id, _ := this.GetInt64("patient_id")
|
|
728
|
+ start_time := this.GetString("start_time")
|
|
729
|
+ timeLayout := "2006-01-02"
|
|
730
|
+ loc, _ := time.LoadLocation("Local")
|
|
731
|
+ startTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", start_time+" 00:00:00", loc)
|
|
732
|
+ end_time := this.GetString("end_time")
|
|
733
|
+ endTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", end_time+" 23:59:59", loc)
|
728
|
734
|
|
729
|
|
- prescription_list, _ := service.GetDialysisPrescriptionDataList(patient_id)
|
730
|
|
- befor_list, err := service.GetDialysisBeforInitDateList(patient_id)
|
731
|
|
- after_list, err := service.GetDialysisAssementAfter(patient_id)
|
732
|
|
- //统计透析次数
|
733
|
|
- modelist, err := service.GetDialysisDialysisMode(patient_id)
|
|
735
|
+ prescription_list, _ := service.GetDialysisPrescriptionDataList(patient_id, startTime.Unix(), endTime.Unix())
|
|
736
|
+ befor_list, err := service.GetDialysisBeforInitDateList(patient_id, startTime.Unix(), endTime.Unix())
|
|
737
|
+ after_list, err := service.GetDialysisAssementAfter(patient_id, startTime.Unix(), endTime.Unix())
|
734
|
738
|
orgId := this.GetAdminUserInfo().CurrentOrgId
|
|
739
|
+ //统计透析次数
|
|
740
|
+ modelist, err := service.GetDialysisDialysisMode(patient_id, startTime.Unix(), endTime.Unix(), orgId)
|
|
741
|
+
|
735
|
742
|
docList, _ := service.GetAllDoctorThree(orgId)
|
736
|
743
|
stockType, err := service.GetStockType(orgId)
|
737
|
744
|
|
|
@@ -755,8 +762,9 @@ func (this *DoctorsApiController) GetInitDateList() {
|
755
|
762
|
func (this *DoctorsApiController) SaveCreationInspection() {
|
756
|
763
|
|
757
|
764
|
title := this.GetString("title")
|
758
|
|
- dry_weight, _ := this.GetFloat("dry_weight")
|
759
|
|
- fmt.Println("hhhhhhhhhhhhh", dry_weight)
|
|
765
|
+
|
|
766
|
+ dryWeight := this.GetString("dry_weight")
|
|
767
|
+ dry_weight, _ := strconv.ParseFloat(dryWeight, 64)
|
760
|
768
|
dialysis_count, _ := this.GetInt64("dialysis_count")
|
761
|
769
|
hd_count, _ := this.GetInt64("hd_count")
|
762
|
770
|
hdf_count, _ := this.GetInt64("hdf_count")
|
|
@@ -765,19 +773,22 @@ func (this *DoctorsApiController) SaveCreationInspection() {
|
765
|
773
|
dialzer_apparatus := this.GetString("dialzer_apparatus")
|
766
|
774
|
perfusion_apparatus := this.GetString("perfusion_apparatus")
|
767
|
775
|
anticoagulant, _ := this.GetInt64("anticoagulant")
|
768
|
|
- fmt.Println(anticoagulant)
|
769
|
|
- kalium, _ := this.GetFloat("kalium")
|
770
|
|
- autunite, _ := this.GetFloat("autunite")
|
771
|
|
- natrium, _ := this.GetFloat("natrium")
|
|
776
|
+ kaliumstr := this.GetString("kalium")
|
|
777
|
+ kalium, _ := strconv.ParseFloat(kaliumstr, 64)
|
|
778
|
+
|
|
779
|
+ autunitestr := this.GetString("autunite")
|
|
780
|
+ autunite, _ := strconv.ParseFloat(autunitestr, 64)
|
|
781
|
+ natriumstr := this.GetString("natrium")
|
|
782
|
+ natrium, _ := strconv.ParseFloat(natriumstr, 64)
|
772
|
783
|
hour, _ := this.GetInt64("hour")
|
773
|
784
|
minute, _ := this.GetInt64("minute")
|
774
|
|
- befor_weight, _ := this.GetFloat("befor_weight")
|
775
|
|
- after_weight, _ := this.GetFloat("after_weight")
|
|
785
|
+ beforWeight := this.GetString("befor_weight")
|
|
786
|
+ befor_weight, _ := strconv.ParseFloat(beforWeight, 64)
|
|
787
|
+ afterWeight := this.GetString("after_weight")
|
|
788
|
+ after_weight, _ := strconv.ParseFloat(afterWeight, 64)
|
776
|
789
|
befor_pressure := this.GetString("befor_pressure")
|
777
|
790
|
template_summary_content := this.GetString("template_summary_content")
|
778
|
791
|
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
|
792
|
admin_user_id, _ := this.GetInt64("admin_user_id")
|
782
|
793
|
record_time := this.GetString("record_time")
|
783
|
794
|
timeLayout := "2006-01-02"
|
|
@@ -790,43 +801,46 @@ func (this *DoctorsApiController) SaveCreationInspection() {
|
790
|
801
|
patient_id, _ := this.GetInt64("patient_id")
|
791
|
802
|
fmt.Println("patient_id", patient_id)
|
792
|
803
|
orgId := this.GetAdminUserInfo().CurrentOrgId
|
|
804
|
+ inspect_date := this.GetString("inspect_date")
|
|
805
|
+ project_id := this.GetString("project_id")
|
793
|
806
|
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,
|
|
807
|
+ StartYear: 0,
|
|
808
|
+ StartMonth: 0,
|
|
809
|
+ Radio: 0,
|
|
810
|
+ Quarter: 0,
|
|
811
|
+ DryWeight: dry_weight,
|
|
812
|
+ DialysisCount: dialysis_count,
|
|
813
|
+ HdCount: hd_count,
|
|
814
|
+ HdfCount: hdf_count,
|
|
815
|
+ HpCount: hp_count,
|
|
816
|
+ OtherCount: other_count,
|
|
817
|
+ DialzerApparatus: dialzer_apparatus,
|
|
818
|
+ PerfusionApparatus: perfusion_apparatus,
|
|
819
|
+ Anticoagulant: anticoagulant,
|
|
820
|
+ Kalium: kalium,
|
|
821
|
+ Autunite: autunite,
|
|
822
|
+ Natrium: natrium,
|
|
823
|
+ Hour: hour,
|
|
824
|
+ Minute: minute,
|
|
825
|
+ BeforWeight: befor_weight,
|
|
826
|
+ AfterWeight: after_weight,
|
|
827
|
+ BeforPressure: befor_pressure,
|
|
828
|
+ AfterPressure: after_pressure,
|
|
829
|
+ TemplateSummaryId: template_summary_id,
|
|
830
|
+ TemplateSummaryContent: template_summary_content,
|
|
831
|
+ TemplatePlanId: template_plan_id,
|
|
832
|
+ TemplatePlanContent: template_plan_content,
|
|
833
|
+ TemplateInspectionId: template_inspection_id,
|
|
834
|
+ AdminUserId: admin_user_id,
|
|
835
|
+ RecordTime: recordTime.Unix(),
|
|
836
|
+ PatientId: patient_id,
|
|
837
|
+ UserOrgId: orgId,
|
|
838
|
+ Status: 1,
|
|
839
|
+ Ctime: time.Now().Unix(),
|
|
840
|
+ Mtime: 0,
|
|
841
|
+ Title: title,
|
|
842
|
+ InspectDate: inspect_date,
|
|
843
|
+ ProjectId: project_id,
|
830
|
844
|
}
|
831
|
845
|
|
832
|
846
|
err := service.CreateSummary(&summary)
|
|
@@ -841,8 +855,14 @@ func (this *DoctorsApiController) SaveCreationInspection() {
|
841
|
855
|
|
842
|
856
|
func (this *DoctorsApiController) GetTemplateSummaryList() {
|
843
|
857
|
patient_id, _ := this.GetInt64("patient_id")
|
|
858
|
+ start_time := this.GetString("start_time")
|
|
859
|
+ timeLayout := "2006-01-02"
|
|
860
|
+ loc, _ := time.LoadLocation("Local")
|
|
861
|
+ end_time := this.GetString("end_time")
|
844
|
862
|
orgId := this.GetAdminUserInfo().CurrentOrgId
|
845
|
|
- list, err := service.GetTemplateSummaryList(patient_id, orgId)
|
|
863
|
+ startTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", start_time+" 00:00:00", loc)
|
|
864
|
+ endTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", end_time+" 23:59:59", loc)
|
|
865
|
+ list, err := service.GetTemplateSummaryList(patient_id, orgId, startTime.Unix(), endTime.Unix())
|
846
|
866
|
if err == nil {
|
847
|
867
|
this.ServeSuccessJSON(map[string]interface{}{
|
848
|
868
|
"list": list,
|
|
@@ -855,9 +875,14 @@ func (this *DoctorsApiController) GetTemplateSummaryDetail() {
|
855
|
875
|
|
856
|
876
|
id, _ := this.GetInt64("id")
|
857
|
877
|
list, err := service.GetTemplateSummaryDetail(id)
|
|
878
|
+
|
|
879
|
+ ids := strings.Split(list.ProjectId, ",")
|
|
880
|
+ datelist := strings.Split(list.InspectDate, ",")
|
|
881
|
+ inspectlist, err := service.GetInspectionItemlist(list.PatientId, datelist, ids)
|
858
|
882
|
if err == nil {
|
859
|
883
|
this.ServeSuccessJSON(map[string]interface{}{
|
860
|
|
- "list": list,
|
|
884
|
+ "list": list,
|
|
885
|
+ "inspectlist": inspectlist,
|
861
|
886
|
})
|
862
|
887
|
return
|
863
|
888
|
}
|
|
@@ -867,12 +892,16 @@ func (this *DoctorsApiController) GetTemplateSummaryPrintDetail() {
|
867
|
892
|
|
868
|
893
|
id, _ := this.GetInt64("id")
|
869
|
894
|
list, err := service.GetTemplateSummaryPrintDetail(id)
|
|
895
|
+ ids := strings.Split(list.ProjectId, ",")
|
|
896
|
+ datelist := strings.Split(list.InspectDate, ",")
|
|
897
|
+ inspectlist, err := service.GetInspectionItemlist(list.PatientId, datelist, ids)
|
870
|
898
|
orgId := this.GetAdminUserInfo().CurrentOrgId
|
871
|
899
|
doctorList, _ := service.GetAllDoctorThree(orgId)
|
872
|
900
|
if err == nil {
|
873
|
901
|
this.ServeSuccessJSON(map[string]interface{}{
|
874
|
|
- "list": list,
|
875
|
|
- "doctorList": doctorList,
|
|
902
|
+ "list": list,
|
|
903
|
+ "doctorList": doctorList,
|
|
904
|
+ "inspectlist": inspectlist,
|
876
|
905
|
})
|
877
|
906
|
return
|
878
|
907
|
}
|
|
@@ -882,8 +911,9 @@ func (this *DoctorsApiController) UpdateTempalteSummary() {
|
882
|
911
|
|
883
|
912
|
id, _ := this.GetInt64("id")
|
884
|
913
|
title := this.GetString("title")
|
885
|
|
- dry_weight, _ := this.GetFloat("dry_weight")
|
886
|
|
- fmt.Println("hhhhhhhhhhhhh", dry_weight)
|
|
914
|
+
|
|
915
|
+ dryWeight := this.GetString("dry_weight")
|
|
916
|
+ dry_weight, _ := strconv.ParseFloat(dryWeight, 64)
|
887
|
917
|
dialysis_count, _ := this.GetInt64("dialysis_count")
|
888
|
918
|
hd_count, _ := this.GetInt64("hd_count")
|
889
|
919
|
hdf_count, _ := this.GetInt64("hdf_count")
|
|
@@ -892,19 +922,22 @@ func (this *DoctorsApiController) UpdateTempalteSummary() {
|
892
|
922
|
dialzer_apparatus := this.GetString("dialzer_apparatus")
|
893
|
923
|
perfusion_apparatus := this.GetString("perfusion_apparatus")
|
894
|
924
|
anticoagulant, _ := this.GetInt64("anticoagulant")
|
895
|
|
- fmt.Println(anticoagulant)
|
896
|
|
- kalium, _ := this.GetFloat("kalium")
|
897
|
|
- autunite, _ := this.GetFloat("autunite")
|
898
|
|
- natrium, _ := this.GetFloat("natrium")
|
|
925
|
+ kaliumstr := this.GetString("kalium")
|
|
926
|
+ kalium, _ := strconv.ParseFloat(kaliumstr, 64)
|
|
927
|
+
|
|
928
|
+ autunitestr := this.GetString("autunite")
|
|
929
|
+ autunite, _ := strconv.ParseFloat(autunitestr, 64)
|
|
930
|
+ natriumstr := this.GetString("natrium")
|
|
931
|
+ natrium, _ := strconv.ParseFloat(natriumstr, 64)
|
899
|
932
|
hour, _ := this.GetInt64("hour")
|
900
|
933
|
minute, _ := this.GetInt64("minute")
|
901
|
|
- befor_weight, _ := this.GetFloat("befor_weight")
|
902
|
|
- after_weight, _ := this.GetFloat("after_weight")
|
|
934
|
+ beforWeight := this.GetString("befor_weight")
|
|
935
|
+ befor_weight, _ := strconv.ParseFloat(beforWeight, 64)
|
|
936
|
+ afterWeight := this.GetString("after_weight")
|
|
937
|
+ after_weight, _ := strconv.ParseFloat(afterWeight, 64)
|
903
|
938
|
befor_pressure := this.GetString("befor_pressure")
|
904
|
939
|
template_summary_content := this.GetString("template_summary_content")
|
905
|
940
|
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
|
941
|
admin_user_id, _ := this.GetInt64("admin_user_id")
|
909
|
942
|
record_time := this.GetString("record_time")
|
910
|
943
|
timeLayout := "2006-01-02"
|
|
@@ -917,44 +950,47 @@ func (this *DoctorsApiController) UpdateTempalteSummary() {
|
917
|
950
|
patient_id, _ := this.GetInt64("patient_id")
|
918
|
951
|
fmt.Println("patient_id", patient_id)
|
919
|
952
|
orgId := this.GetAdminUserInfo().CurrentOrgId
|
|
953
|
+ inspect_date := this.GetString("inspect_date")
|
|
954
|
+ project_id := this.GetString("project_id")
|
920
|
955
|
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,
|
|
956
|
+ ID: id,
|
|
957
|
+ StartYear: 0,
|
|
958
|
+ StartMonth: 0,
|
|
959
|
+ Radio: 0,
|
|
960
|
+ Quarter: 0,
|
|
961
|
+ DryWeight: dry_weight,
|
|
962
|
+ DialysisCount: dialysis_count,
|
|
963
|
+ HdCount: hd_count,
|
|
964
|
+ HdfCount: hdf_count,
|
|
965
|
+ HpCount: hp_count,
|
|
966
|
+ OtherCount: other_count,
|
|
967
|
+ DialzerApparatus: dialzer_apparatus,
|
|
968
|
+ PerfusionApparatus: perfusion_apparatus,
|
|
969
|
+ Anticoagulant: anticoagulant,
|
|
970
|
+ Kalium: kalium,
|
|
971
|
+ Autunite: autunite,
|
|
972
|
+ Natrium: natrium,
|
|
973
|
+ Hour: hour,
|
|
974
|
+ Minute: minute,
|
|
975
|
+ BeforWeight: befor_weight,
|
|
976
|
+ AfterWeight: after_weight,
|
|
977
|
+ BeforPressure: befor_pressure,
|
|
978
|
+ AfterPressure: after_pressure,
|
|
979
|
+ TemplateSummaryId: template_summary_id,
|
|
980
|
+ TemplateSummaryContent: template_summary_content,
|
|
981
|
+ TemplatePlanId: template_plan_id,
|
|
982
|
+ TemplatePlanContent: template_plan_content,
|
|
983
|
+ TemplateInspectionId: template_inspection_id,
|
|
984
|
+ AdminUserId: admin_user_id,
|
|
985
|
+ RecordTime: recordTime.Unix(),
|
|
986
|
+ PatientId: patient_id,
|
|
987
|
+ UserOrgId: orgId,
|
|
988
|
+ Status: 1,
|
|
989
|
+ Ctime: time.Now().Unix(),
|
|
990
|
+ Mtime: 0,
|
|
991
|
+ Title: title,
|
|
992
|
+ ProjectId: project_id,
|
|
993
|
+ InspectDate: inspect_date,
|
958
|
994
|
}
|
959
|
995
|
err := service.UpdateTempalteSummary(&summary)
|
960
|
996
|
if err == nil {
|