Skip to content

Commit

Permalink
Replace argument file with txt in exportToJson
Browse files Browse the repository at this point in the history
  • Loading branch information
guuswilmink committed Oct 27, 2023
1 parent ea478a3 commit 491db96
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions R/exportToJson.R
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,7 @@ generateConditionReports <- function(conn,
return()
}

treemapData <- jsonlite::fromJSON(file = treemapFile)
treemapData <- jsonlite::fromJSON(txt = treemapFile)
uniqueConcepts <- unique(treemapData$CONCEPT_ID)
totalCount <- length(uniqueConcepts)

Expand Down Expand Up @@ -1334,7 +1334,7 @@ generateConditionEraReports <- function(conn,
return()
}

treemapData <- jsonlite::fromJSON(file = treemapFile)
treemapData <- jsonlite::fromJSON(txt = treemapFile)
uniqueConcepts <- unique(treemapData$CONCEPT_ID)
totalCount <- length(uniqueConcepts)

Expand Down Expand Up @@ -1413,7 +1413,7 @@ generateDrugEraReports <- function(conn, dbms, cdmDatabaseSchema, resultsDatabas
return()
}

treemapData <- jsonlite::fromJSON(file = treemapFile)
treemapData <- jsonlite::fromJson(txt = treemapFile)
uniqueConcepts <- unique(treemapData$CONCEPT_ID)
totalCount <- length(uniqueConcepts)

Expand Down Expand Up @@ -1495,7 +1495,7 @@ generateDrugReports <- function(conn,
return()
}

treemapData <- jsonlite::fromJSON(file = treemapFile)
treemapData <- jsonlite::fromJson(txt = treemapFile)
uniqueConcepts <- unique(treemapData$CONCEPT_ID)
totalCount <- length(uniqueConcepts)

Expand Down Expand Up @@ -1630,7 +1630,7 @@ generateProcedureReports <- function(conn,
return()
}

treemapData <- jsonlite::fromJSON(file = treemapFile)
treemapData <- jsonlite::fromJson(txt = treemapFile)
uniqueConcepts <- unique(treemapData$CONCEPT_ID)
totalCount <- length(uniqueConcepts)

Expand Down Expand Up @@ -1985,14 +1985,14 @@ generateDashboardReport <- function(outputPath) {
progress <- progress + 1
utils::setTxtProgressBar(progressBar, progress)

personReport <- jsonlite::fromJSON(file = paste(outputPath, "/person.json", sep = ""))
personReport <- jsonlite::fromJson(txt = paste(outputPath, "/person.json", sep = ""))
output$SUMMARY <- personReport$SUMMARY
output$GENDER_DATA <- personReport$GENDER_DATA

progress <- progress + 1
utils::setTxtProgressBar(progressBar, progress)

opReport <- jsonlite::fromJSON(file = paste(outputPath, "/observationperiod.json", sep = ""))
opReport <- jsonlite::fromJson(txt = paste(outputPath, "/observationperiod.json", sep = ""))

output$AGE_AT_FIRST_OBSERVATION_HISTOGRAM <- opReport$AGE_AT_FIRST_OBSERVATION_HISTOGRAM
output$CUMULATIVE_DURATION <- opReport$CUMULATIVE_DURATION
Expand Down Expand Up @@ -2110,7 +2110,7 @@ generateMeasurementReports <- function(conn,
return()
}

treemapData <- jsonlite::fromJSON(file = treemapFile)
treemapData <- jsonlite::fromJson(txt = treemapFile)
uniqueConcepts <- unique(treemapData$CONCEPT_ID)
totalCount <- length(uniqueConcepts)

Expand Down Expand Up @@ -2265,7 +2265,7 @@ generateObservationReports <- function(conn,
return()
}

treemapData <- jsonlite::fromJSON(file = treemapFile)
treemapData <- jsonlite::fromJson(txt = treemapFile)
uniqueConcepts <- unique(treemapData$CONCEPT_ID)
totalCount <- length(uniqueConcepts)

Expand Down Expand Up @@ -2382,7 +2382,7 @@ generateVisitReports <- function(conn,
return()
}

treemapData <- jsonlite::fromJSON(file = treemapFile)
treemapData <- jsonlite::fromJson(txt = treemapFile)
uniqueConcepts <- unique(treemapData$CONCEPT_ID)
totalCount <- length(uniqueConcepts)

Expand Down Expand Up @@ -2557,7 +2557,7 @@ generateVisitDetailReports <- function(conn,
return()
}

treemapData <- jsonlite::fromJSON(file = treemapFile)
treemapData <- jsonlite::fromJson(txt = treemapFile)
uniqueConcepts <- unique(treemapData$CONCEPT_ID)
totalCount <- length(uniqueConcepts)

Expand Down

0 comments on commit 491db96

Please sign in to comment.