>I need to be able to generate a random number for patient ids. The first three numbers are entered by the user but the remaining 12 should be generated.
>
>Broken down, it's like this:
>
>555 - 1234 - 56789
>
>(555 = SITE NO.)
>(1234 = 4 RANDOM NUMBERS)
>(56789 = 5 RANDOM NUMBERS)
>
>Does anyone know of a painless method in doing this? The only thing that they need to be able to do now is, type in their site no, 2.) Enter Patient's First and last name, 3.) Patient's date of birth, and press the Generate randon id Button.
>
>
>Help!
>
>:-)
>
>Jeff
I would store a sequential key... then add it onto the end of your first three.
Never trust any random number generator (Unless you can use a GUID)
Wayne
Wayne Myers, MCSD
Senior Consultant
Forte' Incorporated
"The only things you can take to heaven are those which you give away" Author Unknown