sidataplus / demo-etl-sqlmesh-omop

The OMOP implementation on SQLMesh for the demo at the OHDSI Symposium 2024.
0 stars 3 forks source link

Implement SQLMesh Tests for Person Model #34

Open hamcheezee opened 1 week ago

hamcheezee commented 1 week ago

Content

Test Name Description Query Expected Result
no_duplicate_person_ids Ensure no duplicate person_id values exist. SELECT person_id, COUNT() as count
FROM omop.person
GROUP BY person_id
HAVING COUNT(
) > 1
rows_count: 0 (No duplicates)
valid_gender_source_values Check that gender_source_value one of the allowed values. gender_source_value is in ['M', 'F']
valid_race_source_values Check that race_source_values is one of the allowed values. race_source_values is in ['white', 'black', 'asian', 'hawaiian', 'native', 'other']
valid_ethnicity_source_value Check that ethnicity_source_value is one of the allowed values. ethnicity_source_value is in ['nonhispanic', 'hispanic']