Page 1 of 1

Random Primary Keys - messes up Patient numbers

Posted: Tue Oct 13, 2015 4:54 pm
by drawab
Hi

I was hoping to install Replication servers (due to horrible internet connections situations) - having set up the process - i turned on Random Primary Keys - and the new assigned patient numbers is jumping all over the place - what used to be a human readable chronologic order of 5 digit XXXXX has now jumped to 19 digits patient number being allocated to each patient for example (8373611305246530320) and each subsequent number on another numerical planet altogether - is this expected? in such a situation

Thanks

Re: Random Primary Keys - messes up Patient numbers

Posted: Wed Oct 14, 2015 7:05 am
by jsalmon
That's exactly what random primary keys is designed to do. It allows you to designate ranges of keys to use for each of your servers (that are replicating) and then randomizes new PKs within those ranges for new entries to avoid collisions.