You need to change the declaration of
@clinicCode varchar = null,
to the actual size you require.
So something like
@clinicCode varchar(50) = null,
The reason for this is that
@clinicCode varchar
is the same as
@clinicCode varchar(1)
Which then casts your field isnull(@clinicCode, ClinicCode)
to only the first letter of ClinicCode
Have a look at this example