修正问诊病例返回数据
This commit is contained in:
parent
7642449eda
commit
848cffdda2
@ -178,10 +178,10 @@ func (r *OrderInquiryDto) LoadOrderInquiryCoupon(m *model.OrderInquiryCoupon) *O
|
||||
return r
|
||||
}
|
||||
|
||||
// LoadOrderInquiryCase 加载问诊病例
|
||||
func (r *OrderInquiryDto) LoadOrderInquiryCase(m *model.OrderInquiryCase) *OrderInquiryDto {
|
||||
// LoadMaskOrderInquiryCase 加载问诊病例
|
||||
func (r *OrderInquiryDto) LoadMaskOrderInquiryCase(m *model.OrderInquiryCase) *OrderInquiryDto {
|
||||
if m != nil {
|
||||
d := GetOrderInquiryCaseDto(m)
|
||||
d := GetMaskOrderInquiryCaseDto(m)
|
||||
|
||||
r.OrderInquiryCase = d
|
||||
}
|
||||
|
||||
@ -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 {
|
||||
// 处理返回值
|
||||
responses := make([]OrderInquiryCaseDto, len(m))
|
||||
|
||||
@ -178,10 +178,10 @@ func (r *OrderPrescriptionDto) LoadOrderPrescriptionIcdString(m []*model.OrderPr
|
||||
return r
|
||||
}
|
||||
|
||||
// LoadOrderInquiryCase 加载问诊病例
|
||||
func (r *OrderPrescriptionDto) LoadOrderInquiryCase(m *model.OrderInquiryCase) *OrderPrescriptionDto {
|
||||
// LoadMaskOrderInquiryCase 加载问诊病例
|
||||
func (r *OrderPrescriptionDto) LoadMaskOrderInquiryCase(m *model.OrderInquiryCase) *OrderPrescriptionDto {
|
||||
if m != nil {
|
||||
d := GetOrderInquiryCaseDto(m)
|
||||
d := GetMaskOrderInquiryCaseDto(m)
|
||||
|
||||
r.OrderInquiryCase = d
|
||||
}
|
||||
|
||||
@ -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"`
|
||||
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"`
|
||||
|
||||
@ -316,7 +316,7 @@ func (r *OrderInquiryService) GetOrderInquiry(orderInquiryId int64) (g *dto.Orde
|
||||
g.LoadOrderInquiryCoupon(orderInquiryCoupon)
|
||||
|
||||
// 加载问诊病例
|
||||
g.LoadOrderInquiryCase(orderInquiryCase)
|
||||
g.LoadMaskOrderInquiryCase(orderInquiryCase)
|
||||
|
||||
// 加载订单评价
|
||||
g.LoadOrderEvaluation(orderEvaluation)
|
||||
|
||||
@ -57,7 +57,7 @@ func (r *OrderPrescriptionService) GetOrderPrescription(OrderPrescriptionId int6
|
||||
g = dto.GetOrderPrescriptionDto(orderPrescription)
|
||||
|
||||
// 加载问诊病例
|
||||
g.LoadOrderInquiryCase(orderInquiryCase)
|
||||
g.LoadMaskOrderInquiryCase(orderInquiryCase)
|
||||
|
||||
// 加载处方关联疾病-字符串
|
||||
g.LoadOrderPrescriptionIcdString(orderPrescriptionIcds)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user