if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[SearchNationalCode]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[SearchNationalCode]

IF EXISTS(SELECT * FROM sysobjects WHERE name='##TmpSickInfo')
DROP TABLE [##TmpSickInfo]