GoldWaterFall / Chat-Health

chat health - empowering health management through clinical AI
Apache License 2.0
3 stars 1 forks source link

How to Generate Unique ID for Users #2

Open ChenyangGuan-anu opened 1 year ago

ChenyangGuan-anu commented 1 year ago

In our system, we need to allocate a unique ID for each patient. Usually, there are several methods to generating ID numbers in Python: Universally Unique Identifier (UUID), autometic increase of database primary key, and snowflake.

However, these three methods have a same drawback that the ID is too long so that reducing searching efficiency and the database method even involves data privacy issues. Finally, we use while loops and a check function to solve this problem.