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.
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.