removes ids on doctor,nurse,specialist-intern

This commit is contained in:
dpurbosakti
2025-11-06 12:08:36 +07:00
parent 444fc5ce28
commit a2015a5c7e
9 changed files with 55 additions and 49 deletions

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)).