修正问诊病例返回数据

This commit is contained in:
wucongxing 2023-10-07 10:20:19 +08:00
parent 7642449eda
commit 848cffdda2
6 changed files with 29 additions and 9 deletions

View File

@ -178,10 +178,10 @@ func (r *OrderInquiryDto) LoadOrderInquiryCoupon(m *model.OrderInquiryCoupon) *O
return r return r
} }
// LoadOrderInquiryCase 加载问诊病例 // LoadMaskOrderInquiryCase 加载问诊病例
func (r *OrderInquiryDto) LoadOrderInquiryCase(m *model.OrderInquiryCase) *OrderInquiryDto { func (r *OrderInquiryDto) LoadMaskOrderInquiryCase(m *model.OrderInquiryCase) *OrderInquiryDto {
if m != nil { if m != nil {
d := GetOrderInquiryCaseDto(m) d := GetMaskOrderInquiryCaseDto(m)
r.OrderInquiryCase = d r.OrderInquiryCase = d
} }

View File

@ -88,6 +88,27 @@ func GetOrderInquiryCaseDto(m *model.OrderInquiryCase) *OrderInquiryCaseDto {
} }
} }
func GetMaskOrderInquiryCaseDto(m *model.OrderInquiryCase) *OrderInquiryCaseDto {
return &OrderInquiryCaseDto{
InquiryCaseId: fmt.Sprintf("%d", m.InquiryCaseId),
UserId: fmt.Sprintf("%d", m.InquiryCaseId),
PatientId: fmt.Sprintf("%d", m.InquiryCaseId),
OrderInquiryId: fmt.Sprintf("%d", m.InquiryCaseId),
FamilyId: fmt.Sprintf("%d", m.InquiryCaseId),
Relation: m.Relation,
Status: m.Status,
Name: utils.MaskNameStr(m.Name, 0),
Sex: m.Sex,
Age: m.Age,
DiseaseClassId: fmt.Sprintf("%d", m.InquiryCaseId),
DiseaseClassName: m.DiseaseClassName,
DiagnosisDate: m.DiagnosisDate,
DiseaseDesc: m.DiseaseDesc,
CreatedAt: m.CreatedAt,
UpdatedAt: m.UpdatedAt,
}
}
func GetOrderInquiryCaseListDto(m []*model.OrderInquiryCase) []OrderInquiryCaseDto { func GetOrderInquiryCaseListDto(m []*model.OrderInquiryCase) []OrderInquiryCaseDto {
// 处理返回值 // 处理返回值
responses := make([]OrderInquiryCaseDto, len(m)) responses := make([]OrderInquiryCaseDto, len(m))

View File

@ -178,10 +178,10 @@ func (r *OrderPrescriptionDto) LoadOrderPrescriptionIcdString(m []*model.OrderPr
return r return r
} }
// LoadOrderInquiryCase 加载问诊病例 // LoadMaskOrderInquiryCase 加载问诊病例
func (r *OrderPrescriptionDto) LoadOrderInquiryCase(m *model.OrderInquiryCase) *OrderPrescriptionDto { func (r *OrderPrescriptionDto) LoadMaskOrderInquiryCase(m *model.OrderInquiryCase) *OrderPrescriptionDto {
if m != nil { if m != nil {
d := GetOrderInquiryCaseDto(m) d := GetMaskOrderInquiryCaseDto(m)
r.OrderInquiryCase = d r.OrderInquiryCase = d
} }

View File

@ -24,7 +24,6 @@ type OrderPrescription struct {
IsAutoPharVerify int `gorm:"column:is_auto_phar_verify;type:tinyint(1);default:0;comment:是否药师自动审核0:否 1:是)" json:"is_auto_phar_verify"` 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"` 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"` 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"` 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"` 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"` DoctorName string `gorm:"column:doctor_name;type:varchar(100);comment:医生名称" json:"doctor_name"`

View File

@ -316,7 +316,7 @@ func (r *OrderInquiryService) GetOrderInquiry(orderInquiryId int64) (g *dto.Orde
g.LoadOrderInquiryCoupon(orderInquiryCoupon) g.LoadOrderInquiryCoupon(orderInquiryCoupon)
// 加载问诊病例 // 加载问诊病例
g.LoadOrderInquiryCase(orderInquiryCase) g.LoadMaskOrderInquiryCase(orderInquiryCase)
// 加载订单评价 // 加载订单评价
g.LoadOrderEvaluation(orderEvaluation) g.LoadOrderEvaluation(orderEvaluation)

View File

@ -57,7 +57,7 @@ func (r *OrderPrescriptionService) GetOrderPrescription(OrderPrescriptionId int6
g = dto.GetOrderPrescriptionDto(orderPrescription) g = dto.GetOrderPrescriptionDto(orderPrescription)
// 加载问诊病例 // 加载问诊病例
g.LoadOrderInquiryCase(orderInquiryCase) g.LoadMaskOrderInquiryCase(orderInquiryCase)
// 加载处方关联疾病-字符串 // 加载处方关联疾病-字符串
g.LoadOrderPrescriptionIcdString(orderPrescriptionIcds) g.LoadOrderPrescriptionIcdString(orderPrescriptionIcds)