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.

224 lines
5.5KB

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