Browse Source

Filtre pole fermé dans script données

master
Maxime Wack 8 years ago
parent
commit
3dfbd2ccab
2 changed files with 7 additions and 7 deletions
  1. +0
    -5
      cloture.Rmd
  2. +7
    -2
      donnees.R

+ 0
- 5
cloture.Rmd View File

@@ -305,7 +305,6 @@ rss %>%
rum %>%
filter(mois_sortie <= mois) %>%
filter(! is.na(pole_libelle)) %>%
mutate(pole_libelle = ifelse(pole_libelle == "CLOS14 HEMATOLOGIE", "SPECIALITES MEDICALES", pole_libelle)) %>%
count(pole_libelle, annee_sortie) %>%
ungroup %>%
spread(annee_sortie, n) %>%
@@ -322,7 +321,6 @@ rum %>%
rum %>%
filter(mois_sortie <= mois) %>%
filter(! is.na(pole_libelle)) %>%
mutate(pole_libelle = ifelse(pole_libelle == "CLOS14 HEMATOLOGIE", "SPECIALITES MEDICALES", pole_libelle)) %>%
count(pole_libelle, annee_sortie) %>%
ungroup %>%

@@ -435,12 +433,9 @@ gam %>%
```{r tab9}
rss %>%
filter(annee_sortie == annee) %>%
mutate(service_libelle = ifelse(service_libelle == "CLOS14 HEMATO.S.INTENSIFS", "SERVICE HEMATOLOGIE", service_libelle),
pole_libelle = ifelse(pole_libelle == "CLOS14 HEMATOLOGIE", "SPECIALITES MEDICALES", pole_libelle)) %>%
count(pole_libelle, service_libelle) %>%
bind_rows(rss %>%
filter(annee_sortie == annee) %>%
mutate(pole_libelle = ifelse(pole_libelle == "CLOS14 HEMATOLOGIE", "SPECIALITES MEDICALES", pole_libelle)) %>%
count(pole_libelle)) %>%
full_join(gam %>%
count(pole_libelle, service_libelle) %>%


+ 7
- 2
donnees.R View File

@@ -91,8 +91,13 @@ src_mysql("pmsi_dim", "localhost", user = user, password = password) %>%
left_join(group_by(., idrss) %>%
summarise(duree_rss = sum(duree_rum))) -> rum

# RSS
print("Création des RSS")
# CLOS14 Hémato
rum %<>%
mutate(pole_libelle = ifelse(pole_libelle == "CLOS14 HEMATOLOGIE", "SPECIALITES MEDICALES", pole_libelle),
service_libelle = ifelse(service_libelle == "CLOS14 HEMATO.S.INTENSIFS", "SERVICE HEMATOLOGIE", service_libelle))

# Création des RSSs des 3 dernières années à partir des RUMs
print("6/9 - Création des RSS")
rum %>%
group_by(idrss) %>%
filter(idrum == max(idrum)) %>%


Loading…
Cancel
Save