Browse Source

新增多个上传类型

csx 4 years ago
parent
commit
a6477e6988
4 changed files with 558 additions and 398 deletions
  1. 128 61
      controllers/sync.go
  2. 401 322
      models/sz/target_data.go
  3. 13 13
      service/city_data_uoload_service.go
  4. 16 2
      service/db.go

+ 128 - 61
controllers/sync.go View File

@@ -5,6 +5,7 @@ import (
5 5
 	"Data_Upload_Api/models/sz"
6 6
 	"Data_Upload_Api/service"
7 7
 	"Data_Upload_Api/utils"
8
+	"fmt"
8 9
 	"github.com/astaxie/beego"
9 10
 	"github.com/jinzhu/gorm"
10 11
 	"math"
@@ -12,7 +13,6 @@ import (
12 13
 	"strings"
13 14
 	_ "strings"
14 15
 	"time"
15
-	"fmt"
16 16
 )
17 17
 
18 18
 type SyncController struct {
@@ -21,7 +21,76 @@ type SyncController struct {
21 21
 
22 22
 func SyncAPIRegisterRouters() {
23 23
 	beego.Router("/sync/upload", &SyncController{}, "get:SyncToSZIC")
24
+	beego.Router("/sync/upload/bx", &SyncController{}, "get:SyncToBX")
25
+
26
+}
24 27
 
28
+func (c *SyncController) SyncToBX() {
29
+	// 第一步:到上报配置表中找到深圳需要上报的机构
30
+	//sz_province, _ := beego.AppConfig.Int64("sz_province")
31
+	//sz_city, _ := beego.AppConfig.Int64("sz_city")
32
+	//configs, _ := service.FindAllDataUploadConfigOrgInfo(sz_province, sz_city, 3)
33
+
34
+	org := &sz.DataUploadConfig{
35
+		OrgId:          3907,
36
+		ProvinceId:     19,
37
+		CityId:         291,
38
+		DepartmentName: "深圳宝兴医院",
39
+		HospitalId:     "455835506",
40
+		InstType:       1,
41
+		DbHost:         "172.16.173.151",
42
+		DbPort:         "1433",
43
+		DbUser:         "sa",
44
+		DbName:         "123.com",
45
+	}
46
+
47
+	//for _, org := range configs {
48
+	// 第二步:跟进配置,创建数据库连接
49
+	if len(org.DbHost) > 0 && len(org.DbUser) > 0 && len(org.DbPort) > 0 && len(org.DbPass) > 0 && len(org.DbName) > 0 {
50
+		orgDb, err := service.CreateSqlServiceDB(org.DbHost, org.DbPort, org.DbUser, org.DbPass, org.DbName)
51
+		if err != nil {
52
+			utils.ErrorLog("创建数据库连接失败:%v", err)
53
+			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
54
+			return
55
+		}
56
+		// 第三步:开始同步数据
57
+		// 同步医院信息  t_hd_hospital
58
+		c.SyncHospital(orgDb, org.OrgId, org.HospitalId, org.InstType, org.DepartmentName)
59
+		// 同步水处理器  t_hd_wm
60
+		c.SyncWMS(orgDb, org.OrgId, org.HospitalId)
61
+		// 同步员工 t_hd_staff
62
+		c.SyncStaff(orgDb, org.OrgId, org.HospitalId)
63
+		// 同步病人 t_hd_patient
64
+		c.SyncPatient(orgDb, org.OrgId, org.HospitalId)
65
+		// 同步排班  t_hd_shift
66
+		c.SyncShift(orgDb, org.OrgId, org.HospitalId)
67
+		// 同步处方 t_hd_ps
68
+		c.SyncPs(orgDb, org.OrgId, org.HospitalId)
69
+		// 同步处方药品 t_hd_ps
70
+		c.SyncPsMedicine(orgDb, org.OrgId, org.HospitalId)
71
+		// 同步转院信息 t_hd_patient_out
72
+		c.SyncPatientOut(orgDb, org.OrgId, org.HospitalId)
73
+		// 同步处方信息 t_hd_doctors_advice
74
+		c.SyncDoctorAdvice(orgDb, org.OrgId, org.HospitalId)
75
+		// 同步透中信息 t_hd_middle
76
+		c.SyncMiddle(orgDb, org.OrgId, org.HospitalId)
77
+		// // 同步设备 t_hd_other_machine
78
+		c.SyncOtherMachine(orgDb, org.OrgId, org.HospitalId)
79
+		// // 同步维修 t_hd_maintain
80
+		c.SyncMachineRepair(orgDb, org.OrgId, org.HospitalId)
81
+		// // 同步设备 t_hd_dm
82
+		c.SyncDM(orgDb, org.OrgId, org.HospitalId)
83
+		// // 同步患者透析记录 t_hd_dialysis
84
+		c.SyncDialysis(orgDb, org.OrgId, org.HospitalId)
85
+
86
+		// 第四步:关闭数据库连接
87
+		service.CloseDB(orgDb)
88
+	}
89
+	//}
90
+	c.ServeSuccessJSON(map[string]interface{}{
91
+		"resultList": "12345",
92
+	})
93
+	return
25 94
 }
26 95
 
27 96
 func (c *SyncController) SyncToSZIC() {
@@ -32,6 +101,7 @@ func (c *SyncController) SyncToSZIC() {
32 101
 	for _, org := range configs {
33 102
 		// 第二步:跟进配置,创建数据库连接
34 103
 		if len(org.DbHost) > 0 && len(org.DbUser) > 0 && len(org.DbPort) > 0 && len(org.DbPass) > 0 && len(org.DbName) > 0 {
104
+
35 105
 			orgDb, err := service.CreateDB(org.DbHost, org.DbPort, org.DbUser, org.DbPass, org.DbName)
36 106
 			if err != nil {
37 107
 				utils.ErrorLog("创建数据库连接失败:%v", err)
@@ -42,32 +112,32 @@ func (c *SyncController) SyncToSZIC() {
42 112
 			// 同步医院信息  t_hd_hospital
43 113
 			c.SyncHospital(orgDb, org.OrgId, org.HospitalId, org.InstType, org.DepartmentName)
44 114
 			// 同步水处理器  t_hd_wm
45
-			c.SyncWMS(orgDb,org.OrgId, org.HospitalId)
115
+			c.SyncWMS(orgDb, org.OrgId, org.HospitalId)
46 116
 			// 同步员工 t_hd_staff
47
-			c.SyncStaff(orgDb,org.OrgId, org.HospitalId)
117
+			c.SyncStaff(orgDb, org.OrgId, org.HospitalId)
48 118
 			// 同步病人 t_hd_patient
49
-			c.SyncPatient(orgDb,org.OrgId, org.HospitalId)
119
+			c.SyncPatient(orgDb, org.OrgId, org.HospitalId)
50 120
 			// 同步排班  t_hd_shift
51
-			c.SyncShift(orgDb,org.OrgId, org.HospitalId)
121
+			c.SyncShift(orgDb, org.OrgId, org.HospitalId)
52 122
 			// 同步处方 t_hd_ps
53
-			c.SyncPs(orgDb,org.OrgId, org.HospitalId)
123
+			c.SyncPs(orgDb, org.OrgId, org.HospitalId)
54 124
 			// 同步处方药品 t_hd_ps
55
-			c.SyncPsMedicine(orgDb,org.OrgId, org.HospitalId)
125
+			c.SyncPsMedicine(orgDb, org.OrgId, org.HospitalId)
56 126
 			// 同步转院信息 t_hd_patient_out
57
-			c.SyncPatientOut(orgDb,org.OrgId, org.HospitalId)
127
+			c.SyncPatientOut(orgDb, org.OrgId, org.HospitalId)
58 128
 			// 同步处方信息 t_hd_doctors_advice
59
-			c.SyncDoctorAdvice(orgDb,org.OrgId, org.HospitalId)
129
+			c.SyncDoctorAdvice(orgDb, org.OrgId, org.HospitalId)
60 130
 			// 同步透中信息 t_hd_middle
61
-			c.SyncMiddle(orgDb,org.OrgId, org.HospitalId)
131
+			c.SyncMiddle(orgDb, org.OrgId, org.HospitalId)
62 132
 			// // 同步设备 t_hd_other_machine
63
-			c.SyncOtherMachine(orgDb,org.OrgId, org.HospitalId)
133
+			c.SyncOtherMachine(orgDb, org.OrgId, org.HospitalId)
64 134
 			// // 同步维修 t_hd_maintain
65
-			c.SyncMachineRepair(orgDb,org.OrgId, org.HospitalId)
135
+			c.SyncMachineRepair(orgDb, org.OrgId, org.HospitalId)
66 136
 			// // 同步设备 t_hd_dm
67
-			c.SyncDM(orgDb,org.OrgId, org.HospitalId)
137
+			c.SyncDM(orgDb, org.OrgId, org.HospitalId)
68 138
 			// // 同步患者透析记录 t_hd_dialysis
69
-			c.SyncDialysis(orgDb,org.OrgId, org.HospitalId)
70
-			
139
+			c.SyncDialysis(orgDb, org.OrgId, org.HospitalId)
140
+
71 141
 			// 第四步:关闭数据库连接
72 142
 			service.CloseDB(orgDb)
73 143
 		}
@@ -95,14 +165,14 @@ func (c *SyncController) SyncHospital(rdb *gorm.DB, org_id int64, hospital_id st
95 165
 		hospital := &sz.TempHdHospital{
96 166
 			HospitalId:     hospital_id,
97 167
 			InstType:       strconv.FormatInt(inst_type, 10),
98
-			DepartMentName: department_name,
168
+			DepartmentName: department_name,
99 169
 			AuthorizedBeds: int64(len(org.DeviceNumber)),
100 170
 			CreateTime:     time.Now(),
101 171
 			UpdateTime:     time.Now(),
102 172
 			Sjscsj:         time.Now(),
103 173
 			Xgbz:           0,
104 174
 		}
105
-		err := service.CreateOrgRecord(rdb,hospital)
175
+		err := service.CreateOrgRecord(rdb, hospital)
106 176
 		if err == nil {
107 177
 			// 第三步:同步成功后,添加同步记录
108 178
 			upload := &sz.DataUpload{
@@ -143,11 +213,11 @@ func (c *SyncController) SyncWMS(rdb *gorm.DB, org_id int64, hospital_id string)
143 213
 			EquipmentModel: strconv.FormatInt(item.UnitType, 10),
144 214
 			EnableTime:     time.Unix(item.StartDate, 0),
145 215
 			DiscardedTime:  time.Unix(item.RubbishDate, 0),
146
-			EquipmentType:  strconv.FormatInt(item.DeviceType, 10),
216
+			EquipmentType:  item.DeviceType,
147 217
 			CreateTime:     time.Now(),
148 218
 			UpdateTime:     time.Now(),
149 219
 			Sjscsj:         time.Now(),
150
-			Xgbz:           strconv.FormatInt(0, 10),
220
+			Xgbz:           0,
151 221
 		}
152 222
 
153 223
 		wms = append(wms, wm)
@@ -192,13 +262,13 @@ func (c *SyncController) SyncStaff(rdb *gorm.DB, org_id int64, hospital_id strin
192 262
 	//waterMachine, _ := service.FindOrgWaterMachineData(org_id, sync_time, time.Now().Unix())
193 263
 	var staffs []*sz.TempHdStaff
194 264
 	for _, role := range roles {
195
-		var title string
265
+		var title int
196 266
 		switch role.UserType {
197 267
 		case 2:
198
-			title = strconv.FormatInt(1, 10)
268
+			title = 1
199 269
 			break
200 270
 		case 3:
201
-			title = strconv.FormatInt(2, 10)
271
+			title = 2
202 272
 			break
203 273
 		}
204 274
 
@@ -206,12 +276,12 @@ func (c *SyncController) SyncStaff(rdb *gorm.DB, org_id int64, hospital_id strin
206 276
 			HospitalId:    hospital_id,
207 277
 			StaffId:       strconv.FormatInt(role.ID, 10),
208 278
 			StaffName:     role.UserName,
209
-			Position:      title,
210
-			PermanentType: strconv.FormatInt(1, 10),
279
+			Position:      int64(title),
280
+			PermanentType: 1,
211 281
 			CreateTime:    time.Now(),
212 282
 			UpdateTime:    time.Now(),
213 283
 			Sjscsj:        time.Now(),
214
-			Xgbz:          strconv.FormatInt(0, 10),
284
+			Xgbz:          0,
215 285
 		}
216 286
 		staffs = append(staffs, staff)
217 287
 
@@ -259,14 +329,14 @@ func (c *SyncController) SyncPatient(rdb *gorm.DB, org_id int64, hospital_id str
259 329
 
260 330
 		idcard_year, _ := strconv.Atoi(Substr(patient.IdCardNo, 6, 4)) // 年
261 331
 		idcard_mo, _ := strconv.Atoi(Substr(patient.IdCardNo, 10, 2))  // 月
262
-		
332
+
263 333
 		idcard_day, _ := strconv.Atoi(Substr(patient.IdCardNo, 12, 2)) // 日
264 334
 
265 335
 		date := strconv.Itoa(idcard_year)
266 336
 		if idcard_mo < 10 {
267
-			date = date + "-0" + strconv.Itoa(idcard_mo) 
337
+			date = date + "-0" + strconv.Itoa(idcard_mo)
268 338
 		} else {
269
-			date = date + "-" + strconv.Itoa(idcard_mo) 
339
+			date = date + "-" + strconv.Itoa(idcard_mo)
270 340
 		}
271 341
 
272 342
 		if idcard_day < 10 {
@@ -293,9 +363,9 @@ func (c *SyncController) SyncPatient(rdb *gorm.DB, org_id int64, hospital_id str
293 363
 
294 364
 		p := &sz.TempHdPatient{
295 365
 			HospitalId:       hospital_id,
296
-			PatientNk:        strconv.FormatInt(patient.ID, 10),
366
+			PatientNk:        patient.ID,
297 367
 			CardNo:           "000000000000000000",
298
-			CardType:         "01", 
368
+			CardType:         1,
299 369
 			IdNo:             patient.IdCardNo,
300 370
 			IdType:           "01",
301 371
 			PatientName:      patient.Name,
@@ -303,10 +373,10 @@ func (c *SyncController) SyncPatient(rdb *gorm.DB, org_id int64, hospital_id str
303 373
 			BornDate:         birthday,
304 374
 			DiagnosisSummary: patient.Diagnose,
305 375
 			IsCrf:            strconv.Itoa(isCKD),
306
-			CreatedTime:      time.Now(),
376
+			CreateTime:       time.Now(),
307 377
 			UpdateTime:       time.Now(),
308 378
 			Sjscsj:           time.Now(),
309
-			Xgbz:             strconv.FormatInt(0, 10),
379
+			Xgbz:             0,
310 380
 		}
311 381
 
312 382
 		if patient.FirstDialysisDate != 0 {
@@ -519,7 +589,7 @@ func (c *SyncController) SyncPsMedicine(rdb *gorm.DB, org_id int64, hospital_id
519 589
 			PrescribeId:    strconv.FormatInt(item.ID, 10),
520 590
 			HospitalId:     strconv.FormatInt(item.UserOrgId, 10),
521 591
 			MedicineTypeId: "2",
522
-			CreatedTime:    time.Now(),
592
+			CreateTime:     time.Now(),
523 593
 			Sjscsj:         time.Now(),
524 594
 			Xgbz:           0,
525 595
 		}
@@ -599,7 +669,7 @@ func (c *SyncController) SyncPatientOut(rdb *gorm.DB, org_id int64, hospital_id
599 669
 		}
600 670
 
601 671
 		if len(patient.PatientLapseto) > 0 {
602
-			p.SequelaeDate = time.Unix(patient.PatientLapseto[len(patient.PatientLapseto) - 1].LapsetoTime, 0)
672
+			p.SequelaeDate = time.Unix(patient.PatientLapseto[len(patient.PatientLapseto)-1].LapsetoTime, 0)
603 673
 		}
604 674
 
605 675
 		hdPatientOuts = append(hdPatientOuts, p)
@@ -644,7 +714,7 @@ func (c *SyncController) SyncDoctorAdvice(rdb *gorm.DB, org_id int64, hospital_i
644 714
 
645 715
 	for _, dp := range dialysisPrescriptions {
646 716
 		advice := &sz.TempHdDoctorsAdvice{
647
-			MedicalOrDerId:   strconv.FormatInt(dp.ID, 10),
717
+			MedicalOrderId:   strconv.FormatInt(dp.ID, 10),
648 718
 			HospitalId:       strconv.FormatInt(dp.UserOrgId, 10),
649 719
 			DialysisId:       strconv.FormatInt(dp.DialysisOrder.ID, 10),
650 720
 			OrderType:        "1",
@@ -766,10 +836,10 @@ func (c *SyncController) SyncOtherMachine(rdb *gorm.DB, org_id int64, hospital_i
766 836
 		}
767 837
 		switch item.MachineStatus {
768 838
 		case 1:
769
-			wm.Status = "1"
839
+			wm.Status = 1
770 840
 			break
771 841
 		case 4:
772
-			wm.Status = "3"
842
+			wm.Status = 3
773 843
 			break
774 844
 		}
775 845
 
@@ -819,7 +889,7 @@ func (c *SyncController) SyncMachineRepair(rdb *gorm.DB, org_id int64, hospital_
819 889
 			RepairTime:  time.Unix(item.GuaranteeDate, 0),
820 890
 			CreateTime:  time.Now(),
821 891
 			Sjscsj:      time.Now(),
822
-			Xgbz:        strconv.FormatInt(0, 10),
892
+			Xgbz:        0,
823 893
 		}
824 894
 		switch item.VMDeviceAddmacher.DeviceType {
825 895
 		case 1:
@@ -900,9 +970,6 @@ func (c *SyncController) SyncDM(rdb *gorm.DB, org_id int64, hospital_id string)
900 970
 		case 1:
901 971
 			hdm.EquipmentType = "11"
902 972
 			break
903
-		case 2:
904
-			hdm.EquipmentType = "98"
905
-			break
906 973
 		case 3:
907 974
 			hdm.EquipmentType = "99"
908 975
 			break
@@ -948,26 +1015,26 @@ func (c *SyncController) SyncDialysis(rdb *gorm.DB, org_id int64, hospital_id st
948 1015
 	dialysisData, _ := service.FindOrgDialysisData(org_id, sync_time, time.Now().Unix())
949 1016
 
950 1017
 	for _, item := range dialysisData {
951
- 
1018
+
952 1019
 		psm := &sz.TempHdDialysis{
953
-			DialysisId:		strconv.FormatInt(item.ID, 10),
954
-			HospitalId:     strconv.FormatInt(item.UserOrgId, 10),
955
-			PatientNk:      strconv.FormatInt(item.PatientId, 10),
956
-			PsId:			strconv.FormatInt(item.Schedule.ID, 10),
957
-			DialysisDate:	time.Unix(item.DialysisDate, 0),
958
-			SickbedNo:		item.DeviceNumber.Number,
959
-			DivisionId:		strconv.FormatInt(item.Schedule.PartitionId,10),
960
-			EquipmentId: 	strconv.FormatInt(item.DeviceNumber.ID, 10),
961
-			TotalTreatDuration: 	 item.AssessmentAfterDislysis.ActualTreatmentHour * 60 	+ item.AssessmentAfterDislysis.ActualTreatmentMinute,
962
-			BeforeSbp: 		int64(item.AssessmentBeforeDislysis.SystolicBloodPressure),
963
-			BeforeDbp: 		int64(item.AssessmentBeforeDislysis.DiastolicBloodPressure),
964
-			AfterSbp:		int64(item.AssessmentAfterDislysis.SystolicBloodPressure),
965
-			AfterDbp:		int64(item.AssessmentAfterDislysis.DiastolicBloodPressure),
966
-			StartTime:		time.Unix(item.StartTime, 0),
967
-			EndTime:		time.Unix(item.EndTime, 0),
968
-			CreateTime:		time.Unix(item.CreatedTime, 0),
969
-			Sjscsj:         time.Now(),
970
-			Xgbz:           0,
1020
+			DialysisId:         strconv.FormatInt(item.ID, 10),
1021
+			HospitalId:         strconv.FormatInt(item.UserOrgId, 10),
1022
+			PatientNk:          strconv.FormatInt(item.PatientId, 10),
1023
+			PsId:               strconv.FormatInt(item.Schedule.ID, 10),
1024
+			DialysisDate:       time.Unix(item.DialysisDate, 0),
1025
+			SickbedNo:          item.DeviceNumber.Number,
1026
+			DivisionId:         strconv.FormatInt(item.Schedule.PartitionId, 10),
1027
+			EquipmentId:        strconv.FormatInt(item.DeviceNumber.ID, 10),
1028
+			TotalTreatDuration: item.AssessmentAfterDislysis.ActualTreatmentHour*60 + item.AssessmentAfterDislysis.ActualTreatmentMinute,
1029
+			BeforeSbp:          int64(item.AssessmentBeforeDislysis.SystolicBloodPressure),
1030
+			BeforeDbp:          int64(item.AssessmentBeforeDislysis.DiastolicBloodPressure),
1031
+			AfterSbp:           int64(item.AssessmentAfterDislysis.SystolicBloodPressure),
1032
+			AfterDbp:           int64(item.AssessmentAfterDislysis.DiastolicBloodPressure),
1033
+			StartTime:          time.Unix(item.StartTime, 0),
1034
+			EndTime:            time.Unix(item.EndTime, 0),
1035
+			CreateTime:         time.Unix(item.CreatedTime, 0),
1036
+			Sjscsj:             time.Now(),
1037
+			Xgbz:               0,
971 1038
 		}
972 1039
 		if item.AssessmentAfterDislysis.ActualUltrafiltration < 10 {
973 1040
 			psm.ActualufMl = int64(item.AssessmentAfterDislysis.ActualUltrafiltration * 1000)
@@ -980,7 +1047,7 @@ func (c *SyncController) SyncDialysis(rdb *gorm.DB, org_id int64, hospital_id st
980 1047
 		} else {
981 1048
 			psm.Ufv = int64(item.VMDialysisPrescription.TargetUltrafiltration)
982 1049
 		}
983
-		
1050
+
984 1051
 		if item.AssessmentAfterDislysis.ActualDisplacement < 10 {
985 1052
 			psm.TotalReplace = int64(item.AssessmentAfterDislysis.ActualDisplacement * 1000)
986 1053
 		} else {

+ 401 - 322
models/sz/target_data.go View File

@@ -3,18 +3,18 @@ package sz
3 3
 import "time"
4 4
 
5 5
 type TempHdHospital struct {
6
-	ID             int64     `gorm:"column:id" json:"id"`
7
-	HospitalId     string    `gorm:"column:HOSPITAL_ID" json:"HOSPITAL_ID"`
8
-	InstType       string    `gorm:"column:INST_TYPE" json:"INST_TYPE"`
9
-	DepartMentName string    `gorm:"column:DEPARTMENT_NAME" json:"DEPARTMENT_NAME"`
10
-	AuthorizedBeds int64     `gorm:"column:AUTHORIZED_BEDS" json:"AUTHORIZED_BEDS"`
11
-	CreateTime     time.Time `gorm:"column:CREATE_TIME" json:"CREATE_TIME"`
12
-	UpdateTime     time.Time `gorm:"column:UPDATE_TIME" json:"UPDATE_TIME"`
13
-	Sjscsj         time.Time `gorm:"column:SJSCSJ" json:"SJSCSJ"`
14
-	Mj             string    `gorm:"column:MJ" json:"MJ"`
15
-	Xgbz           int64     `gorm:"column:XGBZ" json:"XGBZ"`
16
-	Ylyl1          string    `gorm:"column:YLYL1" json:"YLYL1"`
17
-	Ylyl2          string    `gorm:"column:YLYL2" json:"YLYL2"`
6
+	ID             int64     `gorm:"column:id" json:"id" form:"id"`
7
+	HospitalId     string    `gorm:"column:hospital_id" json:"hospital_id" form:"hospital_id"`
8
+	InstType       string    `gorm:"column:inst_type" json:"inst_type" form:"inst_type"`
9
+	DepartmentName string    `gorm:"column:department_name" json:"department_name" form:"department_name"`
10
+	AuthorizedBeds int64     `gorm:"column:authorized_beds" json:"authorized_beds" form:"authorized_beds"`
11
+	CreateTime     time.Time `gorm:"column:create_time" json:"create_time" form:"create_time"`
12
+	UpdateTime     time.Time `gorm:"column:update_time" json:"update_time" form:"update_time"`
13
+	Sjscsj         time.Time `gorm:"column:sjscsj" json:"sjscsj" form:"sjscsj"`
14
+	Mj             string    `gorm:"column:mj" json:"mj" form:"mj"`
15
+	Xgbz           int64     `gorm:"column:xgbz" json:"xgbz" form:"xgbz"`
16
+	Ylyl1          string    `gorm:"column:ylyl1" json:"ylyl1" form:"ylyl1"`
17
+	Ylyl2          string    `gorm:"column:ylyl2" json:"ylyl2" form:"ylyl2"`
18 18
 }
19 19
 
20 20
 func (TempHdHospital) TableName() string {
@@ -22,34 +22,43 @@ func (TempHdHospital) TableName() string {
22 22
 }
23 23
 
24 24
 type TempHdStaff struct {
25
-	ID                           int64     `gorm:"column:id" json:"id"`
26
-	HospitalId                   string    `gorm:"column:HOSPITAL_ID" json:"HOSPITAL_ID"`
27
-	StaffId                      string    `gorm:"column:STAFF_ID" json:"STAFF_ID"`
28
-	IdType                       string    `gorm:"column:ID_TYPE" json:"ID_TYPE"`
29
-	IdNo                         string    `gorm:"column:ID_NO" json:"ID_NO"`
30
-	StaffName                    string    `gorm:"column:STAFF_NAME" json:"STAFF_NAME"`
31
-	Position                     string    `gorm:"column:POSITION" json:"POSITION"`
32
-	TrainingName                 string    `gorm:"column:TRAINING_NAME" json:"TRAINING_NAME"`
33
-	PracticeCertificate          string    `gorm:"column:PRACTICE_CERTIFICATE" json:"PRACTICE_CERTIFICATE"`
34
-	PracticeCertificateNo        string    `gorm:"column:PRACTICE_CERTIFICATE_NO" json:"PRACTICE_CERTIFICATE_NO"`
35
-	QualificationCertificate     string    `gorm:"column:QUALIFICATION_CERTIFICATE" json:"QUALIFICATION_CERTIFICATE"`
36
-	QualificationType            string    `gorm:"column:QUALIFICATION_TYPE" json:"QUALIFICATION_TYPE"`
37
-	PermanentType                string    `gorm:"column:PERMANENT_TYPE" json:"PERMANENT_TYPE"`
38
-	DiplomaFile                  string    `gorm:"column:DIPLOMA_FILE" json:"DIPLOMA_FILE"`
39
-	DegreeCertificateFile        string    `gorm:"column:DEGREE_CERTIFICATE_FILE" json:"DEGREE_CERTIFICATE_FILE"`
40
-	TrainingCertificateFile      string    `gorm:"column:TRAINING_CERTIFICATE_FILE" json:"TRAINING_CERTIFICATE_FILE"`
41
-	PracticeCertificateFile      string    `gorm:"column:PRACTICE_CERTIFICATE_FILE" json:"PRACTICE_CERTIFICATE_FILE"`
42
-	QualificationCertificateFile string    `gorm:"column:QUALIFICATION_CERTIFICATE_FILE" json:"QUALIFICATION_CERTIFICATE_FILE"`
43
-	Xgbz                         string    `gorm:"column:XGBZ" json:"XGBZ"`
44
-	TrainingDate                 time.Time `gorm:"column:TRAINING_DATE" json:"TRAINING_DATE"`
45
-	InDate                       time.Time `gorm:"column:IN_DATE" json:"IN_DATE"`
46
-	OutDate                      time.Time `gorm:"column:OUT_DATE" json:"OUT_DATE"`
47
-	CreateTime                   time.Time `gorm:"column:CREATE_TIME" json:"CREATE_TIME"`
48
-	UpdateTime                   time.Time `gorm:"column:UPDATE_TIME" json:"UPDATE_TIME"`
49
-	Sjscsj                       time.Time `gorm:"column:SJSCSJ" json:"SJSCSJ"`
50
-	Mj                           string    `gorm:"column:MJ" json:"MJ"`
51
-	Ylyl1                        string    `gorm:"column:YLYL1" json:"YLYL1"`
52
-	Ylyl2                        string    `gorm:"column:YLYL2" json:"YLYL2"`
25
+	ID                           int64     `gorm:"column:id" json:"id" form:"id"`
26
+	HospitalId                   string    `gorm:"column:hospital_id" json:"hospital_id" form:"hospital_id"`
27
+	StaffId                      string    `gorm:"column:staff_id" json:"staff_id" form:"staff_id"`
28
+	IdType                       string    `gorm:"column:id_type" json:"id_type" form:"id_type"`
29
+	IdNo                         string    `gorm:"column:id_no" json:"id_no" form:"id_no"`
30
+	StaffName                    string    `gorm:"column:staff_name" json:"staff_name" form:"staff_name"`
31
+	Position                     int64     `gorm:"column:position" json:"position" form:"position"`
32
+	TrainingName                 string    `gorm:"column:training_name" json:"training_name" form:"training_name"`
33
+	PracticeCertificate          string    `gorm:"column:practice_certificate" json:"practice_certificate" form:"practice_certificate"`
34
+	PracticeCertificateNo        string    `gorm:"column:practice_certificate_no" json:"practice_certificate_no" form:"practice_certificate_no"`
35
+	QualificationCertificate     string    `gorm:"column:qualification_certificate" json:"qualification_certificate" form:"qualification_certificate"`
36
+	QualificationType            string    `gorm:"column:qualification_type" json:"qualification_type" form:"qualification_type"`
37
+	PermanentType                int64     `gorm:"column:permanent_type" json:"permanent_type" form:"permanent_type"`
38
+	DiplomaFile                  string    `gorm:"column:diploma_file" json:"diploma_file" form:"diploma_file"`
39
+	DegreeCertificateFile        string    `gorm:"column:degree_certificate_file" json:"degree_certificate_file" form:"degree_certificate_file"`
40
+	TrainingCertificateFile      string    `gorm:"column:training_certificate_file" json:"training_certificate_file" form:"training_certificate_file"`
41
+	PracticeCertificateFile      string    `gorm:"column:practice_certificate_file" json:"practice_certificate_file" form:"practice_certificate_file"`
42
+	QualificationCertificateFile string    `gorm:"column:qualification_certificate_file" json:"qualification_certificate_file" form:"qualification_certificate_file"`
43
+	Xgbz                         int64     `gorm:"column:xgbz" json:"xgbz" form:"xgbz"`
44
+	TrainingDate                 time.Time `gorm:"column:training_date" json:"training_date" form:"training_date"`
45
+	InDate                       time.Time `gorm:"column:in_date" json:"in_date" form:"in_date"`
46
+	OutDate                      time.Time `gorm:"column:out_date" json:"out_date" form:"out_date"`
47
+	CreateTime                   time.Time `gorm:"column:create_time" json:"create_time" form:"create_time"`
48
+	UpdateTime                   time.Time `gorm:"column:update_time" json:"update_time" form:"update_time"`
49
+	Sjscsj                       time.Time `gorm:"column:sjscsj" json:"sjscsj" form:"sjscsj"`
50
+	Mj                           string    `gorm:"column:mj" json:"mj" form:"mj"`
51
+	Ylyl1                        string    `gorm:"column:ylyl1" json:"ylyl1" form:"ylyl1"`
52
+	Ylyl2                        string    `gorm:"column:ylyl2" json:"ylyl2" form:"ylyl2"`
53
+	TechnicalPosition            int64     `gorm:"column:technical_position" json:"technical_position" form:"technical_position"`
54
+	StaffLevel                   int64     `gorm:"column:staff_level" json:"staff_level" form:"staff_level"`
55
+	IsAdvanced                   int64     `gorm:"column:is_advanced" json:"is_advanced" form:"is_advanced"`
56
+	HospitalPosition             int64     `gorm:"column:hospital_position" json:"hospital_position" form:"hospital_position"`
57
+	StaffNo                      string    `gorm:"column:staff_no" json:"staff_no" form:"staff_no"`
58
+	Education                    string    `gorm:"column:education" json:"education" form:"education"`
59
+	Specialty                    string    `gorm:"column:specialty" json:"specialty" form:"specialty"`
60
+	StaffDegree                  string    `gorm:"column:staff_degree" json:"staff_degree" form:"staff_degree"`
61
+	StaffStatus                  int64     `gorm:"column:staff_status" json:"staff_status" form:"staff_status"`
53 62
 }
54 63
 
55 64
 func (TempHdStaff) TableName() string {
@@ -57,17 +66,18 @@ func (TempHdStaff) TableName() string {
57 66
 }
58 67
 
59 68
 type TempHdLayout struct {
60
-	ID            int64     `gorm:"column:id" json:"id"`
61
-	HospitalId    string    `gorm:"column:HOSPITAL_ID" json:"HOSPITAL_ID"`
62
-	PartitionName string    `gorm:"column:PARTITION_NAME" json:"PARTITION_NAME"`
63
-	PartitionImg  string    `gorm:"column:PARTITION_IMG" json:"PARTITION_IMG"`
64
-	FunctionArea  string    `gorm:"column:FUNCTION_AREA" json:"FUNCTION_AREA"`
65
-	Xgbz          int64     `gorm:"column:XGBZ" json:"XGBZ"`
66
-	CreateTime    time.Time `gorm:"column:CREATE_TIME" json:"CREATE_TIME"`
67
-	Sjscsj        time.Time `gorm:"column:SJSCSJ" json:"SJSCSJ"`
68
-	Mj            string    `gorm:"column:MJ" json:"MJ"`
69
-	Ylyl1         string    `gorm:"column:YLYL1" json:"YLYL1"`
70
-	Ylyl2         string    `gorm:"column:YLYL2" json:"YLYL2"`
69
+	ID            int64     `gorm:"column:id" json:"id" form:"id"`
70
+	HospitalId    string    `gorm:"column:hospital_id" json:"hospital_id" form:"hospital_id"`
71
+	PartitionName string    `gorm:"column:partition_name" json:"partition_name" form:"partition_name"`
72
+	PartitionImg  string    `gorm:"column:partition_img" json:"partition_img" form:"partition_img"`
73
+	FunctionArea  string    `gorm:"column:function_area" json:"function_area" form:"function_area"`
74
+	Xgbz          string    `gorm:"column:xgbz" json:"xgbz" form:"xgbz"`
75
+	CreateTime    time.Time `gorm:"column:create_time" json:"create_time" form:"create_time"`
76
+	Sjscsj        time.Time `gorm:"column:sjscsj" json:"sjscsj" form:"sjscsj"`
77
+	Mj            string    `gorm:"column:mj" json:"mj" form:"mj"`
78
+	Ylyl1         string    `gorm:"column:ylyl1" json:"ylyl1" form:"ylyl1"`
79
+	Ylyl2         string    `gorm:"column:ylyl2" json:"ylyl2" form:"ylyl2"`
80
+	UpdateTime    time.Time `gorm:"column:update_time" json:"update_time" form:"update_time"`
71 81
 }
72 82
 
73 83
 func (TempHdLayout) TableName() string {
@@ -105,26 +115,26 @@ func (TempHdDm) TableName() string {
105 115
 }
106 116
 
107 117
 type TempHdWm struct {
108
-	ID              int64     `gorm:"column:id" json:"id"`
109
-	HospitalId      string    `gorm:"column:HOSPITAL_ID" json:"HOSPITAL_ID"`
110
-	EquipmentId     string    `gorm:"column:EQUIPMENT_ID" json:"EQUIPMENT_ID"`
111
-	EquipmentBrand  string    `gorm:"column:EQUIPMENT_BRAND" json:"EQUIPMENT_BRAND"`
112
-	EquipmentModel  string    `gorm:"column:EQUIPMENT_MODEL" json:"EQUIPMENT_MODEL"`
113
-	EnableTime      time.Time `gorm:"column:ENABLE_TIME" json:"ENABLE_TIME"`
114
-	DiscardedTime   time.Time `gorm:"column:DISCARDED_TIME" json:"DISCARDED_TIME"`
115
-	EquipmentType   string    `gorm:"column:EQUIPMENT_TYPE" json:"EQUIPMENT_TYPE"`
116
-	Temperature     string    `gorm:"column:TEMPERATURE" json:"TEMPERATURE"`
117
-	Humidity        string    `gorm:"column:HUMIDITY" json:"HUMIDITY"`
118
-	Pressure        string    `gorm:"column:PRESSURE" json:"PRESSURE"`
119
-	PressureUnit    string    `gorm:"column:PRESSURE_UNIT" json:"PRESSURE_UNIT"`
120
-	QualityStandard string    `gorm:"column:QUALITY_STANDARD" json:"QUALITY_STANDARD"`
121
-	Xgbz            string    `gorm:"column:XGBZ" json:"XGBZ"`
122
-	CreateTime      time.Time `gorm:"column:CREATE_TIME" json:"CREATE_TIME"`
123
-	UpdateTime      time.Time `gorm:"column:UPDATE_TIME" json:"UPDATE_TIME"`
124
-	Sjscsj          time.Time `gorm:"column:SJSCSJ" json:"SJSCSJ"`
125
-	Mj              string    `gorm:"column:MJ" json:"MJ"`
126
-	Ylyl1           string    `gorm:"column:YLYL1" json:"YLYL1"`
127
-	Ylyl2           string    `gorm:"column:YLYL2" json:"YLYL2"`
118
+	ID              int64     `gorm:"column:id" json:"id" form:"id"`
119
+	HospitalId      string    `gorm:"column:hospital_id" json:"hospital_id" form:"hospital_id"`
120
+	EquipmentId     string    `gorm:"column:equipment_id" json:"equipment_id" form:"equipment_id"`
121
+	EquipmentBrand  string    `gorm:"column:equipment_brand" json:"equipment_brand" form:"equipment_brand"`
122
+	EquipmentModel  string    `gorm:"column:equipment_model" json:"equipment_model" form:"equipment_model"`
123
+	EnableTime      time.Time `gorm:"column:enable_time" json:"enable_time" form:"enable_time"`
124
+	DiscardedTime   time.Time `gorm:"column:discarded_time" json:"discarded_time" form:"discarded_time"`
125
+	EquipmentType   int64     `gorm:"column:equipment_type" json:"equipment_type" form:"equipment_type"`
126
+	Temperature     string    `gorm:"column:temperature" json:"temperature" form:"temperature"`
127
+	Humidity        string    `gorm:"column:humidity" json:"humidity" form:"humidity"`
128
+	Pressure        string    `gorm:"column:pressure" json:"pressure" form:"pressure"`
129
+	PressureUnit    int64     `gorm:"column:pressure_unit" json:"pressure_unit" form:"pressure_unit"`
130
+	QualityStandard string    `gorm:"column:quality_standard" json:"quality_standard" form:"quality_standard"`
131
+	Xgbz            int64     `gorm:"column:xgbz" json:"xgbz" form:"xgbz"`
132
+	CreateTime      time.Time `gorm:"column:create_time" json:"create_time" form:"create_time"`
133
+	UpdateTime      time.Time `gorm:"column:update_time" json:"update_time" form:"update_time"`
134
+	Sjscsj          time.Time `gorm:"column:sjscsj" json:"sjscsj" form:"sjscsj"`
135
+	Mj              int64     `gorm:"column:mj" json:"mj" form:"mj"`
136
+	Ylyl1           int64     `gorm:"column:ylyl1" json:"ylyl1" form:"ylyl1"`
137
+	Ylyl2           int64     `gorm:"column:ylyl2" json:"ylyl2" form:"ylyl2"`
128 138
 }
129 139
 
130 140
 func (TempHdWm) TableName() string {
@@ -132,18 +142,18 @@ func (TempHdWm) TableName() string {
132 142
 }
133 143
 
134 144
 type TempHdMaintain struct {
135
-	ID            int64     `gorm:"column:id" json:"id"`
136
-	SN            string    `gorm:"column:SN" json:"SN"`
137
-	HospitalId    string    `gorm:"column:HOSPITAL_ID" json:"HOSPITAL_ID"`
138
-	EquipmentId   string    `gorm:"column:EQUIPMENT_ID" json:"EQUIPMENT_ID"`
139
-	EquipmentType string    `gorm:"column:EQUIPMENT_TYPE" json:"EQUIPMENT_TYPE"`
140
-	RepairTime    time.Time `gorm:"column:REPAIR_TIME" json:"REPAIR_TIME"`
141
-	Xgbz          string    `gorm:"column:XGBZ" json:"XGBZ"`
142
-	CreateTime    time.Time `gorm:"column:CREATE_TIME" json:"CREATE_TIME"`
143
-	Sjscsj        time.Time `gorm:"column:SJSCSJ" json:"SJSCSJ"`
144
-	Mj            string    `gorm:"column:MJ" json:"MJ"`
145
-	Ylyl1         string    `gorm:"column:YLYL1" json:"YLYL1"`
146
-	Ylyl2         string    `gorm:"column:YLYL2" json:"YLYL2"`
145
+	ID            int64     `gorm:"column:id" json:"id" form:"id"`
146
+	Sn            string    `gorm:"column:sn" json:"sn" form:"sn"`
147
+	HospitalId    string    `gorm:"column:hospital_id" json:"hospital_id" form:"hospital_id"`
148
+	EquipmentId   string    `gorm:"column:equipment_id" json:"equipment_id" form:"equipment_id"`
149
+	EquipmentType string    `gorm:"column:equipment_type" json:"equipment_type" form:"equipment_type"`
150
+	RepairTime    time.Time `gorm:"column:repair_time" json:"repair_time" form:"repair_time"`
151
+	Xgbz          int64     `gorm:"column:xgbz" json:"xgbz" form:"xgbz"`
152
+	CreateTime    time.Time `gorm:"column:create_time" json:"create_time" form:"create_time"`
153
+	Sjscsj        time.Time `gorm:"column:sjscsj" json:"sjscsj" form:"sjscsj"`
154
+	Mj            string    `gorm:"column:mj" json:"mj" form:"mj"`
155
+	Ylyl1         string    `gorm:"column:ylyl1" json:"ylyl1" form:"ylyl1"`
156
+	Ylyl2         string    `gorm:"column:ylyl2" json:"ylyl2" form:"ylyl2"`
147 157
 }
148 158
 
149 159
 func (TempHdMaintain) TableName() string {
@@ -175,21 +185,22 @@ func (TempHdDisinfectMethod) TableName() string {
175 185
 }
176 186
 
177 187
 type TempHdOtherMachine struct {
178
-	ID             int64     `gorm:"column:id" json:"id"`
179
-	HospitalId     string    `gorm:"column:HOSPITAL_ID" json:"HOSPITAL_ID"`
180
-	EquipmentId    string    `gorm:"column:EQUIPMENT_ID" json:"EQUIPMENT_ID"`
181
-	EquipmentBrand string    `gorm:"column:EQUIPMENT_BRAND" json:"EQUIPMENT_BRAND"`
182
-	EquipmentModel string    `gorm:"column:EQUIPMENT_MODEL" json:"EQUIPMENT_MODEL"`
183
-	EnableTime     time.Time `gorm:"column:ENABLE_TIME" json:"ENABLE_TIME"`
184
-	DiscardedTime  time.Time `gorm:"column:DISCARDED_TIME" json:"DISCARDED_TIME"`
185
-	Status         string    `gorm:"column:STATUS" json:"STATUS"`
186
-	Xgbz           string    `gorm:"column:XGBZ" json:"XGBZ"`
187
-	CreateTime     time.Time `gorm:"column:CREATE_TIME" json:"CREATE_TIME"`
188
-	UpdateTime     time.Time `gorm:"column:UPDATE_TIME" json:"UPDATE_TIME"`
189
-	Sjscsj         time.Time `gorm:"column:SJSCSJ" json:"SJSCSJ"`
190
-	Mj             string    `gorm:"column:MJ" json:"MJ"`
191
-	Ylyl1          string    `gorm:"column:YLYL1" json:"YLYL1"`
192
-	Ylyl2          string    `gorm:"column:YLYL2" json:"YLYL2"`
188
+	ID             int64     `gorm:"column:id" json:"id" form:"id"`
189
+	HospitalId     string    `gorm:"column:hospital_id" json:"hospital_id" form:"hospital_id"`
190
+	EquipmentId    string    `gorm:"column:equipment_id" json:"equipment_id" form:"equipment_id"`
191
+	EquipmentBrand string    `gorm:"column:equipment_brand" json:"equipment_brand" form:"equipment_brand"`
192
+	EquipmentModel string    `gorm:"column:equipment_model" json:"equipment_model" form:"equipment_model"`
193
+	EnableTime     time.Time `gorm:"column:enable_time" json:"enable_time" form:"enable_time"`
194
+	DiscardedTime  time.Time `gorm:"column:discarded_time" json:"discarded_time" form:"discarded_time"`
195
+	Status         int64     `gorm:"column:status" json:"status" form:"status"`
196
+	Xgbz           string    `gorm:"column:xgbz" json:"xgbz" form:"xgbz"`
197
+	CreateTime     time.Time `gorm:"column:create_time" json:"create_time" form:"create_time"`
198
+	UpdateTime     time.Time `gorm:"column:update_time" json:"update_time" form:"update_time"`
199
+	Sjscsj         time.Time `gorm:"column:sjscsj" json:"sjscsj" form:"sjscsj"`
200
+	Mj             int64     `gorm:"column:mj" json:"mj" form:"mj"`
201
+	Ylyl1          string    `gorm:"column:ylyl1" json:"ylyl1" form:"ylyl1"`
202
+	Ylyl2          string    `gorm:"column:ylyl2" json:"ylyl2" form:"ylyl2"`
203
+	EquipmentType  int64     `gorm:"column:equipment_type" json:"equipment_type" form:"equipment_type"`
193 204
 }
194 205
 
195 206
 func (TempHdOtherMachine) TableName() string {
@@ -197,29 +208,44 @@ func (TempHdOtherMachine) TableName() string {
197 208
 }
198 209
 
199 210
 type TempHdPatient struct {
200
-	ID                int64     `gorm:"column:id" json:"id"`
201
-	HospitalId        string    `gorm:"column:HOSPITAL_ID" json:"HOSPITAL_ID"`
202
-	PatientNk         string    `gorm:"column:PATIENT_NK" json:"PATIENT_NK"`
203
-	CardNo            string    `gorm:"column:CARD_NO" json:"CARD_NO"`
204
-	CardType          string    `gorm:"column:CARD_TYPE" json:"CARD_TYPE"`
205
-	IdNo              string    `gorm:"column:ID_NO" json:"ID_NO"`
206
-	IdType            string    `gorm:"column:ID_TYPE" json:"ID_TYPE"`
207
-	PatientName       string    `gorm:"column:PATIENT_NAME" json:"PATIENT_NAME"`
208
-	Gender            string    `gorm:"column:GENDER" json:"GENDER"`
209
-	BornDate          time.Time `gorm:"column:BORN_DATE" json:"BORN_DATE"`
210
-	DiagnosisSummary  string    `gorm:"column:DIAGNOSIS_SUMMARY" json:"DIAGNOSIS_SUMMARY"`
211
-	IsCrf             string    `gorm:"column:IS_CRF" json:"IS_CRF"`
212
-	AllergyHistory    string    `gorm:"column:ALLERGY_HISTORY" json:"ALLERGY_HISTORY"`
213
-	PayMethod         string    `gorm:"column:PAY_METHOD" json:"PAY_METHOD"`
214
-	DialysisStartTime time.Time `gorm:"column:DIALYSIS_START_TIME" json:"DIALYSIS_START_TIME"`
215
-	LocalStartTime    time.Time `gorm:"column:LOCAL_START_TIME" json:"LOCAL_START_TIME"`
216
-	Xgbz              string    `gorm:"column:XGBZ" json:"XGBZ"`
217
-	CreatedTime       time.Time `gorm:"column:CREATE_TIME" json:"CREATE_TIME"`
218
-	UpdateTime        time.Time `gorm:"column:UPDATE_TIME" json:"UPDATE_TIME"`
219
-	Sjscsj            time.Time `gorm:"column:SJSCSJ" json:"SJSCSJ"`
220
-	Mj                string    `gorm:"column:MJ" json:"MJ"`
221
-	Ylyl1             string    `gorm:"column:YLYL1" json:"YLYL1"`
222
-	Ylyl2             string    `gorm:"column:YLYL2" json:"YLYL2"`
211
+	ID                 int64     `gorm:"column:id" json:"id" form:"id"`
212
+	HospitalId         string    `gorm:"column:hospital_id" json:"hospital_id" form:"hospital_id"`
213
+	PatientNk          int64     `gorm:"column:patient_nk" json:"patient_nk" form:"patient_nk"`
214
+	CardNo             string    `gorm:"column:card_no" json:"card_no" form:"card_no"`
215
+	CardType           int64     `gorm:"column:card_type" json:"card_type" form:"card_type"`
216
+	IdNo               string    `gorm:"column:id_no" json:"id_no" form:"id_no"`
217
+	IdType             string    `gorm:"column:id_type" json:"id_type" form:"id_type"`
218
+	PatientName        string    `gorm:"column:patient_name" json:"patient_name" form:"patient_name"`
219
+	Gender             string    `gorm:"column:gender" json:"gender" form:"gender"`
220
+	BornDate           time.Time `gorm:"column:born_date" json:"born_date" form:"born_date"`
221
+	OutpatientNo       string    `gorm:"column:outpatient_no" json:"outpatient_no" form:"outpatient_no"`
222
+	DiagnosisSummary   string    `gorm:"column:diagnosis_summary" json:"diagnosis_summary" form:"diagnosis_summary"`
223
+	IsCrf              string    `gorm:"column:is_crf" json:"is_crf" form:"is_crf"`
224
+	AllergyHistory     string    `gorm:"column:allergy_history" json:"allergy_history" form:"allergy_history"`
225
+	PayMethod          string    `gorm:"column:pay_method" json:"pay_method" form:"pay_method"`
226
+	RrtStartTime       time.Time `gorm:"column:rrt_start_time" json:"rrt_start_time" form:"rrt_start_time"`
227
+	DialysisStartTime  time.Time `gorm:"column:dialysis_start_time" json:"dialysis_start_time" form:"dialysis_start_time"`
228
+	LocalStartTime     time.Time `gorm:"column:local_start_time" json:"local_start_time" form:"local_start_time"`
229
+	CreateTime         time.Time `gorm:"column:create_time" json:"create_time" form:"create_time"`
230
+	UpdateTime         time.Time `gorm:"column:update_time" json:"update_time" form:"update_time"`
231
+	Sjscsj             time.Time `gorm:"column:sjscsj" json:"sjscsj" form:"sjscsj"`
232
+	Mj                 int64     `gorm:"column:mj" json:"mj" form:"mj"`
233
+	Ylyl1              int64     `gorm:"column:ylyl1" json:"ylyl1" form:"ylyl1"`
234
+	Ylyl2              int64     `gorm:"column:ylyl2" json:"ylyl2" form:"ylyl2"`
235
+	PatientPhoneNo     string    `gorm:"column:patient_phone_no" json:"patient_phone_no" form:"patient_phone_no"`
236
+	FolkPhoneNo        string    `gorm:"column:folk_phone_no" json:"folk_phone_no" form:"folk_phone_no"`
237
+	PatientNationality int64     `gorm:"column:patient_nationality" json:"patient_nationality" form:"patient_nationality"`
238
+	Province           int64     `gorm:"column:province" json:"province" form:"province"`
239
+	City               int64     `gorm:"column:city" json:"city" form:"city"`
240
+	District           int64     `gorm:"column:district" json:"district" form:"district"`
241
+	Subdistrict        int64     `gorm:"column:subdistrict" json:"subdistrict" form:"subdistrict"`
242
+	DetailAddress      string    `gorm:"column:detail_address" json:"detail_address" form:"detail_address"`
243
+	PatientHeight      int64     `gorm:"column:patient_height" json:"patient_height" form:"patient_height"`
244
+	HospitalizedNo     string    `gorm:"column:hospitalized_no" json:"hospitalized_no" form:"hospitalized_no"`
245
+	IsTerminated       int64     `gorm:"column:is_terminated" json:"is_terminated" form:"is_terminated"`
246
+	InCrrtDate         time.Time `gorm:"column:in_crrt_date" json:"in_crrt_date" form:"in_crrt_date"`
247
+	Xgbz               int64     `gorm:"column:xgbz" json:"xgbz" form:"xgbz"`
248
+	LocalInsurance     int64     `gorm:"column:local_insurance" json:"local_insurance" form:"local_insurance"`
223 249
 }
224 250
 
225 251
 func (TempHdPatient) TableName() string {
@@ -227,20 +253,20 @@ func (TempHdPatient) TableName() string {
227 253
 }
228 254
 
229 255
 type TempHdPatientOut struct {
230
-	ID              int64     `gorm:"column:id" json:"id"`
231
-	Sn              string    `gorm:"column:SN" json:"SN"`
232
-	HospitalId      string    `gorm:"column:HOSPITAL_ID" json:"HOSPITAL_ID"`
233
-	PatientNk       string    `gorm:"column:PATIENT_NK" json:"PATIENT_NK"`
234
-	SequelaeDate    time.Time `gorm:"column:SEQUELAE_DATE" json:"SEQUELAE_DATE"`
235
-	SequelaeType    string    `gorm:"column:SEQUELAE_TYPE" json:"SEQUELAE_TYPE"`
236
-	SequelaeSubType string    `gorm:"column:SEQUELAE_SUB_TYPE" json:"SEQUELAE_SUB_TYPE"`
237
-	ExtReason       string    `gorm:"column:EXT_REASON" json:"EXT_REASON"`
238
-	CreateTime      time.Time `gorm:"column:CREATE_TIME" json:"CREATE_TIME"`
239
-	Sjscsj          time.Time `gorm:"column:SJSCSJ" json:"SJSCSJ"`
240
-	Mj              string    `gorm:"column:MJ" json:"MJ"`
241
-	Xgbz            int64     `gorm:"column:XGBZ" json:"XGBZ"`
242
-	Ylyl1           string    `gorm:"column:YLYL1" json:"YLYL1"`
243
-	Ylyl2           string    `gorm:"column:YLYL2" json:"YLYL2"`
256
+	ID              int64     `gorm:"column:id" json:"id" form:"id"`
257
+	Sn              string    `gorm:"column:sn" json:"sn" form:"sn"`
258
+	HospitalId      string    `gorm:"column:hospital_id" json:"hospital_id" form:"hospital_id"`
259
+	PatientNk       string    `gorm:"column:patient_nk" json:"patient_nk" form:"patient_nk"`
260
+	SequelaeDate    time.Time `gorm:"column:sequelae_date" json:"sequelae_date" form:"sequelae_date"`
261
+	SequelaeType    string    `gorm:"column:sequelae_type" json:"sequelae_type" form:"sequelae_type"`
262
+	SequelaeSubType string    `gorm:"column:sequelae_sub_type" json:"sequelae_sub_type" form:"sequelae_sub_type"`
263
+	ExtReason       string    `gorm:"column:ext_reason" json:"ext_reason" form:"ext_reason"`
264
+	CreateTime      time.Time `gorm:"column:create_time" json:"create_time" form:"create_time"`
265
+	Sjscsj          time.Time `gorm:"column:sjscsj" json:"sjscsj" form:"sjscsj"`
266
+	Mj              string    `gorm:"column:mj" json:"mj" form:"mj"`
267
+	Xgbz            int64     `gorm:"column:xgbz" json:"xgbz" form:"xgbz"`
268
+	Ylyl1           string    `gorm:"column:ylyl1" json:"ylyl1" form:"ylyl1"`
269
+	Ylyl2           string    `gorm:"column:ylyl2" json:"ylyl2" form:"ylyl2"`
244 270
 }
245 271
 
246 272
 func (TempHdPatientOut) TableName() string {
@@ -248,37 +274,50 @@ func (TempHdPatientOut) TableName() string {
248 274
 }
249 275
 
250 276
 type TempHdPs struct {
251
-	ID                int64     `gorm:"column:id" json:"id"`
252
-	HospitalId        string    `gorm:"column:HOSPITAL_ID" json:"HOSPITAL_ID"`
253
-	PrescribeId       string    `gorm:"column:PRESCRIBE_ID" json:"PRESCRIBE_ID"`
254
-	PatientNk         string    `gorm:"column:PATIENT_NK" json:"PATIENT_NK"`
255
-	MedicalId         string    `gorm:"column:MEDICAL_ID" json:"MEDICAL_ID"`
256
-	DrId              string    `gorm:"column:DR_ID" json:"DR_ID"`
257
-	DialysisFrequency int64     `gorm:"column:DIALYSIS_FREQUENCY" json:"DIALYSIS_FREQUENCY"`
258
-	FrequencyUnit     int64     `gorm:"column:FREQUENCY_UNIT" json:"FREQUENCY_UNIT"`
259
-	DialysisDuration  float64   `gorm:"column:DIALYSIS_DURATION" json:"DIALYSIS_DURATION"`
260
-	Hdf               string    `gorm:"column:HDF" json:"HDF"`
261
-	HdfFrequencyUnit  int64     `gorm:"column:HDF_FREQUENCY_UNIT" json:"HDF_FREQUENCY_UNIT"`
262
-	HdfFrequency      int64     `gorm:"column:HDF_FREQUENCY" json:"HDF_FREQUENCY"`
263
-	HdfDuration       float64   `gorm:"column:HDF_DURATION" json:"HDF_DURATION"`
264
-	Hp                string    `gorm:"column:HP" json:"HP"`
265
-	HpFrequency       int64     `gorm:"column:HP_FREQUENCY" json:"HP_FREQUENCY"`
266
-	HpFrequencyUnit   int64     `gorm:"column:HP_FREQUENCY_UNIT" json:"HP_FREQUENCY_UNIT"`
267
-	HpDuration        float64   `gorm:"column:HP_DURATION" json:"HP_DURATION"`
268
-	K                 float64   `gorm:"column:K" json:"K"`
269
-	Ca                float64   `gorm:"column:CA" json:"CA"`
270
-	Na                float64   `gorm:"column:NA" json:"NA"`
271
-	Glucose           string    `gorm:"column:GLUCOSE" json:"GLUCOSE"`
272
-	FluxLevel         string    `gorm:"column:FLUX_LEVEL" json:"FLUX_LEVEL"`
273
-	FluxValue         string    `gorm:"column:FLUX_VALUE" json:"FLUX_VALUE"`
274
-	UseType           string    `gorm:"column:USE_TYPE" json:"USE_TYPE"`
275
-	PrescribeTime     time.Time `gorm:"column:PRESCRIBE_TIME" json:"PRESCRIBE_TIME"`
276
-	CreateTime        time.Time `gorm:"column:CREATE_TIME" json:"CREATE_TIME"`
277
-	Sjscsj            time.Time `gorm:"column:SJSCSJ" json:"SJSCSJ"`
278
-	Mj                string    `gorm:"column:MJ" json:"MJ"`
279
-	Xgbz              int64     `gorm:"column:XGBZ" json:"XGBZ"`
280
-	Ylyl1             string    `gorm:"column:YLYL1" json:"YLYL1"`
281
-	Ylyl2             string    `gorm:"column:YLYL2" json:"YLYL2"`
277
+	ID                   int64     `gorm:"column:id" json:"id" form:"id"`
278
+	HospitalId           string    `gorm:"column:hospital_id" json:"hospital_id" form:"hospital_id"`
279
+	PrescribeId          string    `gorm:"column:prescribe_id" json:"prescribe_id" form:"prescribe_id"`
280
+	PatientNk            string    `gorm:"column:patient_nk" json:"patient_nk" form:"patient_nk"`
281
+	MedicalId            string    `gorm:"column:medical_id" json:"medical_id" form:"medical_id"`
282
+	DrId                 int64     `gorm:"column:dr_id" json:"dr_id" form:"dr_id"`
283
+	Sn                   string    `gorm:"column:sn" json:"sn" form:"sn"`
284
+	DialysisFrequency    int64     `gorm:"column:dialysis_frequency" json:"dialysis_frequency" form:"dialysis_frequency"`
285
+	FrequencyUnit        int64     `gorm:"column:frequency_unit" json:"frequency_unit" form:"frequency_unit"`
286
+	DialysisDuration     float64   `gorm:"column:dialysis_duration" json:"dialysis_duration" form:"dialysis_duration"`
287
+	Hdf                  string    `gorm:"column:hdf" json:"hdf" form:"hdf"`
288
+	HdfFrequencyUnit     int64     `gorm:"column:hdf_frequency_unit" json:"hdf_frequency_unit" form:"hdf_frequency_unit"`
289
+	HdfFrequency         int64     `gorm:"column:hdf_frequency" json:"hdf_frequency" form:"hdf_frequency"`
290
+	HdfDuration          float64   `gorm:"column:hdf_duration" json:"hdf_duration" form:"hdf_duration"`
291
+	Hp                   string    `gorm:"column:hp" json:"hp" form:"hp"`
292
+	HpFrequency          int64     `gorm:"column:hp_frequency" json:"hp_frequency" form:"hp_frequency"`
293
+	HpFrequencyUnit      int64     `gorm:"column:hp_frequency_unit" json:"hp_frequency_unit" form:"hp_frequency_unit"`
294
+	HpDuration           float64   `gorm:"column:hp_duration" json:"hp_duration" form:"hp_duration"`
295
+	K                    float64   `gorm:"column:k" json:"k" form:"k"`
296
+	DialysisId           int64     `gorm:"column:dialysis_id" json:"dialysis_id" form:"dialysis_id"`
297
+	MedicineTypeId       int64     `gorm:"column:medicine_type_id" json:"medicine_type_id" form:"medicine_type_id"`
298
+	Ca                   float64   `gorm:"column:ca" json:"ca" form:"ca"`
299
+	Na                   float64   `gorm:"column:na" json:"na" form:"na"`
300
+	Glucose              int64     `gorm:"column:glucose" json:"glucose" form:"glucose"`
301
+	FluxLevel            int64     `gorm:"column:flux_level" json:"flux_level" form:"flux_level"`
302
+	FluxValue            string    `gorm:"column:flux_value" json:"flux_value" form:"flux_value"`
303
+	UseType              int64     `gorm:"column:use_type" json:"use_type" form:"use_type"`
304
+	PrescribeTime        time.Time `gorm:"column:prescribe_time" json:"prescribe_time" form:"prescribe_time"`
305
+	DialysisMembrane     int64     `gorm:"column:dialysis_membrane" json:"dialysis_membrane" form:"dialysis_membrane"`
306
+	CreateTime           time.Time `gorm:"column:create_time" json:"create_time" form:"create_time"`
307
+	PatientNo            int64     `gorm:"column:patient_no" json:"patient_no" form:"patient_no"`
308
+	Sjscsj               time.Time `gorm:"column:sjscsj" json:"sjscsj" form:"sjscsj"`
309
+	Mj                   int64     `gorm:"column:mj" json:"mj" form:"mj"`
310
+	Xgbz                 int64     `gorm:"column:xgbz" json:"xgbz" form:"xgbz"`
311
+	AType                int64     `gorm:"column:a_type" json:"a_type" form:"a_type"`
312
+	Ylyl1                string    `gorm:"column:ylyl1" json:"ylyl1" form:"ylyl1"`
313
+	Ylyl2                string    `gorm:"column:ylyl2" json:"ylyl2" form:"ylyl2"`
314
+	RrtType              int64     `gorm:"column:rrt_type" json:"rrt_type" form:"rrt_type"`
315
+	MedicineId           int64     `gorm:"column:medicine_id" json:"medicine_id" form:"medicine_id"`
316
+	ABSource             int64     `gorm:"column:a_b_source" json:"a_b_source" form:"a_b_source"`
317
+	B                    int64     `gorm:"column:b" json:"b" form:"b"`
318
+	EquipmentType        int64     `gorm:"column:equipment_type" json:"equipment_type" form:"equipment_type"`
319
+	DialysisMembraneSize int64     `gorm:"column:dialysis_membrane_size" json:"dialysis_membrane_size" form:"dialysis_membrane_size"`
320
+	UpdateTime           time.Time `gorm:"column:update_time" json:"update_time" form:"update_time"`
282 321
 }
283 322
 
284 323
 func (TempHdPs) TableName() string {
@@ -286,18 +325,18 @@ func (TempHdPs) TableName() string {
286 325
 }
287 326
 
288 327
 type TempHdPsMedicine struct {
289
-	ID             int64     `gorm:"column:id" json:"id"`
290
-	Sn             string    `gorm:"column:SN" json:"SN"`
291
-	PrescribeId    string    `gorm:"column:PRESCRIBE_ID" json:"PRESCRIBE_ID"`
292
-	HospitalId     string    `gorm:"column:HOSPITAL_ID" json:"HOSPITAL_ID"`
293
-	MedicineTypeId string    `gorm:"column:MEDICINE_TYPE_ID" json:"MEDICINE_TYPE_ID"`
294
-	MedicineId     string    `gorm:"column:MEDICINE_ID" json:"MEDICINE_ID"`
295
-	CreatedTime    time.Time `gorm:"column:CREATE_TIME" json:"CREATE_TIME"`
296
-	Sjscsj         time.Time `gorm:"column:SJSCSJ" json:"SJSCSJ"`
297
-	Mj             string    `gorm:"column:MJ" json:"MJ"`
298
-	Xgbz           int64     `gorm:"column:XGBZ" json:"XGBZ"`
299
-	Ylyl1          string    `gorm:"column:YLYL1" json:"YLYL1"`
300
-	Ylyl2          string    `gorm:"column:YLYL2" json:"YLYL2"`
328
+	ID             int64     `gorm:"column:id" json:"id" form:"id"`
329
+	Sn             string    `gorm:"column:sn" json:"sn" form:"sn"`
330
+	PrescribeId    string    `gorm:"column:prescribe_id" json:"prescribe_id" form:"prescribe_id"`
331
+	HospitalId     string    `gorm:"column:hospital_id" json:"hospital_id" form:"hospital_id"`
332
+	MedicineTypeId string    `gorm:"column:medicine_type_id" json:"medicine_type_id" form:"medicine_type_id"`
333
+	MedicineId     string    `gorm:"column:medicine_id" json:"medicine_id" form:"medicine_id"`
334
+	CreateTime     time.Time `gorm:"column:create_time" json:"create_time" form:"create_time"`
335
+	Sjscsj         time.Time `gorm:"column:sjscsj" json:"sjscsj" form:"sjscsj"`
336
+	Mj             string    `gorm:"column:mj" json:"mj" form:"mj"`
337
+	Xgbz           int64     `gorm:"column:xgbz" json:"xgbz" form:"xgbz"`
338
+	Ylyl1          string    `gorm:"column:ylyl1" json:"ylyl1" form:"ylyl1"`
339
+	Ylyl2          string    `gorm:"column:ylyl2" json:"ylyl2" form:"ylyl2"`
301 340
 }
302 341
 
303 342
 func (TempHdPsMedicine) TableName() string {
@@ -305,25 +344,29 @@ func (TempHdPsMedicine) TableName() string {
305 344
 }
306 345
 
307 346
 type TempHdInfection struct {
308
-	ID         int64     `gorm:"column:id" json:"id"`
309
-	HospitalId string    `gorm:"column:hospital_id" json:"hospital_id"`
310
-	PatientNk  string    `gorm:"column:patient_nk" json:"patient_nk"`
311
-	Hbv        string    `gorm:"column:hbv" json:"hbv"`
312
-	Hcv        string    `gorm:"column:hcv" json:"hcv"`
313
-	Rpr        string    `gorm:"column:rpr" json:"rpr"`
314
-	Hiv        string    `gorm:"column:hiv" json:"hiv"`
315
-	Hbsag      string    `gorm:"column:hbsag" json:"hbsag"`
316
-	Hbs        string    `gorm:"column:hbs" json:"hbs"`
317
-	Hbeag      string    `gorm:"column:hbeag" json:"hbeag"`
318
-	Hbe        string    `gorm:"column:hbe" json:"hbe"`
319
-	Hbc        string    `gorm:"column:hbc" json:"hbc"`
320
-	CheckDate  time.Time `gorm:"column:check_date" json:"check_date"`
321
-	CreateTime time.Time `gorm:"column:create_time" json:"create_time"`
322
-	Sjscsj     time.Time `gorm:"column:sjscsj" json:"sjscsj"`
323
-	Mj         string    `gorm:"column:mj" json:"mj"`
324
-	Xgbz       int64     `gorm:"column:xgbz" json:"xgbz"`
325
-	Ylyl1      string    `gorm:"column:ylyl1" json:"ylyl1"`
326
-	Ylyl2      string    `gorm:"column:ylyl2" json:"ylyl2"`
347
+	ID         int64     `gorm:"column:id" json:"id" form:"id"`
348
+	Sn         string    `gorm:"column:sn" json:"sn" form:"sn"`
349
+	HospitalId string    `gorm:"column:hospital_id" json:"hospital_id" form:"hospital_id"`
350
+	PatientNk  string    `gorm:"column:patient_nk" json:"patient_nk" form:"patient_nk"`
351
+	Hbv        string    `gorm:"column:hbv" json:"hbv" form:"hbv"`
352
+	Hcv        string    `gorm:"column:hcv" json:"hcv" form:"hcv"`
353
+	Rpr        string    `gorm:"column:rpr" json:"rpr" form:"rpr"`
354
+	Hiv        string    `gorm:"column:hiv" json:"hiv" form:"hiv"`
355
+	Hbsag      string    `gorm:"column:hbsag" json:"hbsag" form:"hbsag"`
356
+	Hbs        string    `gorm:"column:hbs" json:"hbs" form:"hbs"`
357
+	Hbeag      string    `gorm:"column:hbeag" json:"hbeag" form:"hbeag"`
358
+	Hbe        string    `gorm:"column:hbe" json:"hbe" form:"hbe"`
359
+	Hbc        string    `gorm:"column:hbc" json:"hbc" form:"hbc"`
360
+	CheckDate  time.Time `gorm:"column:check_date" json:"check_date" form:"check_date"`
361
+	CreateTime time.Time `gorm:"column:create_time" json:"create_time" form:"create_time"`
362
+	Sjscsj     time.Time `gorm:"column:sjscsj" json:"sjscsj" form:"sjscsj"`
363
+	Mj         string    `gorm:"column:mj" json:"mj" form:"mj"`
364
+	Xgbz       int64     `gorm:"column:xgbz" json:"xgbz" form:"xgbz"`
365
+	Ylyl1      string    `gorm:"column:ylyl1" json:"ylyl1" form:"ylyl1"`
366
+	Ylyl2      string    `gorm:"column:ylyl2" json:"ylyl2" form:"ylyl2"`
367
+	Hbsab      string    `gorm:"column:hbsab" json:"hbsab" form:"hbsab"`
368
+	Hbeab      string    `gorm:"column:hbeab" json:"hbeab" form:"hbeab"`
369
+	Hbcab      string    `gorm:"column:hbcab" json:"hbcab" form:"hbcab"`
327 370
 }
328 371
 
329 372
 func (TempHdInfection) TableName() string {
@@ -331,17 +374,19 @@ func (TempHdInfection) TableName() string {
331 374
 }
332 375
 
333 376
 type TempHdInhospital struct {
334
-	ID             int64     `gorm:"column:id" json:"id"`
335
-	HospitalId     string    `gorm:"column:hospital_id" json:"hospital_id"`
336
-	MedicalNo      string    `gorm:"column:medical_no" json:"medical_no"`
337
-	AdmissionTime  time.Time `gorm:"column:admission_time" json:"admission_time"`
338
-	AdmissionCause string    `gorm:"column:admission_cause" json:"admission_cause"`
339
-	CreateTime     time.Time `gorm:"column:create_time" json:"create_time"`
340
-	Sjscsj         time.Time `gorm:"column:sjscsj" json:"sjscsj"`
341
-	Mj             string    `gorm:"column:mj" json:"mj"`
342
-	Xgbz           int64     `gorm:"column:xgbz" json:"xgbz"`
343
-	Ylyl1          string    `gorm:"column:ylyl1" json:"ylyl1"`
344
-	Ylyl2          string    `gorm:"column:ylyl2" json:"ylyl2"`
377
+	ID                 int64     `gorm:"column:id" json:"id" form:"id"`
378
+	HospitalId         string    `gorm:"column:hospital_id" json:"hospital_id" form:"hospital_id"`
379
+	MedicalNo          string    `gorm:"column:medical_no" json:"medical_no" form:"medical_no"`
380
+	AdmissionTime      time.Time `gorm:"column:admission_time" json:"admission_time" form:"admission_time"`
381
+	AdmissionCause     int64     `gorm:"column:admission_cause" json:"admission_cause" form:"admission_cause"`
382
+	CreateTime         time.Time `gorm:"column:create_time" json:"create_time" form:"create_time"`
383
+	Sjscsj             time.Time `gorm:"column:sjscsj" json:"sjscsj" form:"sjscsj"`
384
+	Mj                 string    `gorm:"column:mj" json:"mj" form:"mj"`
385
+	Xgbz               int64     `gorm:"column:xgbz" json:"xgbz" form:"xgbz"`
386
+	Ylyl1              string    `gorm:"column:ylyl1" json:"ylyl1" form:"ylyl1"`
387
+	Ylyl2              string    `gorm:"column:ylyl2" json:"ylyl2" form:"ylyl2"`
388
+	PatientNk          int64     `gorm:"column:patient_nk" json:"patient_nk" form:"patient_nk"`
389
+	AdmissionCauseDesc string    `gorm:"column:admission_cause_desc" json:"admission_cause_desc" form:"admission_cause_desc"`
345 390
 }
346 391
 
347 392
 func (TempHdInhospital) TableName() string {
@@ -349,16 +394,17 @@ func (TempHdInhospital) TableName() string {
349 394
 }
350 395
 
351 396
 type TempHdOuthospital struct {
352
-	ID            int64     `gorm:"column:id" json:"id"`
353
-	HospitalId    string    `gorm:"column:hospital_id" json:"hospital_id"`
354
-	MedicalNo     string    `gorm:"column:medical_no" json:"medical_no"`
355
-	DischargeDate time.Time `gorm:"column:discharge_date" json:"discharge_date"`
356
-	CreateTime    time.Time `gorm:"column:create_time" json:"create_time"`
357
-	Sjscsj        time.Time `gorm:"column:sjscsj" json:"sjscsj"`
358
-	Mj            string    `gorm:"column:mj" json:"mj"`
359
-	Xgbz          int64     `gorm:"column:xgbz" json:"xgbz"`
360
-	Ylyl1         string    `gorm:"column:ylyl1" json:"ylyl1"`
361
-	Ylyl2         string    `gorm:"column:ylyl2" json:"ylyl2"`
397
+	ID            int64     `gorm:"column:id" json:"id" form:"id"`
398
+	HospitalId    string    `gorm:"column:hospital_id" json:"hospital_id" form:"hospital_id"`
399
+	MedicalNo     string    `gorm:"column:medical_no" json:"medical_no" form:"medical_no"`
400
+	DischargeDate time.Time `gorm:"column:discharge_date" json:"discharge_date" form:"discharge_date"`
401
+	CreateTime    time.Time `gorm:"column:create_time" json:"create_time" form:"create_time"`
402
+	Sjscsj        time.Time `gorm:"column:sjscsj" json:"sjscsj" form:"sjscsj"`
403
+	Mj            string    `gorm:"column:mj" json:"mj" form:"mj"`
404
+	Xgbz          int64     `gorm:"column:xgbz" json:"xgbz" form:"xgbz"`
405
+	Ylyl1         int64     `gorm:"column:ylyl1" json:"ylyl1" form:"ylyl1"`
406
+	Ylyl2         int64     `gorm:"column:ylyl2" json:"ylyl2" form:"ylyl2"`
407
+	PatientNk     int64     `gorm:"column:patient_nk" json:"patient_nk" form:"patient_nk"`
362 408
 }
363 409
 
364 410
 func (TempHdOuthospital) TableName() string {
@@ -410,20 +456,20 @@ func (DataUploadConfig) TableName() string {
410 456
 }
411 457
 
412 458
 type TempHdShift struct {
413
-	ID             int64     `gorm:"column:id" json:"id"`
414
-	PsId           string    `gorm:"column:PS_ID" json:"PS_ID"`
415
-	HospitalId     string    `gorm:"column:HOSPITAL_ID" json:"HOSPITAL_ID"`
416
-	PatientNk      string    `gorm:"column:PATIENT_NK" json:"PATIENT_NK"`
417
-	ScheduleDate   time.Time `gorm:"column:SCHEDULE_DATE" json:"SCHEDULE_DATE"`
418
-	ShiftType      string    `gorm:"column:SHIFT_TYPE" json:"SHIFT_TYPE"`
419
-	SickbedNo      string    `gorm:"column:SICKBED_NO" json:"SICKBED_NO"`
420
-	ScheduleStatus string    `gorm:"column:SCHEDULE_STATUS" json:"SCHEDULE_STATUS"`
421
-	CreateTime     time.Time `gorm:"column:CREATE_TIME" json:"CREATE_TIME"`
422
-	Sjscsj         time.Time `gorm:"column:SJSCSJ" json:"SJSCSJ"`
423
-	Mj             string    `gorm:"column:MJ" json:"MJ"`
424
-	Xgbz           int64     `gorm:"column:XGBZ" json:"XGBZ"`
425
-	Ylyl1          string    `gorm:"column:YLYL1" json:"YLYL1"`
426
-	Ylyl2          string    `gorm:"column:YLYL2" json:"YLYL2"`
459
+	ID             int64     `gorm:"column:id" json:"id" form:"id"`
460
+	PsId           string    `gorm:"column:ps_id" json:"ps_id" form:"ps_id"`
461
+	HospitalId     string    `gorm:"column:hospital_id" json:"hospital_id" form:"hospital_id"`
462
+	PatientNk      string    `gorm:"column:patient_nk" json:"patient_nk" form:"patient_nk"`
463
+	ScheduleDate   time.Time `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
464
+	ShiftType      string    `gorm:"column:shift_type" json:"shift_type" form:"shift_type"`
465
+	SickbedNo      string    `gorm:"column:sickbed_no" json:"sickbed_no" form:"sickbed_no"`
466
+	ScheduleStatus string    `gorm:"column:schedule_status" json:"schedule_status" form:"schedule_status"`
467
+	CreateTime     time.Time `gorm:"column:create_time" json:"create_time" form:"create_time"`
468
+	Sjscsj         time.Time `gorm:"column:sjscsj" json:"sjscsj" form:"sjscsj"`
469
+	Mj             string    `gorm:"column:mj" json:"mj" form:"mj"`
470
+	Xgbz           int64     `gorm:"column:xgbz" json:"xgbz" form:"xgbz"`
471
+	Ylyl1          string    `gorm:"column:ylyl1" json:"ylyl1" form:"ylyl1"`
472
+	Ylyl2          string    `gorm:"column:ylyl2" json:"ylyl2" form:"ylyl2"`
427 473
 }
428 474
 
429 475
 func (TempHdShift) TableName() string {
@@ -431,22 +477,45 @@ func (TempHdShift) TableName() string {
431 477
 }
432 478
 
433 479
 type TempHdDoctorsAdvice struct {
434
-	ID               int64     `gorm:"column:id" json:"id"`
435
-	MedicalOrDerId   string    `gorm:"column:MEDICAL_ORDER_ID" json:"MEDICAL_ORDER_ID"`
436
-	HospitalId       string    `gorm:"column:HOSPITAL_ID" json:"HOSPITAL_ID"`
437
-	DialysisId       string    `gorm:"column:DIALYSIS_ID" json:"DIALYSIS_ID"`
438
-	OrderType        string    `gorm:"column:ORDER_TYPE" json:"ORDER_TYPE"`
439
-	RrtType          string    `gorm:"column:RRT_TYPE" json:"RRT_TYPE"`
440
-	PatientNk        string    `gorm:"column:PATIENT_NK" json:"PATIENT_NK"`
441
-	DialysisDuration int64     `gorm:"column:DIALYSIS_DURATION" json:"DIALYSIS_DURATION"`
442
-	BloodVol         int64     `gorm:"column:BLOOD_VOL" json:"BLOOD_VOL"`
443
-	DryWeigh         float64   `gorm:"column:DRY_WEIGHT" json:"DRY_WEIGHT"`
444
-	CreateTime       time.Time `gorm:"column:CREATE_TIME" json:"CREATE_TIME"`
445
-	Sjscsj           time.Time `gorm:"column:SJSCSJ" json:"SJSCSJ"`
446
-	Mj               string    `gorm:"column:MJ" json:"MJ"`
447
-	Xgbz             int64     `gorm:"column:XGBZ" json:"XGBZ"`
448
-	Ylyl1            string    `gorm:"column:YLYL1" json:"YLYL1"`
449
-	Ylyl2            string    `gorm:"column:YLYL2" json:"YLYL2"`
480
+	ID                    int64     `gorm:"column:id" json:"id" form:"id"`
481
+	MedicalOrderId        string    `gorm:"column:medical_order_id" json:"medical_order_id" form:"medical_order_id"`
482
+	HospitalId            string    `gorm:"column:hospital_id" json:"hospital_id" form:"hospital_id"`
483
+	DialysisId            string    `gorm:"column:dialysis_id" json:"dialysis_id" form:"dialysis_id"`
484
+	OrderType             string    `gorm:"column:order_type" json:"order_type" form:"order_type"`
485
+	RrtType               int64     `gorm:"column:rrt_type" json:"rrt_type" form:"rrt_type"`
486
+	PatientNk             string    `gorm:"column:patient_nk" json:"patient_nk" form:"patient_nk"`
487
+	DialysisDuration      int64     `gorm:"column:dialysis_duration" json:"dialysis_duration" form:"dialysis_duration"`
488
+	BloodVol              int64     `gorm:"column:blood_vol" json:"blood_vol" form:"blood_vol"`
489
+	DryWeight             float64   `gorm:"column:dry_weight" json:"dry_weight" form:"dry_weight"`
490
+	CreateTime            time.Time `gorm:"column:create_time" json:"create_time" form:"create_time"`
491
+	Sjscsj                time.Time `gorm:"column:sjscsj" json:"sjscsj" form:"sjscsj"`
492
+	Mj                    string    `gorm:"column:mj" json:"mj" form:"mj"`
493
+	Xgbz                  int64     `gorm:"column:xgbz" json:"xgbz" form:"xgbz"`
494
+	Ylyl1                 string    `gorm:"column:ylyl1" json:"ylyl1" form:"ylyl1"`
495
+	Ylyl2                 string    `gorm:"column:ylyl2" json:"ylyl2" form:"ylyl2"`
496
+	HospitalizationNo     string    `gorm:"column:hospitalization_no" json:"hospitalization_no" form:"hospitalization_no"`
497
+	OutpatientNo          string    `gorm:"column:outpatient_no" json:"outpatient_no" form:"outpatient_no"`
498
+	RrtTypeName           string    `gorm:"column:rrt_type_name" json:"rrt_type_name" form:"rrt_type_name"`
499
+	Txq                   int64     `gorm:"column:txq" json:"txq" form:"txq"`
500
+	FluxLevel             int64     `gorm:"column:flux_level" json:"flux_level" form:"flux_level"`
501
+	ReuseFlag             int64     `gorm:"column:reuse_flag" json:"reuse_flag" form:"reuse_flag"`
502
+	MembraneType          int64     `gorm:"column:membrane_type" json:"membrane_type" form:"membrane_type"`
503
+	MembraneSize          int64     `gorm:"column:membrane_size" json:"membrane_size" form:"membrane_size"`
504
+	Dlflow                int64     `gorm:"column:dlflow" json:"dlflow" form:"dlflow"`
505
+	DlTemperature         int64     `gorm:"column:dl_temperature" json:"dl_temperature" form:"dl_temperature"`
506
+	ReplacementMode       int64     `gorm:"column:replacement_mode" json:"replacement_mode" form:"replacement_mode"`
507
+	RlAmount              int64     `gorm:"column:rl_amount" json:"rl_amount" form:"rl_amount"`
508
+	Anticoagulant         int64     `gorm:"column:anticoagulant" json:"anticoagulant" form:"anticoagulant"`
509
+	AnticoagulantQuantity int64     `gorm:"column:anticoagulant_quantity" json:"anticoagulant_quantity" form:"anticoagulant_quantity"`
510
+	InitialAmount         int64     `gorm:"column:initial_amount" json:"initial_amount" form:"initial_amount"`
511
+	DlPotassium           int64     `gorm:"column:dl_potassium" json:"dl_potassium" form:"dl_potassium"`
512
+	DlSodium              int64     `gorm:"column:dl_sodium" json:"dl_sodium" form:"dl_sodium"`
513
+	BicarbonateRadical    int64     `gorm:"column:bicarbonate_radical" json:"bicarbonate_radical" form:"bicarbonate_radical"`
514
+	MaintenanceQuantity   int64     `gorm:"column:maintenance_quantity" json:"maintenance_quantity" form:"maintenance_quantity"`
515
+	Conductivity          int64     `gorm:"column:conductivity" json:"conductivity" form:"conductivity"`
516
+	DlCalcium             int64     `gorm:"column:dl_calcium" json:"dl_calcium" form:"dl_calcium"`
517
+	ExecuteOrder          int64     `gorm:"column:execute_order" json:"execute_order" form:"execute_order"`
518
+	UpdateTime            time.Time `gorm:"column:update_time" json:"update_time" form:"update_time"`
450 519
 }
451 520
 
452 521
 func (TempHdDoctorsAdvice) TableName() string {
@@ -454,41 +523,48 @@ func (TempHdDoctorsAdvice) TableName() string {
454 523
 }
455 524
 
456 525
 type TempHdDialysis struct {
457
-	ID                    int64     `gorm:"column:id" json:"id"`
458
-	DialysisId            string    `gorm:"column:DIALYSIS_ID" json:"DIALYSIS_ID"`
459
-	HospitalId            string    `gorm:"column:HOSPITAL_ID" json:"HOSPITAL_ID"`
460
-	PatientNk             string    `gorm:"column:PATIENT_NK" json:"PATIENT_NK"`
461
-	PsId                  string    `gorm:"column:PS_ID" json:"PS_ID"`
462
-	DialysisDate          time.Time `gorm:"column:DIALYSIS_DATE" json:"DIALYSIS_DATE"`
463
-	SickbedNo             string    `gorm:"column:SICKBED_NO" json:"SICKBED_NO"`
464
-	DivisionId            string    `gorm:"column:DIVISION_ID" json:"DIVISION_ID"`
465
-	EquipmentId           string    `gorm:"column:EQUIPMENT_ID" json:"EQUIPMENT_ID"`
466
-	MixDalysis            string    `gorm:"column:MIX_DIALYSIS" json:"MIX_DIALYSIS"`
467
-	ActualufMl            int64     `gorm:"column:ACTUALUF_ML" json:"ACTUALUF_ML"`
468
-	Ufv                   int64     `gorm:"column:UFV" json:"UFV"`
469
-	TotalReplace          int64     `gorm:"column:TOTAL_REPLACE" json:"TOTAL_REPLACE"`
470
-	TotalTreatDuration    int64     `gorm:"column:TOTAL_TREAT_DURATION" json:"TOTAL_TREAT_DURATION"`
471
-	IsHospitalozation     string    `gorm:"column:IS_HOSPITALIZATION" json:"IS_HOSPITALIZATION"`
472
-	IsEmergency           string    `gorm:"column:IS_EMERGENCY" json:"IS_EMERGENCY"`
473
-	EmergencyReason       string    `gorm:"column:EMERGENCY_REASON" json:"EMERGENCY_REASON"`
474
-	IsPerioperativePeriod string    `gorm:"column:IS_PERIOPERATIVE_PERIOD" json:"IS_PERIOPERATIVE_PERIOD"`
475
-	BeforeSbp             int64     `gorm:"column:BEFORE_SBP" json:"BEFORE_SBP"`
476
-	BeforeDbp             int64     `gorm:"column:BEFORE_DBP" json:"BEFORE_DBP"`
477
-	AfterSbp              int64     `gorm:"column:AFTER_SBP" json:"AFTER_SBP"`
478
-	AfterDbp              int64     `gorm:"column:AFTER_DBP" json:"AFTER_DBP"`
479
-	BeforeWeight          float64   `gorm:"column:BEFORE_WEIGHT" json:"BEFORE_WEIGHT"`
480
-	AfterWeight           float64   `gorm:"column:AFTER_WEIGHT" json:"AFTER_WEIGHT"`
481
-	AccessId              string    `gorm:"column:ACCESS_ID" json:"ACCESS_ID"`
482
-	DialyzerId            string    `gorm:"column:DIALYZER_ID" json:"DIALYZER_ID"`
483
-	Ktv                   float64   `gorm:"column:KTV" json:"KTV"`
484
-	StartTime             time.Time `gorm:"column:START_TIME" json:"START_TIME"`
485
-	EndTime               time.Time `gorm:"column:END_TIME" json:"END_TIME"`
486
-	CreateTime            time.Time `gorm:"column:CREATE_TIME" json:"CREATE_TIME"`
487
-	Sjscsj                time.Time `gorm:"column:SJSCSJ" json:"SJSCSJ"`
488
-	Mj                    string    `gorm:"column:MJ" json:"MJ"`
489
-	Xgbz                  int64     `gorm:"column:XGBZ" json:"XGBZ"`
490
-	Ylyl1                 string    `gorm:"column:YLYL1" json:"YLYL1"`
491
-	Ylyl2                 string    `gorm:"column:YLYL2" json:"YLYL2"`
526
+	ID                    int64     `gorm:"column:id" json:"id" form:"id"`
527
+	DialysisId            string    `gorm:"column:dialysis_id" json:"dialysis_id" form:"dialysis_id"`
528
+	HospitalId            string    `gorm:"column:hospital_id" json:"hospital_id" form:"hospital_id"`
529
+	PatientNk             string    `gorm:"column:patient_nk" json:"patient_nk" form:"patient_nk"`
530
+	PsId                  string    `gorm:"column:ps_id" json:"ps_id" form:"ps_id"`
531
+	DialysisDate          time.Time `gorm:"column:dialysis_date" json:"dialysis_date" form:"dialysis_date"`
532
+	SickbedNo             string    `gorm:"column:sickbed_no" json:"sickbed_no" form:"sickbed_no"`
533
+	DivisionId            string    `gorm:"column:division_id" json:"division_id" form:"division_id"`
534
+	EquipmentId           string    `gorm:"column:equipment_id" json:"equipment_id" form:"equipment_id"`
535
+	MixDialysis           string    `gorm:"column:mix_dialysis" json:"mix_dialysis" form:"mix_dialysis"`
536
+	ActualufMl            int64     `gorm:"column:actualuf_ml" json:"actualuf_ml" form:"actualuf_ml"`
537
+	Ufv                   int64     `gorm:"column:ufv" json:"ufv" form:"ufv"`
538
+	TotalReplace          int64     `gorm:"column:total_replace" json:"total_replace" form:"total_replace"`
539
+	TotalTreatDuration    int64     `gorm:"column:total_treat_duration" json:"total_treat_duration" form:"total_treat_duration"`
540
+	IsHospitalization     string    `gorm:"column:is_hospitalization" json:"is_hospitalization" form:"is_hospitalization"`
541
+	IsEmergency           string    `gorm:"column:is_emergency" json:"is_emergency" form:"is_emergency"`
542
+	EmergencyReason       string    `gorm:"column:emergency_reason" json:"emergency_reason" form:"emergency_reason"`
543
+	IsPerioperativePeriod string    `gorm:"column:is_perioperative_period" json:"is_perioperative_period" form:"is_perioperative_period"`
544
+	BeforeSbp             int64     `gorm:"column:before_sbp" json:"before_sbp" form:"before_sbp"`
545
+	BeforeDbp             int64     `gorm:"column:before_dbp" json:"before_dbp" form:"before_dbp"`
546
+	AfterSbp              int64     `gorm:"column:after_sbp" json:"after_sbp" form:"after_sbp"`
547
+	AfterDbp              int64     `gorm:"column:after_dbp" json:"after_dbp" form:"after_dbp"`
548
+	BeforeWeight          float64   `gorm:"column:before_weight" json:"before_weight" form:"before_weight"`
549
+	AfterWeight           float64   `gorm:"column:after_weight" json:"after_weight" form:"after_weight"`
550
+	AccessId              string    `gorm:"column:access_id" json:"access_id" form:"access_id"`
551
+	DialyzerId            string    `gorm:"column:dialyzer_id" json:"dialyzer_id" form:"dialyzer_id"`
552
+	Ktv                   float64   `gorm:"column:ktv" json:"ktv" form:"ktv"`
553
+	StartTime             time.Time `gorm:"column:start_time" json:"start_time" form:"start_time"`
554
+	EndTime               time.Time `gorm:"column:end_time" json:"end_time" form:"end_time"`
555
+	CreateTime            time.Time `gorm:"column:create_time" json:"create_time" form:"create_time"`
556
+	Sjscsj                time.Time `gorm:"column:sjscsj" json:"sjscsj" form:"sjscsj"`
557
+	Mj                    string    `gorm:"column:mj" json:"mj" form:"mj"`
558
+	Xgbz                  int64     `gorm:"column:xgbz" json:"xgbz" form:"xgbz"`
559
+	Ylyl1                 string    `gorm:"column:ylyl1" json:"ylyl1" form:"ylyl1"`
560
+	Ylyl2                 string    `gorm:"column:ylyl2" json:"ylyl2" form:"ylyl2"`
561
+	UpdateTime            time.Time `gorm:"column:update_time" json:"update_time" form:"update_time"`
562
+	ChargeDoctorId        string    `gorm:"column:charge_doctor_id" json:"charge_doctor_id" form:"charge_doctor_id"`
563
+	ChargeNurseId         string    `gorm:"column:charge_nurse_id" json:"charge_nurse_id" form:"charge_nurse_id"`
564
+	UpNurseId             string    `gorm:"column:up_nurse_id" json:"up_nurse_id" form:"up_nurse_id"`
565
+	DownNurseId           string    `gorm:"column:down_nurse_id" json:"down_nurse_id" form:"down_nurse_id"`
566
+	CheckNurseId          string    `gorm:"column:check_nurse_id" json:"check_nurse_id" form:"check_nurse_id"`
567
+	PunctureNurseId       string    `gorm:"column:puncture_nurse_id" json:"puncture_nurse_id" form:"puncture_nurse_id"`
492 568
 }
493 569
 
494 570
 func (TempHdDialysis) TableName() string {
@@ -496,33 +572,35 @@ func (TempHdDialysis) TableName() string {
496 572
 }
497 573
 
498 574
 type TempHdMiddle struct {
499
-	ID             int64     `gorm:"column:id" json:"id"`
500
-	Sn             string    `gorm:"column:SN" json:"SN"`
501
-	HospitalId     string    `gorm:"column:HOSPITAL_ID" json:"HOSPITAL_ID"`
502
-	PatientNk      string    `gorm:"column:PATIENT_NK" json:"PATIENT_NK"`
503
-	DialysisId     string    `gorm:"column:DIALYSIS_ID" json:"DIALYSIS_ID"`
504
-	MonitorTime    time.Time `gorm:"column:MONITOR_TIME" json:"MONITOR_TIME"`
505
-	Sbp            int64     `gorm:"column:SBP" json:"SBP"`
506
-	Dbp            int64     `gorm:"column:DBP" json:"DBP"`
507
-	P              int64     `gorm:"column:P" json:"P"`
508
-	Ns             int64     `gorm:"column:NS" json:"NS"`
509
-	Qb             int64     `gorm:"column:QB" json:"QB"`
510
-	Ap             int64     `gorm:"column:AP" json:"AP"`
511
-	Vp             int64     `gorm:"column:VP" json:"VP"`
512
-	Tmp            int64     `gorm:"column:TMP" json:"TMP"`
513
-	Ufr            int64     `gorm:"column:UFR" json:"UFR"`
514
-	Ufv            int64     `gorm:"column:UFV" json:"UFV"`
515
-	OnLine         int64     `gorm:"column:ON_LINE" json:"ON_LINE"`
516
-	Spo2           float64   `gorm:"column:SPO2" json:"SPO2"`
517
-	R              int64     `gorm:"column:R" json:"R"`
518
-	OtherSituation string    `gorm:"column:OTHER_SITUATION" json:"OTHER_SITUATION"`
519
-	Nurse          string    `gorm:"column:NURSE" json:"NURSE"`
520
-	CreateTime     time.Time `gorm:"column:CREATE_TIME" json:"CREATE_TIME"`
521
-	Sjscsj         time.Time `gorm:"column:SJSCSJ" json:"SJSCSJ"`
522
-	Mj             string    `gorm:"column:MJ" json:"MJ"`
523
-	Xgbz           int64     `gorm:"column:XGBZ" json:"XGBZ"`
524
-	Ylyl1          string    `gorm:"column:YLYL1" json:"YLYL1"`
525
-	Ylyl2          string    `gorm:"column:YLYL2" json:"YLYL2"`
575
+	ID             int64     `gorm:"column:id" json:"id" form:"id"`
576
+	Sn             string    `gorm:"column:sn" json:"sn" form:"sn"`
577
+	HospitalId     string    `gorm:"column:hospital_id" json:"hospital_id" form:"hospital_id"`
578
+	PatientNk      string    `gorm:"column:patient_nk" json:"patient_nk" form:"patient_nk"`
579
+	DialysisId     string    `gorm:"column:dialysis_id" json:"dialysis_id" form:"dialysis_id"`
580
+	MonitorTime    time.Time `gorm:"column:monitor_time" json:"monitor_time" form:"monitor_time"`
581
+	Sbp            int64     `gorm:"column:sbp" json:"sbp" form:"sbp"`
582
+	Dbp            int64     `gorm:"column:dbp" json:"dbp" form:"dbp"`
583
+	P              int64     `gorm:"column:p" json:"p" form:"p"`
584
+	Ns             int64     `gorm:"column:ns" json:"ns" form:"ns"`
585
+	Qb             int64     `gorm:"column:qb" json:"qb" form:"qb"`
586
+	Ap             int64     `gorm:"column:ap" json:"ap" form:"ap"`
587
+	Vp             int64     `gorm:"column:vp" json:"vp" form:"vp"`
588
+	Tmp            int64     `gorm:"column:tmp" json:"tmp" form:"tmp"`
589
+	Ufr            int64     `gorm:"column:ufr" json:"ufr" form:"ufr"`
590
+	Ufv            int64     `gorm:"column:ufv" json:"ufv" form:"ufv"`
591
+	OnLine         int64     `gorm:"column:on_line" json:"on_line" form:"on_line"`
592
+	Spo2           float64   `gorm:"column:spo2" json:"spo2" form:"spo2"`
593
+	R              int64     `gorm:"column:r" json:"r" form:"r"`
594
+	OtherSituation string    `gorm:"column:other_situation" json:"other_situation" form:"other_situation"`
595
+	Nurse          string    `gorm:"column:nurse" json:"nurse" form:"nurse"`
596
+	CreateTime     time.Time `gorm:"column:create_time" json:"create_time" form:"create_time"`
597
+	Sjscsj         time.Time `gorm:"column:sjscsj" json:"sjscsj" form:"sjscsj"`
598
+	Mj             string    `gorm:"column:mj" json:"mj" form:"mj"`
599
+	Xgbz           int64     `gorm:"column:xgbz" json:"xgbz" form:"xgbz"`
600
+	Ylyl1          string    `gorm:"column:ylyl1" json:"ylyl1" form:"ylyl1"`
601
+	Ylyl2          string    `gorm:"column:ylyl2" json:"ylyl2" form:"ylyl2"`
602
+	UpdateBy       int64     `gorm:"column:update_by" json:"update_by" form:"update_by"`
603
+	UpdateTime     time.Time `gorm:"column:update_time" json:"update_time" form:"update_time"`
526 604
 }
527 605
 
528 606
 func (TempHdMiddle) TableName() string {
@@ -530,18 +608,19 @@ func (TempHdMiddle) TableName() string {
530 608
 }
531 609
 
532 610
 type TempHdDivision struct {
533
-	ID           int64     `gorm:"column:id" json:"id"`
534
-	DivisionId   string    `gorm:"column:division_id" json:"division_id"`
535
-	HospitalId   string    `gorm:"column:hospital_id" json:"hospital_id"`
536
-	DevisionName string    `gorm:"column:devision_name" json:"devision_name"`
537
-	UpdateFlag   string    `gorm:"column:update_flag" json:"update_flag"`
538
-	UpdateTime   time.Time `gorm:"column:update_time" json:"update_time"`
539
-	CreateTime   time.Time `gorm:"column:create_time" json:"create_time"`
540
-	Sjscsj       time.Time `gorm:"column:sjscsj" json:"sjscsj"`
541
-	Mj           string    `gorm:"column:mj" json:"mj"`
542
-	Xgbz         int64     `gorm:"column:xgbz" json:"xgbz"`
543
-	Ylyl1        string    `gorm:"column:ylyl1" json:"ylyl1"`
544
-	Ylyl2        string    `gorm:"column:ylyl2" json:"ylyl2"`
611
+	ID           int64     `gorm:"column:id" json:"id" form:"id"`
612
+	DivisionId   int64     `gorm:"column:division_id" json:"division_id" form:"division_id"`
613
+	HospitalId   string    `gorm:"column:hospital_id" json:"hospital_id" form:"hospital_id"`
614
+	DivisionName string    `gorm:"column:division_name" json:"division_name" form:"division_name"`
615
+	UpdateFlag   int64     `gorm:"column:update_flag" json:"update_flag" form:"update_flag"`
616
+	UpdateTime   time.Time `gorm:"column:update_time" json:"update_time" form:"update_time"`
617
+	CreateTime   time.Time `gorm:"column:create_time" json:"create_time" form:"create_time"`
618
+	Sjscsj       time.Time `gorm:"column:sjscsj" json:"sjscsj" form:"sjscsj"`
619
+	Mj           string    `gorm:"column:mj" json:"mj" form:"mj"`
620
+	Xgbz         int64     `gorm:"column:xgbz" json:"xgbz" form:"xgbz"`
621
+	Ylyl1        string    `gorm:"column:ylyl1" json:"ylyl1" form:"ylyl1"`
622
+	Ylyl2        string    `gorm:"column:ylyl2" json:"ylyl2" form:"ylyl2"`
623
+	DivisionType int64     `gorm:"column:division_type" json:"division_type" form:"division_type"`
545 624
 }
546 625
 
547 626
 func (TempHdDivision) TableName() string {

+ 13 - 13
service/city_data_uoload_service.go View File

@@ -128,7 +128,7 @@ func BatchCreateWMsRecord(wms []*sz.TempHdWm, rdb *gorm.DB) (err error) {
128 128
 	if len(wms) > 0 {
129 129
 		utx := rdb.Begin()
130 130
 		if len(wms) > 0 {
131
-			thisSQL := "INSERT INTO t_hd_wm (HOSPITAL_ID, EQUIPMENT_ID, EQUIPMENT_BRAND, EQUIPMENT_MODEL, ENABLE_TIME,DISCARDED_TIME,EQUIPMENT_TYPE,XGBZ,CREATE_TIME,UPDATE_TIME,SJSCSJ) VALUES "
131
+			thisSQL := "INSERT INTO t_hd_wm (hospital_id, equipment_id, equipment_brand, equipment_model, enable_time,discarded_time,equipment_type,xgbz,create_time,update_time,sjscsj) VALUES "
132 132
 			insertParams := make([]string, 0)
133 133
 			insertData := make([]interface{}, 0)
134 134
 			for _, wm := range wms {
@@ -162,7 +162,7 @@ func BatchCreateStaffRecord(staffs []*sz.TempHdStaff, rdb *gorm.DB) (err error)
162 162
 	if len(staffs) > 0 {
163 163
 		utx := rdb.Begin()
164 164
 		if len(staffs) > 0 {
165
-			thisSQL := "INSERT INTO t_hd_staff (HOSPITAL_ID, STAFF_ID, STAFF_NAME, POSITION, PERMANENT_TYPE,CREATE_TIME,UPDATE_TIME,SJSCSJ,MJ) VALUES "
165
+			thisSQL := "INSERT INTO t_hd_staff (hospital_id, staff_id, staff_name, position, permanent_type,create_time,update_time,sjscsj,mj) VALUES "
166 166
 			insertParams := make([]string, 0)
167 167
 			insertData := make([]interface{}, 0)
168 168
 			for _, info := range staffs {
@@ -193,7 +193,7 @@ func BatchCreatePatinet(patients []*sz.TempHdPatient, rdb *gorm.DB) (err error)
193 193
 	if len(patients) > 0 {
194 194
 		utx := rdb.Begin()
195 195
 		if len(patients) > 0 {
196
-			thisSQL := "INSERT INTO t_hd_patient (HOSPITAL_ID, PATIENT_NK, CARD_NO, CARD_TYPE, ID_NO,ID_TYPE,PATIENT_NAME,GENDER,BORN_DATE,DIAGNOSIS_SUMMARY,IS_CRF,CREATE_TIME,UPDATE_TIME,SJSCSJ,XGBZ) VALUES "
196
+			thisSQL := "INSERT INTO t_hd_patient (hospital_id, patient_nk, card_no, card_type, id_no,id_type,patient_name,gender,born_date,diagnosis_summary,is_crf,create_time,update_time,sjscsj,xgbz) VALUES "
197 197
 			insertParams := make([]string, 0)
198 198
 			insertData := make([]interface{}, 0)
199 199
 			for _, info := range patients {
@@ -209,7 +209,7 @@ func BatchCreatePatinet(patients []*sz.TempHdPatient, rdb *gorm.DB) (err error)
209 209
 				insertData = append(insertData, info.BornDate)
210 210
 				insertData = append(insertData, info.DiagnosisSummary)
211 211
 				insertData = append(insertData, info.IsCrf)
212
-				insertData = append(insertData, info.CreatedTime)
212
+				insertData = append(insertData, info.CreateTime)
213 213
 				insertData = append(insertData, info.UpdateTime)
214 214
 				insertData = append(insertData, info.Sjscsj)
215 215
 				insertData = append(insertData, info.Xgbz)
@@ -231,7 +231,7 @@ func BatchCreateSchedual(patients []*sz.TempHdShift, rdb *gorm.DB) (err error) {
231 231
 	if len(patients) > 0 {
232 232
 		utx := rdb.Begin()
233 233
 		if len(patients) > 0 {
234
-			thisSQL := "INSERT INTO t_hd_shift (PS_ID, HOSPITAL_ID, PATIENT_NK, SCHEDULE_DATE, SHIFT_TYPE,SICKBED_NO,SCHEDULE_STATUS,CREATE_TIME,SJSCSJ,XGBZ) VALUES "
234
+			thisSQL := "INSERT INTO t_hd_shift (ps_id, hospital_id, patient_nk, schedule_date, shift_type,sickbed_no,schedule_status,create_time,sjscsj,xgbz) VALUES "
235 235
 			insertParams := make([]string, 0)
236 236
 			insertData := make([]interface{}, 0)
237 237
 			for _, info := range patients {
@@ -316,7 +316,7 @@ func BatchCreatePsm(psms []*sz.TempHdPsMedicine, rdb *gorm.DB) (err error) {
316 316
 				insertData = append(insertData, psm.HospitalId)
317 317
 				insertData = append(insertData, psm.MedicineTypeId)
318 318
 				insertData = append(insertData, psm.MedicineId)
319
-				insertData = append(insertData, psm.CreatedTime)
319
+				insertData = append(insertData, psm.CreateTime)
320 320
 				insertData = append(insertData, psm.Sjscsj)
321 321
 				insertData = append(insertData, psm.Xgbz)
322 322
 
@@ -411,12 +411,12 @@ func BatchCreateDoctorsAdvice(advices []*sz.TempHdDoctorsAdvice, rdb *gorm.DB) (
411 411
 	if len(advices) > 0 {
412 412
 		utx := rdb.Begin()
413 413
 		if len(advices) > 0 {
414
-			thisSQL := "INSERT INTO t_hd_doctors_advice (MEDICAL_ORDER_ID, HOSPITAL_ID,DIALYSIS_ID,ORDER_TYPE,PATIENT_NK,DIALYSIS_DURATION,BLOOD_VOL,CREATE_TIME,SJSCSJ,XGBZ) VALUES "
414
+			thisSQL := "INSERT INTO t_hd_doctors_advice (medical_order_id, hospital_id,dialysis_id,order_type,patient_nk,dialysis_duration,blood_vol,create_time,sjscsj,xgbz) VALUES "
415 415
 			insertParams := make([]string, 0)
416 416
 			insertData := make([]interface{}, 0)
417 417
 			for _, advice := range advices {
418 418
 				insertParams = append(insertParams, "(?,?,?,?,?,?,?,?,?,?)")
419
-				insertData = append(insertData, advice.MedicalOrDerId)
419
+				insertData = append(insertData, advice.MedicalOrderId)
420 420
 				insertData = append(insertData, advice.HospitalId)
421 421
 				insertData = append(insertData, advice.DialysisId)
422 422
 				insertData = append(insertData, advice.OrderType)
@@ -444,7 +444,7 @@ func BatchCreateMonitor(advices []*sz.TempHdMiddle, rdb *gorm.DB) (err error) {
444 444
 	if len(advices) > 0 {
445 445
 		utx := rdb.Begin()
446 446
 		if len(advices) > 0 {
447
-			thisSQL := "INSERT INTO t_hd_middle (HOSPITAL_ID, PATIENT_NK,DIALYSIS_ID,MONITOR_TIME,SBP,DBP,CREATE_TIME,SJSCSJ,XGBZ) VALUES "
447
+			thisSQL := "INSERT INTO t_hd_middle (hospital_id, patient_nk,dialysis_id,monitor_time,sbp,dbp,create_time,sjscsj,xgbz) VALUES "
448 448
 			insertParams := make([]string, 0)
449 449
 			insertData := make([]interface{}, 0)
450 450
 			for _, advice := range advices {
@@ -493,14 +493,14 @@ func BatchCreateOtherMachineRecord(wms []*sz.TempHdOtherMachine, rdb *gorm.DB) (
493 493
 	if len(wms) > 0 {
494 494
 		utx := rdb.Begin()
495 495
 		if len(wms) > 0 {
496
-			thisSQL := "INSERT INTO t_hd_other_machine (HOSPITAL_ID, EQUIPMENT_ID, EQUIPMENT_BRAND, EQUIPMENT_MODEL, ENABLE_TIME,DISCARDED_TIME,XGBZ,CREATE_TIME,UPDATE_TIME,SJSCSJ) VALUES "
496
+			thisSQL := "INSERT INTO t_hd_other_machine (hospital_id, equipment_id, equipment_brand, equipment_model, enable_time,discarded_time,xgbz,create_time,update_time,sjscsj) VALUES "
497 497
 			insertParams := make([]string, 0)
498 498
 			insertData := make([]interface{}, 0)
499 499
 			for _, wm := range wms {
500 500
 				insertParams = append(insertParams, "(?,?,?,?,?,?,?,?,?,?)")
501 501
 				insertData = append(insertData, wm.HospitalId)
502 502
 				insertData = append(insertData, wm.EquipmentId)
503
-				insertData = append(insertData, wm.EquipmentBrand)
503
+				insertData = append(insertData, wm.EquipmentType)
504 504
 				insertData = append(insertData, wm.EquipmentModel)
505 505
 				insertData = append(insertData, wm.EnableTime)
506 506
 				insertData = append(insertData, wm.DiscardedTime)
@@ -526,7 +526,7 @@ func BatchCreateMainTain(maintain []*sz.TempHdMaintain, rdb *gorm.DB) (err error
526 526
 	if len(maintain) > 0 {
527 527
 		utx := rdb.Begin()
528 528
 		if len(maintain) > 0 {
529
-			thisSQL := "INSERT INTO t_hd_maintain (HOSPITAL_ID, EQUIPMENT_ID, EQUIPMENT_TYPE, REPAIR_TIME, XGBZ,CREATE_TIME,SJSCSJ) VALUES "
529
+			thisSQL := "INSERT INTO t_hd_maintain (hospital_id, equipment_id, equipment_type, repair_time, xgbz,create_time,sjscsj) VALUES "
530 530
 			insertParams := make([]string, 0)
531 531
 			insertData := make([]interface{}, 0)
532 532
 			for _, wm := range maintain {
@@ -566,7 +566,7 @@ func BatchCreateHDMRecord(wms []*sz.TempHdDm, rdb *gorm.DB) (err error) {
566 566
 	if len(wms) > 0 {
567 567
 		utx := rdb.Begin()
568 568
 		if len(wms) > 0 {
569
-			thisSQL := "INSERT INTO t_hd_dm (HOSPITAL_ID, EQUIPMENT_ID,SICKBED_NO, EQUIPMENT_BRAND, EQUIPMENT_MODEL, ENABLE_TIME,DISCARDED_TIME,STATUS,EQUIPMENT_TYPE, XGBZ,CREATE_TIME,UPDATE_TIME,SJSCSJ) VALUES "
569
+			thisSQL := "INSERT INTO t_hd_dm (hospital_id, equipment_id,sickbed_no, equipment_brand, equipment_model, enable_time,discarded_time,status,equipment_type, xgbz,create_time,update_time,sjscsj) VALUES "
570 570
 			insertParams := make([]string, 0)
571 571
 			insertData := make([]interface{}, 0)
572 572
 			for _, wm := range wms {

+ 16 - 2
service/db.go View File

@@ -20,6 +20,7 @@ import (
20 20
 	"fmt"
21 21
 	"github.com/astaxie/beego"
22 22
 	"github.com/jinzhu/gorm"
23
+	_ "github.com/jinzhu/gorm/dialects/mssql"
23 24
 	_ "github.com/jinzhu/gorm/dialects/mysql" // mysql
24 25
 )
25 26
 
@@ -30,7 +31,7 @@ var writeUserDb *gorm.DB
30 31
 
31 32
 var err error
32 33
 
33
-func CreateDB(Host string,Port string,User string,Pass string,Name string) (rsdDb *gorm.DB,err error){
34
+func CreateDB(Host string, Port string, User string, Pass string, Name string) (rsdDb *gorm.DB, err error) {
34 35
 	rdb := fmt.Sprintf("%s:%s@tcp(%s:%s)/%s?charset=utf8mb4&parseTime=true", User, Pass, Host, Port, Name)
35 36
 	rsdDb, err = gorm.Open("mysql", rdb)
36 37
 	if err != nil {
@@ -39,7 +40,20 @@ func CreateDB(Host string,Port string,User string,Pass string,Name string) (rsdD
39 40
 	rsdDb.DB().SetMaxIdleConns(5)
40 41
 	rsdDb.DB().SetMaxOpenConns(20)
41 42
 	rsdDb.LogMode(true)
42
-	return 
43
+	return
44
+}
45
+
46
+func CreateSqlServiceDB(Host string, Port string, User string, Pass string, Name string) (rsdDb *gorm.DB, err error) {
47
+	//rdb := fmt.Sprintf("%s:%s@tcp(%s:%s)/%s?charset=utf8mb4&parseTime=true", User, Pass, Host, Port, Name)
48
+	rudsn := fmt.Sprintf("server=%s;port=%s;database=%s;user id=%s;password=%s", Host, Port, Name, User, Pass)
49
+	rsdDb, err = gorm.Open("mysql", rudsn)
50
+	if err != nil {
51
+		//beego.Error(err)
52
+	}
53
+	rsdDb.DB().SetMaxIdleConns(5)
54
+	rsdDb.DB().SetMaxOpenConns(20)
55
+	rsdDb.LogMode(true)
56
+	return
43 57
 }
44 58
 
45 59
 func CloseDB(DB *gorm.DB) {