You can avoid the error by using a variable inside your stored procedure. See the following code block
create PROCEDURE spgetoutpatientidbyinpatientid
@pinpatientid int
AS
BEGIN
DECLARE @PatientId BIGINT;
SET @PatientId = 0
select @PatientId = ISNULL(Patient_ID,0) from tblPatientAdmissionDetails where
ID=@pinpatientid and Status=1
SELECT @PatientId
END
Thank you..