|
@@ -80,6 +80,8 @@ func HisManagerApiRegistRouters() {
|
80
|
80
|
|
81
|
81
|
beego.Router("/api/insutype/check", &HisApiController{}, "get:CheckInsutype")
|
82
|
82
|
|
|
83
|
+ beego.Router("/api/batchsettlelist/get", &HisApiController{}, "get:GetBatchSettleList")
|
|
84
|
+
|
83
|
85
|
//beego.Router("/api/settlelist/get", &HisApiController{}, "get:GetSettleList")
|
84
|
86
|
//beego.Router("/api/testinit", &HisApiController{}, "get:TestGetBasBaseInit")
|
85
|
87
|
//beego.Router("/api/test", &HisApiController{}, "get:TestGetBasBaseInfo")
|
|
@@ -886,11 +888,8 @@ func (c *HisApiController) GetSettleList() {
|
886
|
888
|
iteminfo.ClabAmt = treat_clab_amt
|
887
|
889
|
iteminfo.OthAmt = treat_other_amt
|
888
|
890
|
iteminfoStructs = append(iteminfoStructs, iteminfo)
|
889
|
|
-
|
890
|
|
- // (struct4101.IteminfoStruct, iteminfo)
|
891
|
|
-
|
|
891
|
+ //(struct4101.IteminfoStruct, iteminfo)
|
892
|
892
|
//struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
|
893
|
|
-
|
894
|
893
|
}
|
895
|
894
|
|
896
|
895
|
if operationCostTotal != 0 {
|
|
@@ -902,7 +901,6 @@ func (c *HisApiController) GetSettleList() {
|
902
|
901
|
iteminfo.OthAmt = operation_other_amt
|
903
|
902
|
//struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
|
904
|
903
|
iteminfoStructs = append(iteminfoStructs, iteminfo)
|
905
|
|
-
|
906
|
904
|
}
|
907
|
905
|
|
908
|
906
|
if materialCostTotal != 0 {
|
|
@@ -914,8 +912,8 @@ func (c *HisApiController) GetSettleList() {
|
914
|
912
|
iteminfo.OthAmt = material_other_amt
|
915
|
913
|
//struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
|
916
|
914
|
iteminfoStructs = append(iteminfoStructs, iteminfo)
|
917
|
|
-
|
918
|
915
|
}
|
|
916
|
+
|
919
|
917
|
if westernMedicineCostTotal != 0 {
|
920
|
918
|
iteminfo.MedChrgitm = "09"
|
921
|
919
|
iteminfo.FulamtOwnpayAmt = westernMedicine_fulamt_ownpay_amt
|
|
@@ -994,6 +992,736 @@ func (c *HisApiController) GetSettleList() {
|
994
|
992
|
}
|
995
|
993
|
}
|
996
|
994
|
|
|
995
|
+func (c *HisApiController) GetBatchSettleList() {
|
|
996
|
+ org_id, _ := beego.AppConfig.Int64("org_id")
|
|
997
|
+ orders, _ := service.GetAllHisOrder(org_id)
|
|
998
|
+ admin_user_id, _ := c.GetInt64("admin_user_id")
|
|
999
|
+
|
|
1000
|
+ for _, item := range orders {
|
|
1001
|
+ order_id := item.ID
|
|
1002
|
+ order, _ := service.GetHisOrderByIDTwo(order_id)
|
|
1003
|
+ roles, _ := service.GetDoctorListTwo(c.GetAdminUserInfo().CurrentOrgId)
|
|
1004
|
+ his, _ := service.GetHisPatientByNumber(order.MdtrtId)
|
|
1005
|
+ admin, _ := service.GetAdminUserByUserID(roles[0].AdminUserId)
|
|
1006
|
+ curRoles, _ := service.GetAdminUserInfoByID(c.GetAdminUserInfo().CurrentOrgId, admin_user_id)
|
|
1007
|
+ depart, _ := service.GetDepartMentDetail(curRoles.DepartmentId)
|
|
1008
|
+ miConfig, _ := service.FindMedicalInsuranceInfo(c.GetAdminUserInfo().CurrentOrgId)
|
|
1009
|
+
|
|
1010
|
+ if order.ID == 0 {
|
|
1011
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeHisOrderNoExistParamWrong)
|
|
1012
|
+ return
|
|
1013
|
+ }
|
|
1014
|
+ struct4101 := service.Struct4101{
|
|
1015
|
+ PsnNo: order.PsnNo,
|
|
1016
|
+ MdtrtId: order.MdtrtId,
|
|
1017
|
+ SetlId: order.SetlId,
|
|
1018
|
+ PsnName: order.PsnName,
|
|
1019
|
+ Gend: order.Gend,
|
|
1020
|
+ Brdy: his.Brdy,
|
|
1021
|
+ Age: his.Age,
|
|
1022
|
+ Naty: order.Naty,
|
|
1023
|
+ PatnCertType: "01",
|
|
1024
|
+ Certno: order.Certno,
|
|
1025
|
+ Prfs: "90",
|
|
1026
|
+ ConerName: roles[0].UserName,
|
|
1027
|
+ PatnRlts: "99",
|
|
1028
|
+ ConerAddr: miConfig.OrgName,
|
|
1029
|
+ ConerTel: admin.Mobile,
|
|
1030
|
+ HiType: order.Insutype,
|
|
1031
|
+ Insuplc: miConfig.InsuplcAdmdvs,
|
|
1032
|
+ MaindiagFlag: "1",
|
|
1033
|
+ BillCode: order.FaPiaoCode,
|
|
1034
|
+ BillNo: order.FaPiaoNumber,
|
|
1035
|
+ BizSn: order.Number,
|
|
1036
|
+ PsnSelfPay: order.PsnPartAmt,
|
|
1037
|
+ PsnOwnPay: order.PsnPartAmt,
|
|
1038
|
+ AcctPay: order.AcctPay,
|
|
1039
|
+ PsnCashpay: order.PsnCashPay,
|
|
1040
|
+ HiPaymtd: "1",
|
|
1041
|
+ Hsorg: miConfig.InsuplcAdmdvs,
|
|
1042
|
+ HsorgOpter: miConfig.InsuplcAdmdvs,
|
|
1043
|
+ MedinsFillPsn: curRoles.UserName,
|
|
1044
|
+ MedinsFillDept: depart.Name,
|
|
1045
|
+ IptMedType: "2",
|
|
1046
|
+ }
|
|
1047
|
+ struct4101.SetlBegnDate = order.SetlTime
|
|
1048
|
+ struct4101.SetlEndDate = order.SetlTime
|
|
1049
|
+ //if order.SettleType == 1 {
|
|
1050
|
+ // t := time.Unix(int64(order.SettleAccountsDate), 0)
|
|
1051
|
+ // dateStr := t.Format("2006-01-02")
|
|
1052
|
+ // struct4101.SetlBegnDate = dateStr
|
|
1053
|
+ // struct4101.SetlEndDate = dateStr
|
|
1054
|
+ //} else {
|
|
1055
|
+ // t := time.Unix(int64(order.SettleStartTime), 0)
|
|
1056
|
+ // t2 := time.Unix(int64(order.SettleEndTime), 0)
|
|
1057
|
+ // dateStartStr := t.Format("2006-01-02")
|
|
1058
|
+ // dateEndStr := t2.Format("2006-01-02")
|
|
1059
|
+ // struct4101.SetlBegnDate = dateStartStr
|
|
1060
|
+ // struct4101.SetlEndDate = dateEndStr
|
|
1061
|
+ //}
|
|
1062
|
+
|
|
1063
|
+ var rf []CustomFundPay
|
|
1064
|
+ json.Unmarshal([]byte(order.SetlDetail), &rf)
|
|
1065
|
+
|
|
1066
|
+ var tempFunPays []service.CustomStruct
|
|
1067
|
+ for _, item := range rf {
|
|
1068
|
+ var tempFunPay service.CustomStruct
|
|
1069
|
+ tempFunPay.FundPayamt = item.FundPayamt
|
|
1070
|
+ tempFunPay.FundPayType = item.FundPayType
|
|
1071
|
+ tempFunPays = append(tempFunPays, tempFunPay)
|
|
1072
|
+ }
|
|
1073
|
+ struct4101.CustomStruct = tempFunPays
|
|
1074
|
+
|
|
1075
|
+ var tempOpspdiseinfos []service.OpspdiseinfoStruct
|
|
1076
|
+ var tempOpspdiseinfo2 service.OpspdiseinfoStruct
|
|
1077
|
+ //sickConfig, _ := service.FindDiagnoseById(his.Diagnosis)
|
|
1078
|
+
|
|
1079
|
+ diagnosis_ids := strings.Split(his.Diagnosis, ",")
|
|
1080
|
+ var config []*models.HisXtDiagnoseConfig
|
|
1081
|
+ for _, item := range diagnosis_ids {
|
|
1082
|
+ id, _ := strconv.ParseInt(item, 10, 64)
|
|
1083
|
+ diagnosisConfig, _ := service.FindDiagnoseById(id)
|
|
1084
|
+ config = append(config, &diagnosisConfig)
|
|
1085
|
+ }
|
|
1086
|
+
|
|
1087
|
+ for _, item := range config {
|
|
1088
|
+ var tempOpspdiseinfo service.OpspdiseinfoStruct
|
|
1089
|
+ tempOpspdiseinfo.DiagCode = item.CountryCode
|
|
1090
|
+ tempOpspdiseinfo.DiagName = item.CountryContentName
|
|
1091
|
+ tempOpspdiseinfo.MaindiagFlag = "1"
|
|
1092
|
+ tempOpspdiseinfo.OprnOprtCode = ""
|
|
1093
|
+ tempOpspdiseinfo.OprnOprtName = ""
|
|
1094
|
+ tempOpspdiseinfos = append(tempOpspdiseinfos, tempOpspdiseinfo)
|
|
1095
|
+ }
|
|
1096
|
+
|
|
1097
|
+ sickConfigTwo, _ := service.FindSickById(his.SickType)
|
|
1098
|
+ tempOpspdiseinfo2.DiagCode = sickConfigTwo.ContentCode
|
|
1099
|
+ tempOpspdiseinfo2.DiagName = sickConfigTwo.CountryContentName
|
|
1100
|
+ tempOpspdiseinfo2.MaindiagFlag = "2"
|
|
1101
|
+ tempOpspdiseinfo2.OprnOprtCode = ""
|
|
1102
|
+ tempOpspdiseinfo2.OprnOprtName = ""
|
|
1103
|
+ tempOpspdiseinfos = append(tempOpspdiseinfos, tempOpspdiseinfo2)
|
|
1104
|
+ struct4101.OpspdiseinfoStruct = tempOpspdiseinfos
|
|
1105
|
+
|
|
1106
|
+ var iteminfo service.IteminfoStruct
|
|
1107
|
+
|
|
1108
|
+ var bedCostTotal float64 = 0 //床位总费
|
|
1109
|
+ var bedCostSelfTotal float64 = 0 //床位自费
|
|
1110
|
+ var bedCostPartSelfTotal float64 = 0 //床位部分项目自费
|
|
1111
|
+
|
|
1112
|
+ var examineCostTotal float64 = 0 //诊查总费
|
|
1113
|
+ var examineCostSelfTotal float64 = 0 //诊查自费
|
|
1114
|
+ var examineCostPartSelfTotal float64 = 0 //诊查部分项目自费
|
|
1115
|
+
|
|
1116
|
+ var nursingCostTotal float64 = 0 //护理总费
|
|
1117
|
+ var nursingCostSelfTotal float64 = 0 //护理自费
|
|
1118
|
+ var nursingCostPartSelfTotal float64 = 0 //护理部分项目自费
|
|
1119
|
+
|
|
1120
|
+ var chineseMedicineCostTotal float64 = 0 //中成药
|
|
1121
|
+ var chineseMedicineCostSelfTotal float64 = 0 //中成药
|
|
1122
|
+ var chineseMedicineCostPartSelfTotal float64 = 0 //中成药
|
|
1123
|
+
|
|
1124
|
+ var commonlyTreatmentCostTotal float64 = 0 //一般诊疗费
|
|
1125
|
+ var commonlyTreatmentCostSelfTotal float64 = 0 //一般诊疗费
|
|
1126
|
+ var commonlyTreatmentCostPartSelfTotal float64 = 0 //一般诊疗费
|
|
1127
|
+
|
|
1128
|
+ var registerCostTotal float64 = 0 //一般诊疗费
|
|
1129
|
+ var registerCostSelfTotal float64 = 0 //一般诊疗费
|
|
1130
|
+ var registerPartSelfTotal float64 = 0 //一般诊疗费
|
|
1131
|
+
|
|
1132
|
+ var operationCostTotal float64 = 0 //手术费
|
|
1133
|
+ var operationCostSelfTotal float64 = 0 //手术费
|
|
1134
|
+ var operationCostPartSelfTotal float64 = 0 //手术费
|
|
1135
|
+
|
|
1136
|
+ var otherCostTotal float64 = 0 //其他费用
|
|
1137
|
+ var otherCostSelfTotal float64 = 0 //其他费用
|
|
1138
|
+ var otherCostPartSelfTotal float64 = 0 //其他费用
|
|
1139
|
+
|
|
1140
|
+ var materialCostTotal float64 = 0 //材料费
|
|
1141
|
+ var materialCostSelfTotal float64 = 0 //材料费
|
|
1142
|
+ var materialCostPartSelfTotal float64 = 0 //材料费
|
|
1143
|
+
|
|
1144
|
+ var westernMedicineCostTotal float64 = 0 //西药费
|
|
1145
|
+ var westernMedicineCostSelfTotal float64 = 0 //西药费
|
|
1146
|
+ var westernMedicineCostPartSelfTotal float64 = 0 //西药费
|
|
1147
|
+
|
|
1148
|
+ var chineseTraditionalMedicineCostTotal float64 = 0 //中成药
|
|
1149
|
+ var chineseTraditionalMedicineCostSelfTotal float64 = 0 //中成药
|
|
1150
|
+ var chineseTraditionalMedicineCostPartSelfTotal float64 = 0 //中成药
|
|
1151
|
+
|
|
1152
|
+ var checkCostTotal float64 = 0 //检查费
|
|
1153
|
+ var checkCostSelfTotal float64 = 0 //检查费
|
|
1154
|
+ var checkCostPartSelfTotal float64 = 0 //检查费
|
|
1155
|
+
|
|
1156
|
+ var laboratoryCostTotal float64 = 0 //化验费
|
|
1157
|
+ var laboratoryCostSelfTotal float64 = 0 //化验费
|
|
1158
|
+ var laboratoryCostPartSelfTotal float64 = 0 //化验费
|
|
1159
|
+
|
|
1160
|
+ var treatCostTotal float64 = 0 //治疗费用
|
|
1161
|
+ var treatCostSelfTotal float64 = 0 //治疗费用
|
|
1162
|
+ var treatCostPartSelfTotal float64 = 0 //治疗费用
|
|
1163
|
+
|
|
1164
|
+ decimal.DivisionPrecision = 2
|
|
1165
|
+
|
|
1166
|
+ var bed_fulamt_ownpay_amt float64 = 0
|
|
1167
|
+
|
|
1168
|
+ var examine_fulamt_ownpay_amt float64 = 0
|
|
1169
|
+
|
|
1170
|
+ var nursing_fulamt_ownpay_amt float64 = 0
|
|
1171
|
+
|
|
1172
|
+ var chinese_medicine_fulamt_ownpay_amt float64 = 0
|
|
1173
|
+
|
|
1174
|
+ var commonly_treatment_fulamt_ownpay_amt float64 = 0
|
|
1175
|
+
|
|
1176
|
+ var register_fulamt_ownpay_amt float64 = 0
|
|
1177
|
+
|
|
1178
|
+ var operation_fulamt_ownpay_amt float64 = 0
|
|
1179
|
+ var other_fulamt_ownpay_amt float64 = 0
|
|
1180
|
+ var westernMedicine_fulamt_ownpay_amt float64 = 0
|
|
1181
|
+ var chineseTraditional_fulamt_ownpay_amt float64 = 0
|
|
1182
|
+ var check_fulamt_ownpay_amt float64 = 0
|
|
1183
|
+ var material_fulamt_ownpay_amt float64 = 0
|
|
1184
|
+ var laboratory_fulamt_ownpay_amt float64 = 0
|
|
1185
|
+ var treat_fulamt_ownpay_amt float64 = 0
|
|
1186
|
+
|
|
1187
|
+ var bed_claa_sunmfee float64 = 0
|
|
1188
|
+ var bed_clab_amt float64 = 0
|
|
1189
|
+ var bed_other_amt float64 = 0
|
|
1190
|
+
|
|
1191
|
+ var examine_claa_sunmfee float64 = 0
|
|
1192
|
+ var examine_clab_amt float64 = 0
|
|
1193
|
+ var examine_other_amt float64 = 0
|
|
1194
|
+
|
|
1195
|
+ var nursing_claa_sunmfee float64 = 0
|
|
1196
|
+ var nursing_clab_amt float64 = 0
|
|
1197
|
+ var nursing_other_amt float64 = 0
|
|
1198
|
+
|
|
1199
|
+ var chinese_medicine_claa_sunmfee float64 = 0
|
|
1200
|
+ var chinese_medicine_clab_amt float64 = 0
|
|
1201
|
+ var chinese_medicine_other_amt float64 = 0
|
|
1202
|
+
|
|
1203
|
+ var commonly_treatment_claa_sunmfee float64 = 0
|
|
1204
|
+ var commonly_treatment_clab_amt float64 = 0
|
|
1205
|
+ var commonly_treatment_other_amt float64 = 0
|
|
1206
|
+
|
|
1207
|
+ var operation_claa_sunmfee float64 = 0
|
|
1208
|
+ var operation_clab_amt float64 = 0
|
|
1209
|
+ var operation_other_amt float64 = 0
|
|
1210
|
+
|
|
1211
|
+ var other_claa_sunmfee float64 = 0
|
|
1212
|
+ var other_clab_amt float64 = 0
|
|
1213
|
+ var other_other_amt float64 = 0
|
|
1214
|
+
|
|
1215
|
+ var westernMedicine_claa_sunmfee float64 = 0
|
|
1216
|
+ var westernMedicine_clab_amt float64 = 0
|
|
1217
|
+ var westernMedicine_other_amt float64 = 0
|
|
1218
|
+
|
|
1219
|
+ var chineseTraditional_claa_sunmfee float64 = 0
|
|
1220
|
+ var chineseTraditional_clab_amt float64 = 0
|
|
1221
|
+ var chineseTraditional_other_amt float64 = 0
|
|
1222
|
+
|
|
1223
|
+ var check_claa_sunmfee float64 = 0
|
|
1224
|
+ var check_clab_amt float64 = 0
|
|
1225
|
+ var check_other_amt float64 = 0
|
|
1226
|
+
|
|
1227
|
+ var material_claa_sunmfee float64 = 0
|
|
1228
|
+ var material_clab_amt float64 = 0
|
|
1229
|
+ var material_other_amt float64 = 0
|
|
1230
|
+
|
|
1231
|
+ var laboratory_claa_sunmfee float64 = 0
|
|
1232
|
+ var laboratory_clab_amt float64 = 0
|
|
1233
|
+ var laboratory_other_amt float64 = 0
|
|
1234
|
+
|
|
1235
|
+ var treat_claa_sunmfee float64 = 0
|
|
1236
|
+ var treat_clab_amt float64 = 0
|
|
1237
|
+ var treat_other_amt float64 = 0
|
|
1238
|
+
|
|
1239
|
+ var register_claa_sunmfee float64 = 0
|
|
1240
|
+ var register_clab_amt float64 = 0
|
|
1241
|
+ var register_other_amt float64 = 0
|
|
1242
|
+
|
|
1243
|
+ for _, item := range order.HisOrderInfo {
|
|
1244
|
+ if item.MedChrgitmType == "01" { //床位费
|
|
1245
|
+ bedCostTotal, _ = decimal.NewFromFloat(bedCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
1246
|
+ bedCostSelfTotal, _ = decimal.NewFromFloat(bedCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
|
|
1247
|
+ bedCostPartSelfTotal, _ = decimal.NewFromFloat(bedCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
|
|
1248
|
+ bed_fulamt_ownpay_amt, _ = decimal.NewFromFloat(bed_fulamt_ownpay_amt).Add(decimal.NewFromFloat(item.FulamtOwnpayAmt)).Float64()
|
|
1249
|
+ if item.ChrgitmLv == "1" {
|
|
1250
|
+ bed_claa_sunmfee, _ = decimal.NewFromFloat(bed_claa_sunmfee).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
1251
|
+ }
|
|
1252
|
+ if item.ChrgitmLv == "2" {
|
|
1253
|
+ bed_clab_amt, _ = decimal.NewFromFloat(bed_clab_amt).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
|
|
1254
|
+
|
|
1255
|
+ }
|
|
1256
|
+ if item.ChrgitmLv == "3" {
|
|
1257
|
+ bed_other_amt, _ = decimal.NewFromFloat(bed_other_amt).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
|
|
1258
|
+ }
|
|
1259
|
+
|
|
1260
|
+ }
|
|
1261
|
+
|
|
1262
|
+ if item.MedChrgitmType == "02" { //诊查
|
|
1263
|
+ examineCostTotal, _ = decimal.NewFromFloat(examineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
1264
|
+ examineCostSelfTotal, _ = decimal.NewFromFloat(examineCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
|
|
1265
|
+ examineCostPartSelfTotal, _ = decimal.NewFromFloat(examineCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
|
|
1266
|
+ examine_fulamt_ownpay_amt, _ = decimal.NewFromFloat(examine_fulamt_ownpay_amt).Add(decimal.NewFromFloat(item.FulamtOwnpayAmt)).Float64()
|
|
1267
|
+ if item.ChrgitmLv == "1" {
|
|
1268
|
+ examine_claa_sunmfee, _ = decimal.NewFromFloat(examine_claa_sunmfee).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
1269
|
+ }
|
|
1270
|
+ if item.ChrgitmLv == "2" {
|
|
1271
|
+ examine_clab_amt, _ = decimal.NewFromFloat(examine_clab_amt).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
|
|
1272
|
+
|
|
1273
|
+ }
|
|
1274
|
+ if item.ChrgitmLv == "3" {
|
|
1275
|
+ examine_other_amt, _ = decimal.NewFromFloat(examine_other_amt).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
|
|
1276
|
+ }
|
|
1277
|
+
|
|
1278
|
+ }
|
|
1279
|
+
|
|
1280
|
+ if item.MedChrgitmType == "03" { //检查费
|
|
1281
|
+ checkCostTotal, _ = decimal.NewFromFloat(checkCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
1282
|
+ checkCostSelfTotal, _ = decimal.NewFromFloat(checkCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
|
|
1283
|
+ checkCostPartSelfTotal, _ = decimal.NewFromFloat(checkCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
|
|
1284
|
+ check_fulamt_ownpay_amt, _ = decimal.NewFromFloat(check_fulamt_ownpay_amt).Add(decimal.NewFromFloat(item.FulamtOwnpayAmt)).Float64()
|
|
1285
|
+ if item.ChrgitmLv == "1" {
|
|
1286
|
+
|
|
1287
|
+ check_claa_sunmfee, _ = decimal.NewFromFloat(check_claa_sunmfee).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
1288
|
+
|
|
1289
|
+ }
|
|
1290
|
+ if item.ChrgitmLv == "2" {
|
|
1291
|
+ check_clab_amt, _ = decimal.NewFromFloat(check_clab_amt).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
|
|
1292
|
+
|
|
1293
|
+ }
|
|
1294
|
+ if item.ChrgitmLv == "3" {
|
|
1295
|
+ check_other_amt, _ = decimal.NewFromFloat(check_other_amt).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
|
|
1296
|
+ }
|
|
1297
|
+ }
|
|
1298
|
+
|
|
1299
|
+ if item.MedChrgitmType == "04" { //化验费
|
|
1300
|
+ laboratoryCostTotal, _ = decimal.NewFromFloat(laboratoryCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
1301
|
+ laboratoryCostSelfTotal, _ = decimal.NewFromFloat(laboratoryCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
|
|
1302
|
+ laboratoryCostPartSelfTotal, _ = decimal.NewFromFloat(laboratoryCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
|
|
1303
|
+ laboratory_fulamt_ownpay_amt, _ = decimal.NewFromFloat(laboratory_fulamt_ownpay_amt).Add(decimal.NewFromFloat(item.FulamtOwnpayAmt)).Float64()
|
|
1304
|
+ if item.ChrgitmLv == "1" {
|
|
1305
|
+
|
|
1306
|
+ laboratory_claa_sunmfee, _ = decimal.NewFromFloat(laboratory_claa_sunmfee).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
1307
|
+
|
|
1308
|
+ }
|
|
1309
|
+ if item.ChrgitmLv == "2" {
|
|
1310
|
+ laboratory_clab_amt, _ = decimal.NewFromFloat(laboratory_clab_amt).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
|
|
1311
|
+
|
|
1312
|
+ }
|
|
1313
|
+ if item.ChrgitmLv == "3" {
|
|
1314
|
+ laboratory_other_amt, _ = decimal.NewFromFloat(laboratory_other_amt).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
|
|
1315
|
+ }
|
|
1316
|
+ }
|
|
1317
|
+
|
|
1318
|
+ if item.MedChrgitmType == "05" { //治疗费
|
|
1319
|
+ treatCostTotal, _ = decimal.NewFromFloat(treatCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
1320
|
+ treatCostSelfTotal, _ = decimal.NewFromFloat(treatCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
|
|
1321
|
+ treatCostPartSelfTotal, _ = decimal.NewFromFloat(treatCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
|
|
1322
|
+ treat_fulamt_ownpay_amt, _ = decimal.NewFromFloat(treat_fulamt_ownpay_amt).Add(decimal.NewFromFloat(item.FulamtOwnpayAmt)).Float64()
|
|
1323
|
+ if item.ChrgitmLv == "1" {
|
|
1324
|
+
|
|
1325
|
+ treat_claa_sunmfee, _ = decimal.NewFromFloat(treat_claa_sunmfee).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
1326
|
+
|
|
1327
|
+ }
|
|
1328
|
+ if item.ChrgitmLv == "2" {
|
|
1329
|
+ treat_clab_amt, _ = decimal.NewFromFloat(treat_clab_amt).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
|
|
1330
|
+
|
|
1331
|
+ }
|
|
1332
|
+ if item.ChrgitmLv == "3" {
|
|
1333
|
+ treat_other_amt, _ = decimal.NewFromFloat(treat_other_amt).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
|
|
1334
|
+ }
|
|
1335
|
+ }
|
|
1336
|
+
|
|
1337
|
+ if item.MedChrgitmType == "06" { //手术费
|
|
1338
|
+ operationCostTotal, _ = decimal.NewFromFloat(operationCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
1339
|
+ operationCostSelfTotal, _ = decimal.NewFromFloat(operationCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
|
|
1340
|
+ operationCostPartSelfTotal, _ = decimal.NewFromFloat(operationCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
|
|
1341
|
+ operation_fulamt_ownpay_amt, _ = decimal.NewFromFloat(operation_fulamt_ownpay_amt).Add(decimal.NewFromFloat(item.FulamtOwnpayAmt)).Float64()
|
|
1342
|
+
|
|
1343
|
+ if item.ChrgitmLv == "1" {
|
|
1344
|
+
|
|
1345
|
+ operation_claa_sunmfee, _ = decimal.NewFromFloat(operation_claa_sunmfee).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
1346
|
+
|
|
1347
|
+ }
|
|
1348
|
+ if item.ChrgitmLv == "2" {
|
|
1349
|
+ operation_clab_amt, _ = decimal.NewFromFloat(operation_clab_amt).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
|
|
1350
|
+
|
|
1351
|
+ }
|
|
1352
|
+ if item.ChrgitmLv == "3" {
|
|
1353
|
+ operation_other_amt, _ = decimal.NewFromFloat(operation_other_amt).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
|
|
1354
|
+ }
|
|
1355
|
+ }
|
|
1356
|
+
|
|
1357
|
+ if item.MedChrgitmType == "07" { //手术费
|
|
1358
|
+ nursingCostTotal, _ = decimal.NewFromFloat(nursingCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
1359
|
+ nursingCostSelfTotal, _ = decimal.NewFromFloat(nursingCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
|
|
1360
|
+ nursingCostPartSelfTotal, _ = decimal.NewFromFloat(nursingCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
|
|
1361
|
+ nursing_fulamt_ownpay_amt, _ = decimal.NewFromFloat(nursing_fulamt_ownpay_amt).Add(decimal.NewFromFloat(item.FulamtOwnpayAmt)).Float64()
|
|
1362
|
+
|
|
1363
|
+ if item.ChrgitmLv == "1" {
|
|
1364
|
+
|
|
1365
|
+ nursing_claa_sunmfee, _ = decimal.NewFromFloat(nursing_claa_sunmfee).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
1366
|
+
|
|
1367
|
+ }
|
|
1368
|
+ if item.ChrgitmLv == "2" {
|
|
1369
|
+ nursing_clab_amt, _ = decimal.NewFromFloat(nursing_clab_amt).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
|
|
1370
|
+
|
|
1371
|
+ }
|
|
1372
|
+ if item.ChrgitmLv == "3" {
|
|
1373
|
+ nursing_other_amt, _ = decimal.NewFromFloat(nursing_other_amt).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
|
|
1374
|
+ }
|
|
1375
|
+ }
|
|
1376
|
+
|
|
1377
|
+ if item.MedChrgitmType == "08" { //材料费
|
|
1378
|
+ materialCostTotal, _ = decimal.NewFromFloat(materialCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
1379
|
+ materialCostSelfTotal, _ = decimal.NewFromFloat(materialCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
|
|
1380
|
+ materialCostPartSelfTotal, _ = decimal.NewFromFloat(materialCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
|
|
1381
|
+ material_fulamt_ownpay_amt, _ = decimal.NewFromFloat(material_fulamt_ownpay_amt).Add(decimal.NewFromFloat(item.FulamtOwnpayAmt)).Float64()
|
|
1382
|
+ if item.ChrgitmLv == "1" {
|
|
1383
|
+
|
|
1384
|
+ material_claa_sunmfee, _ = decimal.NewFromFloat(material_claa_sunmfee).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
1385
|
+
|
|
1386
|
+ }
|
|
1387
|
+ if item.ChrgitmLv == "2" {
|
|
1388
|
+ material_clab_amt, _ = decimal.NewFromFloat(material_clab_amt).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
|
|
1389
|
+
|
|
1390
|
+ }
|
|
1391
|
+ if item.ChrgitmLv == "3" {
|
|
1392
|
+ material_other_amt, _ = decimal.NewFromFloat(material_other_amt).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
|
|
1393
|
+ }
|
|
1394
|
+ }
|
|
1395
|
+
|
|
1396
|
+ if item.MedChrgitmType == "09" { //西药费
|
|
1397
|
+ westernMedicineCostTotal, _ = decimal.NewFromFloat(westernMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
1398
|
+ westernMedicineCostSelfTotal, _ = decimal.NewFromFloat(westernMedicineCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
|
|
1399
|
+ westernMedicineCostPartSelfTotal, _ = decimal.NewFromFloat(westernMedicineCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
|
|
1400
|
+ westernMedicine_fulamt_ownpay_amt, _ = decimal.NewFromFloat(westernMedicine_fulamt_ownpay_amt).Add(decimal.NewFromFloat(item.FulamtOwnpayAmt)).Float64()
|
|
1401
|
+ if item.ChrgitmLv == "1" {
|
|
1402
|
+
|
|
1403
|
+ westernMedicine_claa_sunmfee, _ = decimal.NewFromFloat(westernMedicine_claa_sunmfee).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
1404
|
+
|
|
1405
|
+ }
|
|
1406
|
+ if item.ChrgitmLv == "2" {
|
|
1407
|
+ westernMedicine_clab_amt, _ = decimal.NewFromFloat(westernMedicine_clab_amt).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
|
|
1408
|
+
|
|
1409
|
+ }
|
|
1410
|
+ if item.ChrgitmLv == "3" {
|
|
1411
|
+ westernMedicine_other_amt, _ = decimal.NewFromFloat(westernMedicine_other_amt).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
|
|
1412
|
+ }
|
|
1413
|
+ }
|
|
1414
|
+
|
|
1415
|
+ if item.MedChrgitmType == "10" { //中药饮片
|
|
1416
|
+ chineseMedicineCostTotal, _ = decimal.NewFromFloat(chineseMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
1417
|
+ chineseMedicineCostSelfTotal, _ = decimal.NewFromFloat(chineseMedicineCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
|
|
1418
|
+ chineseMedicineCostPartSelfTotal, _ = decimal.NewFromFloat(chineseMedicineCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
|
|
1419
|
+ chinese_medicine_fulamt_ownpay_amt, _ = decimal.NewFromFloat(chinese_medicine_fulamt_ownpay_amt).Add(decimal.NewFromFloat(item.FulamtOwnpayAmt)).Float64()
|
|
1420
|
+ if item.ChrgitmLv == "1" {
|
|
1421
|
+
|
|
1422
|
+ chinese_medicine_claa_sunmfee, _ = decimal.NewFromFloat(chinese_medicine_claa_sunmfee).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
1423
|
+
|
|
1424
|
+ }
|
|
1425
|
+ if item.ChrgitmLv == "2" {
|
|
1426
|
+ chinese_medicine_clab_amt, _ = decimal.NewFromFloat(chinese_medicine_clab_amt).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
|
|
1427
|
+
|
|
1428
|
+ }
|
|
1429
|
+ if item.ChrgitmLv == "3" {
|
|
1430
|
+ chinese_medicine_other_amt, _ = decimal.NewFromFloat(chinese_medicine_other_amt).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
|
|
1431
|
+ }
|
|
1432
|
+ }
|
|
1433
|
+
|
|
1434
|
+ if item.MedChrgitmType == "11" { //中成费
|
|
1435
|
+ chineseTraditionalMedicineCostTotal, _ = decimal.NewFromFloat(chineseTraditionalMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
1436
|
+ chineseTraditionalMedicineCostSelfTotal, _ = decimal.NewFromFloat(chineseTraditionalMedicineCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
|
|
1437
|
+ chineseTraditionalMedicineCostPartSelfTotal, _ = decimal.NewFromFloat(chineseTraditionalMedicineCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
|
|
1438
|
+ chineseTraditional_fulamt_ownpay_amt, _ = decimal.NewFromFloat(chineseTraditional_fulamt_ownpay_amt).Add(decimal.NewFromFloat(item.FulamtOwnpayAmt)).Float64()
|
|
1439
|
+ if item.ChrgitmLv == "1" {
|
|
1440
|
+
|
|
1441
|
+ chineseTraditional_claa_sunmfee, _ = decimal.NewFromFloat(chineseTraditional_claa_sunmfee).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
1442
|
+
|
|
1443
|
+ }
|
|
1444
|
+ if item.ChrgitmLv == "2" {
|
|
1445
|
+ chineseTraditional_clab_amt, _ = decimal.NewFromFloat(chineseTraditional_clab_amt).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
|
|
1446
|
+
|
|
1447
|
+ }
|
|
1448
|
+ if item.ChrgitmLv == "3" {
|
|
1449
|
+ chineseTraditional_other_amt, _ = decimal.NewFromFloat(chineseTraditional_other_amt).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
|
|
1450
|
+ }
|
|
1451
|
+ }
|
|
1452
|
+
|
|
1453
|
+ if item.MedChrgitmType == "12" { //中成费
|
|
1454
|
+ commonlyTreatmentCostTotal, _ = decimal.NewFromFloat(commonlyTreatmentCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
1455
|
+ commonlyTreatmentCostSelfTotal, _ = decimal.NewFromFloat(commonlyTreatmentCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
|
|
1456
|
+ commonlyTreatmentCostPartSelfTotal, _ = decimal.NewFromFloat(commonlyTreatmentCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
|
|
1457
|
+ commonly_treatment_fulamt_ownpay_amt, _ = decimal.NewFromFloat(commonly_treatment_fulamt_ownpay_amt).Add(decimal.NewFromFloat(item.FulamtOwnpayAmt)).Float64()
|
|
1458
|
+ if item.ChrgitmLv == "1" {
|
|
1459
|
+
|
|
1460
|
+ commonly_treatment_claa_sunmfee, _ = decimal.NewFromFloat(commonly_treatment_claa_sunmfee).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
1461
|
+
|
|
1462
|
+ }
|
|
1463
|
+ if item.ChrgitmLv == "2" {
|
|
1464
|
+ commonly_treatment_clab_amt, _ = decimal.NewFromFloat(commonly_treatment_clab_amt).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
|
|
1465
|
+
|
|
1466
|
+ }
|
|
1467
|
+ if item.ChrgitmLv == "3" {
|
|
1468
|
+ commonly_treatment_other_amt, _ = decimal.NewFromFloat(commonly_treatment_other_amt).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
|
|
1469
|
+ }
|
|
1470
|
+ }
|
|
1471
|
+
|
|
1472
|
+ if item.MedChrgitmType == "13" { //中成费
|
|
1473
|
+ registerCostTotal, _ = decimal.NewFromFloat(registerCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
1474
|
+ registerCostSelfTotal, _ = decimal.NewFromFloat(registerCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
|
|
1475
|
+ registerPartSelfTotal, _ = decimal.NewFromFloat(registerPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
|
|
1476
|
+ register_fulamt_ownpay_amt, _ = decimal.NewFromFloat(register_fulamt_ownpay_amt).Add(decimal.NewFromFloat(item.FulamtOwnpayAmt)).Float64()
|
|
1477
|
+ if item.ChrgitmLv == "1" {
|
|
1478
|
+
|
|
1479
|
+ register_claa_sunmfee, _ = decimal.NewFromFloat(register_claa_sunmfee).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
1480
|
+
|
|
1481
|
+ }
|
|
1482
|
+ if item.ChrgitmLv == "2" {
|
|
1483
|
+ register_clab_amt, _ = decimal.NewFromFloat(register_clab_amt).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
|
|
1484
|
+
|
|
1485
|
+ }
|
|
1486
|
+ if item.ChrgitmLv == "3" {
|
|
1487
|
+ register_other_amt, _ = decimal.NewFromFloat(register_other_amt).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
|
|
1488
|
+ }
|
|
1489
|
+ }
|
|
1490
|
+
|
|
1491
|
+ if item.MedChrgitmType == "14" { //其他费
|
|
1492
|
+ otherCostTotal, _ = decimal.NewFromFloat(otherCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
1493
|
+ otherCostSelfTotal, _ = decimal.NewFromFloat(otherCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
|
|
1494
|
+ otherCostPartSelfTotal, _ = decimal.NewFromFloat(otherCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
|
|
1495
|
+ other_fulamt_ownpay_amt, _ = decimal.NewFromFloat(other_fulamt_ownpay_amt).Add(decimal.NewFromFloat(item.FulamtOwnpayAmt)).Float64()
|
|
1496
|
+ if item.ChrgitmLv == "1" {
|
|
1497
|
+ other_claa_sunmfee, _ = decimal.NewFromFloat(other_claa_sunmfee).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
1498
|
+
|
|
1499
|
+ }
|
|
1500
|
+ if item.ChrgitmLv == "2" {
|
|
1501
|
+ other_clab_amt, _ = decimal.NewFromFloat(other_clab_amt).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
|
|
1502
|
+
|
|
1503
|
+ }
|
|
1504
|
+ if item.ChrgitmLv == "3" {
|
|
1505
|
+ other_other_amt, _ = decimal.NewFromFloat(other_other_amt).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
|
|
1506
|
+ }
|
|
1507
|
+ }
|
|
1508
|
+
|
|
1509
|
+ }
|
|
1510
|
+
|
|
1511
|
+ var iteminfoStructs []service.IteminfoStruct
|
|
1512
|
+
|
|
1513
|
+ if bedCostTotal != 0 {
|
|
1514
|
+ iteminfo.MedChrgitm = "01"
|
|
1515
|
+ iteminfo.FulamtOwnpayAmt = bed_fulamt_ownpay_amt
|
|
1516
|
+ iteminfo.Amt = bedCostTotal
|
|
1517
|
+ iteminfo.ClaaSumfee = bed_claa_sunmfee
|
|
1518
|
+ iteminfo.ClabAmt = bed_clab_amt
|
|
1519
|
+ iteminfo.OthAmt = bed_other_amt
|
|
1520
|
+ iteminfoStructs = append(iteminfoStructs, iteminfo)
|
|
1521
|
+ }
|
|
1522
|
+
|
|
1523
|
+ if examineCostTotal != 0 {
|
|
1524
|
+ iteminfo.MedChrgitm = "02"
|
|
1525
|
+ iteminfo.FulamtOwnpayAmt = examine_fulamt_ownpay_amt
|
|
1526
|
+ iteminfo.Amt = examineCostTotal
|
|
1527
|
+ iteminfo.ClaaSumfee = examine_claa_sunmfee
|
|
1528
|
+ iteminfo.ClabAmt = examine_clab_amt
|
|
1529
|
+ iteminfo.OthAmt = examine_other_amt
|
|
1530
|
+ //struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
|
|
1531
|
+ iteminfoStructs = append(iteminfoStructs, iteminfo)
|
|
1532
|
+ }
|
|
1533
|
+
|
|
1534
|
+ if checkCostTotal != 0 {
|
|
1535
|
+ iteminfo.MedChrgitm = "03"
|
|
1536
|
+ iteminfo.FulamtOwnpayAmt = check_fulamt_ownpay_amt
|
|
1537
|
+ iteminfo.Amt = checkCostTotal
|
|
1538
|
+ iteminfo.ClaaSumfee = check_claa_sunmfee
|
|
1539
|
+ iteminfo.ClabAmt = check_clab_amt
|
|
1540
|
+ iteminfo.OthAmt = check_other_amt
|
|
1541
|
+ iteminfoStructs = append(iteminfoStructs, iteminfo)
|
|
1542
|
+
|
|
1543
|
+ }
|
|
1544
|
+
|
|
1545
|
+ if laboratoryCostTotal != 0 {
|
|
1546
|
+ iteminfo.MedChrgitm = "04"
|
|
1547
|
+ iteminfo.FulamtOwnpayAmt = laboratory_fulamt_ownpay_amt
|
|
1548
|
+ iteminfo.Amt = laboratoryCostTotal
|
|
1549
|
+ iteminfo.ClaaSumfee = laboratory_claa_sunmfee
|
|
1550
|
+ iteminfo.ClabAmt = laboratory_clab_amt
|
|
1551
|
+ iteminfo.OthAmt = laboratory_other_amt
|
|
1552
|
+ iteminfoStructs = append(iteminfoStructs, iteminfo)
|
|
1553
|
+
|
|
1554
|
+ //struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
|
|
1555
|
+
|
|
1556
|
+ }
|
|
1557
|
+
|
|
1558
|
+ if treatCostTotal != 0 {
|
|
1559
|
+ iteminfo.MedChrgitm = "05"
|
|
1560
|
+ iteminfo.FulamtOwnpayAmt = treat_fulamt_ownpay_amt
|
|
1561
|
+ iteminfo.Amt = treatCostTotal
|
|
1562
|
+ iteminfo.ClaaSumfee = treat_claa_sunmfee
|
|
1563
|
+ iteminfo.ClabAmt = treat_clab_amt
|
|
1564
|
+ iteminfo.OthAmt = treat_other_amt
|
|
1565
|
+ iteminfoStructs = append(iteminfoStructs, iteminfo)
|
|
1566
|
+ //(struct4101.IteminfoStruct, iteminfo)
|
|
1567
|
+ //struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
|
|
1568
|
+ }
|
|
1569
|
+
|
|
1570
|
+ if operationCostTotal != 0 {
|
|
1571
|
+ iteminfo.MedChrgitm = "06"
|
|
1572
|
+ iteminfo.FulamtOwnpayAmt = bed_fulamt_ownpay_amt
|
|
1573
|
+ iteminfo.Amt = operationCostTotal
|
|
1574
|
+ iteminfo.ClaaSumfee = operation_claa_sunmfee
|
|
1575
|
+ iteminfo.ClabAmt = operation_clab_amt
|
|
1576
|
+ iteminfo.OthAmt = operation_other_amt
|
|
1577
|
+ //struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
|
|
1578
|
+ iteminfoStructs = append(iteminfoStructs, iteminfo)
|
|
1579
|
+ }
|
|
1580
|
+
|
|
1581
|
+ if nursingCostTotal != 0 {
|
|
1582
|
+ iteminfo.MedChrgitm = "07"
|
|
1583
|
+ iteminfo.FulamtOwnpayAmt = nursing_fulamt_ownpay_amt
|
|
1584
|
+ iteminfo.Amt = nursingCostTotal
|
|
1585
|
+ iteminfo.ClaaSumfee = nursing_claa_sunmfee
|
|
1586
|
+ iteminfo.ClabAmt = nursing_clab_amt
|
|
1587
|
+ iteminfo.OthAmt = nursing_other_amt
|
|
1588
|
+ iteminfoStructs = append(iteminfoStructs, iteminfo)
|
|
1589
|
+ }
|
|
1590
|
+
|
|
1591
|
+ if materialCostTotal != 0 {
|
|
1592
|
+ iteminfo.MedChrgitm = "08"
|
|
1593
|
+ iteminfo.FulamtOwnpayAmt = material_fulamt_ownpay_amt
|
|
1594
|
+ iteminfo.Amt = materialCostTotal
|
|
1595
|
+ iteminfo.ClaaSumfee = material_claa_sunmfee
|
|
1596
|
+ iteminfo.ClabAmt = material_clab_amt
|
|
1597
|
+ iteminfo.OthAmt = material_other_amt
|
|
1598
|
+ //struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
|
|
1599
|
+ iteminfoStructs = append(iteminfoStructs, iteminfo)
|
|
1600
|
+ }
|
|
1601
|
+
|
|
1602
|
+ if westernMedicineCostTotal != 0 {
|
|
1603
|
+ iteminfo.MedChrgitm = "09"
|
|
1604
|
+ iteminfo.FulamtOwnpayAmt = westernMedicine_fulamt_ownpay_amt
|
|
1605
|
+ iteminfo.Amt = westernMedicineCostTotal
|
|
1606
|
+ iteminfo.ClaaSumfee = westernMedicine_claa_sunmfee
|
|
1607
|
+ iteminfo.ClabAmt = westernMedicine_clab_amt
|
|
1608
|
+ iteminfo.OthAmt = westernMedicine_other_amt
|
|
1609
|
+ //struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
|
|
1610
|
+ iteminfoStructs = append(iteminfoStructs, iteminfo)
|
|
1611
|
+
|
|
1612
|
+ }
|
|
1613
|
+
|
|
1614
|
+ if chineseMedicineCostTotal != 0 {
|
|
1615
|
+ iteminfo.MedChrgitm = "10"
|
|
1616
|
+ iteminfo.FulamtOwnpayAmt = chinese_medicine_fulamt_ownpay_amt
|
|
1617
|
+ iteminfo.Amt = chineseMedicineCostTotal
|
|
1618
|
+ iteminfo.ClaaSumfee = chinese_medicine_claa_sunmfee
|
|
1619
|
+ iteminfo.ClabAmt = chinese_medicine_clab_amt
|
|
1620
|
+ iteminfo.OthAmt = chinese_medicine_other_amt
|
|
1621
|
+ //struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
|
|
1622
|
+ iteminfoStructs = append(iteminfoStructs, iteminfo)
|
|
1623
|
+
|
|
1624
|
+ }
|
|
1625
|
+
|
|
1626
|
+ if chineseTraditionalMedicineCostTotal != 0 {
|
|
1627
|
+ iteminfo.MedChrgitm = "11"
|
|
1628
|
+ iteminfo.FulamtOwnpayAmt = westernMedicine_fulamt_ownpay_amt
|
|
1629
|
+ iteminfo.Amt = westernMedicineCostTotal
|
|
1630
|
+ iteminfo.ClaaSumfee = westernMedicine_claa_sunmfee
|
|
1631
|
+ iteminfo.ClabAmt = westernMedicine_clab_amt
|
|
1632
|
+ iteminfo.OthAmt = westernMedicine_other_amt
|
|
1633
|
+ //struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
|
|
1634
|
+ iteminfoStructs = append(iteminfoStructs, iteminfo)
|
|
1635
|
+
|
|
1636
|
+ }
|
|
1637
|
+
|
|
1638
|
+ if commonlyTreatmentCostTotal != 0 {
|
|
1639
|
+ iteminfo.MedChrgitm = "12"
|
|
1640
|
+ iteminfo.FulamtOwnpayAmt = commonly_treatment_fulamt_ownpay_amt
|
|
1641
|
+ iteminfo.Amt = commonlyTreatmentCostTotal
|
|
1642
|
+ iteminfo.ClaaSumfee = commonly_treatment_claa_sunmfee
|
|
1643
|
+ iteminfo.ClabAmt = commonly_treatment_clab_amt
|
|
1644
|
+ iteminfo.OthAmt = commonly_treatment_other_amt
|
|
1645
|
+ //struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
|
|
1646
|
+ iteminfoStructs = append(iteminfoStructs, iteminfo)
|
|
1647
|
+
|
|
1648
|
+ }
|
|
1649
|
+
|
|
1650
|
+ if registerCostTotal != 0 {
|
|
1651
|
+ iteminfo.MedChrgitm = "13"
|
|
1652
|
+ iteminfo.FulamtOwnpayAmt = register_fulamt_ownpay_amt
|
|
1653
|
+ iteminfo.Amt = registerCostTotal
|
|
1654
|
+ iteminfo.ClaaSumfee = register_claa_sunmfee
|
|
1655
|
+ iteminfo.ClabAmt = register_clab_amt
|
|
1656
|
+ iteminfo.OthAmt = register_other_amt
|
|
1657
|
+ //struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
|
|
1658
|
+ iteminfoStructs = append(iteminfoStructs, iteminfo)
|
|
1659
|
+
|
|
1660
|
+ }
|
|
1661
|
+
|
|
1662
|
+ if otherCostTotal != 0 {
|
|
1663
|
+ iteminfo.MedChrgitm = "14"
|
|
1664
|
+ iteminfo.FulamtOwnpayAmt = other_fulamt_ownpay_amt
|
|
1665
|
+ iteminfo.Amt = otherCostTotal
|
|
1666
|
+ iteminfo.ClaaSumfee = other_claa_sunmfee
|
|
1667
|
+ iteminfo.ClabAmt = other_clab_amt
|
|
1668
|
+ iteminfo.OthAmt = other_other_amt
|
|
1669
|
+ //struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
|
|
1670
|
+ iteminfoStructs = append(iteminfoStructs, iteminfo)
|
|
1671
|
+
|
|
1672
|
+ }
|
|
1673
|
+ struct4101.IteminfoStruct = iteminfoStructs
|
|
1674
|
+ struct4101.Ntly = "中国"
|
|
1675
|
+ struct4101.AdmCaty = "A03.06"
|
|
1676
|
+ result := service.Gdyb4101(struct4101, miConfig.SecretKey, miConfig.OrgName, curRoles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs)
|
|
1677
|
+ fmt.Println(result)
|
|
1678
|
+
|
|
1679
|
+ var dat map[string]interface{}
|
|
1680
|
+ if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
1681
|
+ fmt.Println(dat)
|
|
1682
|
+ } else {
|
|
1683
|
+ fmt.Println(err)
|
|
1684
|
+ }
|
|
1685
|
+ userJSONBytes, _ := json.Marshal(dat)
|
|
1686
|
+ var res ResultSeventeen
|
|
1687
|
+ if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
1688
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
1689
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
1690
|
+ return
|
|
1691
|
+ }
|
|
1692
|
+
|
|
1693
|
+ if res.Infcode != 0 {
|
|
1694
|
+ adminUser := c.GetAdminUserInfo()
|
|
1695
|
+ errlog := &models.HisOrderError{
|
|
1696
|
+ UserOrgId: adminUser.CurrentOrgId,
|
|
1697
|
+ Ctime: time.Now().Unix(),
|
|
1698
|
+ Mtime: time.Now().Unix(),
|
|
1699
|
+ ErrMsg: res.ErrMsg,
|
|
1700
|
+ Status: 1,
|
|
1701
|
+ PatientId: item.ID,
|
|
1702
|
+ Stage: 20,
|
|
1703
|
+ }
|
|
1704
|
+ service.CreateErrMsgLog(errlog)
|
|
1705
|
+ continue
|
|
1706
|
+ } else {
|
|
1707
|
+ hisFundSettleListResult := &models.HisFundSettleListResult{
|
|
1708
|
+ Number: res.Output.SetlListId,
|
|
1709
|
+ Status: 1,
|
|
1710
|
+ Ctime: time.Now().Unix(),
|
|
1711
|
+ Mtime: time.Now().Unix(),
|
|
1712
|
+ UserOrgId: c.GetAdminUserInfo().CurrentOrgId,
|
|
1713
|
+ IsUpload: 1,
|
|
1714
|
+ OrderId: order_id,
|
|
1715
|
+ }
|
|
1716
|
+ service.CreateUploadRecord(hisFundSettleListResult)
|
|
1717
|
+ continue
|
|
1718
|
+
|
|
1719
|
+ }
|
|
1720
|
+
|
|
1721
|
+ }
|
|
1722
|
+
|
|
1723
|
+}
|
|
1724
|
+
|
997
|
1725
|
//func (c *HisApiController) TestPay() {
|
998
|
1726
|
// DllDef2 := syscall.MustLoadDLL("SSSE32.dll")
|
999
|
1727
|
// readCards := DllDef2.MustFindProc("BankTrans")
|