I am planning to add data in care-site table and as per ETL conventions provided by CDM for column care_site_id - Assign an id to each unique combination of location_id and place_of_service_source_value .
If it is saying for each unique combination of location and placeofservice then why table have constraint as
ALTER TABLE IF EXISTS omop.care_site
ADD CONSTRAINT xpk_care_site PRIMARY KEY (care_site_id);
In my dataset i have 2 records which different combination of location and placeofservice and both have can be same care_site_id as ETL says.
sample , i am trying to insert data as below.
care_site_id | care_site_name | place_of_service_concept_id | location_id | care_site_source_value | place_of_service_source_value |
---|---|---|---|---|---|
2 | ward1 | 1234 | 2 | abcd | ward1 |
2 | ward2 | 12345 | 2 | abcd | ward2 |
Please help.
Thanks