From c829ae317d30a4fd9d6bba2b7547eb60915da9d6 Mon Sep 17 00:00:00 2001 From: Evanette Burrows Date: Tue, 9 Jan 2024 16:26:26 -0500 Subject: [PATCH] Update v5.3 insert for device exposure based on field length issue --- .../sql_server/cdm_version/v531/insert_device_exposure.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inst/sql/sql_server/cdm_version/v531/insert_device_exposure.sql b/inst/sql/sql_server/cdm_version/v531/insert_device_exposure.sql index 9cc4e4d..e86e141 100644 --- a/inst/sql/sql_server/cdm_version/v531/insert_device_exposure.sql +++ b/inst/sql/sql_server/cdm_version/v531/insert_device_exposure.sql @@ -26,7 +26,7 @@ d.start device_exposure_start_datetime, d.stop device_exposure_end_date, d.stop device_exposure_end_datetime, 32827 device_type_concept_id, -d.udi unique_device_id, +left(d.udi,50) unique_device_id, cast(null as int) quantity, pr.provider_id provider_id, fv.visit_occurrence_id_new visit_occurrence_id, @@ -50,7 +50,7 @@ left join @cdm_schema.final_visit_ids fv left join @synthea_schema.encounters e on d.encounter = e.id and d.patient = e.patient -left join @cdm_schema.provider pr +left join @cdm_schema.provider pr on e.provider = pr.provider_source_value join @cdm_schema.person p on p.person_source_value = d.patient