Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
Only keep data with type == "andel" and context == "caregiver" (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnfinn authored May 18, 2021
1 parent e7ae122 commit 6d2516c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: qmongr
Title: Lightweight Quality Assessment of Norwegian Hospitals
Version: 1.2.0
Version: 1.3.0
Authors@R: c(
person(given = "Yohannes",
family = "Tesfay",
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# qmongr 1.3.0

Only keep data with `type == "andel"` and `context == "caregiver"` ([#218](https://github.com/mong/qmongr/pull/218)).

# qmongr 1.2.0

Using commit [80b3ec8](https://github.com/mong/qmongjs/commit/80b3ec8) of `qmongjs`
Expand Down
11 changes: 7 additions & 4 deletions R/data_source.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,16 @@ get_data <- function() {
dplyr::inner_join(registry, by = conf$column$registry_id)
df <- imongr::get_table(pool, "agg_data")

# filter
## include
include <- dplyr::select(description, .data$id, .data$include)
include <- dplyr::select(description, .data$id, .data$include, .data$type)
df <- df %>%
dplyr::left_join(include, by = c("ind_id" = "id"))
# Only keep include == 1, type == "andel" and context == "caregiver"
# qmongr is not able to show other types than "andel" or
# other context than "caregiver.
df <- df %>%
dplyr::filter(.data$include == 1)
dplyr::filter(.data$include == 1) %>%
dplyr::filter(.data$type == "andel") %>%
dplyr::filter(.data$context == "caregiver")
## coverage
if (conf$filter$coverage$use) {
df <- df %>%
Expand Down

0 comments on commit 6d2516c

Please sign in to comment.