Skip to content

Commit

Permalink
Fix DEVICES_BY_TYPE being always empty (#738)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gennadiy Anisimov committed Oct 5, 2023
1 parent ae15edd commit 5a33d22
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions R/exportToAres.R
Original file line number Diff line number Diff line change
Expand Up @@ -1473,10 +1473,10 @@ generateAODeviceReports <- function(connectionDetails, dataDevices, cdmDatabaseS
dplyr::left_join(
(
dataDevicesByType %>%
dplyr::select(c(3,4)) %>%
dplyr::select(c(1,4,5)) %>%
tidyr::nest(DEVICES_BY_TYPE = c(-1))
),
by = c("CONCEPT_ID" = "CONCEPT_ID")
by = c("CONCEPT_ID" = "DEVICE_CONCEPT_ID")
) %>%
dplyr::left_join(
(
Expand Down
4 changes: 2 additions & 2 deletions inst/sql/sql_server/export/device/sqlDevicesByType.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
select c1.concept_id as OBSERVATION_CONCEPT_ID,
c1.concept_name as OBSERVATION_CONCEPT_NAME,
select c1.concept_id as DEVICE_CONCEPT_ID,
c1.concept_name as DEVICE_CONCEPT_NAME,
c2.concept_id as CONCEPT_ID,
c2.concept_name as CONCEPT_NAME,
ar1.count_value as COUNT_VALUE
Expand Down

0 comments on commit 5a33d22

Please sign in to comment.