OHDSI / dbt-synthea

[Under development] A dbt ETL project to convert a Synthea synthetic data set into the OMOP CDM
https://ohdsi.github.io/dbt-synthea/
Apache License 2.0
16 stars 6 forks source link

refactor: use determinisitic provider id #81

Closed lawrenceadams closed 3 weeks ago

lawrenceadams commented 1 month ago

This PR cleans up code imported from upstream OHDSI/SyntheaETL SQL code, where models can produce non-deterministic output for location and provider tables.

For both tables, output is now ordered by:

Perhaps this is too complicated, open to other ideas! I think this is somewhat more logical than doing: city > state > zip > _id, but may not be correct to US-centric norms

lawrenceadams commented 4 weeks ago

I'll cleanup this branch when #83 is determined on this best approach :)

lawrenceadams commented 3 weeks ago

As a result of #83 this only affects provider now - I think ORDER BY provider_state, provider_city, provider_zip, provider_id might be a bit overkill - maybe no provider_id is needed? But in reality it doesn't matter too much and we need to sort by something...