package patient

import (
	esync "simrs-vx/internal/domain/sync-entities/patient"

	dg "github.com/karincake/apem/db-gorm-pg"
)

func ReadDetailLinkData(simgosId uint) (*esync.PatientLink, error) {
	// log event
	var data esync.PatientLink
	var tx = dg.I

	if err := tx.Where("\"Simgos_Id\" = ?", simgosId).First(&data).Error; err != nil {
		return nil, err
	}
	// log end event
	return &data, nil
}
