Skip to content

Commit

Permalink
Merge pull request #178 from Rapporteket/bugfix2024_duplicates
Browse files Browse the repository at this point in the history
Bugfix2024 duplicate varnames in SQL
  • Loading branch information
skkrist authored Sep 4, 2024
2 parents 82e8f24 + 47db9af commit d10e09b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: noric
Title: Provide R Resources for NORIC at Rapporteket
Version: 2.15.4
Version: 2.15.5
Authors@R: c(
person("Kristina",
"Skaare",
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# noric 2.15.5 bugfix dupliserte variabelnavn
RMariaDB vil ikke lenger har dupliserte variabelnavn. Ryddet opp i SQL
for AK-tabellen.

# noric 2.15.4 Buxfix nytt år
For TAVI rapporten. Når kun en måned i inneværende år, tvinge string-format på
label til cumulative plot. Tvinge y-aksen til cumplot til å starte på 0.
Expand Down
5 changes: 2 additions & 3 deletions R/getData.R
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ getAk <- function(registryName, fromDate, toDate, singleRow,
SELECT
AortaklaffVar.*,
ForlopsOversikt.Sykehusnavn,
ForlopsOversikt.PasientID,
ForlopsOversikt.FodselsDato,
ForlopsOversikt.Kommune,
ForlopsOversikt.KommuneNr,
Expand Down Expand Up @@ -832,7 +831,7 @@ getTaviProm <- function(registryName, fromDate, toDate, singleRow, ...){
if (is.null(toDate)) {
toDate <- noric::getLatestEntry(registryName)
}


queryAk <- paste0("
SELECT
Expand All @@ -859,7 +858,7 @@ WHERE
ProsedyreDato <= '", toDate, "'"
)


# Ask for all variables from PROM
queryProm <- paste0("
SELECT
Expand Down
24 changes: 13 additions & 11 deletions inst/NORIC_tavi_report.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -476,14 +476,16 @@ ggplot2::ggplot(df_cumplot) +
periode_data$sisteHeleYear:periode_data$nyesteRegYear),
breaks = periode_data$sisteHeleYear:periode_data$nyesteRegYear) +
ggplot2::geom_label(mapping = ggplot2::aes(x= 12,
y = tot_fjor * 0.95,
label = tot_fjor) ,
colour = colPrimary[3]) +
ggplot2::geom_label(mapping = ggplot2::aes(x= periode_data$nyesteRegMnd,
y = tot_aar * 0.95,
label = tot_aar),
ggplot2::annotate(geom = "label",
x= 12,
y = tot_fjor * 0.95,
label = tot_fjor,
colour = colPrimary[3]) +
ggplot2::annotate(geom = "label",
x= periode_data$nyesteRegMnd,
y = tot_aar * 0.95,
label = tot_aar,
colour = colKontrast) +
ggplot2::xlab("") +
Expand Down Expand Up @@ -613,9 +615,9 @@ if (params$tableFormat == "html") {



<!-- `r if(params$tableFormat !="latex") {"<!--"}` -->
<!-- \newpage -->
<!-- `r if(params$tableFormat !="latex") {"-->"}` -->
`r if(params$tableFormat !="latex") {"<!--"}`
\newpage
`r if(params$tableFormat !="latex") {"-->"}`



Expand Down

0 comments on commit d10e09b

Please sign in to comment.