You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

219 lines
5.4KB

  1. ---
  2. title: Endoscopies
  3. output:
  4. html_document:
  5. toc: true
  6. toc_float: true
  7. params:
  8. endoscopies: NA
  9. endoscopies_ext: NA
  10. endoscopies_hos: NA
  11. liste_actes: NA
  12. ---
  13. ```{r setup, message = F, warning = F, echo = F}
  14. library(tidyverse)
  15. library(DT)
  16. library(knitr)
  17. library(magrittr)
  18. library(stringr)
  19. opts_chunk$set(message = F,
  20. echo = F,
  21. warning = F)
  22. options(DT.options = list(paging = F,
  23. searching = F,
  24. info = F,
  25. dom = "Bfrtip",
  26. buttons = c("copy", "excel")))
  27. ```
  28. # Codes utilisés {.tabset}
  29. ## ORL
  30. ```{r liste_orl}
  31. liste_actes %>%
  32. filter(Appareil == "ORL") %>%
  33. select(- Appareil) %>%
  34. datatable(rownames = F, options = list(paging = T, searching = T))
  35. ```
  36. ## Digestif
  37. ```{r liste_dig}
  38. liste_actes %>%
  39. filter(Appareil == "Digestif") %>%
  40. select(- Appareil) %>%
  41. datatable(rownames = F, options = list(paging = T, searching = T))
  42. ```
  43. ## Respiratoire
  44. ```{r liste_respi}
  45. liste_actes %>%
  46. filter(Appareil == "Respiratoire") %>%
  47. select(- Appareil) %>%
  48. datatable(rownames = F, options = list(paging = T, searching = T))
  49. ```
  50. ## Génito-urinaire
  51. ```{r liste_uro}
  52. liste_actes %>%
  53. filter(Appareil == "Genito-urinaire") %>%
  54. select(- Appareil) %>%
  55. datatable(rownames = F, options = list(paging = T, searching = T))
  56. ```
  57. # Global
  58. ## Total
  59. ```{r global_total}
  60. endoscopies() %>%
  61. summarise(Venues = n_distinct(Venue)) %>%
  62. datatable(rownames = F,
  63. extensions = "Buttons")
  64. ```
  65. ## Par service exécutant
  66. ```{r global_par_service}
  67. endoscopies() %>%
  68. group_by(Service) %>%
  69. summarise(Venues = n_distinct(Venue)) %>%
  70. ungroup %>%
  71. arrange(desc(Venues)) %>%
  72. datatable(rownames = F,
  73. extensions = "Buttons")
  74. ```
  75. # Externe
  76. ## Total
  77. ```{r ext_total}
  78. endoscopies_ext() %>%
  79. summarise(Venues = n_distinct(Venue),
  80. Valorisation = sum(Tarif)) %>%
  81. datatable(rownames = F,
  82. extensions = "Buttons") %>%
  83. formatCurrency(2, currency = "€", dec.mark = ",", mark = " ", before = F)
  84. ```
  85. ## Par appareil
  86. ```{r ext_par_appareil}
  87. endoscopies_ext() %>%
  88. group_by(Appareil) %>%
  89. summarise(Venues = n_distinct(Venue),
  90. Valorisation = sum(Tarif)) %>%
  91. arrange(desc(Valorisation)) %>%
  92. datatable(rownames = F,
  93. extensions = "Buttons") %>%
  94. formatCurrency(3, currency = "€", dec.mark = ",", mark = " ", before = F)
  95. ```
  96. ## Par acte
  97. ```{r ext_par_acte}
  98. endoscopies_ext() %>%
  99. group_by(Acte, Acte_libelle) %>%
  100. summarise(Venues = n_distinct(Venue),
  101. Valorisation = sum(Tarif)) %>%
  102. ungroup %>%
  103. arrange(desc(Valorisation)) %>%
  104. datatable(options = list(paging = T, searching = T),
  105. colnames = c("Libelle" = "Acte_libelle"),
  106. rownames = F,
  107. extensions = "Buttons") %>%
  108. formatCurrency(4, currency = "€", dec.mark = ",", mark = " ", before = F)
  109. ```
  110. ## Par service exécutant
  111. ```{r ext_par_service}
  112. endoscopies_ext() %>%
  113. group_by(Service) %>%
  114. summarise(Venues = n_distinct(Venue),
  115. Valorisation = sum(Tarif)) %>%
  116. ungroup %>%
  117. arrange(desc(Valorisation)) %>%
  118. datatable(rownames = F,
  119. extensions = "Buttons") %>%
  120. formatCurrency(3, currency = "€", dec.mark = ",", mark = " ", before = F)
  121. ```
  122. ## Par service exécutant et par acte
  123. ```{r ext_par_acte_et_service}
  124. endoscopies_ext() %>%
  125. group_by(Service, Acte, Acte_libelle) %>%
  126. summarise(Venues = n_distinct(Venue),
  127. Valorisation = sum(Tarif)) %>%
  128. arrange(Service, desc(Valorisation)) %>%
  129. ungroup %>%
  130. datatable(options = list(paging = T, searching = T),
  131. colnames = c("Libelle" = "Acte_libelle"),
  132. rownames = F,
  133. extensions = "Buttons",
  134. filter = "top") %>%
  135. formatCurrency(5, currency = "€", dec.mark = ",", mark = " ", before = F)
  136. ```
  137. # Hospitalisation
  138. ## Total
  139. ```{r total_hos}
  140. endoscopies_hos() %>%
  141. summarise(RSS = n(),
  142. Valorisation = sum(Valorisation)) %>%
  143. datatable(rownames = F,
  144. extensions = "Buttons") %>%
  145. formatCurrency(2, currency = "€", dec.mark = ",", mark = " ", before = F)
  146. ```
  147. ## Par durée d'hospitalisation
  148. ```{r hos_par_durée}
  149. endoscopies_hos() %>%
  150. group_by(Type_duree) %>%
  151. summarise(RSS = n(),
  152. Valorisation = sum(Valorisation)) %>%
  153. datatable(rownames = F,
  154. colnames = c("Durée" = "Type_duree"),
  155. extensions = "Buttons") %>%
  156. formatCurrency(3, currency = "€", dec.mark = ",", mark = " ", before = F)
  157. ```
  158. ## Par GHM {.tabset}
  159. ### 0 ou 1j
  160. ```{r ghm_hos_0j}
  161. endoscopies_hos() %>%
  162. filter(Type_duree == "0 ou 1 j") %>%
  163. group_by(GHM, GHM_libelle) %>%
  164. summarise(RSS = n(),
  165. Valorisation = sum(Valorisation)) %>%
  166. ungroup %>%
  167. arrange(desc(RSS)) %>%
  168. datatable(rownames = F,
  169. colnames = c("Libelle GHM" = "GHM_libelle"),
  170. options = list(paging = T),
  171. extensions = "Buttons") %>%
  172. formatCurrency(4, currency = "€", dec.mark = ",", mark = " ", before = F) %>%
  173. formatRound(5)
  174. ```
  175. ### 1+ j
  176. ```{r ghm_hos_1j}
  177. endoscopies_hos() %>%
  178. filter(Type_duree == "1+ j") %>%
  179. group_by(GHM, GHM_libelle) %>%
  180. summarise(RSS = n(),
  181. Valorisation = sum(Valorisation)) %>%
  182. ungroup %>%
  183. arrange(desc(RSS)) %>%
  184. datatable(rownames = F,
  185. colnames = c("Libelle GHM" = "GHM_libelle"),
  186. options = list(paging = T),
  187. extensions = "Buttons") %>%
  188. formatCurrency(4, currency = "€", dec.mark = ",", mark = " ", before = F) %>%
  189. formatRound(5)
  190. ```