Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bytt ut runDayOfYear i autoreport-modul-tabell #203

Closed
arnfinn opened this issue Dec 20, 2024 · 0 comments · Fixed by #205
Closed

Bytt ut runDayOfYear i autoreport-modul-tabell #203

arnfinn opened this issue Dec 20, 2024 · 0 comments · Fixed by #205
Assignees

Comments

@arnfinn
Copy link
Contributor

arnfinn commented Dec 20, 2024

Brukes ikke lenger når autoreport er i database (etter #201), så visning av "Neste" blir feil. Gjelder definisjonen av nextDate her:

rapbase/R/autoReport.R

Lines 824 to 860 in 804cc84

if (target == "db") {
if (length(autoRep$id) == 0) {
return(as.matrix(autoRep))
}
l <- list()
for (i in seq_len(nrow(autoRep))) {
runDayOfYear <- as.vector(
as.integer(strsplit(autoRep[i, ]$runDayOfYear, ",")[[1]])
)
nextDate <- findNextRunDate(
runDayOfYear = runDayOfYear,
startDate = autoRep[i, ]$startDate,
returnFormat = dateFormat
)
if (as.Date(nextDate, format = dateFormat) > autoRep[i, ]$terminateDate) {
nextDate <- "Utl\u00F8pt"
}
dataSource <- autoRep[i, ]$organization
if (!is.null(mapOrgId)) {
if (dataSource %in% mapOrgId$id) {
dataSource <- mapOrgId$name[mapOrgId$id == dataSource]
}
}
r <- list(
"Rapport" = autoRep[i, ]$synopsis,
"Datakilde" = dataSource,
"Mottaker" = autoRep[i, ]$email,
"Periode" = autoRep[i, ]$intervalName,
"Slutt" = strftime(
as.Date(
autoRep[i, ]$terminateDate
),
format = "%b %Y"
),
"Neste" = nextDate,
"Endre" = as.character(

@arnfinn arnfinn moved this to Todo in Flytting til NHN Jan 8, 2025
@kevinthon kevinthon moved this from Todo to In Progress in Flytting til NHN Jan 8, 2025
@kevinthon kevinthon self-assigned this Jan 8, 2025
arnfinn added a commit that referenced this issue Jan 15, 2025
…205)

Lukker #203

Også mulig å filtrere på register i runAutoReport.

---------

Co-authored-by: Arnfinn Hykkerud Steindal <arnfinn.hykkerud.steindal@helse-nord.no>
@arnfinn arnfinn closed this as completed Jan 15, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in Flytting til NHN Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants