2 Commits 88dfb56f09 ... 4a3c0c83e2

Author SHA1 Message Date
  陈少旭 4a3c0c83e2 Merge branch '20230223_xt_api_new_branch' of http://git.shengws.com/csx/XT_New into 20230223_xt_api_new_branch 2 weeks ago
  陈少旭 8c224e5ce0 提交代码 2 weeks ago
2 changed files with 392 additions and 290 deletions
  1. 327 238
      controllers/his_api_controller.go
  2. 65 52
      service/his_service.go

+ 327 - 238
controllers/his_api_controller.go View File

@@ -874,69 +874,76 @@ func (c *HisApiController) GetTestOrder() {
874 874
 		break
875 875
 	}
876 876
 	c.ServeSuccessJSON(map[string]interface{}{
877
-		"diagnosis":                                   name,
878
-		"order_infos":                                 orderInfos,
879
-		"number":                                      order.MdtrtId,
880
-		"date":                                        order.SettleAccountsDate,
881
-		"charge_admin":                                charge_admin,
882
-		"printor_admin":                               printor_admin,
883
-		"info":                                        order,
884
-		"order":                                       order,
885
-		"bedCostTotal":                                bedCostTotal,
886
-		"bedCostSelfTotal":                            bedCostSelfTotal,
887
-		"bedCostPartSelfTotal":                        bedCostPartSelfTotal,
888
-		"bedSelfTotal":                                bedSelfTotal,
889
-		"bedInscpTotal":                               bedInscpTotal,
890
-		"operationCostTotal":                          operationCostTotal,
891
-		"operationCostSelfTotal":                      operationCostSelfTotal,
892
-		"operationCostPartSelfTotal":                  operationCostPartSelfTotal,
893
-		"operationSelfTotal":                          operationSelfTotal,
894
-		"operationInscpTotal":                         operationInscpTotal,
895
-		"otherCostTotal":                              otherCostTotal,
896
-		"otherCostSelfTotal":                          otherCostSelfTotal,
897
-		"otherCostPartSelfTotal":                      otherCostPartSelfTotal,
898
-		"otherSelfTotal":                              otherSelfTotal,
899
-		"otherInscpTotal":                             otherInscpTotal,
900
-		"materialCostTotal":                           materialCostTotal,
901
-		"materialCostSelfTotal":                       materialCostSelfTotal,
902
-		"materialCostPartSelfTotal":                   materialCostPartSelfTotal,
903
-		"materialSelfTotal":                           materialSelfTotal,
904
-		"materialInscpTotal":                          materialInscpTotal,
905
-		"westernMedicineCostTotal":                    westernMedicineCostTotal,
906
-		"westernMedicineCostSelfTotal":                westernMedicineCostSelfTotal,
907
-		"westernMedicineCostPartSelfTotal":            westernMedicineCostPartSelfTotal,
908
-		"westernMedicineSelfTotal":                    westernMedicineSelfTotal,
909
-		"westernMedicineInscpTotal":                   westernMedicineInscpTotal,
877
+		"diagnosis":            name,
878
+		"order_infos":          orderInfos,
879
+		"number":               order.MdtrtId,
880
+		"date":                 order.SettleAccountsDate,
881
+		"charge_admin":         charge_admin,
882
+		"printor_admin":        printor_admin,
883
+		"info":                 order,
884
+		"order":                order,
885
+		"bedCostTotal":         bedCostTotal,
886
+		"bedCostSelfTotal":     bedCostSelfTotal,
887
+		"bedCostPartSelfTotal": bedCostPartSelfTotal,
888
+		"bedSelfTotal":         bedSelfTotal,
889
+		"bedInscpTotal":        bedInscpTotal,
890
+
891
+		"operationCostTotal":         operationCostTotal,
892
+		"operationCostSelfTotal":     operationCostSelfTotal,
893
+		"operationCostPartSelfTotal": operationCostPartSelfTotal,
894
+		"operationSelfTotal":         operationSelfTotal,
895
+		"operationInscpTotal":        operationInscpTotal,
896
+		"otherCostTotal":             otherCostTotal,
897
+		"otherCostSelfTotal":         otherCostSelfTotal,
898
+		"otherCostPartSelfTotal":     otherCostPartSelfTotal,
899
+		"otherSelfTotal":             otherSelfTotal,
900
+		"otherInscpTotal":            otherInscpTotal,
901
+		"materialCostTotal":          materialCostTotal,
902
+		"materialCostSelfTotal":      materialCostSelfTotal,
903
+		"materialCostPartSelfTotal":  materialCostPartSelfTotal,
904
+		"materialSelfTotal":          materialSelfTotal,
905
+		"materialInscpTotal":         materialInscpTotal,
906
+
907
+		"westernMedicineCostTotal":         westernMedicineCostTotal,
908
+		"westernMedicineCostSelfTotal":     westernMedicineCostSelfTotal,
909
+		"westernMedicineCostPartSelfTotal": westernMedicineCostPartSelfTotal,
910
+		"westernMedicineSelfTotal":         westernMedicineSelfTotal,
911
+		"westernMedicineInscpTotal":        westernMedicineInscpTotal,
912
+
910 913
 		"chineseTraditionalMedicineCostTotal":         chineseTraditionalMedicineCostTotal,
911 914
 		"chineseTraditionalMedicineCostSelfTotal":     chineseTraditionalMedicineCostSelfTotal,
912 915
 		"chineseTraditionalMedicineCostPartSelfTotal": chineseTraditionalMedicineCostPartSelfTotal,
913 916
 		"chineseTraditionalSelfTotal":                 chineseTraditionalSelfTotal,
914 917
 		"chineseTraditionalInscpTotal":                chineseTraditionalInscpTotal,
915
-		"checkCostTotal":                              checkCostTotal,
916
-		"checkCostSelfTotal":                          checkCostSelfTotal,
917
-		"checkCostPartSelfTotal":                      checkCostPartSelfTotal,
918
-		"checkSelfTotal":                              checkSelfTotal,
919
-		"checkInscpTotal":                             checkInscpTotal,
920
-		"laboratoryCostTotal":                         laboratoryCostTotal,
921
-		"laboratoryCostSelfTotal":                     laboratoryCostSelfTotal,
922
-		"laboratoryCostPartSelfTotal":                 laboratoryCostPartSelfTotal,
923
-		"laboratorySelfTotal":                         laboratorySelfTotal,
924
-		"laboratoryInscpTotal":                        laboratoryInscpTotal,
925
-		"treatCostTotal":                              treatCostTotal,
926
-		"treatCostSelfTotal":                          treatCostSelfTotal,
927
-		"treatCostPartSelfTotal":                      treatCostPartSelfTotal,
928
-		"treatSelfTotal":                              treatSelfTotal,
929
-		"treatInscpTotal":                             treatInscpTotal,
930
-		"doctor_info":                                 doctor_info,
931
-		"doctor_name":                                 doctor_name,
932
-		"health_card_no":                              order.PsnNo,
933
-		"yiliao_leibie":                               yiliao_leibie,
934
-		"patient":                                     patient,
935
-		"org_name":                                    miConfig.OrgName,
936
-		"org_code":                                    miConfig.Code,
937
-		"order_number":                                order.Number,
938
-		"his_hospital":                                his_hospital,
939
-		"dia_config":                                  dia_config,
918
+
919
+		"checkCostTotal":         checkCostTotal,
920
+		"checkCostSelfTotal":     checkCostSelfTotal,
921
+		"checkCostPartSelfTotal": checkCostPartSelfTotal,
922
+		"checkSelfTotal":         checkSelfTotal,
923
+		"checkInscpTotal":        checkInscpTotal,
924
+
925
+		"laboratoryCostTotal":         laboratoryCostTotal,
926
+		"laboratoryCostSelfTotal":     laboratoryCostSelfTotal,
927
+		"laboratoryCostPartSelfTotal": laboratoryCostPartSelfTotal,
928
+		"laboratorySelfTotal":         laboratorySelfTotal,
929
+		"laboratoryInscpTotal":        laboratoryInscpTotal,
930
+
931
+		"treatCostTotal":         treatCostTotal,
932
+		"treatCostSelfTotal":     treatCostSelfTotal,
933
+		"treatCostPartSelfTotal": treatCostPartSelfTotal,
934
+		"treatSelfTotal":         treatSelfTotal,
935
+		"treatInscpTotal":        treatInscpTotal,
936
+
937
+		"doctor_info":    doctor_info,
938
+		"doctor_name":    doctor_name,
939
+		"health_card_no": order.PsnNo,
940
+		"yiliao_leibie":  yiliao_leibie,
941
+		"patient":        patient,
942
+		"org_name":       miConfig.OrgName,
943
+		"org_code":       miConfig.Code,
944
+		"order_number":   order.Number,
945
+		"his_hospital":   his_hospital,
946
+		"dia_config":     dia_config,
940 947
 	})
