OHDSI / Atlas

ATLAS is an open source software tool for researchers to conduct scientific analyses on standardized observational data
http://atlas-demo.ohdsi.org/
Apache License 2.0
272 stars 136 forks source link

Place of Service location attribute incompatible with OMOP CDM v5.4 #2713

Open MaximMoinat opened 2 years ago

MaximMoinat commented 2 years ago

During an exercise in the CDM WG, we discovered a remnant of an OMOP CDM v6 table in the Atlas Cohort Definition interface. This results in a cohort definition that will not run on OMOP CDM v5.4.

When adding a visit occurrence criteria, you have the option to specify the attribute 'Place of service location'.

image

This adds the following section to the cohort sql:

(
  select vo.* 
  FROM @cdm_database_schema.VISIT_OCCURRENCE vo
) C
JOIN @cdm_database_schema.LOCATION_HISTORY LH on LH.entity_id = C.care_site_id AND LH.domain_id = 'CARE_SITE' AND C.visit_start_date >= LH.start_date AND C.visit_end_date <= ISNULL(LH.end_date, DATEFROMPARTS(2099,12,31))
JOIN @cdm_database_schema.LOCATION LOC on LOC.location_id = LH.location_id
JOIN #Codesets cs on (LOC.region_concept_id = cs.concept_id and cs.codeset_id = 0)

Both the location_history table and location.region_concept_id field are not part of the OMOP CDM v5.4.

Our suggestion is to remove the 'Place of service location' attribute completely from the Atlas Cohort Definition interface.

MaximMoinat commented 2 years ago

Related side-note: the visit criteria also has a 'Place of service' attribute. While this does result in a valid cohort query, the place_of_service_conept_id that it uses is to be deprecated in a later OMOP CDM version. Here we would also suggest to remove this attribute.