新增获取处方列表-分页
This commit is contained in:
@@ -8,30 +8,36 @@ import (
|
||||
|
||||
// OrderPrescription 订单-处方表
|
||||
type OrderPrescription struct {
|
||||
OrderPrescriptionId int64 `gorm:"column:order_prescription_id;type:bigint(19);primary_key;comment:主键id" json:"order_prescription_id"`
|
||||
OrderInquiryId int64 `gorm:"column:order_inquiry_id;type:bigint(19);comment:订单-问诊id;NOT NULL" json:"order_inquiry_id"`
|
||||
DoctorId int64 `gorm:"column:doctor_id;type:bigint(19);comment:医生id;NOT NULL" json:"doctor_id"`
|
||||
PatientId int64 `gorm:"column:patient_id;type:bigint(19);comment:患者id" json:"patient_id"`
|
||||
FamilyId int64 `gorm:"column:family_id;type:bigint(19);comment:家庭成员id(就诊用户)" json:"family_id"`
|
||||
PharmacistId int64 `gorm:"column:pharmacist_id;type:bigint(19);comment:药师id" json:"pharmacist_id"`
|
||||
PrescriptionStatus int `gorm:"column:prescription_status;type:tinyint(1);comment:处方状态(1:待审核 2:待使用 3:已失效 4:已使用)" json:"prescription_status"`
|
||||
PharmacistAuditStatus int `gorm:"column:pharmacist_audit_status;type:tinyint(1);default:0;comment:药师审核状态(0:审核中 1:审核成功 2:审核驳回)" json:"pharmacist_audit_status"`
|
||||
PharmacistVerifyTime LocalTime `gorm:"column:pharmacist_verify_time;type:datetime;comment:药师审核时间" json:"pharmacist_verify_time"`
|
||||
PharmacistFailReason string `gorm:"column:pharmacist_fail_reason;type:varchar(255);comment:药师审核驳回原因" json:"pharmacist_fail_reason"`
|
||||
PlatformAuditStatus int `gorm:"column:platform_audit_status;type:tinyint(1);default:0;comment:处方平台审核状态(0:审核中 1:审核成功 2:审核驳回)" json:"platform_audit_status"`
|
||||
PlatformFailTime LocalTime `gorm:"column:platform_fail_time;type:datetime;comment:平台审核失败时间" json:"platform_fail_time"`
|
||||
PlatformFailReason string `gorm:"column:platform_fail_reason;type:varchar(255);comment:处方平台驳回原因" json:"platform_fail_reason"`
|
||||
IsAutoPharVerify int `gorm:"column:is_auto_phar_verify;type:tinyint(1);default:0;comment:是否药师自动审核(0:否 1:是)" json:"is_auto_phar_verify"`
|
||||
DoctorCreatedTime LocalTime `gorm:"column:doctor_created_time;type:datetime;comment:医生开具处方时间" json:"doctor_created_time"`
|
||||
ExpiredTime LocalTime `gorm:"column:expired_time;type:datetime;comment:处方过期时间" json:"expired_time"`
|
||||
VoidTime LocalTime `gorm:"column:void_time;type:datetime;comment:处方作废时间" json:"void_time"`
|
||||
IsDelete int `gorm:"column:is_delete;type:tinyint(1);default:0;comment:是否删除(0:否 1:是)" json:"is_delete"`
|
||||
PrescriptionCode string `gorm:"column:prescription_code;type:varchar(255);comment:处方编号" json:"prescription_code"`
|
||||
DoctorName string `gorm:"column:doctor_name;type:varchar(100);comment:医生名称" json:"doctor_name"`
|
||||
PatientName string `gorm:"column:patient_name;type:varchar(100);comment:患者姓名-就诊人" json:"patient_name"`
|
||||
PatientSex int `gorm:"column:patient_sex;type:tinyint(1);comment:患者性别-就诊人(1:男 2:女)" json:"patient_sex"`
|
||||
PatientAge int `gorm:"column:patient_age;type:int(11);comment:患者年龄-就诊人" json:"patient_age"`
|
||||
DoctorAdvice string `gorm:"column:doctor_advice;type:varchar(255);comment:医嘱" json:"doctor_advice"`
|
||||
OrderPrescriptionId int64 `gorm:"column:order_prescription_id;type:bigint(19);primary_key;comment:主键id" json:"order_prescription_id"`
|
||||
OrderInquiryId int64 `gorm:"column:order_inquiry_id;type:bigint(19);comment:订单-问诊id;NOT NULL" json:"order_inquiry_id"`
|
||||
DoctorId int64 `gorm:"column:doctor_id;type:bigint(19);comment:医生id;NOT NULL" json:"doctor_id"`
|
||||
PatientId int64 `gorm:"column:patient_id;type:bigint(19);comment:患者id" json:"patient_id"`
|
||||
FamilyId int64 `gorm:"column:family_id;type:bigint(19);comment:家庭成员id(就诊用户)" json:"family_id"`
|
||||
PharmacistId int64 `gorm:"column:pharmacist_id;type:bigint(19);comment:药师id" json:"pharmacist_id"`
|
||||
PrescriptionStatus int `gorm:"column:prescription_status;type:tinyint(1);comment:处方状态(1:待审核 2:待使用 3:已失效 4:已使用)" json:"prescription_status"`
|
||||
PharmacistAuditStatus int `gorm:"column:pharmacist_audit_status;type:tinyint(1);default:0;comment:药师审核状态(0:审核中 1:审核成功 2:审核驳回)" json:"pharmacist_audit_status"`
|
||||
PharmacistVerifyTime LocalTime `gorm:"column:pharmacist_verify_time;type:datetime;comment:药师审核时间" json:"pharmacist_verify_time"`
|
||||
PharmacistFailReason string `gorm:"column:pharmacist_fail_reason;type:varchar(255);comment:药师审核驳回原因" json:"pharmacist_fail_reason"`
|
||||
PlatformAuditStatus int `gorm:"column:platform_audit_status;type:tinyint(1);default:0;comment:处方平台审核状态(0:审核中 1:审核成功 2:审核驳回)" json:"platform_audit_status"`
|
||||
PlatformFailTime LocalTime `gorm:"column:platform_fail_time;type:datetime;comment:平台审核失败时间" json:"platform_fail_time"`
|
||||
PlatformFailReason string `gorm:"column:platform_fail_reason;type:varchar(255);comment:处方平台驳回原因" json:"platform_fail_reason"`
|
||||
IsAutoPharVerify int `gorm:"column:is_auto_phar_verify;type:tinyint(1);default:0;comment:是否药师自动审核(0:否 1:是)" json:"is_auto_phar_verify"`
|
||||
DoctorCreatedTime LocalTime `gorm:"column:doctor_created_time;type:datetime;comment:医生开具处方时间" json:"doctor_created_time"`
|
||||
ExpiredTime LocalTime `gorm:"column:expired_time;type:datetime;comment:处方过期时间" json:"expired_time"`
|
||||
VoidTime LocalTime `gorm:"column:void_time;type:datetime;comment:处方作废时间" json:"void_time"`
|
||||
IsDelete int `gorm:"column:is_delete;type:tinyint(1);default:0;comment:是否删除(0:否 1:是)" json:"is_delete"`
|
||||
PrescriptionCode string `gorm:"column:prescription_code;type:varchar(255);comment:处方编号" json:"prescription_code"`
|
||||
DoctorName string `gorm:"column:doctor_name;type:varchar(100);comment:医生名称" json:"doctor_name"`
|
||||
PatientName string `gorm:"column:patient_name;type:varchar(100);comment:患者姓名-就诊人" json:"patient_name"`
|
||||
PatientSex int `gorm:"column:patient_sex;type:tinyint(1);comment:患者性别-就诊人(1:男 2:女)" json:"patient_sex"`
|
||||
PatientAge int `gorm:"column:patient_age;type:int(11);comment:患者年龄-就诊人" json:"patient_age"`
|
||||
DoctorAdvice string `gorm:"column:doctor_advice;type:varchar(255);comment:医嘱" json:"doctor_advice"`
|
||||
OrderInquiry *OrderInquiry `gorm:"foreignKey:OrderInquiryId;references:order_inquiry_id" json:"order_inquiry"` // 问诊订单
|
||||
UserDoctor *UserDoctor `gorm:"foreignKey:DoctorId;references:doctor_id" json:"user_doctor"` // 医生
|
||||
UserPharmacist *UserPharmacist `gorm:"foreignKey:PharmacistId;references:pharmacist_id" json:"user_pharmacist"` // 药师
|
||||
UserPatient *UserPatient `gorm:"foreignKey:PatientId;references:patient_id" json:"user_patient"` // 患者
|
||||
OrderPrescriptionIcd []*OrderPrescriptionIcd `gorm:"foreignKey:OrderPrescriptionId;references:order_prescription_id" json:"order_prescription_icd"` // 处方疾病
|
||||
PatientFamily *PatientFamily `gorm:"foreignKey:FamilyId;references:family_id" json:"patient_family"` // 家庭成员
|
||||
Model
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
type PatientFamily struct {
|
||||
FamilyId int64 `gorm:"column:family_id;type:bigint(19);primary_key;comment:主键id" json:"family_id"`
|
||||
PatientId int64 `gorm:"column:patient_id;type:bigint(19);comment:患者id" json:"patient_id"`
|
||||
Relation int `gorm:"column:relation;type:tinyint(1);comment:与患者关系(1:本人 2:父母 3:爱人 4:子女 5:亲戚 6:其他 )" json:"relation"`
|
||||
Relation *int `gorm:"column:relation;type:tinyint(1);comment:与患者关系(1:本人 2:父母 3:爱人 4:子女 5:亲戚 6:其他 )" json:"relation"`
|
||||
Status int `gorm:"column:status;type:tinyint(1);default:1;comment:状态(1:正常 2:删除)" json:"status"`
|
||||
IsDefault int `gorm:"column:is_default;type:tinyint(1);default:0;comment:是否默认(0:否 1:是)" json:"is_default"`
|
||||
CardName string `gorm:"column:card_name;type:varchar(50);comment:姓名" json:"card_name"`
|
||||
|
||||
Reference in New Issue
Block a user