removes ids on doctor,nurse,specialist-intern
This commit is contained in:
No files matched your search
@@ -4,10 +4,12 @@ import (
|
||||
// std
|
||||
"errors"
|
||||
ere "simrs-vx/internal/domain/references/encounter"
|
||||
|
||||
// external
|
||||
dg "github.com/karincake/apem/db-gorm-pg"
|
||||
gh "github.com/karincake/getuk"
|
||||
"gorm.io/gorm"
|
||||
|
||||
// pkg
|
||||
plh "simrs-vx/pkg/lib-helper"
|
||||
pl "simrs-vx/pkg/logger"
|
||||
@@ -56,8 +58,8 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.En
|
||||
}
|
||||
tx = tx.Model(&e.Encounter{})
|
||||
|
||||
if input.AuthInfo.Doctor_Id != nil {
|
||||
tx.Where("\"Responsible_Doctor_Id\" = ?", *input.AuthInfo.Doctor_Id)
|
||||
if input.AuthInfo.Doctor_Code != nil {
|
||||
tx.Where("\"Responsible_Doctor_Id\" = ?", *input.AuthInfo.Doctor_Code) // TODO: fix this
|
||||
}
|
||||
|
||||
tx.Scopes(gh.Preload(input.Includes)).
|
||||
|
||||
Reference in New Issue
Block a user