@tekkare/romulus 0.1.250 → 0.1.252

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (270) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/BarChart.vue +1 -0
  3. package/dist/runtime/components/ChoroplethMap.vue +4 -1
  4. package/dist/runtime/internal/geo/fr-regions.json +1 -1
  5. package/dist/runtime/utils/chart.d.ts +6 -3
  6. package/dist/runtime/utils/chart.js +15 -2
  7. package/layer/app/app.config.ts +6 -0
  8. package/layer/app/components/OipPubmedSummary.vue +223 -0
  9. package/layer/app/components/OipResourceDrawer.vue +331 -0
  10. package/layer/app/components/OipResourceDrawerLink.vue +40 -0
  11. package/layer/app/components/OipResourceField.vue +41 -0
  12. package/layer/app/components/OipResourceGenericCard.vue +54 -0
  13. package/layer/app/components/OipResourceSource.vue +50 -0
  14. package/layer/app/components/OipResourceTags.vue +65 -0
  15. package/layer/app/components/OipResourceView.vue +107 -0
  16. package/layer/app/components/oip-drugs/fiches/AssociationFiche.vue +775 -0
  17. package/layer/app/components/oip-drugs/fiches/BrandFiche.vue +1111 -0
  18. package/layer/app/components/oip-drugs/fiches/IndicationFiche.vue +182 -0
  19. package/layer/app/components/oip-drugs/fiches/JoFiche.vue +101 -0
  20. package/layer/app/components/oip-drugs/fiches/PndsFiche.vue +279 -0
  21. package/layer/app/components/oip-drugs/heart/JoCard.vue +314 -0
  22. package/layer/app/components/oip-drugs/heart/TextHighlight.vue +326 -0
  23. package/layer/app/components/oip-drugs/heart/ansm/BrandCard.vue +187 -0
  24. package/layer/app/components/oip-drugs/heart/ansm/CisDetail.vue +363 -0
  25. package/layer/app/components/oip-drugs/heart/ansm/CisTable.vue +167 -0
  26. package/layer/app/components/oip-drugs/heart/associations/NationalAssemblyCard.vue +373 -0
  27. package/layer/app/components/oip-drugs/heart/associations/NationalAssemblyFiche.vue +372 -0
  28. package/layer/app/components/oip-drugs/heart/associations/TranscriptionCard.vue +55 -0
  29. package/layer/app/components/oip-drugs/heart/elastic/SourceContainerElastic.vue +103 -0
  30. package/layer/app/components/oip-drugs/heart/france/BrandGroupCard.vue +450 -0
  31. package/layer/app/components/oip-drugs/heart/mitm/Card.vue +199 -0
  32. package/layer/app/components/oip-drugs/heart/mitm/Source.vue +23 -0
  33. package/layer/app/components/oip-drugs/heart/mitm/details/Overview.vue +381 -0
  34. package/layer/app/components/oip-drugs/heart/put/Card.vue +212 -0
  35. package/layer/app/components/oip-drugs/heart/results/AccesCard.vue +696 -0
  36. package/layer/app/components/oip-drugs/heart/results/AlertCard.vue +342 -0
  37. package/layer/app/components/oip-drugs/heart/results/AsmrCursor.vue +229 -0
  38. package/layer/app/components/oip-drugs/heart/results/EvalCard.vue +370 -0
  39. package/layer/app/components/oip-drugs/heart/results/IndicCard.vue +743 -0
  40. package/layer/app/components/oip-drugs/heart/results/MatchExplain.vue +243 -0
  41. package/layer/app/components/oip-drugs/heart/results/PrefRows.vue +105 -0
  42. package/layer/app/components/oip-drugs/heart/results/details/HasHistory.vue +487 -0
  43. package/layer/app/components/oip-drugs/heart/results/details/InternationalCountryCard.vue +461 -0
  44. package/layer/app/components/oip-drugs/heart/results/details/InternationalOverview.vue +200 -0
  45. package/layer/app/components/oip-drugs/heart/results/details/InternationalPriceDrawer.vue +647 -0
  46. package/layer/app/components/oip-drugs/heart/results/details/Monograph.vue +128 -0
  47. package/layer/app/components/oip-drugs/heart/results/details/OpinionDrawer.vue +535 -0
  48. package/layer/app/components/oip-drugs/heart/results/details/PresentationDrawer.vue +738 -0
  49. package/layer/app/components/oip-drugs/heart/results/details/Price.vue +227 -0
  50. package/layer/app/components/oip-drugs/heart/results/details/PriceOverview.vue +1261 -0
  51. package/layer/app/components/oip-drugs/heart/results/details/RecordDrawer.vue +494 -0
  52. package/layer/app/components/oip-drugs/heart/results/details/RecordList.vue +426 -0
  53. package/layer/app/components/oip-drugs/heart/results/les/Card.vue +340 -0
  54. package/layer/app/components/oip-drugs/heart/results/les/Drawer.vue +67 -0
  55. package/layer/app/components/oip-drugs/heart/results/les/IndicationDetail.vue +149 -0
  56. package/layer/app/components/oip-drugs/heart/results/les/Source.vue +20 -0
  57. package/layer/app/components/oip-drugs/heart/results/les/SourceTag.vue +39 -0
  58. package/layer/app/components/oip-drugs/heart/searchPage/DynamicSource.vue +29 -0
  59. package/layer/app/components/oip-drugs/medicam/market/Chart.vue +121 -0
  60. package/layer/app/components/oip-drugs/outpatient/ProductEvolution.vue +236 -0
  61. package/layer/app/components/oip-drugs/resources/Ansm.vue +75 -0
  62. package/layer/app/components/oip-drugs/resources/Association.vue +30 -0
  63. package/layer/app/components/oip-drugs/resources/Brand.vue +65 -0
  64. package/layer/app/components/oip-drugs/resources/Contribution.vue +216 -0
  65. package/layer/app/components/oip-drugs/resources/Hospital.vue +151 -0
  66. package/layer/app/components/oip-drugs/resources/Indication.vue +54 -0
  67. package/layer/app/components/oip-drugs/resources/Jo.vue +57 -0
  68. package/layer/app/components/oip-drugs/resources/Medicam.vue +140 -0
  69. package/layer/app/components/oip-drugs/resources/Mitm.vue +84 -0
  70. package/layer/app/components/oip-drugs/resources/NationalAssembly.vue +93 -0
  71. package/layer/app/components/oip-drugs/resources/Outpatient.vue +97 -0
  72. package/layer/app/components/oip-drugs/resources/Pnds.vue +24 -0
  73. package/layer/app/components/oip-drugs/resources/Price.vue +106 -0
  74. package/layer/app/components/oip-drugs/resources/Put.vue +143 -0
  75. package/layer/app/components/oip-science/appel-a-projet/Cards.vue +162 -0
  76. package/layer/app/components/oip-science/clinical-trials/Cards.vue +382 -0
  77. package/layer/app/components/oip-science/clinical-trials/CardsGlobal.vue +273 -0
  78. package/layer/app/components/oip-science/clinical-trials/LinkedList.vue +366 -0
  79. package/layer/app/components/oip-science/clinical-trials/PairBadge.vue +25 -0
  80. package/layer/app/components/oip-science/clinical-trials/PairBody.vue +182 -0
  81. package/layer/app/components/oip-science/clinical-trials/SitesDrawer.vue +95 -0
  82. package/layer/app/components/oip-science/common/Form.vue +73 -0
  83. package/layer/app/components/oip-science/common/MatchAvgTag.vue +283 -0
  84. package/layer/app/components/oip-science/common/NoData.vue +16 -0
  85. package/layer/app/components/oip-science/common/ScoreBadge.vue +35 -0
  86. package/layer/app/components/oip-science/common/Source.vue +31 -0
  87. package/layer/app/components/oip-science/common/TableTags.vue +279 -0
  88. package/layer/app/components/oip-science/common/Timeline.vue +104 -0
  89. package/layer/app/components/oip-science/common/ToolTips.vue +89 -0
  90. package/layer/app/components/oip-science/cross/publicationPubmed.vue +484 -0
  91. package/layer/app/components/oip-science/crossData/CrossDataLocations.vue +71 -0
  92. package/layer/app/components/oip-science/ctgov/Investigators.vue +148 -0
  93. package/layer/app/components/oip-science/ctgov/Locations.vue +102 -0
  94. package/layer/app/components/oip-science/ctgov/Publications.vue +52 -0
  95. package/layer/app/components/oip-science/ctgov/Sponsors.vue +66 -0
  96. package/layer/app/components/oip-science/ctgov/StudyDescription.vue +1136 -0
  97. package/layer/app/components/oip-science/ctgov-centers/ClinicalTrials.vue +40 -0
  98. package/layer/app/components/oip-science/ctgov-centers/Publications.vue +50 -0
  99. package/layer/app/components/oip-science/ctgov-investigators/ClinicalTrials.vue +43 -0
  100. package/layer/app/components/oip-science/ctgov-investigators/Informations.vue +171 -0
  101. package/layer/app/components/oip-science/ctgov-investigators/Publications.vue +44 -0
  102. package/layer/app/components/oip-science/elastic/DateRangeFilter.vue +209 -0
  103. package/layer/app/components/oip-science/elastic/Filter.vue +719 -0
  104. package/layer/app/components/oip-science/elastic/MatchExplain.vue +152 -0
  105. package/layer/app/components/oip-science/establishments/Cards.vue +183 -0
  106. package/layer/app/components/oip-science/establishments/ClinicalTrials.vue +62 -0
  107. package/layer/app/components/oip-science/establishments/Hcps.vue +227 -0
  108. package/layer/app/components/oip-science/establishments/Informations.vue +263 -0
  109. package/layer/app/components/oip-science/establishments/LinkedList.vue +153 -0
  110. package/layer/app/components/oip-science/establishments/MatchedLabels.vue +194 -0
  111. package/layer/app/components/oip-science/establishments/PublicFinance.vue +62 -0
  112. package/layer/app/components/oip-science/euct/Investigators.vue +125 -0
  113. package/layer/app/components/oip-science/euct/Locations.vue +102 -0
  114. package/layer/app/components/oip-science/euct/Products.vue +101 -0
  115. package/layer/app/components/oip-science/euct/Publications.vue +89 -0
  116. package/layer/app/components/oip-science/euct/Sponsors.vue +86 -0
  117. package/layer/app/components/oip-science/euct/StudyDescription.vue +1075 -0
  118. package/layer/app/components/oip-science/euct-centers/ClinicalTrials.vue +40 -0
  119. package/layer/app/components/oip-science/euct-centers/Publications.vue +55 -0
  120. package/layer/app/components/oip-science/euct-investigators/ClinicalTrials.vue +41 -0
  121. package/layer/app/components/oip-science/euct-investigators/Informations.vue +171 -0
  122. package/layer/app/components/oip-science/euct-investigators/Publications.vue +51 -0
  123. package/layer/app/components/oip-science/hcps/AppelsAProjet.vue +62 -0
  124. package/layer/app/components/oip-science/hcps/Cards.vue +237 -0
  125. package/layer/app/components/oip-science/hcps/ClinicalTrials.vue +78 -0
  126. package/layer/app/components/oip-science/hcps/Informations.vue +296 -0
  127. package/layer/app/components/oip-science/hcps/LinkedList.vue +153 -0
  128. package/layer/app/components/oip-science/hcps/MatchedLabels.vue +207 -0
  129. package/layer/app/components/oip-science/hcps/Pubmed.vue +128 -0
  130. package/layer/app/components/oip-science/local/SliderTabs.vue +99 -0
  131. package/layer/app/components/oip-science/local/SliderTabsFull.vue +135 -0
  132. package/layer/app/components/oip-science/pubmed/Authors.vue +128 -0
  133. package/layer/app/components/oip-science/pubmed/Cards.vue +417 -0
  134. package/layer/app/components/oip-science/pubmed/ClinicalTrials.vue +71 -0
  135. package/layer/app/components/oip-science/resources/Phrc.vue +39 -0
  136. package/layer/app/composables/useOipChapterScroll.ts +43 -0
  137. package/layer/app/composables/useOipResourceHooks.ts +27 -0
  138. package/layer/app/composables/useOipResourceNav.ts +66 -0
  139. package/layer/app/composables/useOipResourceViews.ts +117 -0
  140. package/layer/app/composables/useOipResources.ts +83 -0
  141. package/layer/app/oip-drugs/PORTING.md +120 -0
  142. package/layer/app/oip-drugs/composables/useAssociationDetail.ts +220 -0
  143. package/layer/app/oip-drugs/composables/useAssociationExport.ts +63 -0
  144. package/layer/app/oip-drugs/composables/useAssociationLookup.ts +105 -0
  145. package/layer/app/oip-drugs/composables/useCardPrefOptions.ts +201 -0
  146. package/layer/app/oip-drugs/composables/useCurrency.ts +121 -0
  147. package/layer/app/oip-drugs/composables/useDirectusSources.ts +224 -0
  148. package/layer/app/oip-drugs/composables/useHeartBrandMatches.ts +112 -0
  149. package/layer/app/oip-drugs/composables/useHeartDetailSearches.ts +479 -0
  150. package/layer/app/oip-drugs/composables/useHeartIntlApprovals.ts +661 -0
  151. package/layer/app/oip-drugs/composables/useHeartLesIndication.ts +168 -0
  152. package/layer/app/oip-drugs/composables/useHeartMatchExplain.ts +231 -0
  153. package/layer/app/oip-drugs/composables/useHeartReports.ts +239 -0
  154. package/layer/app/oip-drugs/composables/useHeartSearchFields.ts +233 -0
  155. package/layer/app/oip-drugs/composables/useMergeByKey.ts +23 -0
  156. package/layer/app/oip-drugs/composables/useOipDrugsElastic.ts +621 -0
  157. package/layer/app/oip-drugs/composables/usePageEmpty.ts +58 -0
  158. package/layer/app/oip-drugs/composables/v-useSalesSource.ts +64 -0
  159. package/layer/app/oip-drugs/drugs.css +500 -0
  160. package/layer/app/oip-drugs/esIndices.ts +322 -0
  161. package/layer/app/oip-drugs/kinds.ts +264 -0
  162. package/layer/app/oip-drugs/locales/en.json +1571 -0
  163. package/layer/app/oip-drugs/locales/fr.json +1571 -0
  164. package/layer/app/oip-drugs/monographs/blincyto-has.vue +289 -0
  165. package/layer/app/oip-drugs/monographs/darzalex-has.vue +276 -0
  166. package/layer/app/oip-drugs/monographs/dupixent-has.vue +216 -0
  167. package/layer/app/oip-drugs/monographs/enhertu-has.vue +280 -0
  168. package/layer/app/oip-drugs/monographs/has-sein-2023.vue +1649 -0
  169. package/layer/app/oip-drugs/monographs/ibrance-has.vue +277 -0
  170. package/layer/app/oip-drugs/monographs/imfinzi-has.vue +293 -0
  171. package/layer/app/oip-drugs/monographs/keytruda-has.vue +334 -0
  172. package/layer/app/oip-drugs/monographs/kisqali-has.vue +201 -0
  173. package/layer/app/oip-drugs/monographs/opdivo-has.vue +231 -0
  174. package/layer/app/oip-drugs/monographs/ozempic-has.vue +186 -0
  175. package/layer/app/oip-drugs/monographs/tecentriq-has.vue +312 -0
  176. package/layer/app/oip-drugs/monographs/yescarta-has.vue +272 -0
  177. package/layer/app/oip-drugs/types/elastic.ts +113 -0
  178. package/layer/app/oip-drugs/types/es/agencies.ts +152 -0
  179. package/layer/app/oip-drugs/types/es/directory.ts +54 -0
  180. package/layer/app/oip-drugs/types/es/docByIndex.ts +151 -0
  181. package/layer/app/oip-drugs/types/es/openmedic.ts +67 -0
  182. package/layer/app/oip-drugs/types/es/outpatient.ts +71 -0
  183. package/layer/app/oip-drugs/types/es/portal.ts +130 -0
  184. package/layer/app/oip-drugs/types/es/retail.ts +107 -0
  185. package/layer/app/oip-drugs/types/es/statistics.ts +29 -0
  186. package/layer/app/oip-drugs/types/heart/CurrencyRate.ts +16 -0
  187. package/layer/app/oip-drugs/types/heart/ansm.ts +106 -0
  188. package/layer/app/oip-drugs/types/heart/tag.ts +29 -0
  189. package/layer/app/oip-drugs/utils/associationFields.ts +118 -0
  190. package/layer/app/oip-drugs/utils/contributions.ts +36 -0
  191. package/layer/app/oip-drugs/utils/countryMapping.ts +387 -0
  192. package/layer/app/oip-drugs/utils/esHighlight.ts +21 -0
  193. package/layer/app/oip-drugs/utils/exportSheets.ts +57 -0
  194. package/layer/app/oip-drugs/utils/heartIntlPrice.ts +228 -0
  195. package/layer/app/oip-drugs/utils/heartStyleAndFormat.ts +262 -0
  196. package/layer/app/oip-drugs/utils/heartStyleAnsm.ts +71 -0
  197. package/layer/app/oip-drugs/utils/latestDate.ts +31 -0
  198. package/layer/app/oip-drugs/utils/p-heartCardTags.ts +53 -0
  199. package/layer/app/oip-drugs/utils/priceExport.ts +269 -0
  200. package/layer/app/oip-drugs/utils/q-hasRatings.ts +43 -0
  201. package/layer/app/oip-drugs/utils/s-openCard.ts +20 -0
  202. package/layer/app/oip-drugs/utils/sourceUuids.ts +155 -0
  203. package/layer/app/oip-drugs/utils/styleAndFormat.ts +40 -0
  204. package/layer/app/oip-drugs/utils/v-salesSeries.ts +156 -0
  205. package/layer/app/oip-drugs/utils/v-scopeTags.ts +23 -0
  206. package/layer/app/oip-science/PORTING.md +93 -0
  207. package/layer/app/oip-science/assets/smartSelection.json +428 -0
  208. package/layer/app/oip-science/composables/useAuthorMatching.ts +342 -0
  209. package/layer/app/oip-science/composables/useCTCenter.ts +107 -0
  210. package/layer/app/oip-science/composables/useCTInvestigators.ts +107 -0
  211. package/layer/app/oip-science/composables/useEstablishmentCrossData.ts +139 -0
  212. package/layer/app/oip-science/composables/useEstablishmentMatching.ts +176 -0
  213. package/layer/app/oip-science/composables/useEuct.ts +418 -0
  214. package/layer/app/oip-science/composables/useEuctCenter.ts +107 -0
  215. package/layer/app/oip-science/composables/useEuctInvestigators.ts +107 -0
  216. package/layer/app/oip-science/composables/useGlobalClinicalTrials.ts +624 -0
  217. package/layer/app/oip-science/composables/useLinkedTrials.ts +83 -0
  218. package/layer/app/oip-science/composables/useOipElastic.ts +658 -0
  219. package/layer/app/oip-science/composables/useOipSearchExplain.ts +166 -0
  220. package/layer/app/oip-science/composables/usePubmed.ts +487 -0
  221. package/layer/app/oip-science/composables/useSearchFields.ts +153 -0
  222. package/layer/app/oip-science/indexConfig.json +794 -0
  223. package/layer/app/oip-science/locales/en.json +483 -0
  224. package/layer/app/oip-science/locales/fr.json +483 -0
  225. package/layer/app/oip-science/science.css +1182 -0
  226. package/layer/app/oip-science/utils/a-openCard.ts +23 -0
  227. package/layer/app/oip-science/utils/b-openCard.ts +35 -0
  228. package/layer/app/oip-science/utils/c-filterContext.ts +81 -0
  229. package/layer/app/oip-science/utils/f-types.ts +241 -0
  230. package/layer/app/oip-science/utils/frDiseaseTerms.ts +269 -0
  231. package/layer/app/oip-science/utils/matchMethod.ts +53 -0
  232. package/layer/app/oip-science/utils/sliderTabs.ts +13 -0
  233. package/layer/app/oip-science/utils/sources.ts +15 -0
  234. package/layer/app/oip-science/utils/styleAndFormat.ts +608 -0
  235. package/layer/app/oip-science/utils/toPresets.ts +7 -0
  236. package/layer/app/oip-science/utils/valueTable.ts +126 -0
  237. package/layer/app/plugins/oip-science-i18n.ts +17 -0
  238. package/layer/app/utils/oipFicheRoutes.ts +118 -0
  239. package/layer/app/utils/oipResources.ts +440 -0
  240. package/layer/nuxt.config.ts +22 -2
  241. package/layer/public/reports/blincyto-has.html +292 -0
  242. package/layer/public/reports/blincyto-has.pdf +0 -0
  243. package/layer/public/reports/darzalex-has.html +279 -0
  244. package/layer/public/reports/darzalex-has.pdf +0 -0
  245. package/layer/public/reports/dupixent-has.html +217 -0
  246. package/layer/public/reports/dupixent-has.pdf +0 -0
  247. package/layer/public/reports/enhertu-has.html +283 -0
  248. package/layer/public/reports/enhertu-has.pdf +0 -0
  249. package/layer/public/reports/has-sein-2023.html +1639 -0
  250. package/layer/public/reports/ibrance-has.html +280 -0
  251. package/layer/public/reports/ibrance-has.pdf +0 -0
  252. package/layer/public/reports/imfinzi-has.html +297 -0
  253. package/layer/public/reports/imfinzi-has.pdf +0 -0
  254. package/layer/public/reports/keytruda-has.html +337 -0
  255. package/layer/public/reports/keytruda-has.pdf +0 -0
  256. package/layer/public/reports/kisqali-has.html +202 -0
  257. package/layer/public/reports/kisqali-has.pdf +0 -0
  258. package/layer/public/reports/opdivo-has.html +232 -0
  259. package/layer/public/reports/opdivo-has.pdf +0 -0
  260. package/layer/public/reports/ozempic-has.html +188 -0
  261. package/layer/public/reports/ozempic-has.pdf +0 -0
  262. package/layer/public/reports/tecentriq-has.html +315 -0
  263. package/layer/public/reports/tecentriq-has.pdf +0 -0
  264. package/layer/public/reports/yescarta-has.html +275 -0
  265. package/layer/public/reports/yescarta-has.pdf +0 -0
  266. package/layer/server/api/oip/es.post.ts +99 -0
  267. package/layer/server/api/oip/pdf.get.ts +70 -0
  268. package/layer/server/api/oip/reports.get.ts +98 -0
  269. package/layer/server/api/oip/resource-types.get.ts +22 -0
  270. package/package.json +1 -1