941 948
 
942 949
 }
@@ -1054,41 +1061,59 @@ func (c *HisApiController) GetPrivateExpensesOrder() {
1054 1061
 		}
1055 1062
 	}
1056 1063
 
1057
-	var bedCostTotal float64 = 0 //床位总费
1058
-	//var bedCostSelfTotal float64 = 0     //床位自费
1064
+	var bedCostTotal float64 = 0         //床位总费
1065
+	var bedCostSelfTotal float64 = 0     //床位自费
1059 1066
 	var bedCostPartSelfTotal float64 = 0 //床位部分项目自费
1067
+	var bedSelfTotal float64 = 0         //床位部分项目自费
1068
+	var bedInscpTotal float64 = 0        //床位部分项目自费
1060 1069
 
1061
-	var operationCostTotal float64 = 0 //手术费
1062
-	//var operationCostSelfTotal float64 = 0     //手术费
1070
+	var operationCostTotal float64 = 0         //手术费
1071
+	var operationCostSelfTotal float64 = 0     //手术费
1063 1072
 	var operationCostPartSelfTotal float64 = 0 //手术费
1073
+	var operationSelfTotal float64 = 0         //床位部分项目自费
1074
+	var operationInscpTotal float64 = 0        //床位部分项目自费
1064 1075
 
1065 1076
 	var otherCostTotal float64 = 0 //其他费用
1066 1077
 	//var otherCostSelfTotal float64 = 0     //其他费用
1067 1078
 	var otherCostPartSelfTotal float64 = 0 //其他费用
1079
+	//var otherSelfTotal float64 = 0         //床位部分项目自费
1080
+	//var otherInscpTotal float64 = 0        //床位部分项目自费
1068 1081
 
1069
-	var materialCostTotal float64 = 0 //材料费
1070
-	//var materialCostSelfTotal float64 = 0     //材料费
1082
+	var materialCostTotal float64 = 0         //材料费
1083
+	var materialCostSelfTotal float64 = 0     //材料费
1071 1084
 	var materialCostPartSelfTotal float64 = 0 //材料费
1085
+	var materialSelfTotal float64 = 0         //床位部分项目自费
1086
+	var materialInscpTotal float64 = 0        //床位部分项目自费
1072 1087
 
1073
-	var westernMedicineCostTotal float64 = 0 //西药费
1074
-	//var westernMedicineCostSelfTotal float64 = 0     //西药费
1088
+	var westernMedicineCostTotal float64 = 0         //西药费
1089
+	var westernMedicineCostSelfTotal float64 = 0     //西药费
1075 1090
 	var westernMedicineCostPartSelfTotal float64 = 0 //西药费
1091
+	var westernMedicineSelfTotal float64 = 0         //床位部分项目自费
1092
+	var westernMedicineInscpTotal float64 = 0        //床位部分项目自费
1076 1093
 
1077
-	var chineseTraditionalMedicineCostTotal float64 = 0 //中成药
1078
-	//var chineseTraditionalMedicineCostSelfTotal float64 = 0     //中成药
1094
+	var chineseTraditionalMedicineCostTotal float64 = 0         //中成药
1095
+	var chineseTraditionalMedicineCostSelfTotal float64 = 0     //中成药
1079 1096
 	var chineseTraditionalMedicineCostPartSelfTotal float64 = 0 //中成药
1097
+	var chineseTraditionalSelfTotal float64 = 0                 //床位部分项目自费
1098
+	var chineseTraditionalInscpTotal float64 = 0                //床位部分项目自费
1080 1099
 
1081
-	var checkCostTotal float64 = 0 //检查费
1082
-	//var checkCostSelfTotal float64 = 0     //检查费
1100
+	var checkCostTotal float64 = 0         //检查费
1101
+	var checkCostSelfTotal float64 = 0     //检查费
1083 1102
 	var checkCostPartSelfTotal float64 = 0 //检查费
1103
+	var checkSelfTotal float64 = 0         //床位部分项目自费
1104
+	var checkInscpTotal float64 = 0        //床位部分项目自费
1084 1105
 
1085
-	var laboratoryCostTotal float64 = 0 //化验费
1086
-	//var laboratoryCostSelfTotal float64 = 0     //化验费
1106
+	var laboratoryCostTotal float64 = 0         //化验费
1107
+	var laboratoryCostSelfTotal float64 = 0     //化验费
1087 1108
 	var laboratoryCostPartSelfTotal float64 = 0 //化验费
1109
+	var laboratorySelfTotal float64 = 0         //床位部分项目自费
1110
+	var laboratoryInscpTotal float64 = 0        //床位部分项目自费
1088 1111
 
1089
-	var treatCostTotal float64 = 0 //治疗费用
1090
-	//var treatCostSelfTotal float64 = 0     //治疗费用
1112
+	var treatCostTotal float64 = 0         //治疗费用
1113
+	var treatCostSelfTotal float64 = 0     //治疗费用
1091 1114
 	var treatCostPartSelfTotal float64 = 0 //治疗费用
1115
+	var treatSelfTotal float64 = 0         //床位部分项目自费
1116
+	var treatInscpTotal float64 = 0        //床位部分项目自费
1092 1117
 
1093 1118
 	var zhenChaCostTotal float64 = 0 //其他费用
1094 1119
 	//var zhenChaCostPartSelfTotal float64 = 0 //其他费用
@@ -1096,113 +1121,115 @@ func (c *HisApiController) GetPrivateExpensesOrder() {
1096 1121
 	decimal.DivisionPrecision = 2
1097 1122
 
1098 1123
 	for _, item := range orderInfos {
1099
-		item.FulamtOwnpayAmt = item.DetItemFeeSumamt
1100
-		if item.HisDoctorAdviceInfo.ID > 0 && item.HisPrescriptionProject.ID == 0 { //药品
1101
-			item.MedChrgitmType = "09"
1102
-		}
1103
-		if item.HisPrescriptionProject.ID > 0 && item.HisDoctorAdviceInfo.ID == 0 {
1104
-			if item.HisPrescriptionProject.Type == 2 {
1105
-				if c.GetAdminUserInfo().CurrentOrgId == 10215 {
1106
-					fmt.Println("CostClassify")
1107
-					fmt.Println(item.HisPrescriptionProject.VMHisProject.CostClassify)
1108
-					switch item.HisPrescriptionProject.VMHisProject.CostClassify {
1109
-					case 0:
1110
-						item.MedChrgitmType = "0"
1111
-						break
1112
-					case 1:
1113
-						item.MedChrgitmType = "14"
1114
-						break
1115
-					case 2:
1116
-						item.MedChrgitmType = "05"
1117
-
1118
-						break
1119
-					case 3:
1120
-						item.MedChrgitmType = "03"
1121
-
1122
-						break
1123
-					case 4:
1124
-						item.MedChrgitmType = "03"
1125
-
1126
-						break
1127
-					case 5:
1128
-						item.MedChrgitmType = "08"
1129
-
1130
-						break
1131
-					case 6:
1132
-						item.MedChrgitmType = "14"
1133
-
1134
-						break
1135
-					case 7:
1136
-						item.MedChrgitmType = "14"
1137
-
1138
-						break
1139
-					case 8:
1140
-						item.MedChrgitmType = "03"
1141
-						break
1142
-					case 9:
1143
-						item.MedChrgitmType = "14"
1144
-						break
1145
-					case 10:
1146
-						item.MedChrgitmType = "14"
1147
-						break
1148
-					case 11:
1149
-						item.MedChrgitmType = "06"
1150
-						break
1151
-					case 12:
1152
-						item.MedChrgitmType = "12"
1153
-						break
1154
-					case 13:
1155
-						item.MedChrgitmType = "01"
1156
-						break
1157
-					case 14:
1158
-						item.MedChrgitmType = "04"
1159
-						break
1160
-					case 15:
1161
-						item.MedChrgitmType = "14"
1162
-						break
1124
+		//item.FulamtOwnpayAmt = item.DetItemFeeSumamt
1125
+		if c.GetAdminUserInfo().CurrentOrgId != 10726 {
1126
+			if item.HisDoctorAdviceInfo.ID > 0 && item.HisPrescriptionProject.ID == 0 { //药品
1127
+				item.MedChrgitmType = "09"
1128
+			}
1129
+			if item.HisPrescriptionProject.ID > 0 && item.HisDoctorAdviceInfo.ID == 0 {
1130
+				if item.HisPrescriptionProject.Type == 2 {
1131
+					if c.GetAdminUserInfo().CurrentOrgId == 10215 {
1132
+						fmt.Println("CostClassify")
1133
+						fmt.Println(item.HisPrescriptionProject.VMHisProject.CostClassify)
1134
+						switch item.HisPrescriptionProject.VMHisProject.CostClassify {
1135
+						case 0:
1136
+							item.MedChrgitmType = "0"
1137
+							break
1138
+						case 1:
1139
+							item.MedChrgitmType = "14"
1140
+							break
1141
+						case 2:
1142
+							item.MedChrgitmType = "05"
1163 1143
 
1164
-					}
1144
+							break
1145
+						case 3:
1146
+							item.MedChrgitmType = "03"
1165 1147
 
1166
-				} else {
1167
-					switch item.HisPrescriptionProject.VMHisProject.CostClassify {
1168
-					case 1:
1169
-						item.MedChrgitmType = "14"
1170
-						break
1171
-					case 2:
1172
-						item.MedChrgitmType = "05"
1173
-
1174
-						break
1175
-					case 3:
1176
-						item.MedChrgitmType = "04"
1177
-
1178
-						break
1179
-					case 4:
1180
-						item.MedChrgitmType = "14"
1181
-
1182
-						break
1183
-					case 5:
1184
-						item.MedChrgitmType = "08"
1185
-
1186
-						break
1187
-					case 6:
1188
-						item.MedChrgitmType = "14"
1189
-						break
1190
-					case 7:
1191
-						item.MedChrgitmType = "14"
1192
-						break
1193
-					case 8:
1194
-						item.MedChrgitmType = "03"
1195
-						break
1196
-					case 9:
1197
-						item.MedChrgitmType = "14"
1198
-						break
1199
-					default:
1200
-						item.MedChrgitmType = "14"
1201
-						break
1148
+							break
1149
+						case 4:
1150
+							item.MedChrgitmType = "03"
1151
+
1152
+							break
1153
+						case 5:
1154
+							item.MedChrgitmType = "08"
1155
+
1156
+							break
1157
+						case 6:
1158
+							item.MedChrgitmType = "14"
1159
+
1160
+							break
1161
+						case 7:
1162
+							item.MedChrgitmType = "14"
1163
+
1164
+							break
1165
+						case 8:
1166
+							item.MedChrgitmType = "03"
1167
+							break
1168
+						case 9:
1169
+							item.MedChrgitmType = "14"
1170
+							break
1171
+						case 10:
1172
+							item.MedChrgitmType = "14"
1173
+							break
1174
+						case 11:
1175
+							item.MedChrgitmType = "06"
1176
+							break
1177
+						case 12:
1178
+							item.MedChrgitmType = "12"
1179
+							break
1180
+						case 13:
1181
+							item.MedChrgitmType = "01"
1182
+							break
1183
+						case 14:
1184
+							item.MedChrgitmType = "04"
1185
+							break
1186
+						case 15:
1187
+							item.MedChrgitmType = "14"
1188
+							break
1189
+
1190
+						}
1191
+
1192
+					} else {
1193
+						switch item.HisPrescriptionProject.VMHisProject.CostClassify {
1194
+						case 1:
1195
+							item.MedChrgitmType = "14"
1196
+							break
1197
+						case 2:
1198
+							item.MedChrgitmType = "05"
1199
+
1200
+							break
1201
+						case 3:
1202
+							item.MedChrgitmType = "04"
1203
+
1204
+							break
1205
+						case 4:
1206
+							item.MedChrgitmType = "14"
1207
+
1208
+							break
1209
+						case 5:
1210
+							item.MedChrgitmType = "08"
1211
+
1212
+							break
1213
+						case 6:
1214
+							item.MedChrgitmType = "14"
1215
+							break
1216
+						case 7:
1217
+							item.MedChrgitmType = "14"
1218
+							break
1219
+						case 8:
1220
+							item.MedChrgitmType = "03"
1221
+							break
1222
+						case 9:
1223
+							item.MedChrgitmType = "14"
1224
+							break
1225
+						default:
1226
+							item.MedChrgitmType = "14"
1227
+							break
1228
+						}
1202 1229
 					}
1230
+				} else if item.HisPrescriptionProject.Type == 3 {
1231
+					item.MedChrgitmType = "08"
1203 1232
 				}
1204
-			} else if item.HisPrescriptionProject.Type == 3 {
1205
-				item.MedChrgitmType = "08"
1206 1233
 			}
1207 1234
 		}
1208 1235
 	}
@@ -1213,8 +1240,11 @@ func (c *HisApiController) GetPrivateExpensesOrder() {
1213 1240
 	for _, item := range orderInfos {
1214 1241
 		if item.MedChrgitmType == "01" { //床位费
1215 1242
 			bedCostTotal, _ = decimal.NewFromFloat(bedCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
1216
-			//bedCostSelfTotal, _ = decimal.NewFromFloat(bedCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
1217
-			//bedCostPartSelfTotal, _ = decimal.NewFromFloat(bedCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
1243
+			bedCostSelfTotal, _ = decimal.NewFromFloat(bedCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
1244
+			bedCostPartSelfTotal, _ = decimal.NewFromFloat(bedCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
1245
+			bedSelfTotal, _ = decimal.NewFromFloat(bedSelfTotal).Add(decimal.NewFromFloat(item.FulamtOwnpayAmt)).Float64()
1246
+			bedInscpTotal, _ = decimal.NewFromFloat(bedInscpTotal).Add(decimal.NewFromFloat(item.InscpScpAmt)).Float64()
1247
+
1218 1248
 		}
1219 1249
 		if item.MedChrgitmType == "02" { //诊察费
1220 1250
 			zhenChaCostTotal, _ = decimal.NewFromFloat(zhenChaCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
@@ -1223,50 +1253,83 @@ func (c *HisApiController) GetPrivateExpensesOrder() {
1223 1253
 
1224 1254
 		if item.MedChrgitmType == "03" { //检查费
1225 1255
 			checkCostTotal, _ = decimal.NewFromFloat(checkCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
1226
-			//checkCostSelfTotal, _ = decimal.NewFromFloat(checkCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
1227
-			//checkCostPartSelfTotal, _ = decimal.NewFromFloat(checkCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
1256
+			checkCostSelfTotal, _ = decimal.NewFromFloat(checkCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
1257
+			checkCostPartSelfTotal, _ = decimal.NewFromFloat(checkCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
1258
+			checkSelfTotal, _ = decimal.NewFromFloat(checkSelfTotal).Add(decimal.NewFromFloat(item.FulamtOwnpayAmt)).Float64()
1259
+			checkInscpTotal, _ = decimal.NewFromFloat(checkInscpTotal).Add(decimal.NewFromFloat(item.InscpScpAmt)).Float64()
1260
+
1228 1261
 		}
1229 1262
 
1230 1263
 		if item.MedChrgitmType == "02" { //检查费
1231 1264
 			checkCostTotal, _ = decimal.NewFromFloat(checkCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
1232
-			//checkCostSelfTotal, _ = decimal.NewFromFloat(checkCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
1233
-			//checkCostPartSelfTotal, _ = decimal.NewFromFloat(checkCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
1265
+			checkCostSelfTotal, _ = decimal.NewFromFloat(checkCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
1266
+			checkCostPartSelfTotal, _ = decimal.NewFromFloat(checkCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
1267
+			checkSelfTotal, _ = decimal.NewFromFloat(checkSelfTotal).Add(decimal.NewFromFloat(item.FulamtOwnpayAmt)).Float64()
1268
+			checkInscpTotal, _ = decimal.NewFromFloat(checkInscpTotal).Add(decimal.NewFromFloat(item.InscpScpAmt)).Float64()
1269
+
1234 1270
 		}
1235 1271
 
1236 1272
 		if item.MedChrgitmType == "04" { //化验费
1237 1273
 			laboratoryCostTotal, _ = decimal.NewFromFloat(laboratoryCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
1238
-			//laboratoryCostSelfTotal, _ = decimal.NewFromFloat(laboratoryCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
1239
-			//laboratoryCostPartSelfTotal, _ = decimal.NewFromFloat(laboratoryCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
1274
+			laboratoryCostSelfTotal, _ = decimal.NewFromFloat(laboratoryCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
1275
+			laboratoryCostPartSelfTotal, _ = decimal.NewFromFloat(laboratoryCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
1276
+			laboratorySelfTotal, _ = decimal.NewFromFloat(laboratorySelfTotal).Add(decimal.NewFromFloat(item.FulamtOwnpayAmt)).Float64()
1277
+			laboratoryInscpTotal, _ = decimal.NewFromFloat(laboratoryInscpTotal).Add(decimal.NewFromFloat(item.InscpScpAmt)).Float64()
1278
+
1240 1279
 		}
1241 1280
 
1242 1281
 		if item.MedChrgitmType == "05" { //治疗费
1243 1282
 			treatCostTotal, _ = decimal.NewFromFloat(treatCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
1244
-			//treatCostSelfTotal, _ = decimal.NewFromFloat(treatCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
1245
-			//treatCostPartSelfTotal, _ = decimal.NewFromFloat(treatCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
1283
+			treatCostSelfTotal, _ = decimal.NewFromFloat(treatCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
1284
+			treatCostPartSelfTotal, _ = decimal.NewFromFloat(treatCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
1285
+			treatSelfTotal, _ = decimal.NewFromFloat(treatSelfTotal).Add(decimal.NewFromFloat(item.FulamtOwnpayAmt)).Float64()
1286
+			treatInscpTotal, _ = decimal.NewFromFloat(treatInscpTotal).Add(decimal.NewFromFloat(item.InscpScpAmt)).Float64()
1287
+
1246 1288
 		}
1247 1289
 
1248 1290
 		if item.MedChrgitmType == "06" { //手术费
1249 1291
 			operationCostTotal, _ = decimal.NewFromFloat(operationCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
1250
-			//operationCostSelfTotal, _ = decimal.NewFromFloat(operationCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
1251
-			//operationCostPartSelfTotal, _ = decimal.NewFromFloat(operationCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
1292
+			operationCostSelfTotal, _ = decimal.NewFromFloat(operationCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
1293
+			operationCostPartSelfTotal, _ = decimal.NewFromFloat(operationCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
1294
+
1295
+			operationSelfTotal, _ = decimal.NewFromFloat(operationSelfTotal).Add(decimal.NewFromFloat(item.FulamtOwnpayAmt)).Float64()
1296
+			operationInscpTotal, _ = decimal.NewFromFloat(operationInscpTotal).Add(decimal.NewFromFloat(item.InscpScpAmt)).Float64()
1297
+
1252 1298
 		}
1253 1299
 
1254 1300
 		if item.MedChrgitmType == "08" || item.MedChrgitmType == "1402" || item.MedChrgitmType == "1403" || item.MedChrgitmType == "1401" { //材料费
1255 1301
 			materialCostTotal, _ = decimal.NewFromFloat(materialCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
1256
-			//materialCostSelfTotal, _ = decimal.NewFromFloat(materialCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
1257
-			//materialCostPartSelfTotal, _ = decimal.NewFromFloat(materialCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
1302
+			materialCostSelfTotal, _ = decimal.NewFromFloat(materialCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
1303
+			materialCostPartSelfTotal, _ = decimal.NewFromFloat(materialCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
1304
+
1305
+			materialSelfTotal, _ = decimal.NewFromFloat(materialSelfTotal).Add(decimal.NewFromFloat(item.FulamtOwnpayAmt)).Float64()
1306
+			materialInscpTotal, _ = decimal.NewFromFloat(materialInscpTotal).Add(decimal.NewFromFloat(item.InscpScpAmt)).Float64()
1307
+
1258 1308
 		}
1259 1309
 
1260 1310
 		if item.MedChrgitmType == "09" { //西药费
1311
+			fmt.Println("FulamtOwnpayAmt")
1312
+
1313
+			fmt.Println(item.FulamtOwnpayAmt)
1314
+			fmt.Println("FulamtOwnpayAmt")
1315
+
1261 1316
 			westernMedicineCostTotal, _ = decimal.NewFromFloat(westernMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
1262
-			//westernMedicineCostSelfTotal, _ = decimal.NewFromFloat(westernMedicineCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
1263
-			//westernMedicineCostPartSelfTotal, _ = decimal.NewFromFloat(westernMedicineCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
1317
+			westernMedicineCostSelfTotal, _ = decimal.NewFromFloat(westernMedicineCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
1318
+			westernMedicineCostPartSelfTotal, _ = decimal.NewFromFloat(westernMedicineCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
1319
+
1320
+			westernMedicineSelfTotal, _ = decimal.NewFromFloat(westernMedicineSelfTotal).Add(decimal.NewFromFloat(item.FulamtOwnpayAmt)).Float64()
1321
+			westernMedicineInscpTotal, _ = decimal.NewFromFloat(westernMedicineInscpTotal).Add(decimal.NewFromFloat(item.InscpScpAmt)).Float64()
1322
+
1264 1323
 		}
1265 1324
 
1266 1325
 		if item.MedChrgitmType == "11" { //中成费
1267 1326
 			chineseTraditionalMedicineCostTotal, _ = decimal.NewFromFloat(chineseTraditionalMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
1268
-			//chineseTraditionalMedicineCostSelfTotal, _ = decimal.NewFromFloat(chineseTraditionalMedicineCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
1269
-			//chineseTraditionalMedicineCostPartSelfTotal, _ = decimal.NewFromFloat(chineseTraditionalMedicineCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
1327
+			chineseTraditionalMedicineCostSelfTotal, _ = decimal.NewFromFloat(chineseTraditionalMedicineCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
1328
+			chineseTraditionalMedicineCostPartSelfTotal, _ = decimal.NewFromFloat(chineseTraditionalMedicineCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
1329
+
1330
+			chineseTraditionalSelfTotal, _ = decimal.NewFromFloat(chineseTraditionalSelfTotal).Add(decimal.NewFromFloat(item.FulamtOwnpayAmt)).Float64()
1331
+			chineseTraditionalInscpTotal, _ = decimal.NewFromFloat(chineseTraditionalInscpTotal).Add(decimal.NewFromFloat(item.InscpScpAmt)).Float64()
1332
+
1270 1333
 		}
1271 1334
 
1272 1335
 		if item.MedChrgitmType == "14" || item.MedChrgitmType == "0" || item.MedChrgitmType == "12" || item.MedChrgitmType == "02" { //其他费
@@ -1299,51 +1362,77 @@ func (c *HisApiController) GetPrivateExpensesOrder() {
1299 1362
 	json.Unmarshal([]byte(order.SetlDetail), &rf)
1300 1363
 	patient, _ := service.GetFaPiaoPatientByID(order.UserOrgId, order.PatientId)
1301 1364
 	c.ServeSuccessJSON(map[string]interface{}{
1302
-		"patient":                                     patient,
1303
-		"order_infos":                                 orderInfos,
1304
-		"diagnosis":                                   name,
1305
-		"bedCostTotal":                                bedCostTotal,
1306
-		"bedCostSelfTotal":                            bedCostTotal,
1307
-		"bedCostPartSelfTotal":                        bedCostPartSelfTotal,
1308
-		"operationCostTotal":                          operationCostTotal,
1309
-		"operationCostSelfTotal":                      operationCostTotal,
1310
-		"operationCostPartSelfTotal":                  operationCostPartSelfTotal,
1311
-		"otherCostTotal":                              otherCostTotal,
1312
-		"otherCostSelfTotal":                          otherCostTotal,
1313
-		"otherCostPartSelfTotal":                      otherCostPartSelfTotal,
1314
-		"materialCostTotal":                           materialCostTotal,
1315
-		"materialCostSelfTotal":                       materialCostTotal,
1316
-		"materialCostPartSelfTotal":                   materialCostPartSelfTotal,
1317
-		"westernMedicineCostTotal":                    westernMedicineCostTotal,
1318
-		"westernMedicineCostSelfTotal":                westernMedicineCostTotal,
1319
-		"westernMedicineCostPartSelfTotal":            westernMedicineCostPartSelfTotal,
1365
+		"patient":              patient,
1366
+		"order_infos":          orderInfos,
1367
+		"diagnosis":            name,
1368
+		"bedCostTotal":         bedCostTotal,
1369
+		"bedCostSelfTotal":     bedCostSelfTotal,
1370
+		"bedCostPartSelfTotal": bedCostPartSelfTotal,
1371
+
1372
+		"bedSelfTotal":  bedSelfTotal,
1373
+		"bedInscpTotal": bedInscpTotal,
1374
+
1375
+		"operationCostTotal":         operationCostTotal,
1376
+		"operationCostSelfTotal":     operationCostSelfTotal,
1377
+		"operationCostPartSelfTotal": operationCostPartSelfTotal,
1378
+		"operationInscpTotal":        operationInscpTotal,
1379
+		"operationSelfTotal":         operationSelfTotal,
1380
+
1381
+		"otherCostTotal": otherCostTotal,
1382
+		//"otherCostSelfTotal":        otherCostSelfTotal,
1383
+		"otherCostPartSelfTotal":    otherCostPartSelfTotal,
1384
+		"materialCostTotal":         materialCostTotal,
1385
+		"materialCostSelfTotal":     materialCostSelfTotal,
1386
+		"materialCostPartSelfTotal": materialCostPartSelfTotal,
1387
+		"materialSelfTotal":         materialSelfTotal,
1388
+		"materialInscpTotal":        materialInscpTotal,
1389
+
1390
+		"westernMedicineCostTotal":         westernMedicineCostTotal,
1391
+		"westernMedicineCostSelfTotal":     westernMedicineCostSelfTotal,
1392
+		"westernMedicineCostPartSelfTotal": westernMedicineCostPartSelfTotal,
1393
+		"westernMedicineSelfTotal":         westernMedicineSelfTotal,
1394
+		"westernMedicineInscpTotal":        westernMedicineInscpTotal,
1395
+
1320 1396
 		"chineseTraditionalMedicineCostTotal":         chineseTraditionalMedicineCostTotal,
1321
-		"chineseTraditionalMedicineCostSelfTotal":     chineseTraditionalMedicineCostTotal,
1397
+		"chineseTraditionalMedicineCostSelfTotal":     chineseTraditionalMedicineCostSelfTotal,
1322 1398
 		"chineseTraditionalMedicineCostPartSelfTotal": chineseTraditionalMedicineCostPartSelfTotal,
1323
-		"checkCostTotal":                              checkCostTotal,
1324
-		"checkCostSelfTotal":                          checkCostTotal,
1325
-		"zhenChaCostTotal":                            zhenChaCostTotal,
1326
-		"zhenChaCostSelfTotal":                        zhenChaCostTotal,
1327
-		"checkCostPartSelfTotal":                      checkCostPartSelfTotal,
1328
-		"laboratoryCostTotal":                         laboratoryCostTotal,
1329
-		"laboratoryCostSelfTotal":                     laboratoryCostTotal,
1330
-		"laboratoryCostPartSelfTotal":                 laboratoryCostPartSelfTotal,
1331
-		"treatCostTotal":                              treatCostTotal,
1332
-		"treatCostSelfTotal":                          treatCostTotal,
1333
-		"treatCostPartSelfTotal":                      treatCostPartSelfTotal,
1334
-		"charge_admin":                                charge_admin,
1335
-		"printor_admin":                               printor_admin,
1336
-		"org_name":                                    org.OrgName,
1337
-		"org_code":                                    miConfig.Code,
1338
-		"name":                                        patient.Name,
1339
-		"number":                                      order.MdtrtId,
1340
-		"date":                                        order.SettleAccountsDate,
1341
-		"info":                                        order,
1342
-		"new_order":                                   order,
1343
-		"his_hospital":                                his_hospital,
1344
-		"his":                                         his,
1345
-		"funds":                                       rf,
1346
-		"dia_config":                                  dia_config,
1399
+		"chineseTraditionalSelfTotal":                 chineseTraditionalSelfTotal,
1400
+		"chineseTraditionalInscpTotal":                chineseTraditionalInscpTotal,
1401
+
1402
+		"checkCostTotal":         checkCostTotal,
1403
+		"checkCostSelfTotal":     checkCostSelfTotal,
1404
+		"checkSelfTotal":         checkSelfTotal,
1405
+		"checkInscpTotal":        checkInscpTotal,
1406
+		"checkCostPartSelfTotal": checkCostPartSelfTotal,
1407
+
1408
+		"zhenChaCostTotal":     zhenChaCostTotal,
1409
+		"zhenChaCostSelfTotal": zhenChaCostTotal,
1410
+
1411
+		"laboratoryCostTotal":         laboratoryCostTotal,
1412
+		"laboratoryCostSelfTotal":     laboratoryCostSelfTotal,
1413
+		"laboratoryCostPartSelfTotal": laboratoryCostPartSelfTotal,
1414
+		"laboratorySelfTotal":         laboratorySelfTotal,
1415
+		"laboratoryInscpTotal":        laboratoryInscpTotal,
1416
+
1417
+		"treatCostTotal":         treatCostTotal,
1418
+		"treatCostSelfTotal":     treatCostSelfTotal,
1419
+		"treatCostPartSelfTotal": treatCostPartSelfTotal,
1420
+		"treatSelfTotal":         treatSelfTotal,
1421
+		"treatInscpTotal":        treatInscpTotal,
1422
+
1423
+		"charge_admin":  charge_admin,
1424
+		"printor_admin": printor_admin,
1425
+		"org_name":      org.OrgName,
1426
+		"org_code":      miConfig.Code,
1427
+		"name":          patient.Name,
1428
+		"number":        order.MdtrtId,
1429
+		"date":          order.SettleAccountsDate,
1430
+		"info":          order,
1431
+		"new_order":     order,
1432
+		"his_hospital":  his_hospital,
1433
+		"his":           his,
1434
+		"funds":         rf,
1435
+		"dia_config":    dia_config,
1347 1436
 	})
1348 1437
 
1349 1438
 }

+ 65 - 52
service/his_service.go View File

@@ -2026,24 +2026,28 @@ func (HisPrescriptionProject) TableName() string {
2026 2026
 }
2027 2027
 
2028 2028
 type HisOrderInfo struct {
2029
-	ID                     int64                  `gorm:"column:id" json:"id" form:"id"`
2030
-	OrderNumber            string                 `gorm:"column:order_number" json:"order_number" form:"order_number"`
2031
-	UploadDate             int64                  `gorm:"column:upload_date" json:"upload_date" form:"upload_date"`
2032
-	AdviceId               int64                  `gorm:"column:advice_id" json:"advice_id" form:"advice_id"`
2033
-	DetItemFeeSumamt       float64                `gorm:"column:det_item_fee_sumamt" json:"det_item_fee_sumamt" form:"det_item_fee_sumamt"`
2034
-	Cnt                    float64                `gorm:"column:cnt" json:"cnt" form:"cnt"`
2035
-	Pric                   float64                `gorm:"column:pric" json:"pric" form:"pric"`
2036
-	PatientId              int64                  `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
2037
-	MedChrgitmType         string                 `gorm:"column:med_chrgitm_type" json:"med_chrgitm_type" form:"med_chrgitm_type"`
2038
-	Status                 int64                  `gorm:"column:status" json:"status" form:"status"`
2039
-	FeedetlSn              string                 `gorm:"column:feedetl_sn" json:"feedetl_sn" form:"feedetl_sn"`
2040
-	ChldMedcFlag           string                 `gorm:"column:chld_medc_flag" json:"chld_medc_flag" form:"chld_medc_flag"`
2041
-	ChrgitmLv              string                 `gorm:"column:chrgitm_lv" json:"chrgitm_lv" form:"chrgitm_lv"`
2042
-	UserOrgId              int64                  `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
2043
-	ProjectId              int64                  `gorm:"column:project_id" json:"project_id" form:"project_id"`
2044
-	SelfpayProp            float64                `gorm:"column:selfpay_prop" json:"selfpay_prop" form:"selfpay_prop"`
2045
-	ItemId                 int64                  `gorm:"column:item_id" json:"item_id" form:"item_id"`
2046
-	FulamtOwnpayAmt        float64                `gorm:"column:fulamt_ownpay_amt" json:"fulamt_ownpay_amt" form:"fulamt_ownpay_amt"`
2029
+	ID               int64   `gorm:"column:id" json:"id" form:"id"`
2030
+	OrderNumber      string  `gorm:"column:order_number" json:"order_number" form:"order_number"`
2031
+	UploadDate       int64   `gorm:"column:upload_date" json:"upload_date" form:"upload_date"`
2032
+	AdviceId         int64   `gorm:"column:advice_id" json:"advice_id" form:"advice_id"`
2033
+	DetItemFeeSumamt float64 `gorm:"column:det_item_fee_sumamt" json:"det_item_fee_sumamt" form:"det_item_fee_sumamt"`
2034
+	Cnt              float64 `gorm:"column:cnt" json:"cnt" form:"cnt"`
2035
+	Pric             float64 `gorm:"column:pric" json:"pric" form:"pric"`
2036
+	PatientId        int64   `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
2037
+	MedChrgitmType   string  `gorm:"column:med_chrgitm_type" json:"med_chrgitm_type" form:"med_chrgitm_type"`
2038
+	Status           int64   `gorm:"column:status" json:"status" form:"status"`
2039
+	FeedetlSn        string  `gorm:"column:feedetl_sn" json:"feedetl_sn" form:"feedetl_sn"`
2040
+	ChldMedcFlag     string  `gorm:"column:chld_medc_flag" json:"chld_medc_flag" form:"chld_medc_flag"`
2041
+	ChrgitmLv        string  `gorm:"column:chrgitm_lv" json:"chrgitm_lv" form:"chrgitm_lv"`
2042
+	UserOrgId        int64   `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
2043
+	ProjectId        int64   `gorm:"column:project_id" json:"project_id" form:"project_id"`
2044
+	SelfpayProp      float64 `gorm:"column:selfpay_prop" json:"selfpay_prop" form:"selfpay_prop"`
2045
+	ItemId           int64   `gorm:"column:item_id" json:"item_id" form:"item_id"`
2046
+	FulamtOwnpayAmt  float64 `gorm:"column:fulamt_ownpay_amt" json:"fulamt_ownpay_amt" form:"fulamt_ownpay_amt"`
2047
+	OverlmtAmt       float64 `gorm:"column:overlmt_amt" json:"overlmt_amt" form:"overlmt_amt"`
2048
+	PreselfpayAmt    float64 `gorm:"column:preselfpay_amt" json:"preselfpay_amt" form:"preselfpay_amt"`
2049
+	InscpScpAmt      float64 `json:"inscp_scp_amt" json:"inscp_scp_amt" form:"inscp_scp_amt"`
2050
+
2047 2051
 	HisPrescriptionProject HisPrescriptionProject `gorm:"ForeignKey:ID;AssociationForeignKey:ProjectId" json:"project"`
2048 2052
 	HisDoctorAdviceInfo    HisDoctorAdviceInfo    `gorm:"ForeignKey:ID;AssociationForeignKey:AdviceId" json:"advice"`
2049 2053
 }
@@ -2869,23 +2873,27 @@ func UpDateOrderTwo(order *models.HisOrder, tx *gorm.DB) (err error) {
2869 2873
 }
2870 2874
 
2871 2875
 type HisOrderInfoTen struct {
2872
-	ID                     int64                      `gorm:"column:id" json:"id" form:"id"`
2873
-	OrderNumber            string                     `gorm:"column:order_number" json:"order_number" form:"order_number"`
2874
-	UploadDate             int64                      `gorm:"column:upload_date" json:"upload_date" form:"upload_date"`
2875
-	AdviceId               int64                      `gorm:"column:advice_id" json:"advice_id" form:"advice_id"`
2876
-	DetItemFeeSumamt       float64                    `gorm:"column:det_item_fee_sumamt" json:"det_item_fee_sumamt" form:"det_item_fee_sumamt"`
2877
-	Cnt                    float64                    `gorm:"column:cnt" json:"cnt" form:"cnt"`
2878
-	Pric                   float64                    `gorm:"column:pric" json:"pric" form:"pric"`
2879
-	PatientId              int64                      `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
2880
-	MedChrgitmType         string                     `gorm:"column:med_chrgitm_type" json:"med_chrgitm_type" form:"med_chrgitm_type"`
2881
-	Status                 int64                      `gorm:"column:status" json:"status" form:"status"`
2882
-	FeedetlSn              string                     `gorm:"column:feedetl_sn" json:"feedetl_sn" form:"feedetl_sn"`
2883
-	ChldMedcFlag           string                     `gorm:"column:chld_medc_flag" json:"chld_medc_flag" form:"chld_medc_flag"`
2884
-	ChrgitmLv              string                     `gorm:"column:chrgitm_lv" json:"chrgitm_lv" form:"chrgitm_lv"`
2885
-	UserOrgId              int64                      `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
2886
-	ProjectId              int64                      `gorm:"column:project_id" json:"project_id" form:"project_id"`
2887
-	ItemId                 int64                      `gorm:"column:item_id" json:"item_id" form:"item_id"`
2888
-	FulamtOwnpayAmt        float64                    `gorm:"column:fulamt_ownpay_amt" json:"fulamt_ownpay_amt" form:"fulamt_ownpay_amt"`
2876
+	ID               int64   `gorm:"column:id" json:"id" form:"id"`
2877
+	OrderNumber      string  `gorm:"column:order_number" json:"order_number" form:"order_number"`
2878
+	UploadDate       int64   `gorm:"column:upload_date" json:"upload_date" form:"upload_date"`
2879
+	AdviceId         int64   `gorm:"column:advice_id" json:"advice_id" form:"advice_id"`
2880
+	DetItemFeeSumamt float64 `gorm:"column:det_item_fee_sumamt" json:"det_item_fee_sumamt" form:"det_item_fee_sumamt"`
2881
+	Cnt              float64 `gorm:"column:cnt" json:"cnt" form:"cnt"`
2882
+	Pric             float64 `gorm:"column:pric" json:"pric" form:"pric"`
2883
+	PatientId        int64   `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
2884
+	MedChrgitmType   string  `gorm:"column:med_chrgitm_type" json:"med_chrgitm_type" form:"med_chrgitm_type"`
2885
+	Status           int64   `gorm:"column:status" json:"status" form:"status"`
2886
+	FeedetlSn        string  `gorm:"column:feedetl_sn" json:"feedetl_sn" form:"feedetl_sn"`
2887
+	ChldMedcFlag     string  `gorm:"column:chld_medc_flag" json:"chld_medc_flag" form:"chld_medc_flag"`
2888
+	ChrgitmLv        string  `gorm:"column:chrgitm_lv" json:"chrgitm_lv" form:"chrgitm_lv"`
2889
+	UserOrgId        int64   `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
2890
+	ProjectId        int64   `gorm:"column:project_id" json:"project_id" form:"project_id"`
2891
+	ItemId           int64   `gorm:"column:item_id" json:"item_id" form:"item_id"`
2892
+	FulamtOwnpayAmt  float64 `gorm:"column:fulamt_ownpay_amt" json:"fulamt_ownpay_amt" form:"fulamt_ownpay_amt"`
2893
+	OverlmtAmt       float64 `gorm:"column:overlmt_amt"`
2894
+	PreselfpayAmt    float64 `gorm:"column:preselfpay_amt" json:"preselfpay_amt" form:"preselfpay_amt"`
2895
+	InscpScpAmt      float64 `json:"inscp_scp_amt"`
2896
+
2889 2897
 	HisPrescriptionProject HisPrescriptionProject     `gorm:"ForeignKey:ID;AssociationForeignKey:ProjectId" json:"project"`
2890 2898
 	HisDoctorAdviceInfo    models.HisDoctorAdviceInfo `gorm:"ForeignKey:ID;AssociationForeignKey:AdviceId" json:"advice"`
2891 2899
 }
@@ -2925,23 +2933,28 @@ func GetHisPrescriptonProjectById(id int64) (models.HisPrescriptionProject, erro
2925 2933
 }
2926 2934
 
2927 2935
 type HisOrderInfoTwo struct {
2928
-	ID                     int64                      `gorm:"column:id" json:"id" form:"id"`
2929
-	OrderNumber            string                     `gorm:"column:order_number" json:"order_number" form:"order_number"`
2930
-	UploadDate             int64                      `gorm:"column:upload_date" json:"upload_date" form:"upload_date"`
2931
-	AdviceId               int64                      `gorm:"column:advice_id" json:"advice_id" form:"advice_id"`
2932
-	DetItemFeeSumamt       float64                    `gorm:"column:det_item_fee_sumamt" json:"det_item_fee_sumamt" form:"det_item_fee_sumamt"`
2933
-	Cnt                    float64                    `gorm:"column:cnt" json:"cnt" form:"cnt"`
2934
-	Pric                   float64                    `gorm:"column:pric" json:"pric" form:"pric"`
2935
-	PatientId              int64                      `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
2936
-	MedChrgitmType         string                     `gorm:"column:med_chrgitm_type" json:"med_chrgitm_type" form:"med_chrgitm_type"`
2937
-	Status                 int64                      `gorm:"column:status" json:"status" form:"status"`
2938
-	FeedetlSn              string                     `gorm:"column:feedetl_sn" json:"feedetl_sn" form:"feedetl_sn"`
2939
-	ChldMedcFlag           string                     `gorm:"column:chld_medc_flag" json:"chld_medc_flag" form:"chld_medc_flag"`
2940
-	ChrgitmLv              string                     `gorm:"column:chrgitm_lv" json:"chrgitm_lv" form:"chrgitm_lv"`
2941
-	UserOrgId              int64                      `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
2942
-	ProjectId              int64                      `gorm:"column:project_id" json:"project_id" form:"project_id"`
2943
-	ItemId                 int64                      `gorm:"column:item_id" json:"item_id" form:"item_id"`
2944
-	FulamtOwnpayAmt        float64                    `gorm:"column:fulamt_ownpay_amt" json:"fulamt_ownpay_amt" form:"fulamt_ownpay_amt"`
2936
+	ID               int64   `gorm:"column:id" json:"id" form:"id"`
2937
+	OrderNumber      string  `gorm:"column:order_number" json:"order_number" form:"order_number"`
2938
+	UploadDate       int64   `gorm:"column:upload_date" json:"upload_date" form:"upload_date"`
2939
+	AdviceId         int64   `gorm:"column:advice_id" json:"advice_id" form:"advice_id"`
2940
+	DetItemFeeSumamt float64 `gorm:"column:det_item_fee_sumamt" json:"det_item_fee_sumamt" form:"det_item_fee_sumamt"`
2941
+	Cnt              float64 `gorm:"column:cnt" json:"cnt" form:"cnt"`
2942
+	Pric             float64 `gorm:"column:pric" json:"pric" form:"pric"`
2943
+	PatientId        int64   `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
2944
+	MedChrgitmType   string  `gorm:"column:med_chrgitm_type" json:"med_chrgitm_type" form:"med_chrgitm_type"`
2945
+	Status           int64   `gorm:"column:status" json:"status" form:"status"`
2946
+	FeedetlSn        string  `gorm:"column:feedetl_sn" json:"feedetl_sn" form:"feedetl_sn"`
2947
+	ChldMedcFlag     string  `gorm:"column:chld_medc_flag" json:"chld_medc_flag" form:"chld_medc_flag"`
2948
+	ChrgitmLv        string  `gorm:"column:chrgitm_lv" json:"chrgitm_lv" form:"chrgitm_lv"`
2949
+	UserOrgId        int64   `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
2950
+	ProjectId        int64   `gorm:"column:project_id" json:"project_id" form:"project_id"`
2951
+	ItemId           int64   `gorm:"column:item_id" json:"item_id" form:"item_id"`
2952
+	FulamtOwnpayAmt  float64 `gorm:"column:fulamt_ownpay_amt" json:"fulamt_ownpay_amt" form:"fulamt_ownpay_amt"`
2953
+	OverlmtAmt       float64 `gorm:"column:overlmt_amt"`
2954
+	PreselfpayAmt    float64 `gorm:"column:preselfpay_amt" json:"preselfpay_amt" form:"preselfpay_amt"`
2955
+
2956
+	InscpScpAmt float64 `json:"inscp_scp_amt"`
2957
+
2945 2958
 	HisPrescriptionProject HisPrescriptionProject     `gorm:"ForeignKey:ID;AssociationForeignKey:ProjectId" json:"project"`
2946 2959
 	HisDoctorAdviceInfo    models.HisDoctorAdviceInfo `gorm:"ForeignKey:ID;AssociationForeignKey:AdviceId" json:"advice"`
2947 2960
 }