OHDSI Home | Forums | Wiki | Github

Care_site table CDM5.4- adding data

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.


You are right, it probably overstates it. What it should say is “Assign an ID to each combination of a location and nature of the site - the latter could be the Place of Service, name or another characteristic in your source data.” We will fix the text.

Bottom line: it is an ETL task, not a task done at the OMOP CDM level. You want to take the information you have about your sites and make them unique entities. Makes sense?

agreed on ETL task. Thank you for your reply. Its interesting to work on such a brilliant model.