@@ -0,0 +1,1136 @@
1
+ <!--
2
+ Onglet « Description de l'etude » d'un essai CT.gov (portage de la page
3
+ /ctgov/[id]/study-description de France Augmented Science). L'en-tete de
4
+ fiche reste dans l'app : le titre officiel n'est pas repete ici.
5
+ -->
6
+ <template>
7
+ <div ref="root" class="oip-science">
8
+ <div v-if="trial && !isLoadingQueryClinicalTrial">
9
+ <div class="oip_row gap-16">
10
+ <div class="chapters_col">
11
+ <RmChaptersNav
12
+ class="chapters_sticky"
13
+ :chapters="chaptersList"
14
+ :title="$t('oipScience.trial.chapters')"
15
+ :offset="chaptersOffset"
16
+ :style="{ top: `${stickyTop}px` }"
17
+ @select="scrollToChapter"
18
+ />
19
+ </div>
20
+ <div class="oip_widthFill sd-page">
21
+ <!-- OVERVIEW : statut, chiffres cles, resume. Le titre officiel est
22
+ deja dans l'en-tete de fiche, on ne le repete pas. -->
23
+ <section class="oip_card sd-section" id="summary">
24
+ <div class="sd-overview-head">
25
+ <div class="sd-tags">
26
+ <RmTag :variant="setColorStatus(trial.overall_status)">
27
+ {{ ifNoRes(trial.overall_status) }}
28
+ </RmTag>
29
+ <RmTag v-if="trial.study_type" variant="gray">{{ trial.study_type }}</RmTag>
30
+ <RmTag v-if="trial.phase && trial.phase !== 'Not Applicable'" variant="gray">
31
+ {{ trial.phase }}
32
+ </RmTag>
33
+ <RmTag v-if="trial.with_result" variant="green">{{ $t('oipScience.trial.resultsPosted') }}</RmTag>
34
+ <RmTag v-if="trial.acronym" variant="indigo">{{ trial.acronym }}</RmTag>
35
+ </div>
36
+ <div class="sd-tags">
37
+ <RmCopyCode v-if="trial.nct_id" :value="trial.nct_id" lang="en" />
38
+ <a
39
+ v-if="trial.nct_id"
40
+ class="sd-external"
41
+ :href="`https://clinicaltrials.gov/study/${trial.nct_id}`"
42
+ target="_blank"
43
+ rel="noopener"
44
+ >
45
+ ClinicalTrials.gov
46
+ <RmIcon name="ArrowSquareOut" :size="12" />
47
+ </a>
48
+ </div>
49
+ </div>
50
+
51
+ <RmCallout v-if="trial.why_stopped" tone="warning">
52
+ <b>{{ $t('oipScience.trial.whyStopped') }}</b> {{ trial.why_stopped }}
53
+ </RmCallout>
54
+
55
+ <!-- Le titre officiel est dans l'en-tete ; le titre court n'apparait
56
+ que s'il en differe. -->
57
+ <div v-if="trial.brief_title && trial.brief_title !== trial.official_title" class="sd-block">
58
+ <h2 class="sd-h2">{{ $t('oipScience.trial.briefTitle') }}</h2>
59
+ <p class="oip_body">{{ trial.brief_title }}</p>
60
+ </div>
61
+
62
+ <div class="sd-kpis">
63
+ <RmKpi
64
+ :label="$t('oipScience.trial.enrollment')"
65
+ :value="ifNoRes(trial.enrollment, 'number')"
66
+ :unit="trial.enrollment != null ? $t('oipScience.trial.participants') : undefined"
67
+ :note="dateKind(trial.enrollment_type)"
68
+ />
69
+ <RmKpi
70
+ :label="$t('oipScience.trial.startDate')"
71
+ :value="ifNoRes(trial.start_date, 'date')"
72
+ :note="dateKind(trial.start_date_type)"
73
+ />
74
+ <RmKpi
75
+ :label="$t('oipScience.trial.primaryCompletion')"
76
+ :value="ifNoRes(trial.primary_completion_date, 'date')"
77
+ :note="dateKind(trial.primary_completion_date_type)"
78
+ />
79
+ <RmKpi :label="$t('oipScience.trial.primaryPurpose')" :value="ifNoRes(design?.primary_purpose)" />
80
+ </div>
81
+
82
+ <div v-if="briefSummary" class="sd-block">
83
+ <h2 class="sd-h2">{{ $t('oipScience.trial.briefSummary') }}</h2>
84
+ <RmTextHighlight
85
+ class="oip_body sd-prose"
86
+ :text="briefSummary"
87
+ :queries="highlight"
88
+ />
89
+ </div>
90
+
91
+ <div v-if="trial.description_name" class="sd-block" id="detailed-description">
92
+ <h2 class="sd-h2">{{ $t('oipScience.trial.detailedDescription') }}</h2>
93
+ <RmTextHighlight
94
+ class="oip_body sd-prose"
95
+ :text="trial.description_name"
96
+ :queries="highlight"
97
+ :clamp="6"
98
+ :lang="lang"
99
+ />
100
+ </div>
101
+
102
+ <OipScienceCommonSource :sources="['CT.gov']" :lang="lang" />
103
+ </section>
104
+
105
+ <!-- CONDITIONS : tags OIP, conditions, mots cles. -->
106
+ <section v-if="hasConditionsBlock" class="oip_card sd-section" id="conditions">
107
+ <h1 class="sd-h1">{{ $t('oipScience.trial.conditionsAndKeywords') }}</h1>
108
+
109
+ <RmTable
110
+ v-if="conditionRows.length"
111
+ :columns="[
112
+ { key: 'name', label: $t('oipScience.trial.condition'), width: '30%' },
113
+ { key: 'description', label: $t('oipScience.trial.description') },
114
+ ]"
115
+ :rows="conditionRows"
116
+ compact
117
+ flat
118
+ >
119
+ <template #name="{ value }">
120
+ <RmTextHighlight :queries="highlight" :text="value" />
121
+ </template>
122
+ <template #description="{ value }">
123
+ <RmTextHighlight :queries="highlight" :text="ifNoRes(value)" />
124
+ </template>
125
+ </RmTable>
126
+
127
+ <div v-if="getRareDiseases.length" class="sd-block">
128
+ <h2 class="sd-h2">{{ $t('oipScience.trial.rareDiseases') }} <span class="sd-hint">{{ $t('oipScience.trial.oipDiscoveryTagsHint') }}</span></h2>
129
+ <div class="sd-tags">
130
+ <RmTag v-for="disease in getRareDiseases" :key="String(disease)" variant="purple">
131
+ {{ disease }}
132
+ </RmTag>
133
+ </div>
134
+ </div>
135
+
136
+ <div v-if="keywords.length" class="sd-block">
137
+ <h2 class="sd-h2">{{ $t('oipScience.trial.keywords') }}</h2>
138
+ <div class="sd-tags">
139
+ <RmTag v-for="keyword in keywords" :key="keyword" variant="gray">
140
+ <RmTextHighlight :queries="highlight" :text="keyword" />
141
+ </RmTag>
142
+ </div>
143
+ </div>
144
+ </section>
145
+
146
+ <!-- DESIGN -->
147
+ <section class="oip_card sd-section" id="study-design">
148
+ <h1 class="sd-h1">{{ $t('oipScience.trial.studyDesign') }}</h1>
149
+ <dl class="sd-facts">
150
+ <div v-for="fact in designFacts" :key="fact.label" class="sd-fact">
151
+ <dt>{{ fact.label }}</dt>
152
+ <dd>{{ fact.value }}</dd>
153
+ </div>
154
+ </dl>
155
+ <div v-for="note in designNotes" :key="note.label" class="sd-block">
156
+ <h2 class="sd-h2">{{ note.label }}</h2>
157
+ <p class="oip_body sd-prose">{{ note.text }}</p>
158
+ </div>
159
+ </section>
160
+
161
+ <!-- ARMS AND INTERVENTIONS : une seule table. La liste des
162
+ interventions ne sort seule que s'il n'y a pas de bras. -->
163
+ <section v-if="armRows.length || interventionRows.length" class="oip_card sd-section" id="arms-and-intervention">
164
+ <h1 class="sd-h1">{{ $t('oipScience.trial.armsAndInterventions') }}</h1>
165
+
166
+ <RmTable
167
+ v-if="armRows.length"
168
+ :columns="[
169
+ { key: 'arm', label: isCohort ? $t('oipScience.trial.groupCohort') : $t('oipScience.trial.arm'), width: '40%' },
170
+ { key: 'interventions', label: $t('oipScience.trial.interventions') },
171
+ ]"
172
+ :rows="armRows"
173
+ flat
174
+ >
175
+ <template #arm="{ row }">
176
+ <div class="sd-cell">
177
+ <p class="sd-cell-title">
178
+ <RmTag v-if="row.group_type" variant="gray" class="sd-cell-tag">{{ row.group_type }}</RmTag>
179
+ {{ row.title }}
180
+ </p>
181
+ <RmTextHighlight
182
+ v-if="row.description"
183
+ class="sd-muted"
184
+ :queries="highlight"
185
+ :text="row.description"
186
+ />
187
+ </div>
188
+ </template>
189
+ <template #interventions="{ row }">
190
+ <div class="sd-cell-list">
191
+ <div v-for="(item, i) in row.interventions" :key="i" class="sd-cell">
192
+ <p class="sd-cell-title">
193
+ <span class="sd-kind">{{ item.type }}</span> {{ item.name }}
194
+ </p>
195
+ <RmTextHighlight
196
+ v-if="item.description"
197
+ class="sd-muted"
198
+ :queries="highlight"
199
+ :text="item.description"
200
+ />
201
+ <p v-if="item.otherNames" class="sd-muted">
202
+ {{ $t('oipScience.trial.otherNames') }} <RmTextHighlight class="sd-inline" :queries="highlight" :text="item.otherNames" />
203
+ </p>
204
+ </div>
205
+ </div>
206
+ </template>
207
+ </RmTable>
208
+
209
+ <RmTable
210
+ v-else
211
+ :columns="[
212
+ { key: 'name', label: $t('oipScience.trial.intervention'), width: '30%' },
213
+ { key: 'description', label: $t('oipScience.trial.description') },
214
+ ]"
215
+ :rows="interventionRows"
216
+ compact
217
+ flat
218
+ >
219
+ <template #name="{ row }">
220
+ <span class="sd-kind">{{ row.type }}</span>
221
+ <RmTextHighlight class="sd-inline" :queries="highlight" :text="row.name" />
222
+ </template>
223
+ <template #description="{ value }">
224
+ <RmTextHighlight :queries="highlight" :text="ifNoRes(value)" />
225
+ </template>
226
+ </RmTable>
227
+ </section>
228
+
229
+ <!-- OUTCOME MEASURES -->
230
+ <section v-if="outcomeGroups.length" class="oip_card sd-section" id="outcome-measures">
231
+ <h1 class="sd-h1">{{ $t('oipScience.trial.outcomeMeasures') }}</h1>
232
+ <div v-for="group in outcomeGroups" :key="group.type" class="sd-block">
233
+ <h2 class="sd-h2">
234
+ {{ group.label }} <span class="sd-hint">({{ group.items.length }})</span>
235
+ </h2>
236
+ <ol class="sd-outcomes">
237
+ <li v-for="(measure, index) in group.items" :key="index" class="sd-outcome">
238
+ <p class="sd-cell-title">
239
+ <RmTextHighlight :queries="highlight" :text="measure.measure" />
240
+ </p>
241
+ <RmTextHighlight
242
+ v-if="measure.outcome_description"
243
+ class="sd-muted"
244
+ :queries="highlight"
245
+ :text="measure.outcome_description"
246
+ />
247
+ <p v-if="measure.time_frame" class="sd-meta">
248
+ <RmIcon name="Clock" :size="12" /> {{ measure.time_frame }}
249
+ </p>
250
+ <p v-if="measure.population" class="sd-meta">
251
+ <RmIcon name="Users" :size="12" /> {{ measure.population }}
252
+ </p>
253
+ </li>
254
+ </ol>
255
+ </div>
256
+ </section>
257
+
258
+ <!-- ELIGIBILITY : faits d'abord, puis inclusion / exclusion cote a cote. -->
259
+ <section class="oip_card sd-section" id="eligibility-criteria">
260
+ <h1 class="sd-h1">{{ $t('oipScience.trial.eligibilityCriteria') }}</h1>
261
+ <dl class="sd-facts">
262
+ <div class="sd-fact">
263
+ <dt>{{ $t('oipScience.trial.ages') }}</dt>
264
+ <dd>{{ eligibleAges }}</dd>
265
+ </div>
266
+ <div class="sd-fact">
267
+ <dt>{{ $t('oipScience.trial.sexes') }}</dt>
268
+ <dd>{{ ifNoRes(eligibility?.gender) }}</dd>
269
+ </div>
270
+ <div class="sd-fact">
271
+ <dt>{{ $t('oipScience.trial.healthyVolunteers') }}</dt>
272
+ <dd>{{ eligibility ? yesNo(eligibility.healthy_volunteers) : 'N/A' }}</dd>
273
+ </div>
274
+ <div v-if="eligibility?.sampling_method" class="sd-fact">
275
+ <dt>{{ $t('oipScience.trial.samplingMethod') }}</dt>
276
+ <dd>{{ humanize(eligibility.sampling_method) }}</dd>
277
+ </div>
278
+ </dl>
279
+
280
+ <div v-if="eligibility?.population" class="sd-block">
281
+ <h2 class="sd-h2">{{ $t('oipScience.trial.studyPopulation') }}</h2>
282
+ <p class="oip_body sd-prose">{{ eligibility.population }}</p>
283
+ </div>
284
+
285
+ <div v-if="criteria?.inclusion != null" class="sd-criteria">
286
+ <div class="sd-criteria-col sd-criteria-col--in">
287
+ <h2 class="sd-h2">{{ $t('oipScience.trial.inclusion') }}</h2>
288
+ <RmTextHighlight
289
+ class="oip_body sd-prose"
290
+ :queries="highlight"
291
+ :text="criteria.inclusion || 'N/A'"
292
+ />
293
+ </div>
294
+ <div class="sd-criteria-col sd-criteria-col--out">
295
+ <h2 class="sd-h2">{{ $t('oipScience.trial.exclusion') }}</h2>
296
+ <RmTextHighlight
297
+ class="oip_body sd-prose"
298
+ :queries="highlight"
299
+ :text="criteria.exclusion || 'N/A'"
300
+ />
301
+ </div>
302
+ </div>
303
+ <RmTextHighlight
304
+ v-else-if="criteria?.all"
305
+ class="oip_body sd-prose"
306
+ :queries="highlight"
307
+ :text="criteria.all"
308
+ />
309
+ </section>
310
+
311
+ <!-- DOCUMENTS & LINKS : documents deposes, sites du sponsor, partage des
312
+ donnees individuelles (IPD) et fiche CT.gov. -->
313
+ <section class="oip_card sd-section" id="documents-and-links">
314
+ <h1 class="sd-h1">{{ $t('oipScience.trial.documentsAndLinks') }}</h1>
315
+
316
+ <div v-if="studyDocuments.length" class="sd-block">
317
+ <h2 class="sd-h2">{{ $t('oipScience.trial.studyDocuments') }} <span class="sd-hint">({{ studyDocuments.length }})</span></h2>
318
+ <ul class="sd-links">
319
+ <li v-for="doc in studyDocuments" :key="doc.key" class="sd-link">
320
+ <RmIcon :name="doc.isPdf ? 'FilePdf' : 'FileText'" :size="16" class="sd-link-icon" />
321
+ <div class="sd-cell">
322
+ <a v-if="doc.url" :href="doc.url" target="_blank" rel="noopener" class="sd-link-title">
323
+ {{ doc.type }} <RmIcon name="ArrowSquareOut" :size="12" />
324
+ </a>
325
+ <span v-else class="sd-cell-title">{{ doc.type }}</span>
326
+ <p v-if="doc.id" class="sd-meta">ID: {{ doc.id }}</p>
327
+ <p v-if="doc.comment" class="sd-muted">{{ doc.comment }}</p>
328
+ </div>
329
+ </li>
330
+ </ul>
331
+ </div>
332
+
333
+ <div class="sd-block">
334
+ <h2 class="sd-h2">{{ $t('oipScience.trial.websites') }}</h2>
335
+ <ul class="sd-links">
336
+ <li v-for="link in websiteLinks" :key="link.url" class="sd-link">
337
+ <RmIcon name="Globe" :size="16" class="sd-link-icon" />
338
+ <div class="sd-cell">
339
+ <a :href="link.url" target="_blank" rel="noopener" class="sd-link-title">
340
+ {{ link.label }} <RmIcon name="ArrowSquareOut" :size="12" />
341
+ </a>
342
+ <p class="sd-meta sd-url">{{ link.url }}</p>
343
+ </div>
344
+ </li>
345
+ </ul>
346
+ </div>
347
+
348
+ <div v-if="trial.plan_to_share_ipd" class="sd-block">
349
+ <h2 class="sd-h2">{{ $t('oipScience.trial.ipdSharing') }}</h2>
350
+ <dl class="sd-facts">
351
+ <div class="sd-fact">
352
+ <dt>{{ $t('oipScience.trial.planToShare') }}</dt>
353
+ <dd>{{ humanize(trial.plan_to_share_ipd) }}</dd>
354
+ </div>
355
+ <div v-if="trial.ipd_time_frame" class="sd-fact">
356
+ <dt>{{ $t('oipScience.trial.timeFrame') }}</dt>
357
+ <dd>{{ trial.ipd_time_frame }}</dd>
358
+ </div>
359
+ </dl>
360
+ <p v-if="trial.plan_to_share_ipd_description" class="oip_body sd-prose">
361
+ {{ trial.plan_to_share_ipd_description }}
362
+ </p>
363
+ <p v-if="trial.ipd_access_criteria" class="sd-muted">
364
+ <b>{{ $t('oipScience.trial.accessCriteria') }}</b> {{ trial.ipd_access_criteria }}
365
+ </p>
366
+ </div>
367
+ </section>
368
+
369
+ <!-- KEY DATES : frise des champs NCT dates renseignes + leur type
370
+ (Actual / Estimated). Remplace Study timeline. -->
371
+ <section v-if="keyDates.length" class="oip_card sd-section" id="key-dates">
372
+ <h1 class="sd-h1">{{ $t('oipScience.trial.keyDates') }}</h1>
373
+ <ol class="sd-timeline">
374
+ <li
375
+ v-for="row in keyDates"
376
+ :key="row.field"
377
+ class="sd-step"
378
+ :class="{ 'sd-step--estimated': row.estimated }"
379
+ >
380
+ <span class="sd-dot" aria-hidden="true" />
381
+ <div class="sd-step-body">
382
+ <p class="sd-step-head">
383
+ <span class="sd-step-label">{{ row.label }}</span>
384
+ <span class="sd-step-date">{{ ifNoRes(row.date, 'date') }}</span>
385
+ <RmTag :variant="row.estimated ? 'yellow' : 'gray'">
386
+ {{ row.estimated ? $t('oipScience.trial.estimated') : $t('oipScience.trial.actual') }}
387
+ </RmTag>
388
+ </p>
389
+ <p class="sd-muted">{{ row.desc }}</p>
390
+ </div>
391
+ </li>
392
+ </ol>
393
+ </section>
394
+
395
+ <!-- ALL DATES : table de reference des champs NCT dates, vides compris. -->
396
+ <section class="oip_card sd-section" id="all-dates">
397
+ <h1 class="sd-h1">{{ $t('oipScience.trial.allDates') }}</h1>
398
+ <RmTable
399
+ :columns="[
400
+ { key: 'field', label: $t('oipScience.trial.field'), width: '28%' },
401
+ { key: 'anticipated', label: $t('oipScience.trial.anticipated'), width: '14%' },
402
+ { key: 'actual', label: $t('oipScience.trial.actual'), width: '14%' },
403
+ { key: 'desc', label: $t('oipScience.trial.whatItRepresents') },
404
+ ]"
405
+ :rows="allDatesRows"
406
+ compact
407
+ flat
408
+ >
409
+ <template #field="{ value }">
410
+ <code class="sd-code">{{ value }}</code>
411
+ </template>
412
+ <template #anticipated="{ value }">
413
+ <span :class="value ? 'sd-step-date' : 'sd-na'">{{ value ? ifNoRes(value, 'date') : 'N/A' }}</span>
414
+ </template>
415
+ <template #actual="{ value }">
416
+ <span :class="value ? 'sd-step-date' : 'sd-na'">{{ value ? ifNoRes(value, 'date') : 'N/A' }}</span>
417
+ </template>
418
+ <template #desc="{ value }">
419
+ <span class="sd-muted">{{ value }}</span>
420
+ </template>
421
+ </RmTable>
422
+ </section>
423
+ </div>
424
+ </div>
425
+ </div>
426
+
427
+ <RmLoadingState v-if="!loaded || isLoadingQueryClinicalTrial" :lines="3" :chart-height="240" />
428
+ <RmEmptyState
429
+ v-else-if="!trial"
430
+ :title="$t('oipScience.common.noDataTitle')"
431
+ :text="$t('oipScience.common.noDataText')"
432
+ />
433
+ </div>
434
+ </template>
435
+
436
+ <script setup lang="ts">
437
+ import useGlobalClinicalTrials from '../../../oip-science/composables/useGlobalClinicalTrials';
438
+ import { ifNoRes, removeDuplicate, setColorStatus } from '../../../oip-science/utils/styleAndFormat';
439
+
440
+ const props = withDefaults(
441
+ defineProps<{
442
+ /** Numero NCT de l'essai. */
443
+ id: string;
444
+ /** Termes de la recherche en cours, surlignes dans la fiche. */
445
+ highlight?: string[];
446
+ lang?: 'fr' | 'en';
447
+ }>(),
448
+ { highlight: () => [], lang: 'fr' },
449
+ );
450
+
451
+ const { t } = useI18n();
452
+
453
+ const {
454
+ findClinicalTrialById,
455
+ isLoadingQueryClinicalTrial,
456
+ resultsQueryClinicalTrial,
457
+ } = useGlobalClinicalTrials();
458
+
459
+ // La fiche est typee lache cote composable : on la lit une fois ici.
460
+ const trial = computed(() => resultsQueryClinicalTrial.value as Record<string, any> | null);
461
+
462
+ // Le composable part a `false` : sans ce drapeau, l'etat vide sortirait avant la requete.
463
+ const loaded = ref(false);
464
+
465
+ // QUERY
466
+ async function load() {
467
+ if (!props.id) return;
468
+ await findClinicalTrialById({ id: props.id.toString() });
469
+ loaded.value = true;
470
+ }
471
+
472
+ onMounted(load);
473
+ watch(() => props.id, load);
474
+
475
+ // :::::::::::::::::::::::::::::
476
+ // HELPERS
477
+
478
+ // Les booleens CT.gov arrivent parfois en texte ('Yes', 't', 'true').
479
+ const yesNo = (value: unknown) =>
480
+ value === true || /^(yes|true|t)$/i.test(String(value ?? '')) ? t('oipScience.trial.yes') : t('oipScience.trial.no');
481
+
482
+ // CT.gov type les dates et l'effectif : ESTIMATED (= Anticipated) ou ACTUAL.
483
+ const isEstimated = (type: unknown) => /^(estimated|anticipated)$/i.test(String(type ?? ''));
484
+ const dateKind = (type: unknown) => (type ? (isEstimated(type) ? t('oipScience.trial.estimated') : t('oipScience.trial.actual')) : undefined);
485
+
486
+ // SAMPLES_WITHOUT_DNA -> Samples without DNA
487
+ const humanize = (value: unknown) =>
488
+ value ? String(value).toLowerCase().replace(/_/g, ' ').replace(/^./, (c) => c.toUpperCase()) : '';
489
+
490
+ const design = computed(() => trial.value?.designs?.[0]);
491
+ const eligibility = computed(() => trial.value?.eligibilities?.[0]);
492
+
493
+ const briefSummary = computed(() => trial.value?.brief_summary?.[0]?.brief_summary ?? null);
494
+
495
+ // :::::::::::::::::::::::::::::
496
+ // CONDITIONS & KEYWORDS
497
+
498
+ const getRareDiseases = computed(() =>
499
+ removeDuplicate(
500
+ trial.value?.rare_diseases?.map((res: any) => res.concat_disease_name_orpha_code) ?? []
501
+ ) as string[]
502
+ );
503
+
504
+ const keywords = computed(() =>
505
+ removeDuplicate(trial.value?.keywords?.map((val) => val.keyword_name) ?? []) as string[]
506
+ );
507
+
508
+ const conditionRows = computed(() =>
509
+ ((trial.value?.conditions ?? []) as any[]).map((c) => ({
510
+ name: c.condition_name_en || c.condition_name_fr,
511
+ description: c.condition_description,
512
+ }))
513
+ );
514
+
515
+ const hasConditionsBlock = computed(
516
+ () => conditionRows.value.length > 0 || getRareDiseases.value.length > 0 || keywords.value.length > 0
517
+ );
518
+
519
+ // :::::::::::::::::::::::::::::
520
+ // DESIGN
521
+
522
+ // Seuls les champs renseignes sortent : un essai observationnel n'a ni
523
+ // allocation ni masquage, un interventionnel n'a pas de modele observationnel.
524
+ const designFacts = computed(() => {
525
+ const d = design.value;
526
+ const masked = [
527
+ d?.subject_masked && t('oipScience.trial.maskedParticipant'),
528
+ d?.caregiver_masked && t('oipScience.trial.maskedCareProvider'),
529
+ d?.investigator_masked && t('oipScience.trial.maskedInvestigator'),
530
+ d?.outcomes_assessor_masked && t('oipScience.trial.maskedOutcomesAssessor'),
531
+ ].filter(Boolean);
532
+ return [
533
+ { label: t('oipScience.trial.studyType'), value: trial.value?.study_type },
534
+ { label: t('oipScience.trial.phase'), value: trial.value?.phase },
535
+ { label: t('oipScience.trial.primaryPurpose'), value: d?.primary_purpose },
536
+ { label: t('oipScience.trial.allocation'), value: d?.allocation },
537
+ { label: t('oipScience.trial.interventionModel'), value: d?.intervention_model },
538
+ { label: t('oipScience.trial.observationalModel'), value: d?.observational_model },
539
+ { label: t('oipScience.trial.timePerspective'), value: d?.time_perspective },
540
+ { label: t('oipScience.trial.masking'), value: d?.masking },
541
+ { label: t('oipScience.trial.maskedRoles'), value: masked.join(', ') },
542
+ { label: t('oipScience.trial.targetDuration'), value: trial.value?.target_duration },
543
+ { label: t('oipScience.trial.biospecimenRetention'), value: humanize(trial.value?.biospec_retention) },
544
+ { label: t('oipScience.trial.resultsPosted'), value: yesNo(trial.value?.with_result) },
545
+ { label: t('oipScience.trial.dataMonitoringCommittee'), value: yesNo(trial.value?.has_dmc) },
546
+ { label: t('oipScience.trial.expandedAccess'), value: yesNo(trial.value?.has_expanded_access) },
547
+ { label: t('oipScience.trial.fdaRegulatedDrug'), value: yesNo(trial.value?.is_fda_regulated_drug) },
548
+ { label: t('oipScience.trial.fdaRegulatedDevice'), value: yesNo(trial.value?.is_fda_regulated_device) },
549
+ ].filter((fact) => fact.value);
550
+ });
551
+
552
+ // Textes libres du design, affiches sous la grille quand ils existent.
553
+ const designNotes = computed(() =>
554
+ [
555
+ { label: t('oipScience.trial.interventionModelDescription'), text: design.value?.intervention_model_description },
556
+ { label: t('oipScience.trial.maskingDescription'), text: design.value?.masking_description },
557
+ { label: t('oipScience.trial.biospecimenDescription'), text: trial.value?.biospec_description },
558
+ ].filter((note) => note.text)
559
+ );
560
+
561
+ // :::::::::::::::::::::::::::::
562
+ // BRANCHES ET INTERVENTIONS
563
+
564
+ const isCohort = computed(() => !trial.value?.number_of_arms && !!trial.value?.number_of_groups);
565
+
566
+ // Une ligne par design_group : les lignes de la jointure se fondent par id.
567
+ const resultDesignGroupsInterventions = computed(() => {
568
+ const list = trial.value?.resultDesignGroupsInterventions;
569
+ if (!Array.isArray(list)) return [];
570
+
571
+ const idMap = list.reduce((result: Record<string, any>, current: { design_group_id?: string }) => {
572
+ if (current.design_group_id && result[current.design_group_id] == null) {
573
+ result[current.design_group_id] = { ...current };
574
+ } else if (current.design_group_id) {
575
+ Object.assign(result[current.design_group_id], current);
576
+ }
577
+ return result;
578
+ }, {});
579
+
580
+ return Object.values(idMap) as Record<string, any>[];
581
+ });
582
+
583
+ const otherNamesById = computed(() => {
584
+ const map = new Map<string, string>();
585
+ for (const inter of (trial.value?.intervention ?? []) as Record<string, any>[]) {
586
+ if (inter.intervention_id != null && inter.intervention_other_name) {
587
+ map.set(String(inter.intervention_id), inter.intervention_other_name);
588
+ }
589
+ }
590
+ return map;
591
+ });
592
+
593
+ const armRows = computed(() =>
594
+ resultDesignGroupsInterventions.value.map((arm) => {
595
+ const linked = (trial.value?.armAndInterventionList ?? []).filter(
596
+ (x) => x.design_group_id === arm.design_group_id
597
+ );
598
+ // Sans jointure bras/intervention (etudes observationnelles), l'intervention
599
+ // est portee par la ligne du groupe elle-meme.
600
+ const interventions = linked.length
601
+ ? linked.map((x: Record<string, any>) => ({
602
+ type: x.intervention_type,
603
+ name: x.name,
604
+ description: x.description,
605
+ otherNames: otherNamesById.value.get(String(x.intervention_id)),
606
+ }))
607
+ : arm.intervention_name
608
+ ? [{ type: arm.intervention_type, name: arm.intervention_name, description: arm.intervention_description }]
609
+ : [];
610
+ return {
611
+ group_type: arm.group_type,
612
+ title: arm.title,
613
+ description: arm.description,
614
+ interventions,
615
+ };
616
+ })
617
+ );
618
+
619
+ const interventionRows = computed(() =>
620
+ ((trial.value?.intervention ?? []) as any[]).map((i) => ({
621
+ type: i.intervention_type,
622
+ name: i.intervention_name,
623
+ description: i.intervention_description,
624
+ }))
625
+ );
626
+
627
+ // :::::::::::::::::::::::::::::
628
+ // OUTCOMES
629
+
630
+ const outcomeGroups = computed(() => {
631
+ const outcomes = (trial.value?.design_outcomes ?? []) as Record<string, any>[];
632
+ return [
633
+ { type: 'primary', label: t('oipScience.trial.outcomePrimary') },
634
+ { type: 'secondary', label: t('oipScience.trial.outcomeSecondary') },
635
+ { type: 'other', label: t('oipScience.trial.outcomeOther') },
636
+ ]
637
+ .map((g) => ({ ...g, items: outcomes.filter((o) => o.outcome_type === g.type) }))
638
+ .filter((g) => g.items.length);
639
+ });
640
+
641
+ // :::::::::::::::::::::::::::::
642
+ // ELIGIBILITY
643
+
644
+ const eligibleAges = computed(() => {
645
+ const min = eligibility.value?.minimum_age;
646
+ const max = eligibility.value?.maximum_age;
647
+ if (min && max) return t('oipScience.trial.agesRange', { min, max });
648
+ if (min) return t('oipScience.trial.agesMin', { min });
649
+ if (max) return t('oipScience.trial.agesMax', { max });
650
+ return 'N/A';
651
+ });
652
+
653
+ // Le texte CT.gov porte ses intertitres « Inclusion Criteria: » et
654
+ // « Exclusion Criteria: » sur leur propre ligne. On coupe dessus ; si le texte
655
+ // ne suit pas ce format, il sort d'un bloc.
656
+ const criteria = computed(() => {
657
+ const text = eligibility.value?.criteria;
658
+ if (!text) return null;
659
+ const parts = text.split(/^\s*exclusion criteria\s*:?\s*$/im);
660
+ if (parts.length !== 2) return { all: text };
661
+ return {
662
+ inclusion: (parts[0] ?? '').replace(/^\s*inclusion criteria\s*:?\s*$/im, '').trim(),
663
+ exclusion: (parts[1] ?? '').trim(),
664
+ };
665
+ });
666
+
667
+ // :::::::::::::::::::::::::::::
668
+ // DOCUMENTS & LINKS
669
+
670
+ // Un meme document revient parfois en double dans la jointure : on dedoublonne
671
+ // sur type + id + url.
672
+ const studyDocuments = computed(() => {
673
+ const seen = new Set<string>();
674
+ return ((trial.value?.documents ?? []) as Record<string, any>[])
675
+ .map((d) => ({
676
+ key: `${d.document_type}|${d.document_id}|${d.url}`,
677
+ type: d.document_type || t('oipScience.trial.document'),
678
+ id: d.document_id,
679
+ url: d.url,
680
+ comment: d.comment,
681
+ isPdf: /\.pdf($|\?)/i.test(String(d.url ?? '')),
682
+ }))
683
+ .filter((d) => (seen.has(d.key) ? false : (seen.add(d.key), true)));
684
+ });
685
+
686
+ // Fiche CT.gov d'abord, puis les sites declares par le sponsor et le lien IPD.
687
+ const websiteLinks = computed(() => {
688
+ const links = [
689
+ { label: t('oipScience.trial.ctgovRecord'), url: `https://clinicaltrials.gov/study/${trial.value?.nct_id}` },
690
+ ...((trial.value?.links_t ?? []) as Record<string, any>[])
691
+ .filter((l) => l.url)
692
+ .map((l) => ({ label: l.description || l.url, url: l.url })),
693
+ ];
694
+ if (trial.value?.ipd_url) links.push({ label: t('oipScience.trial.ipdSharingLink'), url: trial.value.ipd_url });
695
+ return links.filter((l, i) => links.findIndex((x) => x.url === l.url) === i);
696
+ });
697
+
698
+ // Champs date NCT, chacun accompagne de son `_type` (ACTUAL / ESTIMATED).
699
+ const dateRows = computed(() => {
700
+ const r = trial.value ?? ({} as Record<string, any>);
701
+ const rows = [
702
+ {
703
+ field: 'study_first_posted_date',
704
+ label: t('oipScience.trial.dateFirstPosted'),
705
+ desc: t('oipScience.trial.dateFirstPostedDesc'),
706
+ },
707
+ { field: 'start_date', label: t('oipScience.trial.dateStudyStart'), desc: t('oipScience.trial.dateStudyStartDesc') },
708
+ {
709
+ field: 'primary_completion_date',
710
+ label: t('oipScience.trial.primaryCompletion'),
711
+ desc: t('oipScience.trial.datePrimaryCompletionDesc'),
712
+ },
713
+ {
714
+ field: 'completion_date',
715
+ label: t('oipScience.trial.dateStudyCompletion'),
716
+ desc: t('oipScience.trial.dateStudyCompletionDesc'),
717
+ },
718
+ {
719
+ field: 'results_first_posted_date',
720
+ label: t('oipScience.trial.dateResultsFirstPosted'),
721
+ desc: t('oipScience.trial.dateResultsFirstPostedDesc'),
722
+ },
723
+ {
724
+ field: 'disposition_first_posted_date',
725
+ label: t('oipScience.trial.dateDispositionFirstPosted'),
726
+ desc: t('oipScience.trial.dateDispositionFirstPostedDesc'),
727
+ },
728
+ {
729
+ field: 'last_update_posted_date',
730
+ label: t('oipScience.trial.dateLastUpdatePosted'),
731
+ desc: t('oipScience.trial.dateLastUpdatePostedDesc'),
732
+ },
733
+ // Dates de depot, sans `_type` : la table seulement, pas la frise.
734
+ {
735
+ field: 'study_first_submitted_date',
736
+ label: t('oipScience.trial.dateFirstSubmitted'),
737
+ desc: t('oipScience.trial.dateFirstSubmittedDesc'),
738
+ timeline: false,
739
+ },
740
+ {
741
+ field: 'study_first_submitted_qc_date',
742
+ label: t('oipScience.trial.dateFirstSubmittedQc'),
743
+ desc: t('oipScience.trial.dateFirstSubmittedQcDesc'),
744
+ timeline: false,
745
+ },
746
+ {
747
+ field: 'results_first_submitted_date',
748
+ label: t('oipScience.trial.dateResultsFirstSubmitted'),
749
+ desc: t('oipScience.trial.dateResultsFirstSubmittedDesc'),
750
+ timeline: false,
751
+ },
752
+ {
753
+ field: 'last_update_submitted_date',
754
+ label: t('oipScience.trial.dateLastUpdateSubmitted'),
755
+ desc: t('oipScience.trial.dateLastUpdateSubmittedDesc'),
756
+ timeline: false,
757
+ },
758
+ {
759
+ field: 'verification_date',
760
+ label: t('oipScience.trial.dateLastVerified'),
761
+ desc: t('oipScience.trial.dateLastVerifiedDesc'),
762
+ timeline: false,
763
+ },
764
+ ];
765
+ return rows.map((row) => ({
766
+ ...row,
767
+ date: r[row.field],
768
+ estimated: isEstimated(r[`${row.field}_type`]),
769
+ }));
770
+ });
771
+
772
+ const keyDates = computed(() => dateRows.value.filter((row) => row.date && row.timeline !== false));
773
+
774
+ // All dates : la table de reference, tous les champs, vides compris. La date
775
+ // tombe dans la colonne de son type ; sans type, elle passe en Actual.
776
+ const allDatesRows = computed(() =>
777
+ dateRows.value.map((row) => ({
778
+ field: row.field,
779
+ anticipated: row.date && row.estimated ? row.date : null,
780
+ actual: row.date && !row.estimated ? row.date : null,
781
+ desc: row.desc,
782
+ }))
783
+ );
784
+
785
+ // Le sommaire defile le conteneur de la fiche (cadre ou tiroir de projet).
786
+ const root = ref<HTMLElement | null>(null);
787
+ const { chaptersOffset, stickyTop, scrollToChapter } = useOipChapterScroll(root);
788
+
789
+ const chaptersList = computed(() =>
790
+ [
791
+ { label: t('oipScience.trial.overview'), value: 'summary', show: true },
792
+ { label: t('oipScience.trial.conditionsAndKeywords'), value: 'conditions', show: hasConditionsBlock.value },
793
+ { label: t('oipScience.trial.studyDesign'), value: 'study-design', show: true },
794
+ {
795
+ label: t('oipScience.trial.armsAndInterventions'),
796
+ value: 'arms-and-intervention',
797
+ show: armRows.value.length > 0 || interventionRows.value.length > 0,
798
+ },
799
+ { label: t('oipScience.trial.outcomeMeasures'), value: 'outcome-measures', show: outcomeGroups.value.length > 0 },
800
+ { label: t('oipScience.trial.eligibilityCriteria'), value: 'eligibility-criteria', show: true },
801
+ { label: t('oipScience.trial.documentsAndLinks'), value: 'documents-and-links', show: true },
802
+ { label: t('oipScience.trial.keyDates'), value: 'key-dates', show: keyDates.value.length > 0 },
803
+ { label: t('oipScience.trial.allDates'), value: 'all-dates', show: true },
804
+
805
+ ]
806
+ .filter((c) => c.show)
807
+ .map(({ label, value }) => ({ label, value }))
808
+ );
809
+ </script>
810
+
811
+ <style scoped>
812
+ .chapters_col {
813
+ flex: 0 0 auto;
814
+ }
815
+ .chapters_sticky {
816
+ position: sticky;
817
+ }
818
+
819
+ .sd-page {
820
+ display: flex;
821
+ flex-direction: column;
822
+ gap: 16px;
823
+ min-width: 0;
824
+ }
825
+ .sd-section {
826
+ display: flex;
827
+ flex-direction: column;
828
+ gap: 20px;
829
+ }
830
+ .sd-block {
831
+ display: flex;
832
+ flex-direction: column;
833
+ gap: 8px;
834
+ }
835
+ .sd-h1 {
836
+ font-family: var(--font-display, Caudex, serif);
837
+ font-size: 20px;
838
+ font-weight: 700;
839
+ color: var(--text-primary);
840
+ margin: 0;
841
+ }
842
+ .sd-h2 {
843
+ font-size: 13px;
844
+ font-weight: 600;
845
+ letter-spacing: 0.02em;
846
+ text-transform: uppercase;
847
+ color: var(--text-secondary);
848
+ margin: 0;
849
+ }
850
+ .sd-hint {
851
+ text-transform: none;
852
+ font-weight: 500;
853
+ color: var(--text-muted);
854
+ }
855
+ .sd-prose {
856
+ white-space: pre-wrap;
857
+ line-height: 1.6;
858
+ max-width: 80ch;
859
+ }
860
+ .sd-muted {
861
+ color: var(--text-secondary);
862
+ font-size: 13px;
863
+ line-height: 1.5;
864
+ }
865
+ .sd-tags {
866
+ display: flex;
867
+ flex-wrap: wrap;
868
+ align-items: center;
869
+ gap: 8px;
870
+ }
871
+
872
+ /* Overview */
873
+ .sd-overview-head {
874
+ display: flex;
875
+ flex-wrap: wrap;
876
+ justify-content: space-between;
877
+ align-items: center;
878
+ gap: 12px;
879
+ }
880
+ .sd-external {
881
+ display: inline-flex;
882
+ align-items: center;
883
+ gap: 4px;
884
+ font-size: 13px;
885
+ font-weight: 500;
886
+ color: var(--color-primary, var(--primary));
887
+ text-decoration: none;
888
+ }
889
+ .sd-external:hover {
890
+ text-decoration: underline;
891
+ }
892
+ .sd-kpis {
893
+ display: grid;
894
+ grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
895
+ gap: 12px;
896
+ }
897
+
898
+ /* Faits (design, eligibilite) */
899
+ .sd-facts {
900
+ display: grid;
901
+ grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
902
+ gap: 1px;
903
+ margin: 0;
904
+ background: var(--border-default);
905
+ border: 1px solid var(--border-default);
906
+ border-radius: 8px;
907
+ overflow: hidden;
908
+ }
909
+ .sd-fact {
910
+ background: var(--bg-surface);
911
+ padding: 12px 14px;
912
+ }
913
+ .sd-fact dt {
914
+ font-size: 12px;
915
+ color: var(--text-muted);
916
+ margin-bottom: 4px;
917
+ }
918
+ .sd-fact dd {
919
+ margin: 0;
920
+ font-size: 14px;
921
+ font-weight: 600;
922
+ color: var(--text-primary);
923
+ }
924
+
925
+ /* Cellules de tables */
926
+ .sd-cell {
927
+ display: flex;
928
+ flex-direction: column;
929
+ gap: 4px;
930
+ }
931
+ .sd-cell-list {
932
+ display: flex;
933
+ flex-direction: column;
934
+ gap: 12px;
935
+ }
936
+ .sd-cell-title {
937
+ font-weight: 600;
938
+ color: var(--text-primary);
939
+ margin: 0;
940
+ }
941
+ .sd-cell-tag {
942
+ margin-right: 6px;
943
+ }
944
+ /* RmTextHighlight est un bloc : apres un libelle ou un type sur la meme
945
+ ligne, on le remet dans le flux du texte. */
946
+ .sd-inline,
947
+ .sd-inline :deep(.rm-thl__body) {
948
+ display: inline;
949
+ }
950
+ .sd-kind {
951
+ font-size: 11px;
952
+ font-weight: 600;
953
+ text-transform: uppercase;
954
+ letter-spacing: 0.03em;
955
+ color: var(--text-muted);
956
+ margin-right: 4px;
957
+ }
958
+
959
+ /* Outcomes */
960
+ .sd-outcomes {
961
+ list-style: none;
962
+ counter-reset: outcome;
963
+ margin: 0;
964
+ padding: 0;
965
+ display: flex;
966
+ flex-direction: column;
967
+ gap: 12px;
968
+ }
969
+ .sd-outcome {
970
+ counter-increment: outcome;
971
+ position: relative;
972
+ padding: 0 0 12px 32px;
973
+ border-bottom: 1px solid var(--border-default);
974
+ display: flex;
975
+ flex-direction: column;
976
+ gap: 4px;
977
+ }
978
+ .sd-outcome:last-child {
979
+ border-bottom: 0;
980
+ padding-bottom: 0;
981
+ }
982
+ .sd-outcome::before {
983
+ content: counter(outcome);
984
+ position: absolute;
985
+ left: 0;
986
+ top: 0;
987
+ width: 22px;
988
+ height: 22px;
989
+ border-radius: 50%;
990
+ background: var(--bg-surface-2);
991
+ color: var(--text-secondary);
992
+ font-size: 12px;
993
+ font-weight: 600;
994
+ display: grid;
995
+ place-items: center;
996
+ }
997
+ .sd-meta {
998
+ display: inline-flex;
999
+ align-items: center;
1000
+ gap: 6px;
1001
+ font-size: 12px;
1002
+ color: var(--text-muted);
1003
+ margin: 0;
1004
+ }
1005
+
1006
+ /* Eligibilite */
1007
+ .sd-criteria {
1008
+ display: grid;
1009
+ grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
1010
+ gap: 16px;
1011
+ }
1012
+ .sd-criteria-col {
1013
+ display: flex;
1014
+ flex-direction: column;
1015
+ gap: 8px;
1016
+ padding: 16px;
1017
+ border-radius: 8px;
1018
+ background: var(--bg-surface-2);
1019
+ border-left: 3px solid var(--border-default);
1020
+ }
1021
+ .sd-criteria-col--in {
1022
+ border-left-color: var(--color-success, #2e9e6a);
1023
+ }
1024
+ .sd-criteria-col--out {
1025
+ border-left-color: var(--color-danger, #d64545);
1026
+ }
1027
+
1028
+ /* Frise des dates */
1029
+ .sd-timeline {
1030
+ list-style: none;
1031
+ margin: 0;
1032
+ padding: 0;
1033
+ }
1034
+ .sd-step {
1035
+ position: relative;
1036
+ display: flex;
1037
+ gap: 14px;
1038
+ padding-bottom: 16px;
1039
+ }
1040
+ .sd-step:not(:last-child)::before {
1041
+ content: '';
1042
+ position: absolute;
1043
+ left: 5px;
1044
+ top: 14px;
1045
+ bottom: 0;
1046
+ width: 2px;
1047
+ background: var(--border-default);
1048
+ }
1049
+ .sd-dot {
1050
+ /* border-box : sans lui, la bordure elargit la pastille a 16px et son
1051
+ centre sort de l'axe du trait (6px). */
1052
+ box-sizing: border-box;
1053
+ position: relative;
1054
+ z-index: 1;
1055
+ flex: 0 0 12px;
1056
+ height: 12px;
1057
+ margin-top: 4px;
1058
+ border-radius: 50%;
1059
+ background: var(--color-primary, var(--primary));
1060
+ border: 2px solid var(--color-primary, var(--primary));
1061
+ }
1062
+ .sd-step--estimated .sd-dot {
1063
+ background: var(--bg-surface);
1064
+ border-style: dashed;
1065
+ }
1066
+ .sd-step-body {
1067
+ display: flex;
1068
+ flex-direction: column;
1069
+ gap: 2px;
1070
+ }
1071
+ .sd-step-head {
1072
+ display: flex;
1073
+ flex-wrap: wrap;
1074
+ align-items: center;
1075
+ gap: 8px;
1076
+ margin: 0;
1077
+ }
1078
+ .sd-step-label {
1079
+ font-weight: 600;
1080
+ color: var(--text-primary);
1081
+ }
1082
+ .sd-step-date {
1083
+ font-variant-numeric: tabular-nums;
1084
+ color: var(--text-primary);
1085
+ }
1086
+
1087
+ /* All dates */
1088
+ .sd-code {
1089
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
1090
+ font-size: 12px;
1091
+ font-weight: 600;
1092
+ color: var(--color-primary, var(--primary));
1093
+ background: var(--bg-surface-2);
1094
+ padding: 2px 6px;
1095
+ border-radius: 4px;
1096
+ word-break: break-all;
1097
+ }
1098
+ .sd-na {
1099
+ color: var(--text-muted);
1100
+ font-style: italic;
1101
+ font-size: 12px;
1102
+ }
1103
+ /* Documents & links */
1104
+ .sd-links {
1105
+ list-style: none;
1106
+ margin: 0;
1107
+ padding: 0;
1108
+ display: flex;
1109
+ flex-direction: column;
1110
+ gap: 12px;
1111
+ }
1112
+ .sd-link {
1113
+ display: flex;
1114
+ gap: 10px;
1115
+ align-items: flex-start;
1116
+ }
1117
+ .sd-link-icon {
1118
+ flex: 0 0 auto;
1119
+ margin-top: 2px;
1120
+ color: var(--text-muted);
1121
+ }
1122
+ .sd-link-title {
1123
+ display: inline-flex;
1124
+ align-items: center;
1125
+ gap: 4px;
1126
+ font-weight: 600;
1127
+ color: var(--color-primary, var(--primary));
1128
+ text-decoration: none;
1129
+ }
1130
+ .sd-link-title:hover {
1131
+ text-decoration: underline;
1132
+ }
1133
+ .sd-url {
1134
+ word-break: break-all;
1135
+ }
1136
+ </style>