新增患者详情

This commit is contained in:
2023-09-18 14:17:40 +08:00
parent ce3168867f
commit dbe0e24241
13 changed files with 496 additions and 57 deletions
+9
View File
@@ -18,6 +18,15 @@ func (r *PatientFamilyDao) GetPatientFamilyById(familyId int64) (m *model.Patien
return m, nil
}
// GetPatientFamilyListByPatientId 获取家庭成员列表-患者id
func (r *PatientFamilyDao) GetPatientFamilyListByPatientId(patientId int64) (m []*model.PatientFamily, err error) {
err = global.Db.Where("patient_id = ?", patientId).Find(&m, patientId).Error
if err != nil {
return nil, err
}
return m, nil
}
// DeletePatientFamily 删除家庭成员
func (r *PatientFamilyDao) DeletePatientFamily(tx *gorm.DB, maps interface{}) error {
err := tx.Where(maps).Delete(&model.PatientFamily{}).Error