Is there anyway to change the patient_id to uuid

I see the patient_id is an int and auto-incremented. Any suggestions??

patient_id is an internal primary key used for references Internal to the database. uuid is supposed to be a type 4 (random) UUID providing a universally unique id that can be used across systems. Patients can also have patient identifiers, which are identifiers used externally to uniquely identified a patient (medical record number, national identifier, etc.).

I agree but why can’t it be a uuid. So that it will be easy to share based on patient_id. Autoincrement kind of only works for non sharded databases.

Is there any plans to make it a uuid? I see it already has a uuid column though.

Int also kind of ok, but auto increment is kind of a bad database design.

UUID’s are useful to guarantee uniqueness when data are created across disconnected systems; they aren’t the most efficient primary key in a closed system.

@chaitanya9186 I read about the pros and cons of the same here !!

In a single database systems, what you guys are talking is completely true. But when it comes to scale, the auto increment of the primary key is kind of bad design. This the era of cloud and scale. So I believe it is the time we change the patient_id or any other auto increment integer ids in a random ids (UUID or Snowflake, etc)