From 92c9411c9a2da2679468f159709d313a14c11b3b Mon Sep 17 00:00:00 2001 From: Evanette Burrows Date: Wed, 7 Feb 2024 14:15:08 -0500 Subject: [PATCH] Correct references --- inst/sql/sql_server/cdm_version/v531/insert_location.sql | 6 +++--- inst/sql/sql_server/cdm_version/v531/insert_person.sql | 2 +- inst/sql/sql_server/cdm_version/v540/insert_location.sql | 4 ++-- inst/sql/sql_server/cdm_version/v540/insert_person.sql | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/inst/sql/sql_server/cdm_version/v531/insert_location.sql b/inst/sql/sql_server/cdm_version/v531/insert_location.sql index b86b9d6..aa40b60 100644 --- a/inst/sql/sql_server/cdm_version/v531/insert_location.sql +++ b/inst/sql/sql_server/cdm_version/v531/insert_location.sql @@ -22,6 +22,6 @@ states_map.state_abbreviation state, cast(null as varchar) county, p.zip zip, p.zip location_source_value -from @synthea_schema.patients p) locations -left join @cdm_schema.states_map states_map on locations.state=states_map.state -; \ No newline at end of file +from @synthea_schema.patients p +left join cdm_synthea_30_v54.states_map states_map on p.state=states_map.state) locations +; diff --git a/inst/sql/sql_server/cdm_version/v531/insert_person.sql b/inst/sql/sql_server/cdm_version/v531/insert_person.sql index c253508..e84d224 100644 --- a/inst/sql/sql_server/cdm_version/v531/insert_person.sql +++ b/inst/sql/sql_server/cdm_version/v531/insert_person.sql @@ -23,7 +23,7 @@ with mapped_states as ( select distinct l.location_id,l.city,states_map.state,l.zip from @cdm_schema.location l - left join states_map state_map on l.state=states_map.state_abbreviation + left join @cdm_schema.states_map states_map on l.state=states_map.state_abbreviation ) select row_number()over(order by p.id), diff --git a/inst/sql/sql_server/cdm_version/v540/insert_location.sql b/inst/sql/sql_server/cdm_version/v540/insert_location.sql index 09eac7f..aa40b60 100644 --- a/inst/sql/sql_server/cdm_version/v540/insert_location.sql +++ b/inst/sql/sql_server/cdm_version/v540/insert_location.sql @@ -22,6 +22,6 @@ states_map.state_abbreviation state, cast(null as varchar) county, p.zip zip, p.zip location_source_value -from @synthea_schema.patients p) locations -left join @cdm_schema.states_map states_map on locations.state=states_map.state +from @synthea_schema.patients p +left join cdm_synthea_30_v54.states_map states_map on p.state=states_map.state) locations ; diff --git a/inst/sql/sql_server/cdm_version/v540/insert_person.sql b/inst/sql/sql_server/cdm_version/v540/insert_person.sql index c253508..e84d224 100644 --- a/inst/sql/sql_server/cdm_version/v540/insert_person.sql +++ b/inst/sql/sql_server/cdm_version/v540/insert_person.sql @@ -23,7 +23,7 @@ with mapped_states as ( select distinct l.location_id,l.city,states_map.state,l.zip from @cdm_schema.location l - left join states_map state_map on l.state=states_map.state_abbreviation + left join @cdm_schema.states_map states_map on l.state=states_map.state_abbreviation ) select row_number()over(order by p.id),