|
@@ -0,0 +1,122 @@
|
|
1
|
+package models
|
|
2
|
+
|
|
3
|
+type PrintPatient struct {
|
|
4
|
+ ID int64 `gorm:"column:id" json:"id" form:"id"`
|
|
5
|
+ UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
|
|
6
|
+ Name string `gorm:"column:name" json:"name" form:"name"`
|
|
7
|
+ Lapseto int64 `gorm:"column:lapseto" json:"lapseto" form:"lapseto"`
|
|
8
|
+ Status int64 `gorm:"column:status" json:"status" form:"status"`
|
|
9
|
+ HisPrintPatient HisPrintPatient `gorm:"ForeignKey:PatientId;AssociationForeignKey:ID" json:"his_patient"`
|
|
10
|
+ HisPrescriptionInfoTwo HisPrescriptionInfoTwo `gorm:"ForeignKey:PatientId;AssociationForeignKey:ID" json:"info"`
|
|
11
|
+ HisPrintPrescription []*HisPrintPrescription `gorm:"ForeignKey:PatientId;AssociationForeignKey:ID" json:"prescriptions"`
|
|
12
|
+}
|
|
13
|
+
|
|
14
|
+func (PrintPatient) TableName() string {
|
|
15
|
+ return "xt_patients"
|
|
16
|
+}
|
|
17
|
+
|
|
18
|
+type HisPrintPatient struct {
|
|
19
|
+ ID int64 `gorm:"column:id" json:"id" form:"id"`
|
|
20
|
+ BalanceAccountsType int64 `gorm:"column:balance_accounts_type" json:"balance_accounts_type" form:"balance_accounts_type"`
|
|
21
|
+ MedicalInsuranceNumber string `gorm:"column:medical_insurance_number" json:"medical_insurance_number" form:"medical_insurance_number"`
|
|
22
|
+ Name string `gorm:"column:name" json:"name" form:"name"`
|
|
23
|
+ Gender int64 `gorm:"column:gender" json:"gender" form:"gender"`
|
|
24
|
+ IdType int64 `gorm:"column:id_type" json:"id_type" form:"id_type"`
|
|
25
|
+ RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
|
|
26
|
+ PhoneNumber string `gorm:"column:phone_number" json:"phone_number" form:"phone_number"`
|
|
27
|
+ IdCardNo string `gorm:"column:id_card_no" json:"id_card_no" form:"id_card_no"`
|
|
28
|
+ RegisterType int64 `gorm:"column:register_type" json:"register_type" form:"register_type"`
|
|
29
|
+ AdminUserId int64 `gorm:"column:admin_user_id" json:"admin_user_id" form:"admin_user_id"`
|
|
30
|
+ Departments int64 `gorm:"column:departments" json:"departments" form:"departments"`
|
|
31
|
+ Total float64 `gorm:"column:total" json:"total" form:"total"`
|
|
32
|
+ UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
|
|
33
|
+ Status int64 `gorm:"column:status" json:"status" form:"status"`
|
|
34
|
+ PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
|
|
35
|
+ Number string `gorm:"column:number" json:"number" form:"number"`
|
|
36
|
+ Doctor int64 `gorm:"column:doctor" json:"doctor" form:"doctor"`
|
|
37
|
+ IsReturn int64 `gorm:"column:is_return" json:"is_return" form:"is_return"`
|
|
38
|
+ PsnNo string `gorm:"column:psn_no" json:"psn_no" form:"psn_no"`
|
|
39
|
+ PsnCertType string `gorm:"column:psn_cert_type" json:"psn_cert_type" form:"psn_cert_type"`
|
|
40
|
+ Certno string `gorm:"column:certno" json:"certno" form:"certno"`
|
|
41
|
+ PsnName string `gorm:"column:psn_name" json:"psn_name" form:"psn_name"`
|
|
42
|
+ Gend string `gorm:"column:gend" json:"gend" form:"gend"`
|
|
43
|
+ Naty string `gorm:"column:naty" json:"naty" form:"naty"`
|
|
44
|
+ Brdy string `gorm:"column:brdy" json:"brdy" form:"brdy"`
|
|
45
|
+ Iinfo string `gorm:"column:iinfo" json:"iinfo" form:"iinfo"`
|
|
46
|
+ Idetinfo string `gorm:"column:idetinfo" json:"idetinfo" form:"idetinfo"`
|
|
47
|
+ IptOtpNo string `gorm:"column:ipt_otp_no" json:"ipt_otp_no" form:"ipt_otp_no"`
|
|
48
|
+ Phone string `gorm:"column:phone" json:"phone" form:"phone"`
|
|
49
|
+ SocialType int64 `gorm:"column:social_type" json:"social_type" form:"social_type"`
|
|
50
|
+ IdCardType int64 `gorm:"column:id_card_type" json:"id_card_type" form:"id_card_type"`
|
|
51
|
+ PType int64 `gorm:"column:p_type" json:"p_type" form:"p_type"`
|
|
52
|
+ Diagnosis string `gorm:"column:diagnosis" json:"diagnosis" form:"diagnosis"`
|
|
53
|
+ SickType int64 `gorm:"column:sick_type" json:"sick_type" form:"sick_type"`
|
|
54
|
+ PatientInfo string `gorm:"column:patient_info" json:"patient_info" form:"patient_info"`
|
|
55
|
+}
|
|
56
|
+
|
|
57
|
+func (HisPrintPatient) TableName() string {
|
|
58
|
+ return "his_patient"
|
|
59
|
+}
|
|
60
|
+
|
|
61
|
+type HisPrintPrescription struct {
|
|
62
|
+ ID int64 `gorm:"column:id" json:"id" form:"id"`
|
|
63
|
+ UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
|
|
64
|
+ RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
|
|
65
|
+ PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
|
|
66
|
+ HisPatientId int64 `gorm:"column:his_patient_id" json:"his_patient_id" form:"his_patient_id"`
|
|
67
|
+ Status int64 `gorm:"column:status" json:"status" form:"status"`
|
|
68
|
+ Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
|
|
69
|
+ Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
|
|
70
|
+ Number string `gorm:"column:number" json:"number" form:"number"`
|
|
71
|
+ Type int64 `gorm:"column:type" json:"type" form:"type"`
|
|
72
|
+ Doctor string `gorm:"column:doctor" json:"doctor" form:"doctor"`
|
|
73
|
+ Creator int64 `gorm:"column:creator" json:"creator" form:"creator"`
|
|
74
|
+ Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
|
|
75
|
+ OrderStatus int64 `gorm:"column:order_status" json:"order_status" form:"order_status"`
|
|
76
|
+ PreTime int64 `gorm:"column:pre_time" json:"pre_time" form:"pre_time"`
|
|
77
|
+ BatchNumber string `gorm:"column:batch_number" json:"batch_number" form:"batch_number"`
|
|
78
|
+ PrescriptionNumber string `gorm:"column:prescription_number" json:"prescription_number" form:"prescription_number"`
|
|
79
|
+ Patients Patients `gorm:"ForeignKey:PatientId;AssociationForeignKey:ID" json:"patient"`
|
|
80
|
+ HisPatient VMHisPatient `gorm:"ForeignKey:PatientId;AssociationForeignKey:patient_id" json:"hisPatient"`
|
|
81
|
+ HisDoctorAdviceInfo []*HisDoctorAdviceInfo `gorm:"ForeignKey:PrescriptionId;AssociationForeignKey:ID" json:"advices"`
|
|
82
|
+ HisPrescriptionProject []*HisPrescriptionProject `gorm:"ForeignKey:PrescriptionId;AssociationForeignKey:ID" json:"project"`
|
|
83
|
+ HisAdditionalCharge []*HisAdditionalCharge `gorm:"ForeignKey:PrescriptionId;AssociationForeignKey:ID" json:"addition"`
|
|
84
|
+ HisPrescriptionInfo HisPrescriptionInfo `gorm:"ForeignKey:PatientId,RecordDate;AssociationForeignKey:PatientId,ScheduleDate" json:"info"`
|
|
85
|
+ HisOrder HisOrder `gorm:"ForeignKey:PrescriptionId;AssociationForeignKey:ID" json:"addition"`
|
|
86
|
+ Total string `gorm:"-" json:"total" form:"total"`
|
|
87
|
+ PType int64 `gorm:"column:p_type" json:"p_type" form:"p_type"`
|
|
88
|
+ MedType string `gorm:"column:med_type" json:"med_type" form:"med_type"`
|
|
89
|
+ TempHisOrder TempHisOrder `gorm:"ForeignKey:Number,MedType;AssociationForeignKey:BatchNumber,MedType" json:"order"`
|
|
90
|
+}
|
|
91
|
+
|
|
92
|
+func (HisPrintPrescription) TableName() string {
|
|
93
|
+ return "his_prescription"
|
|
94
|
+}
|
|
95
|
+
|
|
96
|
+type HisPrescriptionInfoTwo struct {
|
|
97
|
+ ID int64 `gorm:"column:id" json:"id" form:"id"`
|
|
98
|
+ UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
|
|
99
|
+ RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
|
|
100
|
+ PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
|
|
101
|
+ HisPatientId int64 `gorm:"column:his_patient_id" json:"his_patient_id" form:"his_patient_id"`
|
|
102
|
+ Status int64 `gorm:"column:status" json:"status" form:"status"`
|
|
103
|
+ Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
|
|
104
|
+ Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
|
|
105
|
+ Creator int64 `gorm:"column:creator" json:"creator" form:"creator"`
|
|
106
|
+ Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
|
|
107
|
+ Diagnosis string `gorm:"column:diagnosis" json:"diagnosis" form:"diagnosis"`
|
|
108
|
+ RegisterType int64 `gorm:"column:register_type" json:"register_type" form:"register_type"`
|
|
109
|
+ Doctor string `gorm:"column:doctor" json:"doctor" form:"doctor"`
|
|
110
|
+ Departments string `gorm:"column:departments" json:"departments" form:"departments"`
|
|
111
|
+ SickHistory string `gorm:"column:sick_history" json:"sick_history" form:"sick_history"`
|
|
112
|
+ PrescriptionNumber string `gorm:"column:prescription_number" json:"prescription_number" form:"prescription_number"`
|
|
113
|
+ BatchNumber string `gorm:"column:batch_number" json:"batch_number" form:"batch_number"`
|
|
114
|
+ PrescriptionStatus int64 `gorm:"column:prescription_status" json:"prescription_status" form:"prescription_status"`
|
|
115
|
+ DoctorId int64 `gorm:"column:doctor_id" json:"doctor_id" form:"doctor_id"`
|
|
116
|
+ DepartmentId int64 `gorm:"column:department_id" json:"department_id" form:"department_id"`
|
|
117
|
+ SickType int64 `gorm:"column:sick_type" json:"sick_type" form:"sick_type"`
|
|
118
|
+}
|
|
119
|
+
|
|
120
|
+func (HisPrescriptionInfoTwo) TableName() string {
|
|
121
|
+ return "his_prescription_info"
|
|
122
|
+}
|