non-unique id numbers for some tables' primary keys ... #1574
-
i want to load synthea sample data from all 50 states plus dc so i created a quick loop to generate 1000 patient records for each state and dc with each state's output placed in its own directory ... i wanted to confirm pre-load that the multi-state data is good to load noting that some tables have primary keys ... well i seem to have run into a problem with some tables not having truly unique ids ... there seem to be only 10 payer ids per state but the state files have different sizes so i know they are not all the same exact data except for the supposedly unique payer id ... organizations data also have non-unique ids as are patients data ssn ids ... does anybody have any tricks to fix these duplicated ids so i can load multi-state data into the database without any issues? [ patients ssn is not a key so not required to be unique but still ... ]
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The payers should be duplicates. If you just load one of the files, the foreign keys will work for all states. |
Beta Was this translation helpful? Give feedback.
The actual organizations are unique per state (they have physical geographic locations within state borders), even if somehow the IDs are not.
SSNs should be unique, so either we have some bug, or some of the randomization inputs should be changed between runs. In either case, disregard the duplicates if you can.