|
@@ -697,10 +697,10 @@ func GetDialyisSolution(patientid int64, recorddate int64) (*models.DialysisPres
|
697
|
697
|
return &prescription, nil
|
698
|
698
|
}
|
699
|
699
|
|
700
|
|
-func GetPatientScheduleIsExist(patient_id int64, startime int64, schedule_type int64, bed_id int64) (*models.Schedule, error) {
|
|
700
|
+func GetPatientScheduleIsExist(startime int64, schedule_type int64, bed_id int64) (*models.Schedule, error) {
|
701
|
701
|
|
702
|
702
|
schedule := models.Schedule{}
|
703
|
|
- err := XTReadDB().Model(&schedule).Where("patient_id =? and schedule_date = ? and schedule_type = ? and bed_id = ? and status = 1", patient_id, startime, schedule_type, bed_id).Find(&schedule).Error
|
|
703
|
+ err := XTReadDB().Model(&schedule).Where("schedule_date = ? and schedule_type = ? and bed_id = ? and status = 1", patient_id, startime, schedule_type, bed_id).Find(&schedule).Error
|
704
|
704
|
if err == gorm.ErrRecordNotFound {
|
705
|
705
|
return nil, err
|
706
|
706
|
}
|