Create
Function
	[dbo].[Fn_TaminPrescriptionOld_GetRow]
(
		@NationalCode Varchar(15),
		@TrackingCode Varchar(50),
		@EPRSC_ID Bigint
)
Returns Table
As
Return
Select
		s.*
	From [dbo].[tbl_TaminPrescriptionOld] As s
	Left Join [dbo].[tbl_TaminHeadOld] As h On h.[Id] = s.[HeadId]
	Where	h.[NationalCode] = @NationalCode
	And		h.[TrackingCode] = @TrackingCode
	And		s.[EPRSC_ID] = @EPRSC_ID