fix response jadwal dokter
This commit is contained in:
No files matched your search
@@ -19,19 +19,19 @@ func GetJadwalDokterByDPJP(dpjp string) (string, error) {
|
||||
return id, nil
|
||||
}
|
||||
|
||||
func GetJadwalSpesialisDokterByID(id string) (string, error) {
|
||||
var spesialis string
|
||||
errSelect := config.SatuDataDB.Debug().Raw(`select "Spesialis" from "daftar_jadwal_dokter" where "Dokter" = ? order by "Spesialis"`, id).First(&spesialis).Error
|
||||
if errSelect != nil {
|
||||
log.Printf("Failed get data : %v", errSelect)
|
||||
return "", errSelect
|
||||
}
|
||||
return spesialis, nil
|
||||
}
|
||||
// func GetJadwalSpesialisDokterByID(id string) (string, error) {
|
||||
// var spesialis string
|
||||
// errSelect := config.SatuDataDB.Debug().Raw(`select "Spesialis" from "daftar_jadwal_dokter" where "Dokter" = ? order by "Spesialis"`, id).First(&spesialis).Error
|
||||
// if errSelect != nil {
|
||||
// log.Printf("Failed get data : %v", errSelect)
|
||||
// return "", errSelect
|
||||
// }
|
||||
// return spesialis, nil
|
||||
// }
|
||||
|
||||
func GetJadwalHariDokterBySpesialis(id string) ([]jadwal_dokter.ListHari, error) {
|
||||
var hari []jadwal_dokter.ListHari
|
||||
errSelect := config.SatuDataDB.Debug().Raw(`select "id", "Hari", "Nama_hari", "Waktu", "Dokter", "Spesialis" from "daftar_jadwal_dokter" where "Spesialis" = ? order by "id"`, id).Scan(&hari).Error
|
||||
errSelect := config.SatuDataDB.Debug().Raw(`select "id", "Hari", "Nama_hari", "Waktu", "Dokter", "Spesialis" from "daftar_jadwal_dokter" where "Dokter" = ? order by "id"`, id).Scan(&hari).Error
|
||||
if errSelect != nil {
|
||||
log.Printf("Failed get data : %v", errSelect)
|
||||
return nil, errSelect
|
||||
|
||||
Reference in New Issue
Block a user